produce/lib/produce/commands_generator.rb in fastlane-2.74.1 vs produce/lib/produce/commands_generator.rb in fastlane-2.75.0.beta.20180109010003
- old
+ new
@@ -34,103 +34,103 @@
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__)
- puts Produce::Manager.start_producing
+ puts(Produce::Manager.start_producing)
end
end
command :enable_services do |c|
c.syntax = 'fastlane produce enable_services -a APP_IDENTIFIER SERVICE1, SERVICE2, ...'
c.description = 'Enable specific Application Services for a specific app on the Apple Developer Portal'
- c.example 'Enable HealthKit, HomeKit and Passbook', 'fastlane produce enable_services -a com.example.app --healthkit --homekit --passbook'
+ c.example('Enable HealthKit, HomeKit and Passbook', 'fastlane produce enable_services -a com.example.app --healthkit --homekit --passbook')
- c.option '--app-group', 'Enable App Groups'
- c.option '--apple-pay', 'Enable Apple Pay'
- c.option '--associated-domains', 'Enable Associated Domains'
- c.option '--data-protection STRING', String, 'Enable Data Protection, suitable values are "complete", "unlessopen" and "untilfirstauth"'
- c.option '--game-center', 'Enable Game Center'
- c.option '--healthkit', 'Enable HealthKit'
- c.option '--homekit', 'Enable HomeKit'
- c.option '--wireless-conf', 'Enable Wireless Accessory Configuration'
- c.option '--icloud STRING', String, 'Enable iCloud, suitable values are "legacy" and "cloudkit"'
- c.option '--in-app-purchase', 'Enable In-App Purchase'
- c.option '--inter-app-audio', 'Enable Inter-App-Audio'
- c.option '--passbook', 'Enable Passbook'
- c.option '--push-notification', 'Enable Push notification (only enables the service, does not configure certificates)'
- c.option '--sirikit', 'Enable SiriKit'
- c.option '--vpn-conf', 'Enable VPN Configuration'
+ c.option('--app-group', 'Enable App Groups')
+ c.option('--apple-pay', 'Enable Apple Pay')
+ c.option('--associated-domains', 'Enable Associated Domains')
+ c.option('--data-protection STRING', String, 'Enable Data Protection, suitable values are "complete", "unlessopen" and "untilfirstauth"')
+ c.option('--game-center', 'Enable Game Center')
+ c.option('--healthkit', 'Enable HealthKit')
+ c.option('--homekit', 'Enable HomeKit')
+ c.option('--wireless-conf', 'Enable Wireless Accessory Configuration')
+ c.option('--icloud STRING', String, 'Enable iCloud, suitable values are "legacy" and "cloudkit"')
+ c.option('--in-app-purchase', 'Enable In-App Purchase')
+ c.option('--inter-app-audio', 'Enable Inter-App-Audio')
+ c.option('--passbook', 'Enable Passbook')
+ c.option('--push-notification', 'Enable Push notification (only enables the service, does not configure certificates)')
+ c.option('--sirikit', 'Enable SiriKit')
+ c.option('--vpn-conf', 'Enable VPN Configuration')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
# Filter the options so that we can still build the configuration
allowed_keys = Produce::Options.available_options.collect(&:key)
- Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include?(key) })
require 'produce/service'
Produce::Service.enable(options, args)
end
end
command :disable_services do |c|
c.syntax = 'fastlane produce disable_services -a APP_IDENTIFIER SERVICE1, SERVICE2, ...'
c.description = 'Disable specific Application Services for a specific app on the Apple Developer Portal'
- c.example 'Disable HealthKit', 'fastlane produce disable_services -a com.example.app --healthkit'
+ c.example('Disable HealthKit', 'fastlane produce disable_services -a com.example.app --healthkit')
- c.option '--app-group', 'Disable App Groups'
- c.option '--apple-pay', 'Disable Apple Pay'
- c.option '--associated-domains', 'Disable Associated Domains'
- c.option '--data-protection', 'Disable Data Protection'
- c.option '--game-center', 'Disable Game Center'
- c.option '--healthkit', 'Disable HealthKit'
- c.option '--homekit', 'Disable HomeKit'
- c.option '--wireless-conf', 'Disable Wireless Accessory Configuration'
- c.option '--icloud', 'Disable iCloud'
- c.option '--in-app-purchase', 'Disable In-App Purchase'
- c.option '--inter-app-audio', 'Disable Inter-App-Audio'
- c.option '--passbook', 'Disable Passbook'
- c.option '--push-notification', 'Disable Push notifications'
- c.option '--sirikit', 'Disable SiriKit'
- c.option '--vpn-conf', 'Disable VPN Configuration'
+ c.option('--app-group', 'Disable App Groups')
+ c.option('--apple-pay', 'Disable Apple Pay')
+ c.option('--associated-domains', 'Disable Associated Domains')
+ c.option('--data-protection', 'Disable Data Protection')
+ c.option('--game-center', 'Disable Game Center')
+ c.option('--healthkit', 'Disable HealthKit')
+ c.option('--homekit', 'Disable HomeKit')
+ c.option('--wireless-conf', 'Disable Wireless Accessory Configuration')
+ c.option('--icloud', 'Disable iCloud')
+ c.option('--in-app-purchase', 'Disable In-App Purchase')
+ c.option('--inter-app-audio', 'Disable Inter-App-Audio')
+ c.option('--passbook', 'Disable Passbook')
+ c.option('--push-notification', 'Disable Push notifications')
+ c.option('--sirikit', 'Disable SiriKit')
+ c.option('--vpn-conf', 'Disable VPN Configuration')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
# Filter the options so that we can still build the configuration
allowed_keys = Produce::Options.available_options.collect(&:key)
- Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include?(key) })
require 'produce/service'
Produce::Service.disable(options, args)
end
end
command :group do |c|
c.syntax = 'fastlane produce group'
c.description = 'Ensure that a specific App Group exists'
- c.example 'Create group', 'fastlane produce group -g group.example.app -n "Example App Group"'
+ c.example('Create group', 'fastlane produce group -g group.example.app -n "Example App Group"')
- c.option '-n', '--group_name STRING', String, 'Name for the group that is created (PRODUCE_GROUP_NAME)'
- c.option '-g', '--group_identifier STRING', String, 'Group identifier for the group (PRODUCE_GROUP_IDENTIFIER)'
+ c.option('-n', '--group_name STRING', String, 'Name for the group that is created (PRODUCE_GROUP_NAME)')
+ c.option('-g', '--group_identifier STRING', String, 'Group identifier for the group (PRODUCE_GROUP_IDENTIFIER)')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
allowed_keys = Produce::Options.available_options.collect(&:key)
- Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+ Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include?(key) })
require 'produce/group'
Produce::Group.new.create(options, args)
end
end
command :associate_group do |c|
c.syntax = 'fastlane produce associate_group -a APP_IDENTIFIER GROUP_IDENTIFIER1, GROUP_IDENTIFIER2, ...'
c.description = 'Associate with a group, which is created if needed or simply located otherwise'
- c.example 'Associate with group', 'fastlane produce associate-group -a com.example.app group.example.com'
+ c.example('Associate with group', 'fastlane produce associate-group -a com.example.app group.example.com')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__)
@@ -141,33 +141,33 @@
end
command :merchant do |c|
c.syntax = 'fastlane produce merchant'
c.description = 'Ensure that a specific Merchant exists'
- c.example 'Create merchant', 'fastlane produce merchant -o merchant.com.example.production -r "Example Merchant Production"'
+ c.example('Create merchant', 'fastlane produce merchant -o merchant.com.example.production -r "Example Merchant Production"')
- c.option '-r', '--merchant_name STRING', String, 'Name for the merchant that is created (PRODUCE_MERCHANT_NAME)'
- c.option '-o', '--merchant_identifier STRING', String, 'Merchant identifier for the merchant (PRODUCE_MERCHANT_IDENTIFIER)'
+ c.option('-r', '--merchant_name STRING', String, 'Name for the merchant that is created (PRODUCE_MERCHANT_NAME)')
+ c.option('-o', '--merchant_identifier STRING', String, 'Merchant identifier for the merchant (PRODUCE_MERCHANT_IDENTIFIER)')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
extra_options = [FastlaneCore::ConfigItem.new(key: :merchant_name, optional: true), FastlaneCore::ConfigItem.new(key: :merchant_identifier)]
all_options = Produce::Options.available_options + extra_options
allowed_keys = all_options.collect(&:key)
- Produce.config = FastlaneCore::Configuration.create(all_options, options.__hash__.select { |key, value| allowed_keys.include? key })
+ Produce.config = FastlaneCore::Configuration.create(all_options, options.__hash__.select { |key, value| allowed_keys.include?(key) })
require 'produce/merchant'
Produce::Merchant.new.create(options, args)
end
end
command :associate_merchant do |c|
c.syntax = 'fastlane produce associate_merchant -a APP_IDENTIFIER MERCHANT_IDENTIFIER1, MERCHANT_IDENTIFIER2, ...'
c.description = 'Associate with a merchant for use with Apple Pay. Apple Pay will be enabled for this app.'
- c.example 'Associate with merchant', 'fastlane produce associate_merchant -a com.example.app merchant.com.example.production'
+ c.example('Associate with merchant', 'fastlane produce associate_merchant -a com.example.app merchant.com.example.production')
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
c.action do |args, options|
Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__)
@@ -175,10 +175,10 @@
require 'produce/merchant'
Produce::Merchant.new.associate(options, args)
end
end
- default_command :create
+ default_command(:create)
run!
end
end
end