push_package 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +10 -1
- data/lib/push_package/version.rb +1 -1
- data/lib/push_package.rb +5 -0
- data/spec/fixtures/self-signed.p12 +0 -0
- data/spec/push_package_spec.rb +3 -3
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -1,24 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
push_package (0.1.
|
4
|
+
push_package (0.1.2)
|
5
5
|
rubyzip (~> 1.1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
coderay (1.0.9)
|
11
|
+
ffi (1.9.3-java)
|
11
12
|
method_source (0.8.2)
|
12
13
|
minitest (4.7.0)
|
13
14
|
pry (0.9.12.2)
|
14
15
|
coderay (~> 1.0.5)
|
15
16
|
method_source (~> 0.8)
|
16
17
|
slop (~> 3.4)
|
18
|
+
pry (0.9.12.2-java)
|
19
|
+
coderay (~> 1.0.5)
|
20
|
+
method_source (~> 0.8)
|
21
|
+
slop (~> 3.4)
|
22
|
+
spoon (~> 0.0)
|
17
23
|
rake (10.0.3)
|
18
24
|
rubyzip (1.1.0)
|
19
25
|
slop (3.4.6)
|
26
|
+
spoon (0.0.4)
|
27
|
+
ffi
|
20
28
|
|
21
29
|
PLATFORMS
|
30
|
+
java
|
22
31
|
ruby
|
23
32
|
|
24
33
|
DEPENDENCIES
|
data/lib/push_package/version.rb
CHANGED
data/lib/push_package.rb
CHANGED
@@ -29,6 +29,11 @@ class PushPackage
|
|
29
29
|
else
|
30
30
|
cert_data = File.read(certificate)
|
31
31
|
end
|
32
|
+
|
33
|
+
if defined?(JRUBY_VERSION)
|
34
|
+
#ensure binary data for jruby.
|
35
|
+
cert_data.force_encoding(Encoding::ASCII_8BIT)
|
36
|
+
end
|
32
37
|
@p12 = OpenSSL::PKCS12.new(cert_data, password)
|
33
38
|
end
|
34
39
|
|
Binary file
|
data/spec/push_package_spec.rb
CHANGED
@@ -39,13 +39,13 @@ describe PushPackage do
|
|
39
39
|
describe '.new' do
|
40
40
|
it 'should check website_params' do
|
41
41
|
lambda do
|
42
|
-
PushPackage.new({}, iconset_path, certificate)
|
42
|
+
PushPackage.new({}, iconset_path, certificate, 'testing')
|
43
43
|
end.must_raise(PushPackage::InvalidParameterError)
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'must have a valid iconset' do
|
47
47
|
lambda do
|
48
|
-
PushPackage.new(website_params, '/tmp', certificate)
|
48
|
+
PushPackage.new(website_params, '/tmp', certificate, 'testing')
|
49
49
|
end.must_raise(PushPackage::InvalidIconsetError)
|
50
50
|
end
|
51
51
|
|
@@ -72,7 +72,7 @@ describe PushPackage do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
let(:push_package) { PushPackage.new(website_params, iconset_path, certificate) }
|
75
|
+
let(:push_package) { PushPackage.new(website_params, iconset_path, certificate, 'testing') }
|
76
76
|
|
77
77
|
before do
|
78
78
|
push_package.save(output_path)
|
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.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-12-
|
13
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubyzip
|