borrower 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/borrower/content.rb +1 -6
- data/lib/borrower/version.rb +1 -1
- data/spec/borrower/manifest_spec.rb +3 -3
- data/spec/borrower_spec.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d90c3e9d6950afa0c8942ef3a71bb393953fd3f5
|
4
|
+
data.tar.gz: 52ae2f956617ebe0be6ddb61f96e35e953bba2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0ced1e4bec90b41e4e1af22898a7b4043a776c2d5dc6ee08ef2bcc55f03a0bd3dd8d67cb3ca770503e4baf7c8b8b1006deb0a586872a31f04edad7fcc68d9a2
|
7
|
+
data.tar.gz: ad05e03f3aafdf6d2ceb72f55ad18e02c5316fac1c0718d6adc4755e1bf9e912b108b62d41fd260b31274451d5b1dad65c5467b4d0ed79c8fb596e2411b6f27d
|
data/lib/borrower/content.rb
CHANGED
@@ -74,12 +74,7 @@ module Borrower
|
|
74
74
|
def get_response path
|
75
75
|
uri = URI.parse(path)
|
76
76
|
request = Net::HTTP.new(uri.host, uri.port)
|
77
|
-
|
78
|
-
if uri.scheme == "https"
|
79
|
-
request.use_ssl = true
|
80
|
-
request.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
81
|
-
request.ssl_version = :SSLv3
|
82
|
-
end
|
77
|
+
request.use_ssl = ( uri.scheme == "https" )
|
83
78
|
|
84
79
|
return request.get(uri.request_uri)
|
85
80
|
end
|
data/lib/borrower/version.rb
CHANGED
@@ -88,7 +88,7 @@ directories:
|
|
88
88
|
end
|
89
89
|
|
90
90
|
it "detects that it is present" do
|
91
|
-
Borrower::Manifest::ConfigFile.present?.should
|
91
|
+
Borrower::Manifest::ConfigFile.present?.should be_truthy
|
92
92
|
end
|
93
93
|
|
94
94
|
it "adds the given files to the manifest" do
|
@@ -97,8 +97,8 @@ directories:
|
|
97
97
|
end
|
98
98
|
|
99
99
|
it "add the given directories to the manifest" do
|
100
|
-
Borrower.manifest.directories.include?( base_dir ).should
|
101
|
-
Borrower.manifest.directories.include?( files_dir ).should
|
100
|
+
Borrower.manifest.directories.include?( base_dir ).should be_truthy
|
101
|
+
Borrower.manifest.directories.include?( files_dir ).should be_truthy
|
102
102
|
end
|
103
103
|
|
104
104
|
end
|
data/spec/borrower_spec.rb
CHANGED
@@ -75,13 +75,13 @@ describe Borrower do
|
|
75
75
|
it "borrows them as it would any other file" do
|
76
76
|
borrow binary_file, to: binary_dest
|
77
77
|
|
78
|
-
expect( File.exists?(binary_dest) ).to
|
78
|
+
expect( File.exists?(binary_dest) ).to be_truthy
|
79
79
|
end
|
80
80
|
|
81
81
|
it "skips merge attempts" do
|
82
82
|
borrow binary_file, to: binary_dest, merge: true
|
83
83
|
|
84
|
-
expect( File.exists?(binary_dest) ).to
|
84
|
+
expect( File.exists?(binary_dest) ).to be_truthy
|
85
85
|
end
|
86
86
|
|
87
87
|
it "skips block manipulation" do
|
@@ -89,7 +89,7 @@ describe Borrower do
|
|
89
89
|
f.gsub( "foo", "bar" )
|
90
90
|
end
|
91
91
|
|
92
|
-
expect( File.exists?(binary_dest) ).to
|
92
|
+
expect( File.exists?(binary_dest) ).to be_truthy
|
93
93
|
end
|
94
94
|
|
95
95
|
it "doesn't skip block manipulation of odd, but utf-8 files" do
|
@@ -99,7 +99,7 @@ describe Borrower do
|
|
99
99
|
borrow source, to: dest do |f|
|
100
100
|
"woo"
|
101
101
|
end
|
102
|
-
expect( File.exists?(dest) ).to
|
102
|
+
expect( File.exists?(dest) ).to be_truthy
|
103
103
|
expect( IO.read(dest) ).to eq "woo"
|
104
104
|
end
|
105
105
|
|