yes_ship_it 0.1.2 → 0.2.0
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/.gitignore +2 -0
- data/CHANGELOG.md +4 -0
- data/assertions/yes_it_shipped.rb +8 -2
- data/lib/version.rb +1 -1
- data/lib/yes_ship_it/init.rb +5 -0
- data/lib/yes_ship_it.rb +1 -0
- data/spec/integration/cli_spec.rb +10 -0
- data/spec/unit/assertions/yes_it_shipped_spec.rb +30 -7
- data/yes_ship_it.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec285a924c393af40f92c2a10434593a85391c49
|
4
|
+
data.tar.gz: 9d03622b69d49a9e8640ce7e7e7e5b19c97572a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18da7c6c0778d93c4f1722f13f5fb7bd20f0ea8b9c432b735652ceeb4385ac97b71858dd7e4f0dfe9464f4869b7cbb5048fd61d247f3ded621bd19227f7d92bc
|
7
|
+
data.tar.gz: e82dd42519fdde9fef8561662eb7cf841a45415753d72bc0fa952e8aea13d3bea990ac98ba83c72afa22ef559e0f6d6b29d1c333e567daccf3c8d9e0e75a437a
|
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,15 @@ module YSI
|
|
6
6
|
"pushed to yes-it-shipped"
|
7
7
|
end
|
8
8
|
|
9
|
+
def self.url
|
10
|
+
"https://yes-it-shipped.herokuapp.com"
|
11
|
+
end
|
12
|
+
|
13
|
+
parameter :yis_server_url, YesItShipped.url
|
14
|
+
|
9
15
|
def check
|
10
16
|
begin
|
11
|
-
RestClient.get("
|
17
|
+
RestClient.get("#{yis_server_url}/releases/#{engine.project_name}/#{engine.version}")
|
12
18
|
return "#{engine.project_name}-#{engine.version}"
|
13
19
|
rescue RestClient::ResourceNotFound
|
14
20
|
return nil
|
@@ -16,7 +22,7 @@ module YSI
|
|
16
22
|
end
|
17
23
|
|
18
24
|
def assert(executor)
|
19
|
-
executor.http_post("
|
25
|
+
executor.http_post("#{yis_server_url}/releases",
|
20
26
|
project: engine.project_name, version: engine.version,
|
21
27
|
release_date_time: engine.tag_date, project_url: engine.project_url,
|
22
28
|
release_url: engine.release_url, ysi_config_url: engine.config_url)
|
data/lib/version.rb
CHANGED
data/lib/yes_ship_it/init.rb
CHANGED
@@ -42,6 +42,11 @@ module YSI
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
out.puts
|
45
|
+
out.puts "The generated configuration includes an assertion, which publishes the release on"
|
46
|
+
out.puts "#{YesItShipped.url}, our release notification service. If you"
|
47
|
+
out.puts "prefer to not publish releases there, simply remove the `yes_it_shipped`"
|
48
|
+
out.puts "assertion."
|
49
|
+
out.puts
|
45
50
|
out.puts "Check the file `yes_ship_it.conf` and adapt it to your needs."
|
46
51
|
out.puts
|
47
52
|
out.puts "Happy shipping!"
|
data/lib/yes_ship_it.rb
CHANGED
@@ -300,6 +300,11 @@ Initialized directory for shipping.
|
|
300
300
|
|
301
301
|
Couldn't determine type of project, wrote a generic template.
|
302
302
|
|
303
|
+
The generated configuration includes an assertion, which publishes the release on
|
304
|
+
https://yes-it-shipped.herokuapp.com, our release notification service. If you
|
305
|
+
prefer to not publish releases there, simply remove the `yes_it_shipped`
|
306
|
+
assertion.
|
307
|
+
|
303
308
|
Check the file `yes_ship_it.conf` and adapt it to your needs.
|
304
309
|
|
305
310
|
Happy shipping!
|
@@ -320,6 +325,11 @@ Initialized directory for shipping.
|
|
320
325
|
|
321
326
|
It looks like this is is Ruby project.
|
322
327
|
|
328
|
+
The generated configuration includes an assertion, which publishes the release on
|
329
|
+
https://yes-it-shipped.herokuapp.com, our release notification service. If you
|
330
|
+
prefer to not publish releases there, simply remove the `yes_it_shipped`
|
331
|
+
assertion.
|
332
|
+
|
323
333
|
Check the file `yes_ship_it.conf` and adapt it to your needs.
|
324
334
|
|
325
335
|
Happy shipping!
|
@@ -17,8 +17,8 @@ describe YSI::YesItShipped do
|
|
17
17
|
}
|
18
18
|
EOT
|
19
19
|
stub_request(:get, "https://yes-it-shipped.herokuapp.com/releases/dummy/1.0.0").
|
20
|
-
|
21
|
-
|
20
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Host'=>'yes-it-shipped.herokuapp.com'}).
|
21
|
+
to_return(:status => 200, :body => body, :headers => {})
|
22
22
|
|
23
23
|
engine = YSI::Engine.new
|
24
24
|
allow(engine).to receive(:project_name).and_return("dummy")
|
@@ -29,8 +29,8 @@ EOT
|
|
29
29
|
|
30
30
|
it "fails when release is not there" do
|
31
31
|
stub_request(:get, "https://yes-it-shipped.herokuapp.com/releases/dummy/2.0.0").
|
32
|
-
|
33
|
-
|
32
|
+
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Host'=>'yes-it-shipped.herokuapp.com'}).
|
33
|
+
to_return(:status => 404, :body => "", :headers => {})
|
34
34
|
|
35
35
|
engine = YSI::Engine.new
|
36
36
|
allow(engine).to receive(:project_name).and_return("dummy")
|
@@ -53,11 +53,11 @@ EOT
|
|
53
53
|
"ysi_config_url"=>"https://raw.githubusercontent.com/cornelius/yes_ship_it/master/yes_ship_it.conf"
|
54
54
|
},
|
55
55
|
:headers => {
|
56
|
-
'Accept'=>'
|
56
|
+
'Accept'=>'*/*',
|
57
57
|
'Accept-Encoding'=>'gzip, deflate',
|
58
|
-
'Content-Length'=>'
|
58
|
+
'Content-Length'=>'334',
|
59
59
|
'Content-Type'=>'application/x-www-form-urlencoded',
|
60
|
-
'
|
60
|
+
'Host'=>'yes-it-shipped.herokuapp.com'
|
61
61
|
}).to_return(:status => 200, :body => "", :headers => {})
|
62
62
|
|
63
63
|
engine = YSI::Engine.new
|
@@ -71,4 +71,27 @@ EOT
|
|
71
71
|
expect(assertion.assert(engine.executor)).to eq("dummy-1.1.1")
|
72
72
|
end
|
73
73
|
end
|
74
|
+
|
75
|
+
it "reads yis_server_url parameter" do
|
76
|
+
config = <<EOT
|
77
|
+
assertions:
|
78
|
+
yes_it_shipped:
|
79
|
+
yis_server_url: http://localhost:3000
|
80
|
+
EOT
|
81
|
+
engine = YSI::Engine.new
|
82
|
+
engine.read_config(config)
|
83
|
+
|
84
|
+
expect(engine.assertions.first.yis_server_url).to eq("http://localhost:3000")
|
85
|
+
end
|
86
|
+
|
87
|
+
it "has default yis_server_url parameter" do
|
88
|
+
config = <<EOT
|
89
|
+
assertions:
|
90
|
+
yes_it_shipped:
|
91
|
+
EOT
|
92
|
+
engine = YSI::Engine.new
|
93
|
+
engine.read_config(config)
|
94
|
+
|
95
|
+
expect(engine.assertions.first.yis_server_url).to eq("https://yes-it-shipped.herokuapp.com")
|
96
|
+
end
|
74
97
|
end
|
data/yes_ship_it.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency "given_filesystem"
|
24
24
|
s.add_development_dependency "cli_tester", ">= 0.0.2"
|
25
25
|
s.add_development_dependency "httpotemkin"
|
26
|
-
s.add_development_dependency "webmock"
|
26
|
+
s.add_development_dependency "webmock", "~> 2.1"
|
27
27
|
|
28
28
|
s.files = `git ls-files`.split("\n")
|
29
29
|
s.require_path = 'lib'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yes_ship_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cornelius Schumacher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.1'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '2.1'
|
125
125
|
description: Whenever the answer is 'Yes, ship it!' you will need yes_ship_it. It
|
126
126
|
is the ultimate helper in releasing software..
|
127
127
|
email:
|