push_package 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -3
- data/lib/push_package.rb +1 -1
- data/lib/push_package/version.rb +1 -1
- data/push_package.gemspec +1 -1
- data/spec/push_package_spec.rb +29 -8
- 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: 993a2f7345ad1bee0c5aa221936e44e322f63b39
|
4
|
+
data.tar.gz: 09023bbe6ad97d1ebc1e3a97c7b028114aea0ec3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ee7036717ed8f3ab09912d0fc56ed497c2f13c3472371f6fd3c7cb305ee88a45b898db5a2fa69262693382a94bd3bd891767be1dbc14f0cc10039e18cfb912
|
7
|
+
data.tar.gz: f479ef6728e2744759ca348d28afc42f730d5e72c40c006835b3324cef2759fe2b0265506737af66d8800a81624fc327f06597f842c27cf928593b2f1204e386
|
data/.travis.yml
CHANGED
data/lib/push_package.rb
CHANGED
data/lib/push_package/version.rb
CHANGED
data/push_package.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
|
22
22
|
gem.add_runtime_dependency 'rubyzip', '~> 1.1', '>= 1.1.0'
|
23
23
|
|
24
|
-
gem.add_development_dependency 'minitest', '~>
|
24
|
+
gem.add_development_dependency 'minitest', '~> 5.8.4', '>= 5.8.4'
|
25
25
|
gem.add_development_dependency 'rake', '~> 10.0', '>= 10.0.3'
|
26
26
|
gem.add_development_dependency 'pry', '~> 0'
|
27
27
|
end
|
data/spec/push_package_spec.rb
CHANGED
@@ -145,6 +145,14 @@ describe PushPackage do
|
|
145
145
|
File.delete(file.path)
|
146
146
|
end
|
147
147
|
|
148
|
+
it 'supports using a Pathname for iconset_path' do
|
149
|
+
iconset_pathname = Pathname.new(iconset_path)
|
150
|
+
push_package = PushPackage.new(website_params, iconset_pathname, certificate, 'testing')
|
151
|
+
file = push_package.save
|
152
|
+
File.exist?(file.path).must_equal true
|
153
|
+
File.delete(file.path)
|
154
|
+
end
|
155
|
+
|
148
156
|
it 'should return the file handle' do
|
149
157
|
file = push_package.save(output_path)
|
150
158
|
file.must_be_instance_of File
|
@@ -194,14 +202,27 @@ describe PushPackage do
|
|
194
202
|
end
|
195
203
|
|
196
204
|
describe 'when intermediate_cert given' do
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
+
describe 'when intermediate_cert is a string' do
|
206
|
+
let(:intermediate_cert) { fixture_path('intermediate.crt') }
|
207
|
+
let(:push_package) { PushPackage.new(website_params, iconset_path, certificate, 'testing', intermediate_cert) }
|
208
|
+
|
209
|
+
it 'should have one extra cert in signature' do
|
210
|
+
extracted_package.must_include('signature')
|
211
|
+
signature = File.read(tmp_path + '/signature')
|
212
|
+
p7 = OpenSSL::PKCS7.new(signature)
|
213
|
+
p7.certificates().size.must_equal 2
|
214
|
+
end
|
215
|
+
end
|
216
|
+
describe 'when intermediate_cert is a Pathname' do
|
217
|
+
let(:intermediate_cert) { Pathname.new(fixture_path('intermediate.crt')) }
|
218
|
+
let(:push_package) { PushPackage.new(website_params, iconset_path, certificate, 'testing', intermediate_cert) }
|
219
|
+
|
220
|
+
it 'should have one extra cert in signature' do
|
221
|
+
extracted_package.must_include('signature')
|
222
|
+
signature = File.read(tmp_path + '/signature')
|
223
|
+
p7 = OpenSSL::PKCS7.new(signature)
|
224
|
+
p7.certificates().size.must_equal 2
|
225
|
+
end
|
205
226
|
end
|
206
227
|
end
|
207
228
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: push_package
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Natchev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubyzip
|
@@ -37,20 +37,20 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.8.4
|
41
41
|
- - '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 5.8.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - ~>
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
50
|
+
version: 5.8.4
|
51
51
|
- - '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 5.8.4
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rake
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|