sigh 0.1.3 → 0.1.5

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: 6be74216863962899b4a31743764edf32b7b2bb0
4
- data.tar.gz: 0896e0185563e8c63738b828bfd2cee9f4051072
3
+ metadata.gz: a083256818ad827b63f84c5c5b4486618c3ba32c
4
+ data.tar.gz: 30d38d5530f6680a77b695589d699655547e521b
5
5
  SHA512:
6
- metadata.gz: 35ceb603813de63a00ca7b7a48c1d894e9084bebb250dc3a7f3bd8a4f975d13d6ebb56f512d7b175b5bea4edbf9a33193dffabc0e3b7383bfa460f06ebb80662
7
- data.tar.gz: b7af53aac592952283ef08943a5086e88cda433caf06d5dbbe798767d7a45e2ee517dcbef951219deb5c012ee2a23b42da907a2dee3b1a77738288b204f9c9c5
6
+ metadata.gz: 6d21fa089eb7d500a69a68b7d76f6aa022f917f99c8c75e9f48c7c99ec1acd64636a8fc4fb774ef4d27730082aae7e1b8b96e29f4c57f2d7818baf35d673b884
7
+ data.tar.gz: 7fda052634ec1a431b8de4477b5750b83ed18f3e32e2ca02408e4fd200cf2eb36d9574bbd5b0a3ed4073d6c3a55796d2ee674bd6f1cfd083c9734a991f5208fb
data/README.md CHANGED
@@ -97,6 +97,10 @@ If you want to generate a **Development** profile:
97
97
 
98
98
  sigh --development
99
99
 
100
+ To generate the profile in a specific directory:
101
+
102
+ sigh -o "~/Certificates/"
103
+
100
104
  By default, ```sigh``` will install the downloaded profile on your machine. If you just want to generate the profile and skip the installation, use the following flag:
101
105
 
102
106
  sigh --skip_install
@@ -136,7 +140,7 @@ It will show you the ```mobileprovision``` files like this:
136
140
 
137
141
  # Need help?
138
142
  - If there is a technical problem with ```sigh```, submit an issue. Run ```sigh --trace``` to get the stacktrace.
139
- - I'm available for contract work - drop me an email: sigh@felixkrause.at
143
+ - I'm available for contract work - drop me an email: sigh@krausefx.com
140
144
 
141
145
  # License
142
146
  This project is licensed under the terms of the MIT license. See the LICENSE file.
data/bin/sigh CHANGED
@@ -4,7 +4,6 @@ $:.push File.expand_path("../../lib", __FILE__)
4
4
 
5
5
  require 'sigh'
6
6
  require 'commander/import'
7
- require 'sigh/update_checker'
8
7
  require 'deliver/password_manager'
9
8
 
10
9
  HighLine.track_eof = false
@@ -28,13 +27,12 @@ command :renew do |c|
28
27
  c.option '-a', '--identifier STRING', String, 'The bundle identifier of your app'
29
28
  c.option '-u', '--username STRING', String, 'Your Apple ID username'
30
29
  c.option '-n', '--cert_name STRING', String, 'The name of the generated certificate file.'
30
+ c.option '-o', '--output STRING', String, 'The folder in which the file should be generated.'
31
31
  c.option '--adhoc', 'By default, sigh will create and renew App Store profiles. Setting this flag will generate Adhoc profiles instead.'
32
32
  c.option '--skip_install', 'By default, the certificate will be added on your local machine. Setting this flag will skip this action.'
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
-
38
36
  app = app_identifier(options)
39
37
  username(options)
40
38
 
@@ -46,7 +44,8 @@ command :renew do |c|
46
44
 
47
45
  if path
48
46
  file_name = File.basename(path)
49
- output = "./#{file_name}"
47
+ output_path = options.output || '.'
48
+ output = File.join(output_path.gsub("~", ENV["HOME"]), file_name)
50
49
  FileUtils.mv(path, output)
51
50
  system("open '#{output}'") unless options.skip_install
52
51
  puts output.green
@@ -3,10 +3,14 @@ require 'sigh/version'
3
3
  require 'sigh/helper'
4
4
  require 'sigh/dependency_checker'
5
5
  require 'sigh/developer_center'
6
+ require 'sigh/update_checker'
6
7
 
7
8
  # Third Party code
8
9
  require 'colored'
9
10
 
10
11
  module Sigh
11
12
  TMP_FOLDER = "/tmp/sigh/"
13
+
14
+ Sigh::UpdateChecker.verify_latest_version
15
+ DependencyChecker.check_dependencies
12
16
  end
@@ -30,8 +30,6 @@ module Sigh
30
30
 
31
31
  def initialize
32
32
  FileUtils.mkdir_p TMP_FOLDER
33
-
34
- DependencyChecker.check_dependencies
35
33
 
36
34
  Capybara.run_server = false
37
35
  Capybara.default_driver = :poltergeist
@@ -244,7 +242,16 @@ module Sigh
244
242
  # 2) Select the App ID
245
243
  while not page.has_content?"Select App ID" do sleep 1 end
246
244
  # example: <option value="RGAWZGXSY4">ABP (5A997XSHK2.net.sunapps.34)</option>
247
- first(:xpath, "//option[contains(text(), '.#{app_identifier})')]").select_option
245
+ identifiers = all(:xpath, "//option[contains(text(), '.#{app_identifier})')]")
246
+ if identifiers.count == 0
247
+ puts "Couldn't find App ID '#{app_identifier}'\nonly found:".red
248
+ all(:xpath, "//option").each do |current|
249
+ puts "\t- #{current.text}".yellow
250
+ end
251
+ raise "Could not find Apple ID '#{app_identifier}'.".red
252
+ else
253
+ identifiers.first.select_option
254
+ end
248
255
  click_next
249
256
 
250
257
  # 3) Select the certificate
@@ -379,8 +386,13 @@ module Sigh
379
386
  host = Capybara.current_session.current_host
380
387
  url = [host, url].join('')
381
388
 
382
- myacinfo = page.driver.cookies['myacinfo'].value # some Apple magic, which is required for the profile download
383
- data = open(url, {'Cookie' => "myacinfo=#{myacinfo}"}).read
389
+ cookieString = ""
390
+
391
+ page.driver.cookies.each do |key, cookie|
392
+ cookieString << "#{cookie.name}=#{cookie.value};" # append all known cookies
393
+ end
394
+
395
+ data = open(url, {'Cookie' => cookieString}).read
384
396
 
385
397
  raise "Something went wrong when downloading the file from the Dev Center" unless data
386
398
  Helper.log.info "Successfully downloaded provisioning profile"
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
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.3
4
+ version: 0.1.5
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-12-04 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
@@ -222,7 +222,7 @@ dependencies:
222
222
  version: '0'
223
223
  description: Create, Renew and Download your provisioning profiles - using one command
224
224
  email:
225
- - krausefx@gmail.com
225
+ - sigh@krausefx.com
226
226
  executables:
227
227
  - sigh
228
228
  extensions: []
@@ -237,7 +237,7 @@ files:
237
237
  - lib/sigh/helper.rb
238
238
  - lib/sigh/update_checker.rb
239
239
  - lib/sigh/version.rb
240
- homepage: http://felixkrause.at
240
+ homepage: http://krausefx.com
241
241
  licenses:
242
242
  - MIT
243
243
  metadata: {}