Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
KrauseFx committed Jan 15, 2015
2 parents 725c84c + 22dacda commit b4bdc62
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 82 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ rvm:
- 2.1.0
notifications:
email:
- krausefx@gmail.com
- sigh@krausefx.com
42 changes: 8 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
PATH
remote: .
specs:
sigh (0.1.5)
sigh (0.2.0)
capybara (~> 2.4.3)
colored
commander (~> 4.2.0)
deliver
credentials_manager
highline (~> 1.6.21)
json
poltergeist (~> 1.5.1)
security (~> 0.1.3)

GEM
remote: https://rubygems.org/
Expand All @@ -22,62 +21,39 @@ GEM
rack-test (>= 0.5.4)
xpath (~> 2.0)
cliver (0.3.2)
codeclimate-test-reporter (0.4.3)
codeclimate-test-reporter (0.4.5)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.0)
colored (1.2)
commander (4.2.1)
highline (~> 1.6.11)
crack (0.4.2)
safe_yaml (~> 1.0.0)
deliver (0.5.0)
capybara (~> 2.4.3)
credentials_manager (0.1.0)
colored
commander (~> 4.2.0)
fastimage (~> 1.6.3)
fastlane
highline (~> 1.6.21)
json
nokogiri (~> 1.6.5)
plist (~> 3.1.0)
poltergeist (~> 1.5.1)
prawn
rubyzip (~> 1.1.6)
security (~> 0.1.3)
diff-lcs (1.2.5)
docile (1.1.5)
fastimage (1.6.6)
addressable (~> 2.3, >= 2.3.5)
fastlane (0.1.0)
colored
commander (~> 4.2.0)
highline (~> 1.6.21)
json
nokogiri (~> 1.6.5)
security (~> 0.1.3)
highline (1.6.21)
json (1.8.1)
json (1.8.2)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.1)
mini_portile (0.6.2)
multi_json (1.10.1)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
pdf-core (0.4.0)
plist (3.1.0)
poltergeist (1.5.1)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
prawn (1.3.0)
pdf-core (~> 0.4.0)
ttfunk (~> 1.4.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.0)
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rake (10.4.2)
rspec (3.1.0)
Expand All @@ -92,7 +68,6 @@ GEM
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
rubyzip (1.1.6)
safe_yaml (1.0.4)
security (0.1.3)
simplecov (0.9.1)
Expand All @@ -101,7 +76,6 @@ GEM
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.6.0)
ttfunk (1.4.0)
webmock (1.19.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
<h3 align="center">
<a href="https://github.com/KrauseFx/fastlane">
<img src="assets/fastlane.png" width="150" />
<br />
fastlane
</a>
</h3>
<p align="center">
<a href="https://github.com/KrauseFx/deliver">Deliver</a> &bull;
<a href="https://github.com/KrauseFx/snapshot">Snapshot</a> &bull;
<a href="https://github.com/KrauseFx/frameit">FrameIt</a> &bull;
<a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
<b>Sigh</b>
<a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
<a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
<a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
<a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
<b>sigh</b>
</p>

-------

<p align="center">
<img src="assets/sigh.png">
</p>

Sigh
sigh
============
#### Because you would rather spend your time building stuff than fighting provisioning

[![Twitter: @KauseFx](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/KrauseFx)
[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/sigh/blob/master/LICENSE)
[![Gem](https://img.shields.io/gem/v/sigh.svg?style=flat)](http://rubygems.org/gems/sigh)

###### Because you would rather spend your time building stuff than fighting provisioning

Tired of manually creating, renewing and downloading your iOS provisioning profiles?

```sigh``` handles all that for you. Just run ```sigh``` and it will do the rest.

Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)



Expand All @@ -41,6 +47,9 @@ Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)

-------

<h5 align="center"><code>sigh</code> is part of <a href="http://fastlane.tools">fastlane</a>: connect all deployment tools into one streamlined workflow.</h5>


# Features

- **Download** the latest provisioning profile for your app
Expand All @@ -50,7 +59,7 @@ Follow the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
- Supports **App Store**, **Ad Hoc** and **Development** profiles
- Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
- Support for **multiple Teams**
- Support for Enterprise Profiles
- Support for **Enterprise Profiles**

To automate iOS Push profiles you can use [PEM](https://github.com/KrauseFx/PEM).

Expand Down Expand Up @@ -87,7 +96,7 @@ Yes, that's the whole command!

You can pass your bundle identifier and username like this:

sigh -a at.felixkrause.app -u username
sigh -a com.krausefx.app -u username

If you want to generate an **Ad Hoc** profile instead of an App Store profile:

Expand All @@ -111,7 +120,7 @@ In case you prefer environment variables:

- ```SIGH_USERNAME```
- ```SIGH_APP_IDENTIFIER```
- ```SIGH_TEAM_ID``` (The exact name of your preferred team for this account)
- ```SIGH_TEAM_ID``` (The Team ID, e.g. `Q2CBPK58CA`)

# How does it work?

Expand All @@ -122,14 +131,13 @@ In case you prefer environment variables:
```sigh``` uses the password manager from [```Deliver```](https://github.com/KrauseFx/deliver#can-i-trust-deliver). Take a look the [Deliver README](https://github.com/KrauseFx/deliver#can-i-trust-deliver) for more information.

# Tips
## Other helpful tools
Check out other tools in this collection to speed up your deployment process:

- [```deliver```](https://github.com/KrauseFx/deliver): Deploy screenshots, app metadata and app updates to the App Store using just one command
- [```snapshot```](https://github.com/KrauseFx/snapshot): Create hundreds of screenshots of your iPhone app... while doing something else
- [```FrameIt```](https://github.com/KrauseFx/frameit): Want a device frame around your screenshot? Do it in an instant!
- [```PEM```](https://github.com/KrauseFx/pem): Tired of manually creating and maintaining your push certification profiles?
## [`fastlane`](http://fastlane.tools) Toolchain

- [`fastlane`](http://fastlane.tools): Connect all deployment tools into one streamlined workflow
- [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store using a single command
- [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
- [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
- [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles

## Use the 'Provisioning Quicklook plugin'
Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning).
Expand Down
Binary file added assets/fastlane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 14 additions & 11 deletions bin/sigh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ $:.push File.expand_path("../../lib", __FILE__)

require 'sigh'
require 'commander/import'
require 'deliver/password_manager'
require 'credentials_manager/password_manager'
require 'credentials_manager/appfile_config'

HighLine.track_eof = false


# Commander
program :version, Sigh::VERSION
program :description, 'CLI for \'sigh\' - Automatic maintaining of iOS certificates'
program :help, 'Author', 'Felix Krause <krausefx@gmail.com>'
program :help, 'Website', 'http://felixkrause.at'
program :description, 'CLI for \'sigh\' - Because you would rather spend your time building stuff than fighting provisioning'
program :help, 'Author', 'Felix Krause <sigh@krausefx.com>'
program :help, 'Website', 'http://fastlane.tools'
program :help, 'GitHub', 'https://github.com/krausefx/sigh'
program :help_formatter, :compact

Expand Down Expand Up @@ -56,15 +57,17 @@ end
default_command :renew

def username(options)
user = nil
user = options.username if options.username
user = ENV["SIGH_USERNAME"] if ENV["SIGH_USERNAME"]
user = options.username
user ||= ENV["SIGH_USERNAME"]
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)

Deliver::PasswordManager.shared_manager(user) if user
CredentialsManager::PasswordManager.shared_manager(user) if user
end

def app_identifier(options)
return options.identifier if options.identifier
return ENV["SIGH_APP_IDENTIFIER"] if ENV["SIGH_APP_IDENTIFIER"]
return ask("App Identifier (Bundle ID, e.g. at.felixkrause.app): ")
value = options.identifier
value ||= ENV["SIGH_APP_IDENTIFIER"]
value ||= CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
value ||= ask("App Identifier (Bundle ID, e.g. com.krausefx.app): ")
return value
end
18 changes: 9 additions & 9 deletions lib/sigh/developer_center.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'deliver/password_manager'
require 'credentials_manager/password_manager'
require 'open-uri'
require 'openssl'

Expand Down Expand Up @@ -55,7 +55,7 @@ def initialize

# Loggs in a user with the given login data on the Dev Center Frontend.
# You don't need to pass a username and password. It will
# Automatically be fetched using the {Deliver::PasswordManager}.
# Automatically be fetched using the {CredentialsManager::PasswordManager}.
# This method will also automatically be called when triggering other
# actions like {#open_app_page}
# @param user (String) (optional) The username/email address
Expand All @@ -68,8 +68,8 @@ def login(user = nil, password = nil)
begin
Helper.log.info "Login into iOS Developer Center"

user ||= Deliver::PasswordManager.shared_manager.username
password ||= Deliver::PasswordManager.shared_manager.password
user ||= CredentialsManager::PasswordManager.shared_manager.username
password ||= CredentialsManager::PasswordManager.shared_manager.password

result = visit PROFILES_URL
raise "Could not open Developer Center" unless result['status'] == 'success'
Expand Down Expand Up @@ -118,15 +118,15 @@ def login(user = nil, password = nil)
result = visit PROFILES_URL
raise "Could not open Developer Center" unless result['status'] == 'success'
end
rescue Exception => ex
rescue => ex
Helper.log.debug ex
raise DeveloperCenterLoginError.new("Error loggin in user #{user}. User is on multiple teams and we were unable to correctly retrieve them.")
end

begin
wait_for_elements('.ios.profiles.gridList')
visit PROFILES_URL # again, since after the login, the dev center loses the production GET value
rescue Exception => ex
rescue => ex
Helper.log.debug ex
if page.has_content?"Getting Started"
raise "There was no valid signing certificate found. Please log in and follow the 'Getting Started guide' on '#{current_url}'".red
Expand All @@ -139,7 +139,7 @@ def login(user = nil, password = nil)
Helper.log.info "Login successful"

true
rescue Exception => ex
rescue => ex
error_occured(ex)
end
end
Expand Down Expand Up @@ -214,7 +214,7 @@ def maintain_app_certificate(app_identifier, type)
# After creating the profile, we need to download it
return maintain_app_certificate(app_identifier, type) # recursive

rescue Exception => ex
rescue => ex
error_occured(ex)
end
end
Expand All @@ -231,7 +231,7 @@ def create_profile(app_identifier, type)

begin
wait_for_elements('#type-production')
rescue Exception => ex
rescue => ex
wait_for_elements('#type-inhouse') # enterprise accounts
enterprise = true
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sigh/update_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.update_available?
if latest and Gem::Version.new(latest) > Gem::Version.new(current_version)
return true
end
rescue Exception => ex
rescue => ex
Helper.log.error("Could not check if 'sigh' is up to date.")
end
return false
Expand Down
2 changes: 1 addition & 1 deletion lib/sigh/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Sigh
VERSION = "0.1.5"
VERSION = "0.2.0"
end
11 changes: 5 additions & 6 deletions sigh.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
spec.version = Sigh::VERSION
spec.authors = ["Felix Krause"]
spec.email = ["[email protected]"]
spec.summary = %q{Create, Renew and Download your provisioning profiles - using one command}
spec.description = %q{Create, Renew and Download your provisioning profiles - using one command}
spec.homepage = "http://krausefx.com"
spec.summary = %q{Because you would rather spend your time building stuff than fighting provisioning}
spec.description = %q{Because you would rather spend your time building stuff than fighting provisioning}
spec.homepage = "http://fastlane.tools"
spec.license = "MIT"

spec.required_ruby_version = '>= 2.0.0'
Expand All @@ -22,12 +22,11 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency 'json' # Because sometimes it's just not installed
spec.add_dependency 'security', '~> 0.1.3' # Mac OS Keychain manager
spec.add_dependency 'highline', '~> 1.6.21' # user inputs (e.g. passwords)
spec.add_dependency 'colored' # coloured terminal output
spec.add_dependency 'commander', '~> 4.2.0' # CLI parser

spec.add_dependency 'deliver' # password manager
spec.add_dependency 'credentials_manager' # fastlane password manager

# Frontend Scripting
spec.add_dependency 'capybara', '~> 2.4.3' # for controlling iTC
Expand All @@ -42,5 +41,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'webmock', '~> 1.19.0'
spec.add_development_dependency 'codeclimate-test-reporter'

spec.post_install_message = "This gem requires phantomjs. Install it using 'brew update && brew install phantomjs'"
spec.post_install_message = "sigh requires phantomjs. Install it using 'brew update && brew install phantomjs'"
end

0 comments on commit b4bdc62

Please sign in to comment.