lib/teapot/command/create.rb in teapot-3.2.1 vs lib/teapot/command/create.rb in teapot-3.4.0
- old
+ new
@@ -31,11 +31,11 @@
one :name, "The name of the new project in title-case, e.g. 'My Project'.", required: true
one :source, "The source repository to use for fetching packages, e.g. https://github.com/kurocha.", required: true
many :packages, "Any packages you'd like to include in the project.", default: ["generate-project"]
- def invoke
+ def call
logger = parent.logger
nested = parent['--root', parent.options[:root] || name.gsub(/\s+/, '-').downcase]
root = nested.root
@@ -50,21 +50,21 @@
logger.info "Creating project named #{name} at path #{root}..."
generate_project(root, @name, @source, @packages)
# Fetch the initial packages:
- Fetch[parent: nested].invoke
+ Fetch[parent: nested].call
context = nested.context
selection = context.select
target_names = selection.configuration.targets[:create]
if target_names.any?
# Generate the initial project files:
- Build[*target_names, parent: nested].invoke
+ Build[*target_names, parent: nested].call
# Fetch any additional packages:
- Fetch[parent: nested].invoke
+ Fetch[parent: nested].call
end
# Stage all files:
index = repository.index
index.add_all