produce 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/lib/produce/config.rb +56 -23
- data/lib/produce/itunes_connect.rb +9 -0
- data/lib/produce/manager.rb +2 -2
- data/lib/produce/update_checker.rb +1 -1
- data/lib/produce/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8becb8d4af003c48c8ab30a54ab0f3271f1b587
|
4
|
+
data.tar.gz: 4070c10bdecd9d45c0699ea0af277b83fc8527fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e3b535ff76b7f9d35d95c7ce105ff9878b5a7c7af5e8c72406f6237c5ecd4721eeaf826533f464622a79a1834a5c10d5661c3e423d1f99f0b6139f9da3f75fe
|
7
|
+
data.tar.gz: afee6dd96be076d475ccfa4fc670cdaab8ca4fd10aefc99e56a4b7b0cf7b50e54a9872a1dac1d3f051c5151dd607da5ecdc1687cb68f52dfa7bae80016a389c6
|
data/README.md
CHANGED
@@ -83,20 +83,26 @@ In case you want to pass more information to `produce`:
|
|
83
83
|
- `PRODUCE_TEAM_ID` (the Team ID, e.g. `Q2CBPK58CA`)
|
84
84
|
- `PRODUCE_TEAM_NAME` (the Team Name, e.g. `Felix Krause`)
|
85
85
|
|
86
|
-
## `fastlane` Integration
|
86
|
+
## [`fastlane`](https://github.com/KrauseFx/fastlane) Integration
|
87
87
|
|
88
|
-
Your `Fastfile`
|
88
|
+
Your `Fastfile` should look like this
|
89
89
|
```ruby
|
90
90
|
lane :appstore do
|
91
91
|
produce({
|
92
|
-
|
92
|
+
produce_username: 'felix@krausefx.com',
|
93
|
+
produce_app_identifier: 'com.krausefx.app',
|
94
|
+
produce_app_name: 'MyApp',
|
95
|
+
produce_language: 'English',
|
96
|
+
produce_version: '1.0',
|
97
|
+
produce_sku: 123,
|
98
|
+
produce_team_name: 'SunApps GmbH' # only necessary when in multiple teams
|
93
99
|
})
|
94
100
|
|
95
101
|
deliver
|
96
102
|
end
|
97
103
|
```
|
98
104
|
|
99
|
-
To use the newly generated app in `deliver`, you
|
105
|
+
To use the newly generated app in `deliver`, you need to add this line to your `Deliverfile`:
|
100
106
|
|
101
107
|
```ruby
|
102
108
|
apple_id ENV['PRODUCE_APPLE_ID']
|
data/lib/produce/config.rb
CHANGED
@@ -1,41 +1,74 @@
|
|
1
1
|
module Produce
|
2
2
|
class Config
|
3
|
-
|
3
|
+
ASK_MESSAGES = {
|
4
|
+
bundle_identifier: "App Identifier (Bundle ID, e.g. com.krausefx.app): ",
|
5
|
+
app_name: "App Name: ",
|
6
|
+
version: "Initial version number (e.g. '1.0'): ",
|
7
|
+
sku: "SKU Number (e.g. '1234'): ",
|
8
|
+
primary_language: "Primary Language (e.g. 'English', 'German'): "
|
9
|
+
}
|
10
|
+
|
11
|
+
attr_reader :config
|
4
12
|
|
5
13
|
def self.shared_config
|
6
14
|
@@shared ||= self.new
|
7
15
|
end
|
8
16
|
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
:app_name => ENV['PRODUCE_APP_NAME'],
|
13
|
-
:primary_language => ENV['PRODUCE_LANGUAGE'],
|
14
|
-
:version => ENV['PRODUCE_VERSION'],
|
15
|
-
:sku => ENV['PRODUCE_SKU']
|
16
|
-
}
|
17
|
+
def self.shared_config= config
|
18
|
+
@@shared = config
|
19
|
+
end
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
def self.env_options
|
22
|
+
hash = {
|
23
|
+
bundle_identifier: ENV['PRODUCE_APP_IDENTIFIER'],
|
24
|
+
app_name: ENV['PRODUCE_APP_NAME'],
|
25
|
+
version: ENV['PRODUCE_VERSION'],
|
26
|
+
sku: ENV['PRODUCE_SKU'],
|
27
|
+
skip_itc: skip_itc?(ENV['PRODUCE_SKIP_ITC'])
|
28
|
+
}
|
29
|
+
if ENV['PRODUCE_LANGUAGE']
|
30
|
+
language = ENV['PRODUCE_LANGUAGE']
|
31
|
+
if is_valid_language?(language)
|
32
|
+
hash[:primary_language] = language
|
27
33
|
else
|
28
|
-
|
34
|
+
Helper.log.error "PRODUCE_LANGUAGE is set to #{language} but it's not one of available languages. You'll be asked to set language again if needed."
|
29
35
|
end
|
30
36
|
end
|
37
|
+
hash[:bundle_identifier] ||= CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
|
38
|
+
hash.delete_if { |key, value| value.nil? }
|
39
|
+
hash
|
40
|
+
end
|
31
41
|
|
32
|
-
|
33
|
-
@config
|
42
|
+
def initialize(options = {})
|
43
|
+
@config = Config.env_options.merge(options)
|
34
44
|
end
|
35
45
|
|
36
46
|
def self.val(key)
|
37
|
-
raise "Please only pass symbols, no Strings to this method".red unless key.kind_of?Symbol
|
38
|
-
|
47
|
+
raise "Please only pass symbols, no Strings to this method".red unless key.kind_of? Symbol
|
48
|
+
|
49
|
+
unless self.shared_config.config.has_key? key
|
50
|
+
self.shared_config.config[key] = ask(ASK_MESSAGES[key]) do |q|
|
51
|
+
case key
|
52
|
+
when :primary_language
|
53
|
+
q.validate = lambda { |val| is_valid_language?(val) }
|
54
|
+
q.responses[:not_valid] = "Please enter one of available languages: #{AvailableDefaultLanguages.all_langauges}"
|
55
|
+
else
|
56
|
+
q.validate = lambda { |val| !val.empty? }
|
57
|
+
q.responses[:not_valid] = "#{key.to_s.gsub('_', ' ').capitalize} can't be blank"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
return self.shared_config.config[key]
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.is_valid_language? language
|
66
|
+
language = language.split.map(&:capitalize).join(' ')
|
67
|
+
AvailableDefaultLanguages.all_langauges.include? language
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.skip_itc? value
|
71
|
+
%w( true t 1 yes y ).include? value.to_s.downcase
|
39
72
|
end
|
40
73
|
end
|
41
74
|
end
|
@@ -126,6 +126,8 @@ module Produce
|
|
126
126
|
|
127
127
|
initial_create
|
128
128
|
|
129
|
+
initial_pricing
|
130
|
+
|
129
131
|
raise "Something went wrong when creating the new app - it's not listed in the App's list" unless app_exists?
|
130
132
|
|
131
133
|
Helper.log.info "Finished creating new app '#{Config.val(:app_name)}' on iTunes Connect".green
|
@@ -180,6 +182,13 @@ module Produce
|
|
180
182
|
Helper.log.info "Successfully created new app '#{Config.val(:app_name)}' on iTC. Setting up the initial information now.".green
|
181
183
|
end
|
182
184
|
|
185
|
+
def initial_pricing
|
186
|
+
sleep 3
|
187
|
+
click_on "Pricing"
|
188
|
+
first('#pricingPopup > option[value="3"]').select_option
|
189
|
+
first('.saveChangesActionButton').click
|
190
|
+
end
|
191
|
+
|
183
192
|
private
|
184
193
|
def app_exists?
|
185
194
|
open_new_app_popup # to get the dropdown of available app identifier, if it's there, the app was not yet created
|
data/lib/produce/manager.rb
CHANGED
data/lib/produce/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: produce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -206,8 +206,8 @@ dependencies:
|
|
206
206
|
- - '>='
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
-
description:
|
210
|
-
|
209
|
+
description: Create new iOS apps on iTunes Connect and Dev Portal using the command
|
210
|
+
line
|
211
211
|
email:
|
212
212
|
- produce@krausefx.com
|
213
213
|
executables:
|
@@ -252,6 +252,6 @@ rubyforge_project:
|
|
252
252
|
rubygems_version: 2.2.2
|
253
253
|
signing_key:
|
254
254
|
specification_version: 4
|
255
|
-
summary:
|
255
|
+
summary: Create new iOS apps on iTunes Connect and Dev Portal using the command line
|
256
256
|
test_files: []
|
257
257
|
has_rdoc:
|