pem 0.2.0 → 0.2.1

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: b953613039c526d03c52b0341dfbd8b235302e7d
4
- data.tar.gz: 24327d42b6d028ce77a15fcefcdbb2e8dad66751
3
+ metadata.gz: 2764a02548a2172a9fa829b730d03390b2f6131f
4
+ data.tar.gz: a3fa08d3b0e4eefdce180adcdbf0102e3551c4b1
5
5
  SHA512:
6
- metadata.gz: 3d4de449003920eb1594f7fc546ba97c793a26b1768e3829863e69811d1a1e02e726aa77def4f6599fff9cac8c5ab6dbc7370b9516a9181dc7279a92cd4242ef
7
- data.tar.gz: 5d436da8f8de0a09a673cf187f201b8e09200211e4dd6ef63aad7cba961949dd073e9a3f0ca1c46c1913689a9a32abf37d764ed203cb53cff940a576420a9370
6
+ metadata.gz: 58efe36638f7fba19aabe5b6a5faf88252e33de95be0659a1af87ed07522a372aa2ab1c482d3911e2ef501b25eb9aa73960f1f3078f008112ad4305b8335eba2
7
+ data.tar.gz: 446ea0b16723c401c11eac6822b7ade39fdbb94229983e945581fb08108bb1be55940b8db11db71f17bc07334ff1d2ddd908010c746843ca53681b744d8ba298
data/README.md CHANGED
@@ -68,8 +68,8 @@ Yes, that's the whole command!
68
68
 
69
69
  This does the following:
70
70
 
71
- - Verifies the production push certificate looks alright
72
- - Renews the push certificate in case it's necessary
71
+ - Create a new signing request
72
+ - Create a new push certification
73
73
  - Downloads the certificate
74
74
  - Generates a new ```.pem``` file in the current working directory, which you can upload to your server
75
75
 
@@ -86,13 +86,13 @@ In case you prefer environment variables:
86
86
 
87
87
  - ```PEM_USERNAME```
88
88
  - ```PEM_APP_IDENTIFIER```
89
+ - ```PEM_TEAM_ID```
89
90
 
90
91
  # How does it work?
91
92
  There are 2 actions involved:
92
93
 
93
94
  - Accessing the ```iOS Dev Center``` to download the latest ```aps_production.cer```. See: [developer_center.rb](https://github.com/KrauseFx/PEM/blob/master/lib/pem/developer_center.rb).
94
95
  - Generating all the necessary profiles and files to prepare the finished ```.pem``` file. See: [cert_manager.rb](https://github.com/KrauseFx/PEM/blob/master/lib/pem/cert_manager.rb).
95
- ```PEM``` will create a temporary keychain called ```PEM.keychain``` and use that to generate the necessary profiles. That means ```PEM``` will not pollute your default keychain.
96
96
  - The ```.certSigningRequest``` file will be generated in [signing_request.rb](https://github.com/KrauseFx/PEM/blob/master/lib/pem/signing_request.rb)
97
97
 
98
98
 
@@ -84,10 +84,40 @@ module PEM
84
84
 
85
85
  fill_in "accountname", with: user
86
86
  fill_in "accountpassword", with: password
87
+
88
+ all(".button.large.blue.signin-button").first.click
87
89
 
88
90
  begin
89
- all(".button.large.blue.signin-button").first.click
91
+ if page.has_content?"Select Your Team" # If the user is not on multiple teams
92
+ team_id = ENV["PEM_TEAM_ID"]
93
+ unless team_id
94
+ Helper.log.info "You can store you preferred team using the environment variable `PEM_TEAM_ID`".green
95
+ Helper.log.info "Your ID belongs to the following teams:".green
96
+
97
+ teams = find("select").all('option') # Grab all the teams data
98
+ teams.each_with_index do |val, index|
99
+ team_text = val.text
100
+ description_text = val.value
101
+ description_text = " (#{description_text})" unless description_text.empty? # Include the team description if any
102
+ Helper.log.info "\t#{index + 1}. #{team_text}#{description_text}".green # Print the team index and team name
103
+ end
104
+
105
+ team_index = ask("Please select the team number you would like to access: ".green)
106
+ team_id = teams[team_index.to_i - 1].value # Select the desired team
107
+ end
108
+ within 'select' do
109
+ find("option[value='#{team_id}']").select_option
110
+ end
111
+
112
+ all("#saveTeamSelection_saveTeamSelection").first.click
113
+ end
114
+ rescue Exception => ex
115
+ Helper.log.debug ex
116
+ raise DeveloperCenterLoginError.new("Error loggin in user #{user}. User is on multiple teams and we were unable to correctly retrieve them.")
117
+ end
90
118
 
119
+ begin
120
+
91
121
  wait_for_elements('#aprerelease')
92
122
  rescue Exception => ex
93
123
  Helper.log.debug ex
@@ -1,3 +1,3 @@
1
1
  module PEM
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause