appload 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6347d917460f916f69b72b275cca316c5565dd0a
4
+ data.tar.gz: e7388f6ad6c4c26b903d4f5bf17455e96a796af2
5
+ SHA512:
6
+ metadata.gz: f88061b88628858753c94792daf309b4fe5732605612788b0eb063bda39001cbfaafa2accde905d06f36f5d683529413d27381ff6c18f1871d5d7151d239a836
7
+ data.tar.gz: 6dd861e8a4323fe0553820b8a0503988dd554f72b9ed2008ca455475e82e951272ed6d9fa8015f7a02865bcabb146fed8dc801b72281a40fab262fa6612f1b0e
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,30 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-03-18 01:32:44 -0700 using RuboCop version 0.38.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ Metrics/AbcSize:
11
+ Max: 23
12
+
13
+ # Offense count: 1
14
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
15
+ # URISchemes: http, https
16
+ Metrics/LineLength:
17
+ Max: 104
18
+
19
+ # Offense count: 2
20
+ # Configuration parameters: CountComments.
21
+ Metrics/MethodLength:
22
+ Max: 20
23
+
24
+ # Offense count: 2
25
+ Style/Documentation:
26
+ Exclude:
27
+ - 'spec/**/*'
28
+ - 'test/**/*'
29
+ - 'lib/appload.rb'
30
+ - 'lib/appload/runner.rb'
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.3
4
+ before_install: gem install bundler -v 1.11.2
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2016 James Chang
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 James Chang
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,22 @@
1
+ appload
2
+ =======
3
+
4
+ [![Twitter: @longboardcat13](https://img.shields.io/badge/contact-@longboardcat13-blue.svg?style=flat)](https://twitter.com/longboardcat13)
5
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/longboardcat/appload/blob/master/LICENSE)
6
+ [![Build Status](https://travis-ci.org/longboardcat/appload.svg?branch=master)](https://travis-ci.org/longboardcat/appload)
7
+ [![Gem Version](https://badge.fury.io/rb/appload.svg)](http://badge.fury.io/rb/appload)
8
+
9
+ appload helps you double-check things you might have gotten wrong during an iOS iTunes Connect upload.
10
+
11
+ Usage
12
+ -----
13
+
14
+ [deliver][1] needs to be installed.
15
+
16
+ `gem install deliver`
17
+
18
+ `gem install appload`
19
+
20
+ `appload <path_to_ipa>`
21
+
22
+ [1]: https://github.com/fastlane/fastlane/tree/master/deliver
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'appload/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'appload'
8
+ spec.version = Appload::VERSION
9
+ spec.authors = ['James Chang']
10
+ spec.email = ['jchang@squareup.com']
11
+
12
+ spec.summary = 'Guiding iOS release managers through appstore upload.'
13
+ spec.description = 'Guiding iOS release managers through appstore upload.'
14
+ spec.homepage = 'https://github.com/longboardcat/appload'
15
+ spec.license = 'MIT'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_dependency 'awesome_print', '~> 1.6'
23
+ spec.add_dependency 'cocaine', '~> 0.5'
24
+ spec.add_dependency 'colored', '~> 1.2'
25
+ spec.add_dependency 'deliver', '~> 1.10'
26
+ spec.add_dependency 'pliney', '~> 0.0.4'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.11'
29
+ spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'rspec', '~> 3.0'
31
+ spec.add_development_dependency 'rubocop', '~> 0.38.0'
32
+ end
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
4
+
5
+ require 'appload'
6
+
7
+ Appload::Runner.start
@@ -0,0 +1,6 @@
1
+ require 'appload/runner'
2
+ require 'appload/options'
3
+ require 'appload/version'
4
+
5
+ module Appload
6
+ end
@@ -0,0 +1,29 @@
1
+ require 'optparse'
2
+
3
+ module Appload
4
+ # This class handles argument parsing
5
+ class Options
6
+ attr_reader :options
7
+
8
+ def initialize
9
+ @options = {}
10
+ parse_args
11
+ end
12
+
13
+ # Parsing arguments into hash form
14
+ def parse_args
15
+ raise 'Need to specify ipa path' unless ARGV[0]
16
+
17
+ OptionParser.new do |opts|
18
+ opts.banner = 'Usage: appload ipa'
19
+
20
+ opts.on('-h', '--help', 'Display usage') do
21
+ puts 'Usage: appload ipa'
22
+ exit
23
+ end
24
+
25
+ @options[:ipa_path] = ARGV[0]
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,97 @@
1
+ require 'awesome_print'
2
+ require 'cocaine'
3
+ require 'colored'
4
+ require 'pliney'
5
+
6
+ module Appload
7
+ class Runner
8
+ attr_accessor :options
9
+
10
+ def self.start
11
+ new.run
12
+ end
13
+
14
+ def run
15
+ puts "Appload #{Appload::VERSION}"
16
+ @options = Appload::Options.new.options
17
+ @ipa = Pliney::IPA.from_path(options[:ipa_path])
18
+
19
+ actions = [:check_ipa, :check_info_plist, :check_mpp]
20
+
21
+ actions.each do |action|
22
+ send(action)
23
+ prompt_user
24
+ end
25
+
26
+ submit!
27
+ end
28
+
29
+ def check_ipa
30
+ ap 'Please verify the following .ipa information:'
31
+ ap('path' => @options[:ipa_path],
32
+ bundle_id: @ipa.bundle_identifier)
33
+ end
34
+
35
+ def check_info_plist
36
+ ap(@ipa.info_plist, index: false)
37
+ end
38
+
39
+ def check_mpp
40
+ profile = @ipa.provisioning_profile
41
+
42
+ if !profile
43
+ puts 'No provisioning profile found in the .ipa!'.red
44
+ return
45
+ elsif profile.expired?
46
+ puts 'Provisioning profile expired!'.red
47
+ return
48
+ end
49
+
50
+ cert = profile.developer_certificates.first
51
+ fingerprint = OpenSSL::Digest::SHA1.new(cert.to_der).to_s.upcase
52
+
53
+ ap 'Please verify the following provisioning profile information:'
54
+ sleep(1.5)
55
+
56
+ ap({
57
+ name: profile.name,
58
+ team_id: profile.team_identifier,
59
+ SHA1: fingerprint,
60
+ devices: profile.provisioned_devices,
61
+ expiration: profile.expiration_date,
62
+ entitlements: profile.entitlements.ents
63
+ }, index: false)
64
+ end
65
+
66
+ def submit!
67
+ command = ['deliver', '--ipa', @options[:ipa_path]]
68
+ print 'Submit for review? '.green
69
+ command << '--submit_for_review' if yes?
70
+
71
+ puts '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'.red
72
+ puts '% Are you sure you want to submit? %'.red
73
+ puts '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'.red
74
+
75
+ if yes?
76
+ puts
77
+ puts 'Run this command:'.green
78
+ puts command.join(' ')
79
+ end
80
+ end
81
+
82
+ def prompt_user(message = 'Continue?', fail_hard = true, **_opts)
83
+ print "#{message} ".green
84
+
85
+ if yes?
86
+ true
87
+ else
88
+ exit if fail_hard
89
+ false
90
+ end
91
+ end
92
+
93
+ def yes?
94
+ %w(y Y).include?(STDIN.gets.chomp)
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,3 @@
1
+ module Appload
2
+ VERSION = '0.1.0'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: appload
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Chang
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: awesome_print
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cocaine
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.5'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: colored
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: deliver
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.10'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.10'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pliney
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.0.4
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.0.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.11'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.11'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '10.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '10.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.38.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.38.0
139
+ description: Guiding iOS release managers through appstore upload.
140
+ email:
141
+ - jchang@squareup.com
142
+ executables:
143
+ - appload
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - ".gitignore"
148
+ - ".rspec"
149
+ - ".rubocop_todo.yml"
150
+ - ".travis.yml"
151
+ - Gemfile
152
+ - Gemfile.lock
153
+ - LICENSE
154
+ - LICENSE.txt
155
+ - README.md
156
+ - Rakefile
157
+ - appload-1.0.0.gem
158
+ - appload.gemspec
159
+ - bin/appload
160
+ - lib/appload.rb
161
+ - lib/appload/options.rb
162
+ - lib/appload/runner.rb
163
+ - lib/appload/version.rb
164
+ homepage: https://github.com/longboardcat/appload
165
+ licenses:
166
+ - MIT
167
+ metadata: {}
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubyforge_project:
184
+ rubygems_version: 2.4.8
185
+ signing_key:
186
+ specification_version: 4
187
+ summary: Guiding iOS release managers through appstore upload.
188
+ test_files: []