pipely 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipely/bundler/gem_packager.rb +7 -14
- data/lib/pipely/version.rb +1 -1
- data/spec/lib/pipely/bundler/gem_packager_spec.rb +4 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14e0eda2e643cd0b9b8fcf79b668adb5162510a8
|
4
|
+
data.tar.gz: ea9199edd89bcbc3d8b6ab71a727e2a8c69e2b56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7f3a6df462c844a132d070af1474c3b102c40ad4592531f8e9078f5523abf0b265386b8c090a12c2dd39f18d8060d9f2d1f47b448a5eb8080dadc97fc3c9b2d
|
7
|
+
data.tar.gz: d578ec42ba4eb48e6937824b2a67c6af16a7b3c700655a3d956e9584f7cce3eb1ea33b1fb8109f8a26c2db36abaa544375a67b0fbad6515d3621e43a7e508078
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'fileutils'
|
2
|
-
require '
|
2
|
+
require 'rubygems/remote_fetcher'
|
3
3
|
|
4
4
|
module Pipely
|
5
5
|
module Bundler
|
@@ -100,19 +100,12 @@ module Pipely
|
|
100
100
|
"distrubtion, for more details see LINK"
|
101
101
|
|
102
102
|
ruby_gem_url = "https://rubygems.org/downloads/#{gem_file_name}"
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
File.open(vendored_gem, 'w') { |file| file.write( response.body ) }
|
110
|
-
return vendored_gem
|
111
|
-
else
|
112
|
-
raise GemFetchError.new(
|
113
|
-
"Failed to find #{gem_file_name} at rubygems, recieved
|
114
|
-
#{response.status} with #{response.body}" )
|
115
|
-
end
|
103
|
+
|
104
|
+
fetcher = Gem::RemoteFetcher.new
|
105
|
+
gem_data = fetcher.fetch_path(ruby_gem_url)
|
106
|
+
IO.binwrite(vendored_gem, gem_data)
|
107
|
+
|
108
|
+
vendored_gem
|
116
109
|
end
|
117
110
|
end
|
118
111
|
end
|
data/lib/pipely/version.rb
CHANGED
@@ -64,29 +64,15 @@ describe Pipely::Bundler::GemPackager do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
it "downloads from rubygems" do
|
67
|
-
|
68
|
-
expect(
|
69
|
-
|
70
|
-
.
|
67
|
+
remote_fetcher = double(:remote_fetcher)
|
68
|
+
expect(Gem::RemoteFetcher).to receive(:new).and_return(remote_fetcher)
|
69
|
+
expect(remote_fetcher).to receive(:fetch_path).
|
70
|
+
with("https://rubygems.org/downloads/test-0.0.1.gem")
|
71
71
|
expect(subject.package(gem_spec)).to eq(
|
72
72
|
{"test"=>"vendor/test/test-0.0.1.gem"})
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
context "if source not available and not on rubygems" do
|
77
|
-
before do
|
78
|
-
allow(File).to receive(:directory?).with(gem_spec.gem_dir) { false }
|
79
|
-
end
|
80
|
-
|
81
|
-
it "raises" do
|
82
|
-
response = double(:response, status: 400, body: 'test')
|
83
|
-
expect(Excon).to receive(:get).with(
|
84
|
-
"https://rubygems.org/downloads/test-0.0.1.gem", anything())
|
85
|
-
.and_return(response)
|
86
|
-
|
87
|
-
expect { subject.package(gem_spec) }.to raise_error
|
88
|
-
end
|
89
|
-
end
|
90
76
|
end
|
91
77
|
end
|
92
78
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipely
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Gillooly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-graphviz
|