pem 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2764a02548a2172a9fa829b730d03390b2f6131f
4
- data.tar.gz: a3fa08d3b0e4eefdce180adcdbf0102e3551c4b1
3
+ metadata.gz: 190079e284f19718e7136a81bbd5d7c54ce68e38
4
+ data.tar.gz: 71c615d63434145eee04e13d203a1706b6ca15b9
5
5
  SHA512:
6
- metadata.gz: 58efe36638f7fba19aabe5b6a5faf88252e33de95be0659a1af87ed07522a372aa2ab1c482d3911e2ef501b25eb9aa73960f1f3078f008112ad4305b8335eba2
7
- data.tar.gz: 446ea0b16723c401c11eac6822b7ade39fdbb94229983e945581fb08108bb1be55940b8db11db71f17bc07334ff1d2ddd908010c746843ca53681b744d8ba298
6
+ metadata.gz: 8de2769636d1293ed97ef4978a84919334be3b018ff4f16a3043797ce65f2a4cd30a2a0573bb93ae379bc1a24050b03846d809a87ef1118cd9f9e58544fcf588
7
+ data.tar.gz: 9e5ea4f6e75b675cd75a7fb235759d2c97518082fc5632cf69a4d4f9e15afff98acb8ee0d6019001871cc81148229f917ec2c87c5ce6f79600bd7c32ef49089c
data/README.md CHANGED
@@ -19,10 +19,12 @@ Pem - Maintain your push certificates
19
19
  [![Gem](https://img.shields.io/gem/v/pem.svg?style=flat)](http://rubygems.org/gems/pem)
20
20
 
21
21
 
22
- Tired of manually creating and maintaining your push notification profiles? Tired of generating a ```pem``` file for your server?
22
+ Tired of manually creating and maintaining your push notification profiles for your iOS apps? Tired of generating a ```pem``` file for your server?
23
23
 
24
24
  ```PEM``` does all that for, just by running ```pem```.
25
25
 
26
+ To automate iOS Provisioning profiles you can use [sigh](https://github.com/KrauseFx/sigh).
27
+
26
28
  Felix Krause ([@KrauseFx](https://twitter.com/KrauseFx)) the developer of ```PEM```<br />
27
29
  Sebastian Mayr ([@sebmasterkde](https://twitter.com/sebmasterkde)) who implemented the download mechanism of signing certificates<br />
28
30
  Alexander Schuch ([@schuchalexander](https://twitter.com/schuchalexander)) who automated the generation of the signing request
@@ -73,6 +75,9 @@ This does the following:
73
75
  - Downloads the certificate
74
76
  - Generates a new ```.pem``` file in the current working directory, which you can upload to your server
75
77
 
78
+
79
+ ```PEM``` will never revoke your existing certificates.
80
+
76
81
  You can pass parameters like this:
77
82
 
78
83
  pem -a at.felixkrause.app -u username
@@ -105,7 +110,7 @@ Check out other tools in this collection to speed up your deployment process:
105
110
  - [```deliver```](https://github.com/KrauseFx/deliver): Deploy screenshots, app metadata and app updates to the App Store using just one command
106
111
  - [```snapshot```](https://github.com/KrauseFx/snapshot): Create hundreds of screenshots of your iPhone app... while doing something else
107
112
  - [```FrameIt```](https://github.com/KrauseFx/frameit): Want a device frame around your screenshot? Do it in an instant!
108
- - [```sigh```](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning.
113
+ - [```sigh```](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning
109
114
 
110
115
  ## Use the 'Provisioning Quicklook plugin'
111
116
  Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning).
@@ -116,7 +121,7 @@ It will show you the ```pem``` files like this:
116
121
 
117
122
  # Need help?
118
123
  - If there is a technical problem with ```PEM```, submit an issue. Run ```pem --trace``` to get the stacktrace.
119
- - I'm available for contract work - drop me an email: pem@felixkrause.at
124
+ - I'm available for contract work - drop me an email: pem@krausefx.com
120
125
 
121
126
  # License
122
127
  This project is licensed under the terms of the MIT license. See the LICENSE file.
data/bin/pem CHANGED
@@ -4,7 +4,6 @@ $:.push File.expand_path("../../lib", __FILE__)
4
4
 
5
5
  require 'pem'
6
6
  require 'commander/import'
7
- require 'pem/update_checker'
8
7
  require 'deliver/password_manager'
9
8
 
10
9
  HighLine.track_eof = false
@@ -33,8 +32,6 @@ command :renew do |c|
33
32
  app = app_identifier(options)
34
33
  username(options)
35
34
 
36
- PEM::UpdateChecker.verify_latest_version
37
-
38
35
  path = PEM::CertManager.new.run(app, !options.development)
39
36
 
40
37
  if path
data/lib/pem.rb CHANGED
@@ -3,6 +3,7 @@ require 'pem/version'
3
3
  require 'pem/helper'
4
4
  require 'pem/dependency_checker'
5
5
  require 'pem/developer_center'
6
+ require 'pem/update_checker'
6
7
  require 'pem/cert_manager'
7
8
  require 'pem/signing_request'
8
9
 
@@ -11,4 +12,7 @@ require 'colored'
11
12
 
12
13
  module PEM
13
14
  TMP_FOLDER = "/tmp/PEM/"
15
+
16
+ PEM::UpdateChecker.verify_latest_version
17
+ DependencyChecker.check_dependencies
14
18
  end
@@ -27,8 +27,6 @@ module PEM
27
27
 
28
28
  def initialize
29
29
  FileUtils.mkdir_p TMP_FOLDER
30
-
31
- DependencyChecker.check_dependencies
32
30
 
33
31
  Capybara.run_server = false
34
32
  Capybara.default_driver = :poltergeist
@@ -246,7 +244,8 @@ module PEM
246
244
  click_next # "Continue"
247
245
 
248
246
  sleep 1
249
- wait_for_elements(".button.small.center.back") # just to wait
247
+ wait_for_elements(".file-input.validate")
248
+ wait_for_elements(".button.small.center.back")
250
249
 
251
250
  # Upload CSR file
252
251
  first(:xpath, "//input[@type='file']").set PEM::SigningRequest.get_path
@@ -272,14 +271,23 @@ module PEM
272
271
  url = [host, url].join('')
273
272
  puts url
274
273
 
275
- myacinfo = page.driver.cookies['myacinfo'].value # some magic Apple, which is required for the profile download
276
- data = open(url, {'Cookie' => "myacinfo=#{myacinfo}"}).read
274
+ cookieString = ""
275
+
276
+ page.driver.cookies.each do |key, cookie|
277
+ cookieString << "#{cookie.name}=#{cookie.value};" # append all known cookies
278
+ end
279
+
280
+ data = open(url, {'Cookie' => cookieString}).read
277
281
 
278
282
  raise "Something went wrong when downloading the certificate" unless data
279
283
 
280
- path = "#{TMP_FOLDER}/aps_#{certificate_type}_#{app_identifier}.cer"
281
- File.write(path, data)
282
-
284
+ path = "#{TMP_FOLDER}aps_#{certificate_type}_#{app_identifier}.cer"
285
+ dataWritten = File.write(path, data)
286
+
287
+ if dataWritten == 0
288
+ raise "Can't write to #{TMP_FOLDER}"
289
+ end
290
+
283
291
  Helper.log.info "Successfully downloaded latest .cer file."
284
292
  return path
285
293
  end
@@ -5,7 +5,7 @@ module PEM
5
5
  end
6
6
 
7
7
  def self.generate
8
- Helper.log.info "Couldn't find a signing certificate in the current folder. Creating one for you now.".green
8
+ Helper.log.info "Creating a signing certificate for you.".green
9
9
  @key = OpenSSL::PKey::RSA.new 2048
10
10
 
11
11
  # Generate CSR
data/lib/pem/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module PEM
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.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: 0.2.1
4
+ version: 0.2.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: 2014-11-28 00:00:00.000000000 Z
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -209,7 +209,7 @@ dependencies:
209
209
  description: Tired of creating and maintaining your push certification profiles? PEM
210
210
  helps you creating and maintaining your iOS push notification certificates.
211
211
  email:
212
- - krausefx@gmail.com
212
+ - pem@krausefx.com
213
213
  executables:
214
214
  - pem
215
215
  extensions: []
@@ -226,7 +226,7 @@ files:
226
226
  - lib/pem/signing_request.rb
227
227
  - lib/pem/update_checker.rb
228
228
  - lib/pem/version.rb
229
- homepage: http://felixkrause.at
229
+ homepage: http://krausefx.com
230
230
  licenses:
231
231
  - MIT
232
232
  metadata: {}