Class: Lingohub::Command::Resource
- Defined in:
- lib/lingohub/commands/resource.rb
Constant Summary collapse
- EXPECTED_STRATEGY_PARAMETERS =
[ 'source:createNew', 'source:updateExisting', 'source:deactivateMissing', 'target:createNew', 'target:updateExisting', 'target:deactivateMissing', ]
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#app_urls, #escape, #extract_app_from_git_config, #extract_option, #extract_project_title_from_args, #extract_project_title_from_dir_name, #extract_project_title_from_git, #git_remotes, #git_url, #initialize, #lingohub, #project, #project_title
Methods included from Helpers
#ask, #confirm, #confirm_command, #deprecate, #display, #error, #format_date, #git, #has_git?, #home_directory, #redisplay, #retry_on_exception, #run_command, #running_on_a_mac?, #running_on_windows?, #shell
Constructor Details
This class inherits a constructor from Lingohub::Command::Base
Instance Method Details
#down ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lingohub/commands/resource.rb', line 12 def down project #project validation directory = File.join(Dir.pwd, extract_directory_from_args || "") raise(CommandFailed, "Error downloading resources. Path #{directory} does not exist") unless File.directory?(directory) if extract_query_from_args pull_search_results(directory) else download_resources(directory) end end |
#up ⇒ Object
25 26 27 28 29 |
# File 'lib/lingohub/commands/resource.rb', line 25 def up project #project validation upload_resources(args) end |