Skip to content
This repository has been 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 da002de + 7ca347e commit ea07e1d
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 75 deletions.
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
- pem@krausefx.com
49 changes: 12 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PATH
remote: .
specs:
pem (0.2.3)
pem (0.3.0)
capybara (~> 2.4.3)
colored
commander (~> 4.2.0)
deliver
credentials_manager
highline (~> 1.6.21)
json
poltergeist (~> 1.5.1)
Expand All @@ -21,71 +21,53 @@ GEM
rack-test (>= 0.5.4)
xpath (~> 2.0)
cliver (0.3.2)
codeclimate-test-reporter (0.4.1)
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.3.6)
capybara (~> 2.4.3)
credentials_manager (0.1.0)
colored
commander (~> 4.2.0)
fastimage (~> 1.6.3)
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)
snapshot
diff-lcs (1.2.5)
docile (1.1.5)
fastimage (1.6.6)
addressable (~> 2.3, >= 2.3.5)
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.3.2)
rake (10.4.2)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.5)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.2)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.1)
rubyzip (1.1.6)
rspec-support (3.1.2)
safe_yaml (1.0.4)
security (0.1.3)
simplecov (0.9.1)
Expand All @@ -94,13 +76,6 @@ GEM
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.6.0)
snapshot (0.3.2)
colored
commander (~> 4.2.0)
fastimage (~> 1.6.3)
highline (~> 1.6.21)
json
ttfunk (1.4.0)
webmock (1.19.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand All @@ -109,7 +84,7 @@ GEM
websocket-extensions (0.1.1)
xpath (2.0.0)
nokogiri (~> 1.3)
yard (0.8.7.4)
yard (0.8.7.6)

PLATFORMS
ruby
Expand Down
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<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;
<b>PEM</b> &bull;
<a href="https://github.com/KrauseFx/sigh">Sigh</a>
<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;
<b>PEM</b> &bull;
<a href="https://github.com/KrauseFx/sigh">sigh</a>
</p>
-------

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

Pem - Maintain your push certificates
PEM - Maintain your push certificates
============

[![Twitter: @KauseFx](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/KrauseFx)
Expand Down Expand Up @@ -105,12 +112,14 @@ There are 2 actions involved:
```PEM``` 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!
- [```sigh```](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning

## [`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
- [`sigh`](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning

## 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/pem
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ $:.push File.expand_path("../../lib", __FILE__)

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

HighLine.track_eof = false


# Commander
program :version, PEM::VERSION
program :description, 'CLI for \'PEM\' - Automate maintaining of push notification profiles.'
program :help, 'Author', 'Felix Krause <krausefx@gmail.com>'
program :help, 'Website', 'http://felixkrause.at'
program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles'
program :help, 'Author', 'Felix Krause <pem@krausefx.com>'
program :help, 'Website', 'http://fastlane.tools'
program :help, 'GitHub', 'https://github.com/krausefx/PEM'
program :help_formatter, :compact

Expand Down Expand Up @@ -46,15 +47,17 @@ end
default_command :renew

def username(options)
user = nil
user = options.username if options.username
user = ENV["PEM_USERNAME"] if ENV["PEM_USERNAME"]
user = options.username
user ||= ENV["PEM_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["PEM_APP_IDENTIFIER"] if ENV["PEM_APP_IDENTIFIER"]
return ask("App Identifier (Bundle ID, e.g. com.krausefx.app): ")
value = options.identifier
value ||= ENV["PEM_APP_IDENTIFIER"]
value ||= CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
value ||= ask("App Identifier (Bundle ID, e.g. com.krausefx.app): ")
return value
end
16 changes: 8 additions & 8 deletions lib/pem/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 @@ -52,7 +52,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 @@ -65,8 +65,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 DEVELOPER_CENTER_URL
raise "Could not open Developer Center" unless result['status'] == 'success'
Expand Down Expand Up @@ -109,23 +109,23 @@ def login(user = nil, password = nil)

all("#saveTeamSelection_saveTeamSelection").first.click
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('#aprerelease')
rescue Exception => ex
rescue => ex
Helper.log.debug ex
raise DeveloperCenterLoginError.new("Error logging in user #{user} with the given password. Make sure you entered them correctly.")
end

Helper.log.info "Login successful"

true
rescue Exception => ex
rescue => ex
error_occured(ex)
end
end
Expand Down Expand Up @@ -170,7 +170,7 @@ def open_app_page(app_identifier)
else
raise DeveloperCenterGeneralError.new("Could not find app with identifier '#{app_identifier}' on apps page.")
end
rescue Exception => ex
rescue => ex
error_occured(ex)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/pem/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 'PEM' is up to date.")
end
return false
Expand Down
2 changes: 1 addition & 1 deletion lib/pem/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module PEM
VERSION = "0.2.3"
VERSION = "0.3.0"
end
9 changes: 5 additions & 4 deletions pem.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ Gem::Specification.new do |spec|
spec.version = PEM::VERSION
spec.authors = ["Felix Krause"]
spec.email = ["[email protected]"]
spec.summary = %q{Tired of creating and maintaining your push certification profiles? PEM does all that for you.}
spec.description = %q{Tired of creating and maintaining your push certification profiles? PEM helps you creating and maintaining your iOS push notification certificates.}
spec.homepage = "http://krausefx.com"
spec.summary = %q{Automatically generate and renew your push notification profiles}
spec.description = %q{Automatically generate and renew your push notification profiles}
spec.homepage = "http://fastlane.tools"

spec.license = "MIT"

spec.required_ruby_version = '>= 2.0.0'
Expand All @@ -26,7 +27,7 @@ Gem::Specification.new do |spec|
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 Down

0 comments on commit ea07e1d

Please sign in to comment.