Class: MigrationBundler::Targets::CocoapodsTarget
- Inherits:
-
Base
- Object
- Thor
- Base
- MigrationBundler::Targets::CocoapodsTarget
show all
- Defined in:
- lib/migration_bundler/targets/cocoapods/cocoapods_target.rb
Instance Method Summary
collapse
Methods inherited from Base
#drop, #dump, #load, name, #new, register_with_cli, source_root
Methods included from Actions
#bundle, #git, #git_add, #truncate_database, #unique_tag_for_version
Instance Method Details
#generate ⇒ Object
15
16
17
18
|
# File 'lib/migration_bundler/targets/cocoapods/cocoapods_target.rb', line 15
def generate
invoke :validate
template('podspec.erb', podspec_name, force: true)
end
|
#init ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/migration_bundler/targets/cocoapods/cocoapods_target.rb', line 6
def init
unless project.config['cocoapods.repo']
project.config['cocoapods.repo'] = ask("What is the name of your Cocoapods specs repo? ")
end
if options['bundler']
append_to_file 'Gemfile', "gem 'cocoapods'\n"
end
end
|
#push ⇒ Object
24
25
26
27
|
# File 'lib/migration_bundler/targets/cocoapods/cocoapods_target.rb', line 24
def push
invoke :validate
run "pod repo push #{options['quiet'] && '--silent '}--allow-warnings #{cocoapods_repo} #{podspec_name}"
end
|
#validate ⇒ Object
20
21
22
|
# File 'lib/migration_bundler/targets/cocoapods/cocoapods_target.rb', line 20
def validate
fail Error, "Invalid configuration: cocoapods.repo is not configured." unless cocoapods_repo
end
|