establish 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +34 -0
- data/.rspec +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +66 -0
- data/LICENSE +21 -0
- data/README.md +30 -0
- data/Rakefile +3 -0
- data/establish.gemspec +31 -0
- data/lib/establish/app.rb +58 -0
- data/lib/establish/helper.rb +21 -0
- data/lib/establish/itunes_connect.rb +124 -0
- data/lib/establish/itunes_search_api.rb +21 -0
- data/lib/establish/password_manager.rb +24 -0
- data/lib/establish/version.rb +3 -0
- data/lib/establish.rb +9 -0
- data/spec/app_spec.rb +25 -0
- data/spec/helper_spec.rb +12 -0
- data/spec/itunes_connect_spec.rb +7 -0
- data/spec/itunes_search_api_spec.rb +17 -0
- data/spec/password_manager_spec.rb +25 -0
- data/spec/spec_helper.rb +1 -0
- data/tasks/rspec.rake +3 -0
- metadata +170 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 16eb9e7bd489136ebb688a02730bfd2673690091f5dda98a6a32a826b718abcc
|
4
|
+
data.tar.gz: 5eb471ab555a6281860ac3d5e654ec3f51376d91d39d5bc17d26b330f8c4173c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 93c9e9e5fb3e5ba6034530bdba99f6881b6a63715723366d247b985cdcff151166f58c9cd0c08cb3485098afc2412157ebb6080a8f408d1d16e781ae7192e2fd
|
7
|
+
data.tar.gz: 9d3fa8b4cbce0c87994788e4427c3037a8c7e71bcc82a2e26ad354c2d65611bc220da92a3412c145b78ba2b3a47907e6b1769789b0ccfb978738597049ee26c5
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --require spec_helper --format d
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
PATH
|
2
|
+
remote:
|
3
|
+
specs:
|
4
|
+
establish (0.0.1)
|
5
|
+
capybara
|
6
|
+
poltergeist
|
7
|
+
security
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
capybara (2.4.3)
|
13
|
+
mime-types (>= 1.16)
|
14
|
+
nokogiri (>= 1.3.3)
|
15
|
+
rack (>= 1.0.0)
|
16
|
+
rack-test (>= 0.5.4)
|
17
|
+
xpath (~> 2.0)
|
18
|
+
cliver (0.3.2)
|
19
|
+
coderay (1.1.0)
|
20
|
+
diff-lcs (1.2.5)
|
21
|
+
method_source (0.8.2)
|
22
|
+
mime-types (2.3)
|
23
|
+
mini_portile (0.6.0)
|
24
|
+
multi_json (1.10.1)
|
25
|
+
nokogiri (1.6.3.1)
|
26
|
+
mini_portile (= 0.6.0)
|
27
|
+
poltergeist (1.5.1)
|
28
|
+
capybara (~> 2.1)
|
29
|
+
cliver (~> 0.3.1)
|
30
|
+
multi_Json (~> 1.0)
|
31
|
+
websocket-driver (>= 0.2.0)
|
32
|
+
pry (0.10.1)
|
33
|
+
coderay (~> 1.1.0)
|
34
|
+
method_source (~> 0.8.1)
|
35
|
+
slop (~> 3.4)
|
36
|
+
rack (1.5.2)
|
37
|
+
rack-test (0.6.2)
|
38
|
+
rack (>= 1.0)
|
39
|
+
rake (10.3.2)
|
40
|
+
rspec (3.1.0)
|
41
|
+
rspec-core (~> 3.1.0)
|
42
|
+
rspec-expectations (~> 3.1.0)
|
43
|
+
rspec-mocks (~> 3.1.0)
|
44
|
+
rspec-core (3.1.4)
|
45
|
+
rspec-support (~> 3.1.0)
|
46
|
+
rspec-expectations (3.1.1)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.1.0)
|
49
|
+
rspec-mocks (3.1.1)
|
50
|
+
rspec-support (~> 3.1.0)
|
51
|
+
rspec-support (3.1.0)
|
52
|
+
security (0.1.3)
|
53
|
+
slop (3.6.0)
|
54
|
+
websocket-driver (0.3.4)
|
55
|
+
xpath (2.0.0)
|
56
|
+
nokogiri (~> 1.3)
|
57
|
+
|
58
|
+
PLATFORMS
|
59
|
+
ruby
|
60
|
+
|
61
|
+
DEPENDENCIES
|
62
|
+
bundler (~> 1.6)
|
63
|
+
establish!
|
64
|
+
pry
|
65
|
+
rake
|
66
|
+
rspec
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 Vincenzo Fehring
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
Establish for iOS apps
|
2
|
+
=========
|
3
|
+
|
4
|
+
Updating your iOS app should not be painful and time consuming. Automate the whole process to start with Continuous Deployment.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'establish'
|
11
|
+
|
12
|
+
Add then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install establish
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
TODO: Write usage instructions here
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it ( https://github.com/vincenzofehring/establish/fork )
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/establish.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'establish/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "establish"
|
8
|
+
spec.version = Establish::VERSION
|
9
|
+
spec.authors = ["Vincenzo Fehring"]
|
10
|
+
spec.email = ["vincenzo.fehring@me.com"]
|
11
|
+
spec.summary = "Updating your iOS app should not be painful and time consuming."
|
12
|
+
spec.description = "Updating your iOS app should not be painful and time consuming. Automate the whole process to start with Continuous Deployment."
|
13
|
+
spec.homepage = "http://vincenzofehring.com"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.required_ruby_version = '>= 1.9.3'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_dependency "capybara"
|
24
|
+
spec.add_dependency "poltergeist"
|
25
|
+
spec.add_dependency "security" # Mac OS Keychain manager
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "rspec"
|
30
|
+
spec.add_development_dependency "pry"
|
31
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Establish
|
2
|
+
class App
|
3
|
+
attr_accessor :apple_id, :app_identifier
|
4
|
+
|
5
|
+
module AppStatus
|
6
|
+
# As specified by Apple: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/ChanginAppStatus.html
|
7
|
+
PREPARE_FOR_SUBMISSION = "Prepare for Submission"
|
8
|
+
WAITING_FOR_REVIEW = "Waiting for Review"
|
9
|
+
IN_REVIEW = "In Review"
|
10
|
+
UPLOAD_RECEIVED = "Upload Received"
|
11
|
+
# PENDING_CONTRACT = "Pending Contract"
|
12
|
+
# WAITING_FOR_EXPORT_COMPLIANCE = "Waiting for Export Compliance"
|
13
|
+
PENDING_DEVELOPER_RELEASE = "Pending Developer Release"
|
14
|
+
PROCESSING_FOR_APP_STORE = "Processing for App Store"
|
15
|
+
# PENDING_APPLE_RELEASE = "Pending Apple Release"
|
16
|
+
READY_FOR_SALE = "Ready for Sale"
|
17
|
+
REJECTED = "Rejected"
|
18
|
+
# METADATA_REJECTED = "Metadata Rejected"
|
19
|
+
# REMOVED_FROM_SALE = "Removed from Sale"
|
20
|
+
# DEVELOPER_REJECTED = "Developer Rejected" # equals PREPARE_FOR_SUBMISSION
|
21
|
+
# DEVELOPER_REMOVED_FROM_SALE = "Developer Removed from Sale"
|
22
|
+
# INVALID_BINARY = "Invalid Binary"
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
def initialize(apple_id = nil, app_identifier = nil)
|
27
|
+
self.apple_id = apple_id
|
28
|
+
self.app_identifier = app_identifier
|
29
|
+
|
30
|
+
if apple_id and not app_identifier
|
31
|
+
self.app_identifier = Establish::ItunesSearchApi.fetch_bundle_identifier(apple_id)
|
32
|
+
Helper.log.debug "Created app with ID #{apple_id} and app_identifier #{self.app_identifier}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def itc
|
37
|
+
@itc ||= Establish::ItunesConnect.new
|
38
|
+
end
|
39
|
+
|
40
|
+
def open_in_itunes_connect
|
41
|
+
itc.open_app_page(self)
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_app_status
|
45
|
+
itc.get_app_status(self)
|
46
|
+
end
|
47
|
+
|
48
|
+
def to_s
|
49
|
+
"#{apple_id} - #{app_identifier}"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Destructive/Constructive meethods
|
53
|
+
|
54
|
+
def create_new_version!(version_number)
|
55
|
+
itc.create_new_version!(self, version_number)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Establish
|
2
|
+
module Helper
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
def self.log
|
7
|
+
@@log ||= Logger.new(STDOUT)
|
8
|
+
|
9
|
+
@@log
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.xcode_path
|
13
|
+
`xcode-select -p`.gsub("\n", '') + "/"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.transporter_path
|
17
|
+
self.xcode_path + '../Applications/Application\ Loader.app/Contents/MacOS/itms/bin/iTMSTransporter'
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
require 'establish/password_manager'
|
2
|
+
|
3
|
+
require 'capybara'
|
4
|
+
require 'capybara/poltergeist'
|
5
|
+
require 'security'
|
6
|
+
|
7
|
+
# TODO: Dev only
|
8
|
+
require 'pry'
|
9
|
+
|
10
|
+
|
11
|
+
module Establish
|
12
|
+
class ItunesConnect
|
13
|
+
include Capybara::DSL
|
14
|
+
|
15
|
+
ITUNESCONNECT_URL = "https://itunesconnect.apple.com"
|
16
|
+
APP_DETAILS_URL = "https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/[[app_id]]"
|
17
|
+
|
18
|
+
BUTTON_STRING_NEW_VERSION = "New Version"
|
19
|
+
BUTTON_STRING_SUBMIT_FOR_REVIEW = "Submit for Review"
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
super
|
23
|
+
|
24
|
+
Capybara.default_driver = :poltergeist
|
25
|
+
|
26
|
+
self.login
|
27
|
+
end
|
28
|
+
|
29
|
+
def login(user = nil, password = nil)
|
30
|
+
Helper.log.info "Logging into iTunesConnect"
|
31
|
+
|
32
|
+
host = "itunesconnect.apple.com"
|
33
|
+
|
34
|
+
user ||= PasswordManager.new.username
|
35
|
+
password ||= PasswordManager.new.password
|
36
|
+
|
37
|
+
visit ITUNESCONNECT_URL
|
38
|
+
fill_in "accountname", with: user
|
39
|
+
fill_in "accountpassword", with: password
|
40
|
+
|
41
|
+
begin
|
42
|
+
wait_for_elements(".enabled").first.click
|
43
|
+
wait_for_elements('.ng-scope.managedWidth')
|
44
|
+
rescue
|
45
|
+
raise "Error logging in user #{user} with the given password. Make sure you set them correctly"
|
46
|
+
end
|
47
|
+
|
48
|
+
Helper.log.info "Successfully logged into iTunesConnect"
|
49
|
+
true
|
50
|
+
end
|
51
|
+
|
52
|
+
def open_app_page(app)
|
53
|
+
Helper.log.info "Opening detail page for app #{app}"
|
54
|
+
|
55
|
+
visit APP_DETAILS_URL.gsub("[[app_id]]", app.apple_id.to_s)
|
56
|
+
|
57
|
+
wait_for_elements('.page-subnav')
|
58
|
+
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_app_status(app)
|
63
|
+
open_app_page(app)
|
64
|
+
|
65
|
+
if page.has_content?"Waiting For Review"
|
66
|
+
# That's either Upload Received or Waiting for Review
|
67
|
+
if page.has_content?"To submit a new build, you must remove this version from review"
|
68
|
+
return App::AppStatus::WAITING_FOR_REVIEW
|
69
|
+
else
|
70
|
+
return App::AppStatus::UPLOAD_RECEIVED
|
71
|
+
end
|
72
|
+
elsif page.has_content?BUTTON_STRING_NEW_VERSION
|
73
|
+
return App::AppStatus::READY_FOR_SALE
|
74
|
+
elsif page.has_content?BUTTON_STRING_SUBMIT_FOR_REVIEW
|
75
|
+
return App::AppStatus::PREPARE_FOR_SUBMISSION
|
76
|
+
else
|
77
|
+
raise "App status not yet implemented"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
# Constructive/Destructive Methods
|
84
|
+
def create_new_version!(app, version_number)
|
85
|
+
open_app_page(app)
|
86
|
+
|
87
|
+
if page.has_content?BUTTON_STRING_NEW_VERSION
|
88
|
+
click_on BUTTON_STRING_NEW_VERSION
|
89
|
+
|
90
|
+
Helper.log.info "Creating a new version (#{version_number})"
|
91
|
+
|
92
|
+
all(".fullWidth.nobottom.ng-isolate-scope.ng-pristine").last.set(version_number.to_s)
|
93
|
+
click_on "Create"
|
94
|
+
else
|
95
|
+
Helper.log.info "Creating a new version"
|
96
|
+
end
|
97
|
+
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
# Helper - move out
|
104
|
+
|
105
|
+
def wait_for_elements(name)
|
106
|
+
counter = 0
|
107
|
+
results = all(name)
|
108
|
+
while results.count == 0
|
109
|
+
Helper.log.debug "Waiting for #{name}"
|
110
|
+
sleep 0.2
|
111
|
+
|
112
|
+
results = all(name)
|
113
|
+
|
114
|
+
counter += 1
|
115
|
+
if counter > 100
|
116
|
+
Helper.log.debug page.html
|
117
|
+
Helper.log.debug caller
|
118
|
+
raise "Couldn't find element '#{name}' after waiting for quite some time"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
return results
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Establish
|
4
|
+
class ItunesSearchApi
|
5
|
+
def self.fetch(id)
|
6
|
+
# Example: https://itunes.apple.com/lookup?id=284882215
|
7
|
+
|
8
|
+
response = JSON.parse(open("https://itunes.apple.com/lookup?id=#{id}").read)
|
9
|
+
return nil if response['resultCount'] == 0
|
10
|
+
|
11
|
+
return response['results'].first
|
12
|
+
rescue
|
13
|
+
Helper.log.error "Could not find object '#{id}' using the iTunes API"
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.fetch_bundle_identifier(id)
|
18
|
+
self.fetch(id)['bundleId']
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'security'
|
2
|
+
|
3
|
+
module Establish
|
4
|
+
class PasswordManager
|
5
|
+
attr_accessor :username, :password
|
6
|
+
|
7
|
+
HOST = "itunesconnect.apple.com"
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
|
11
|
+
self.username ||= ENV["ESTABLISH_USER"] || self.load_from_keychain[0]
|
12
|
+
self.password ||= ENV["ESTABLISH_PASSWORD"] || self.load_from_keychain[1]
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
def load_from_keychain
|
18
|
+
pass = Security::InternetPassword.find(:server => Establish::PasswordManager::HOST)
|
19
|
+
|
20
|
+
return [pass.attributes['acct'], pass.password] if pass
|
21
|
+
return [nil, nil]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/establish.rb
ADDED
data/spec/app_spec.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
describe Establish do
|
2
|
+
describe Establish::App do
|
3
|
+
let (:apple_id) { 284882215 }
|
4
|
+
let (:app_identifier) { 'com.facebook.Facebook' }
|
5
|
+
describe "#initialize" do
|
6
|
+
it "automatically fetches the app identifier, if only Apple ID is given" do
|
7
|
+
app = Establish::App.new(apple_id)
|
8
|
+
|
9
|
+
app.app_identifier.should eq(app_identifier)
|
10
|
+
app.apple_id.should eq(apple_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "lets me create an app using an Apple ID and app identifier" do
|
14
|
+
app = Establish::App.new(apple_id, "com.facebook.Facebook")
|
15
|
+
|
16
|
+
app.app_identifier.should eq(app_identifier)
|
17
|
+
app.apple_id.should eq(apple_id)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "lets me create an app without any information given (yet)" do
|
21
|
+
Establish::App.new.app_identifier.should eq(nil)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/spec/helper_spec.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
describe Establish do
|
2
|
+
describe Establish::Helper do
|
3
|
+
it "#xcode_path" do
|
4
|
+
Establish::Helper.xcode_path[-1].should eq('/')
|
5
|
+
Establish::Helper.xcode_path.should eq("/Applications/Xcode.app/Contents/Developer/")
|
6
|
+
end
|
7
|
+
|
8
|
+
it "#transporter_path" do
|
9
|
+
Establish::Helper.transporter_path.should eq("/Applications/Xcode.app/Contents/Developer/../Applications/Application\\ Loader.app/Contents/MacOS/itms/bin/iTMSTransporter")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
describe Establish do
|
2
|
+
describe Establish::ItunesSearchApi do
|
3
|
+
it "returns nil when it could not be found" do
|
4
|
+
Establish::ItunesSearchApi.fetch("invalid").should eq(nil)
|
5
|
+
Establish::ItunesSearchApi.fetch("").should eq(nil)
|
6
|
+
Establish::ItunesSearchApi.fetch(123).should eq(nil)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "returns the actual object if it could be found" do
|
10
|
+
response = Establish::ItunesSearchApi.fetch("284882215")
|
11
|
+
response['kind'].should eq('software')
|
12
|
+
response['supportedDevices'].count.should be > 8
|
13
|
+
|
14
|
+
Establish::ItunesSearchApi.fetch_bundle_identifier("284882215").should eq('com.facebook.Facebook')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'establish/password_manager'
|
2
|
+
|
3
|
+
describe Establish do
|
4
|
+
describe Establish::PasswordManager do
|
5
|
+
let (:username) { "test@example123.com" }
|
6
|
+
let (:password) { "somethingFancy123$" }
|
7
|
+
|
8
|
+
before do
|
9
|
+
ENV["ESTABLISH_USER"] = username
|
10
|
+
ENV["ESTABLISH_PASSWORD"] = password
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "#username" do
|
14
|
+
it "uses the environment variable if given" do
|
15
|
+
Establish::PasswordManager.new.username.should eq(username)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#password" do
|
20
|
+
it "uses the environment variable if given" do
|
21
|
+
Establish::PasswordManager.new.password.should eq(password)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'establish'
|
data/tasks/rspec.rake
ADDED
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: establish
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.20
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vincenzo Fehring
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-06-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capybara
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: poltergeist
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: security
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Updating your iOS app should not be painful and time consuming. Automate
|
112
|
+
the whole process to start with Continuous Deployment.
|
113
|
+
email:
|
114
|
+
- vincenzo.fehring@me.com
|
115
|
+
executables: []
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- Gemfile
|
122
|
+
- Gemfile.lock
|
123
|
+
- LICENSE
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- establish.gemspec
|
127
|
+
- lib/establish.rb
|
128
|
+
- lib/establish/app.rb
|
129
|
+
- lib/establish/helper.rb
|
130
|
+
- lib/establish/itunes_connect.rb
|
131
|
+
- lib/establish/itunes_search_api.rb
|
132
|
+
- lib/establish/password_manager.rb
|
133
|
+
- lib/establish/version.rb
|
134
|
+
- spec/app_spec.rb
|
135
|
+
- spec/helper_spec.rb
|
136
|
+
- spec/itunes_connect_spec.rb
|
137
|
+
- spec/itunes_search_api_spec.rb
|
138
|
+
- spec/password_manager_spec.rb
|
139
|
+
- spec/spec_helper.rb
|
140
|
+
- tasks/rspec.rake
|
141
|
+
homepage: http://vincenzofehring.com
|
142
|
+
licenses:
|
143
|
+
- MIT
|
144
|
+
metadata: {}
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options: []
|
147
|
+
require_paths:
|
148
|
+
- lib
|
149
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 1.9.3
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
requirements: []
|
160
|
+
rubygems_version: 3.0.3
|
161
|
+
signing_key:
|
162
|
+
specification_version: 4
|
163
|
+
summary: Updating your iOS app should not be painful and time consuming.
|
164
|
+
test_files:
|
165
|
+
- spec/app_spec.rb
|
166
|
+
- spec/helper_spec.rb
|
167
|
+
- spec/itunes_connect_spec.rb
|
168
|
+
- spec/itunes_search_api_spec.rb
|
169
|
+
- spec/password_manager_spec.rb
|
170
|
+
- spec/spec_helper.rb
|