sigh 0.1.0 → 0.1.1

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: d3f52e65260557eebb196e22e1b789368c5d75d9
4
- data.tar.gz: 02c172f9421aed83f1945f7ca27508c8a3ad84a2
3
+ metadata.gz: 71bb5b57bcbd208f0669a483d67905bba9fd42d9
4
+ data.tar.gz: 7e4c56a32ab902309b09c11e536074731b29e3f2
5
5
  SHA512:
6
- metadata.gz: 85537a62dd26b1d114ae28fd13c266a158f57ab00397fc1a7df746d93560a41482f5f6b13cf7f1b4930b7060762064c6cf3a781c4aa83d2c1ca68fe27281397a
7
- data.tar.gz: 59528094c716081676b2433a90f26f5e4882811ea063ea2471fe3f41ffaa6efa4d680719651edfd9544ce7b3b2109bf354c0a426e69edc2e1826e5a818f2179f
6
+ metadata.gz: a42c7bc04cbdd61fbb673046dcf98163af5c2e1dc205e463b0b1369444c4333bbf6dca503cad8a33c8fb9decd32617b6448457810bacb77215ffe0f66306c83d
7
+ data.tar.gz: d18a1a8c5d5b783a968d175cf81d6e8af692eeabcf8e33bb72c7630e2c108cb248716434fa362fffa9d25947444a5a2204417ca1cea178c4f7a46694f3d0d729
data/README.md CHANGED
@@ -12,15 +12,16 @@
12
12
  <img src="assets/sigh.png">
13
13
  </p>
14
14
 
15
- Sigh - Create and maintain provisioning profiles
15
+ Sigh
16
16
  ============
17
+ #### Because you would rather spend your time building stuff than fighting provisioning
17
18
 
18
19
  [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx)
19
20
  [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/sigh/blob/master/LICENSE)
20
21
  [![Gem](https://img.shields.io/gem/v/sigh.svg?style=flat)](http://rubygems.org/gems/sigh)
21
22
 
22
23
 
23
- Tired of manually creating and maintaining your provisioning profiles?
24
+ Tired of manually creating, renewing and downloading your provisioning profiles?
24
25
 
25
26
  ```sigh``` handles all that for you. Just run ```sigh``` and it will do the rest.
26
27
 
@@ -42,11 +43,20 @@ Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
42
43
 
43
44
  - **Download** the latest provisioning profile for your app
44
45
  - **Renew** a provisioning profile, when it has expired
46
+ - **Repair** a provisioning profile, when it is broken
45
47
  - **Create** a new provisioning profile, if it doesn't exist already
46
- - Support for both **App Store**, **Ad Hoc** and **Development** profiles
48
+ - Supports **App Store**, **Ad Hoc** and **Development** profiles
49
+ - Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
50
+ - Support for **multiple Teams**
47
51
 
52
+ ### Why not let Xcode do the work?
48
53
 
49
- Check out this gif:
54
+ - ```sigh``` can easily be integrated into your CI-server (e.g. Jenkins)
55
+ - Xcode sometimes invalidates all existing profiles ([Proof](assets/SignErrors.png))
56
+ - You have control over what happens
57
+ - You still get to have the signing files, which you can then use for your build scripts or store in git
58
+
59
+ See ```sigh``` in action:
50
60
 
51
61
  ![assets/sighRecording.gif](assets/sighRecording.gif)
52
62
 
@@ -57,6 +67,12 @@ Make sure, you have the latest version of the Xcode command line tools installed
57
67
 
58
68
  xcode-select --install
59
69
 
70
+ Install phantomjs (this is needed to control the Apple Developer Portal)
71
+
72
+ brew update && brew install phantomjs
73
+
74
+ If you don't already have homebrew installed, [install it here](http://brew.sh/).
75
+
60
76
  # Usage
61
77
 
62
78
  sigh
@@ -72,7 +88,7 @@ If you want to generate an **Ad Hoc** profile instead of an App Store profile:
72
88
 
73
89
  sigh --adhoc
74
90
 
75
- If you want to generate an **Development** profile:
91
+ If you want to generate a **Development** profile:
76
92
 
77
93
  sigh --development
78
94
 
@@ -86,6 +102,7 @@ In case you prefer environment variables:
86
102
 
87
103
  - ```SIGH_USERNAME```
88
104
  - ```SIGH_APP_IDENTIFIER```
105
+ - ```SIGH_TEAM_ID``` (The exact name of your preferred team for this account)
89
106
 
90
107
  # How does it work?
91
108
 
@@ -121,7 +138,7 @@ This project is licensed under the terms of the MIT license. See the LICENSE fil
121
138
 
122
139
  # Contributing
123
140
 
124
- 1. Create an issue to discuss about your idea
141
+ 1. Create an issue to start a discussion about your idea
125
142
  2. Fork it (https://github.com/KrauseFx/sigh/fork)
126
143
  3. Create your feature branch (`git checkout -b my-new-feature`)
127
144
  4. Commit your changes (`git commit -am 'Add some feature'`)
@@ -93,9 +93,39 @@ module Sigh
93
93
  fill_in "accountname", with: user
94
94
  fill_in "accountpassword", with: password
95
95
 
96
+ all(".button.large.blue.signin-button").first.click
97
+
96
98
  begin
97
- all(".button.large.blue.signin-button").first.click
99
+ if page.has_content?"Select Team" # If the user is not on multiple teams
100
+ team_id = ENV["SIGH_TEAM_ID"]
101
+ unless team_id
102
+ Helper.log.info "You can store you preferred team using the environment variable `SIGH_TEAM_ID`".green
103
+ Helper.log.info "Your ID belongs to the following teams:".green
104
+
105
+ teams = find("div.input").all('.team-value') # Grab all the teams data
106
+ teams.each_with_index do |val, index|
107
+ team_text = val.find(".label-primary").text
108
+ description_text = val.find(".label-secondary").text
109
+ description_text = " (#{description_text})" unless description_text.empty? # Include the team description if any
110
+ Helper.log.info "\t#{index + 1}. #{team_text}#{description_text}".green # Print the team index and team name
111
+ end
112
+
113
+ team_index = ask("Please select the team number you would like to access: ".green)
114
+ team_id = teams[team_index.to_i - 1].find(".radio").value
115
+ end
116
+
117
+ first(:xpath, "//input[@type='radio' and @value='#{team_id}']").click # Select the desired team
118
+ all(".button.large.blue.submit").first.click
119
+
120
+ result = visit PROFILES_URL
121
+ raise "Could not open Developer Center" unless result['status'] == 'success'
122
+ end
123
+ rescue Exception => ex
124
+ Helper.log.debug ex
125
+ raise DeveloperCenterLoginError.new("Error loggin in user #{user}. User is on multiple teams and we were unable to correctly retrieve them.")
126
+ end
98
127
 
128
+ begin
99
129
  wait_for_elements('.ios.profiles.gridList')
100
130
  visit PROFILES_URL # again, since after the login, the dev center loses the production GET value
101
131
  rescue Exception => ex
@@ -103,6 +133,7 @@ module Sigh
103
133
  raise DeveloperCenterLoginError.new("Error logging in user #{user} with the given password. Make sure you entered them correctly.")
104
134
  end
105
135
 
136
+
106
137
  Helper.log.info "Login successful"
107
138
 
108
139
  true
data/lib/sigh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sigh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-26 00:00:00.000000000 Z
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json