borrower 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1e59a3d71ae928166deab39de254c1c97c50fa39
4
+ data.tar.gz: dca29734a77bdfd629acc06c8ef78175efed8815
5
+ SHA512:
6
+ metadata.gz: 9bd3974ccaa76fc8f215d1bb178f7c8ae417d70d76ea28a1a028ab61e898784879195b2a65f363e5057d2e38adab2d209358bb70ea5354cf540bb4ffad799618
7
+ data.tar.gz: 8c23d76ef0b35907cf5f74d592a2b975cae079c6b9113b0ca6220a0a0c4c46cb71c4188a5de4364246ed6ae23f4b30d4734095a323b08ff8147c09e69d8de361
@@ -1,3 +1,3 @@
1
1
  module Borrower
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
data/lib/borrower.rb CHANGED
@@ -39,7 +39,7 @@ module Borrower::DSL
39
39
  on_conflict = options.delete(:on_conflict) { nil }
40
40
  content = Borrower.take(path)
41
41
 
42
- if content.ascii_only?
42
+ if content.valid_encoding?
43
43
  content = Borrower.merge(content, options) if options.fetch(:merge) { false }
44
44
  content = yield content if block_given?
45
45
  end
@@ -92,6 +92,17 @@ describe Borrower do
92
92
  expect( File.exists?(binary_dest) ).to be_true
93
93
  end
94
94
 
95
+ it "doesn't skip block manipulation of odd, but utf-8 files" do
96
+ source = File.join( Dir.pwd, 'spec/fixture', 'non_ascii.txt' )
97
+ dest = File.join( TMP, 'non_ascii.txt' )
98
+
99
+ borrow source, to: dest do |f|
100
+ "woo"
101
+ end
102
+ expect( File.exists?(dest) ).to be_true
103
+ expect( IO.read(dest) ).to eq "woo"
104
+ end
105
+
95
106
  end
96
107
 
97
108
  describe "on_conflict options" do
data/spec/spec_helper.rb CHANGED
@@ -30,7 +30,17 @@ def cleanup_tmp
30
30
  `rm -rf #{TMP}`
31
31
  end
32
32
 
33
- require 'coveralls'
34
- Coveralls.wear!
33
+ if ENV['TRAVIS'] || ENV['COVERAGE']
34
+ require 'simplecov'
35
+
36
+ if ENV['TRAVIS']
37
+ require 'coveralls'
38
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
39
+ end
40
+
41
+ SimpleCov.start do
42
+ add_filter '/spec/'
43
+ end
44
+ end
35
45
 
36
46
  require 'borrower'
metadata CHANGED
@@ -1,48 +1,44 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: borrower
3
- version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.1
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Steven Sloan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-12 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+
12
+ date: 2014-01-23 00:00:00 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 2.6.5
22
- type: :runtime
23
16
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
29
21
  version: 2.6.5
30
- description: ! ' For borrowing little snippets of the web, or files, or really any
31
- snippet of string. '
32
- email:
22
+ type: :runtime
23
+ version_requirements: *id001
24
+ description: " For borrowing little snippets of the web, or files, or really any snippet of string. "
25
+ email:
33
26
  - stevenosloan@gmail.com
34
27
  executables: []
28
+
35
29
  extensions: []
30
+
36
31
  extra_rdoc_files: []
37
- files:
32
+
33
+ files:
34
+ - lib/borrower.rb
38
35
  - lib/borrower/content.rb
39
- - lib/borrower/manifest/config_file.rb
40
36
  - lib/borrower/manifest.rb
37
+ - lib/borrower/manifest/config_file.rb
41
38
  - lib/borrower/merge.rb
42
39
  - lib/borrower/public_api.rb
43
40
  - lib/borrower/util.rb
44
41
  - lib/borrower/version.rb
45
- - lib/borrower.rb
46
42
  - spec/borrower/manifest_spec.rb
47
43
  - spec/borrower/merge_spec.rb
48
44
  - spec/borrower/public_api_spec.rb
@@ -51,37 +47,36 @@ files:
51
47
  - spec/support/fake_stdin.rb
52
48
  - spec/support/given.rb
53
49
  homepage: http://github.com/stevenosloan/borrower
54
- licenses:
50
+ licenses:
55
51
  - MIT
52
+ metadata: {}
53
+
56
54
  post_install_message:
57
55
  rdoc_options: []
58
- require_paths:
56
+
57
+ require_paths:
59
58
  - lib
60
- required_ruby_version: !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
66
- required_rubygems_version: !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ! '>='
70
- - !ruby/object:Gem::Version
71
- version: '0'
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - &id002
62
+ - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - *id002
72
68
  requirements: []
69
+
73
70
  rubyforge_project:
74
- rubygems_version: 1.8.25
71
+ rubygems_version: 2.2.0
75
72
  signing_key:
76
- specification_version: 3
77
- summary: For borrowing little snippets of the web, or files, or really any snippet
78
- of string.
79
- test_files:
73
+ specification_version: 4
74
+ summary: For borrowing little snippets of the web, or files, or really any snippet of string.
75
+ test_files:
76
+ - spec/borrower_spec.rb
77
+ - spec/spec_helper.rb
80
78
  - spec/borrower/manifest_spec.rb
81
79
  - spec/borrower/merge_spec.rb
82
80
  - spec/borrower/public_api_spec.rb
83
- - spec/borrower_spec.rb
84
- - spec/spec_helper.rb
85
81
  - spec/support/fake_stdin.rb
86
82
  - spec/support/given.rb
87
- has_rdoc: