pem 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1444bbb3ee47eefe111bf4c9863dab47a84990bc
4
- data.tar.gz: 8bb071c17533e7bddacd50d42a4bf91f458ce459
3
+ metadata.gz: d3fb1f2e0ff5006340509dd8fd5e12cfcfa29948
4
+ data.tar.gz: 18d05eb2b6ed877db05c0caede1aeeb4506b5d50
5
5
  SHA512:
6
- metadata.gz: b9f7f5fa3e9f3b94b6ac318d54bca93dad8f4873b5cc4fbce669d8ff3d7558b4729f896ac7b8bc7d80e6d3f6b9ecb7fd72803a401401a3bcad0344d022d3affd
7
- data.tar.gz: 236ee6bf7a1746463aad5c0ae426b2734cb9e41ca3ac54ac96fbe84d8e7799f18fa477699f2f61182c7cea9ea6860aae95b0d3fb2c60710fd97914949f0faf22
6
+ metadata.gz: b5baa66437cc974ed0f32fde7ecdf3f6ea938b5bd821f74badde5f59c9936568aec3a06da70c44c922870fb09c9bd99615c19d2ba969e2af5ebc0f2b62ad39b4
7
+ data.tar.gz: 43dc8420ef464e9f3c2b3bd142e50745234f676a2313b50f8e463310dc098786b17441efd3a8100235efb7c94f7269752546522a6b4d1b27359ea8bfde3dc079
data/README.md CHANGED
@@ -37,7 +37,9 @@ pem
37
37
 
38
38
  Tired of manually creating and maintaining your push notification profiles for your iOS apps? Tired of generating a `pem` file for your server?
39
39
 
40
- `pem` does all that for, just by running `pem`.
40
+ `pem` does all that for, just by simply running `pem`.
41
+
42
+ `pem` creates new .pem, .cer, and .p12 files to be uploaded to your push server if a valid push notification profile is needed. `pem` does not cover uploading the file to your server.
41
43
 
42
44
  To automate iOS Provisioning profiles you can use [sigh](https://github.com/fastlane/fastlane/tree/master/sigh).
43
45
 
@@ -115,7 +117,7 @@ To get a list of available options run:
115
117
  ### Note about empty `p12` passwords and Keychain Access.app
116
118
 
117
119
  `pem` will produce a valid `p12` without specifying a password, or using the empty-string as the password.
118
- While the file is valid, Mac OSX's Keychain Access will not allow you to open the file without specifing a passphrase.
120
+ While the file is valid, Mac OSX's Keychain Access will not allow you to open the file without specifying a passphrase.
119
121
 
120
122
  Instead, you may verify the file is valid using OpenSSL:
121
123
 
data/bin/pem CHANGED
@@ -1,48 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  $:.push File.expand_path("../../lib", __FILE__)
4
3
 
5
4
  require 'pem'
6
- require 'commander'
7
- require 'credentials_manager/appfile_config'
8
- require 'pem/manager'
9
-
10
- HighLine.track_eof = false
11
-
12
- class PemApplication
13
- include Commander::Methods
14
-
15
- def run
16
- program :version, PEM::VERSION
17
- program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles'
18
- program :help, 'Author', 'Felix Krause <pem@krausefx.com>'
19
- program :help, 'Website', 'https://fastlane.tools'
20
- program :help, 'GitHub', 'https://github.com/fastlane/PEM'
21
- program :help_formatter, :compact
22
-
23
- global_option('--verbose') { $verbose = true }
24
-
25
- FastlaneCore::CommanderGenerator.new.generate(PEM::Options.available_options)
26
-
27
- command :renew do |c|
28
- c.syntax = 'pem renew'
29
- c.description = 'Renews the certificate (in case it expired) and shows the path to the generated pem file'
30
-
31
- c.action do |args, options|
32
- PEM.config = FastlaneCore::Configuration.create(PEM::Options.available_options, options.__hash__)
33
- PEM::Manager.start
34
- end
35
- end
36
-
37
- default_command :renew
38
-
39
- run!
40
- end
41
- end
42
-
43
- begin
44
- FastlaneCore::UpdateChecker.start_looking_for_update('pem')
45
- PemApplication.new.run
46
- ensure
47
- FastlaneCore::UpdateChecker.show_update_status('pem', PEM::VERSION)
48
- end
5
+ require 'pem/commands_generator'
6
+ PEM::CommandsGenerator.start
@@ -0,0 +1,43 @@
1
+ require 'commander'
2
+
3
+ HighLine.track_eof = false
4
+
5
+ module PEM
6
+ class CommandsGenerator
7
+ include Commander::Methods
8
+
9
+ def self.start
10
+ FastlaneCore::UpdateChecker.start_looking_for_update('pem')
11
+ self.new.run
12
+ ensure
13
+ FastlaneCore::UpdateChecker.show_update_status('pem', PEM::VERSION)
14
+ end
15
+
16
+ def run
17
+ program :version, PEM::VERSION
18
+ program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles'
19
+ program :help, 'Author', 'Felix Krause <pem@krausefx.com>'
20
+ program :help, 'Website', 'https://fastlane.tools'
21
+ program :help, 'GitHub', 'https://github.com/fastlane/PEM'
22
+ program :help_formatter, :compact
23
+
24
+ global_option('--verbose') { $verbose = true }
25
+
26
+ FastlaneCore::CommanderGenerator.new.generate(PEM::Options.available_options)
27
+
28
+ command :renew do |c|
29
+ c.syntax = 'pem renew'
30
+ c.description = 'Renews the certificate (in case it expired) and shows the path to the generated pem file'
31
+
32
+ c.action do |args, options|
33
+ PEM.config = FastlaneCore::Configuration.create(PEM::Options.available_options, options.__hash__)
34
+ PEM::Manager.start
35
+ end
36
+ end
37
+
38
+ default_command :renew
39
+
40
+ run!
41
+ end
42
+ end
43
+ end
@@ -6,7 +6,7 @@ module PEM
6
6
  class Manager
7
7
  class << self
8
8
  def start
9
- FastlaneCore::PrintTable.print_values(config: PEM.config, hide_keys: [], title: "Summary for PEM #{PEM::VERSION}")
9
+ FastlaneCore::PrintTable.print_values(config: PEM.config, hide_keys: [:new_profile], title: "Summary for PEM #{PEM::VERSION}")
10
10
  login
11
11
 
12
12
  existing_certificate = certificate.all.detect do |c|
@@ -60,22 +60,23 @@ module PEM
60
60
  filename_base = PEM.config[:pem_name] || "#{certificate_type}_#{PEM.config[:app_identifier]}"
61
61
  filename_base = File.basename(filename_base, ".pem") # strip off the .pem if it was provided.
62
62
 
63
+ output_path = PEM.config[:output_path]
64
+ FileUtils.mkdir_p(File.expand_path(output_path))
65
+
63
66
  if PEM.config[:save_private_key]
64
- private_key_path = File.join(PEM.config[:output_path], "#{filename_base}.pkey")
67
+ private_key_path = File.join(output_path, "#{filename_base}.pkey")
65
68
  File.write(private_key_path, pkey.to_pem)
66
69
  UI.message("Private key: ".green + Pathname.new(private_key_path).realpath.to_s)
67
70
  end
68
71
 
69
72
  if PEM.config[:generate_p12]
70
- output_path = PEM.config[:output_path]
71
- FileUtils.mkdir_p(File.expand_path(output_path))
72
73
  p12_cert_path = File.join(output_path, "#{filename_base}.p12")
73
74
  p12 = OpenSSL::PKCS12.create(PEM.config[:p12_password], certificate_type, pkey, x509_certificate)
74
75
  File.write(p12_cert_path, p12.to_der)
75
76
  UI.message("p12 certificate: ".green + Pathname.new(p12_cert_path).realpath.to_s)
76
77
  end
77
78
 
78
- x509_cert_path = File.join(PEM.config[:output_path], "#{filename_base}.pem")
79
+ x509_cert_path = File.join(output_path, "#{filename_base}.pem")
79
80
  File.write(x509_cert_path, x509_certificate.to_pem + pkey.to_pem)
80
81
  UI.message("PEM: ".green + Pathname.new(x509_cert_path).realpath.to_s)
81
82
  return x509_cert_path
@@ -1,3 +1,3 @@
1
1
  module PEM
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-07 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -202,6 +202,7 @@ files:
202
202
  - README.md
203
203
  - bin/pem
204
204
  - lib/pem.rb
205
+ - lib/pem/commands_generator.rb
205
206
  - lib/pem/manager.rb
206
207
  - lib/pem/options.rb
207
208
  - lib/pem/version.rb
@@ -225,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
226
  version: '0'
226
227
  requirements: []
227
228
  rubyforge_project:
228
- rubygems_version: 2.4.0
229
+ rubygems_version: 2.4.5.1
229
230
  signing_key:
230
231
  specification_version: 4
231
232
  summary: Automatically generate and renew your push notification profiles