diff --git a/.travis.yml b/.travis.yml index 9d85afc..ceda26d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ rvm: - 2.1.0 notifications: email: - - krausefx@gmail.com \ No newline at end of file + - pem@krausefx.com \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 81bce5b..3badd0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -21,7 +21,7 @@ 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) @@ -29,63 +29,45 @@ GEM 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) @@ -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) @@ -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 diff --git a/README.md b/README.md index f6c6fd0..1b0a917 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,16 @@ +

+ + +
+ fastlane +
+

- Deliver • - Snapshot • - FrameIt • - PEM • - Sigh + deliver • + snapshot • + frameit • + PEM • + sigh

------- @@ -11,7 +18,7 @@

-Pem - Maintain your push certificates +PEM - Maintain your push certificates ============ [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx) @@ -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). diff --git a/assets/fastlane.png b/assets/fastlane.png new file mode 100644 index 0000000..121b0b4 Binary files /dev/null and b/assets/fastlane.png differ diff --git a/bin/pem b/bin/pem index f32736a..769ed6a 100755 --- a/bin/pem +++ b/bin/pem @@ -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 ' -program :help, 'Website', 'http://felixkrause.at' +program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles' +program :help, 'Author', 'Felix Krause ' +program :help, 'Website', 'http://fastlane.tools' program :help, 'GitHub', 'https://github.com/krausefx/PEM' program :help_formatter, :compact @@ -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 diff --git a/lib/pem/developer_center.rb b/lib/pem/developer_center.rb index 3de3993..711ba96 100644 --- a/lib/pem/developer_center.rb +++ b/lib/pem/developer_center.rb @@ -1,4 +1,4 @@ -require 'deliver/password_manager' +require 'credentials_manager/password_manager' require 'open-uri' require 'openssl' @@ -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 @@ -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' @@ -109,7 +109,7 @@ 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 @@ -117,7 +117,7 @@ def login(user = nil, password = nil) 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 @@ -125,7 +125,7 @@ def login(user = nil, password = nil) Helper.log.info "Login successful" true - rescue Exception => ex + rescue => ex error_occured(ex) end end @@ -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 diff --git a/lib/pem/update_checker.rb b/lib/pem/update_checker.rb index 7d383c9..598716d 100644 --- a/lib/pem/update_checker.rb +++ b/lib/pem/update_checker.rb @@ -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 diff --git a/lib/pem/version.rb b/lib/pem/version.rb index 967e039..eb1eea5 100644 --- a/lib/pem/version.rb +++ b/lib/pem/version.rb @@ -1,3 +1,3 @@ module PEM - VERSION = "0.2.3" + VERSION = "0.3.0" end diff --git a/pem.gemspec b/pem.gemspec index 4d5bdd1..caf13c0 100644 --- a/pem.gemspec +++ b/pem.gemspec @@ -8,9 +8,10 @@ Gem::Specification.new do |spec| spec.version = PEM::VERSION spec.authors = ["Felix Krause"] spec.email = ["pem@krausefx.com"] - 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' @@ -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