sigh 0.1.1 → 0.1.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: 71bb5b57bcbd208f0669a483d67905bba9fd42d9
4
- data.tar.gz: 7e4c56a32ab902309b09c11e536074731b29e3f2
3
+ metadata.gz: a11b1adf724af2b32581b6691097dda749a87e61
4
+ data.tar.gz: 9593cec147e8343fe6ee233b40fdf0ca65de5cbe
5
5
  SHA512:
6
- metadata.gz: a42c7bc04cbdd61fbb673046dcf98163af5c2e1dc205e463b0b1369444c4333bbf6dca503cad8a33c8fb9decd32617b6448457810bacb77215ffe0f66306c83d
7
- data.tar.gz: d18a1a8c5d5b783a968d175cf81d6e8af692eeabcf8e33bb72c7630e2c108cb248716434fa362fffa9d25947444a5a2204417ca1cea178c4f7a46694f3d0d729
6
+ metadata.gz: 5a12346f217fbd2b3939f618d970747179013f9ce330562fb9857c5c76c129f8d072c12f7e9e962eb6ccb5b51384a6f1539d7180d6e0337106ce3b8b2ea35487
7
+ data.tar.gz: 32e1aad4fb9113258d8e404d3ea983292df2ae6a3f1585f016451fb9d182f2721b6bf27f3be4e4949f37b9907b7b0d61a8848bf441d073eb70b4ec725a6d01f9
data/README.md CHANGED
@@ -30,12 +30,14 @@ Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
30
30
 
31
31
 
32
32
  -------
33
- [Features](#features) •
34
- [Installation](#installation) •
35
- [Usage](#usage) •
36
- [How does it work?](#how-does-it-work) •
37
- [Tips](#tips) •
38
- [Need help?](#need-help)
33
+ <p align="center">
34
+ <a href="#features">Features</a> &bull;
35
+ <a href="#installation">Installation</a> &bull;
36
+ <a href="#usage">Usage</a> &bull;
37
+ <a href="#how-does-it-work">How does it work?</a> &bull;
38
+ <a href="#tips">Tips</a> &bull;
39
+ <a href="#need-help">Need help?</a>
40
+ </p>
39
41
 
40
42
  -------
41
43
 
@@ -48,6 +50,7 @@ Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
48
50
  - Supports **App Store**, **Ad Hoc** and **Development** profiles
49
51
  - Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
50
52
  - Support for **multiple Teams**
53
+ - Support for Enterprise Profiles
51
54
 
52
55
  ### Why not let Xcode do the work?
53
56
 
data/bin/sigh CHANGED
@@ -33,11 +33,11 @@ command :renew do |c|
33
33
  c.option '--development', 'Renew the development certificate instead of the production one'
34
34
 
35
35
  c.action do |args, options|
36
+ Sigh::UpdateChecker.verify_latest_version
37
+
36
38
  app = app_identifier(options)
37
39
  username(options)
38
40
 
39
- Sigh::UpdateChecker.verify_latest_version
40
-
41
41
  type = Sigh::DeveloperCenter::APPSTORE
42
42
  type = Sigh::DeveloperCenter::ADHOC if options.adhoc
43
43
  type = Sigh::DeveloperCenter::DEVELOPMENT if options.development
@@ -145,7 +145,9 @@ module Sigh
145
145
  def run(app_identifier, type, cert_name = nil)
146
146
  cert = maintain_app_certificate(app_identifier, type)
147
147
 
148
- cert_name ||= "#{type}_#{app_identifier}.mobileprovision" # default name
148
+ type_name = type
149
+ type_name = "Distribution" if type == APPSTORE # both enterprise and App Store
150
+ cert_name ||= "#{type_name}_#{app_identifier}.mobileprovision" # default name
149
151
  cert_name += '.mobileprovision' unless cert_name.include?'mobileprovision'
150
152
 
151
153
  output_path = TMP_FOLDER + cert_name
@@ -170,8 +172,17 @@ module Sigh
170
172
 
171
173
  Helper.log.info "Checking if profile is available. (#{certs['provisioningProfiles'].count} profiles found)"
172
174
  certs['provisioningProfiles'].each do |current_cert|
173
- next if type == DEVELOPMENT and current_cert['type'] != "iOS Development"
174
- next if type != DEVELOPMENT and current_cert['type'] != 'iOS Distribution'
175
+ if type == DEVELOPMENT
176
+ if current_cert['type'] != "iOS Development"
177
+ next
178
+ end
179
+ end
180
+
181
+ if type != DEVELOPMENT
182
+ if not ['iOS Distribution', 'iOS UniversalDistribution'].include?current_cert['type']
183
+ next
184
+ end
185
+ end
175
186
 
176
187
  details = profile_details(current_cert['provisioningProfileId'])
177
188
 
@@ -214,8 +225,16 @@ module Sigh
214
225
  visit create_url
215
226
 
216
227
  # 1) Select the profile type (AppStore, Adhoc)
217
- wait_for_elements('#type-production')
218
- value = 'store'
228
+ enterprise = false
229
+
230
+ begin
231
+ wait_for_elements('#type-production')
232
+ rescue Exception => ex
233
+ wait_for_elements('#type-inhouse') # enterprise accounts
234
+ enterprise = true
235
+ end
236
+
237
+ value = (enterprise ? 'inhouse' : 'store')
219
238
  value = 'limited' if type == DEVELOPMENT
220
239
  value = 'adhoc' if type == ADHOC
221
240
 
data/lib/sigh/helper.rb CHANGED
@@ -6,7 +6,7 @@ module Sigh
6
6
  # Logging happens using this method
7
7
  def self.log
8
8
  if is_test?
9
- @@log ||= Logger.new(nil) # don't show any logs when running tests
9
+ @@log ||= Logger.new(STDOUT) # don't show any logs when running tests
10
10
  else
11
11
  @@log ||= Logger.new(STDOUT)
12
12
  end
data/lib/sigh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
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.1
4
+ version: 0.1.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-27 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json