Class: Prebundler::Cli::Subset
- Defined in:
- lib/prebundler/cli/subset.rb
Instance Attribute Summary
Attributes inherited from Base
#args, #global_options, #options, #out
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Prebundler::Cli::Base
Instance Method Details
#run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/prebundler/cli/subset.rb', line 4 def run subset = Prebundler::GemfileSubset.from([:gemfile], bundle_path) [:include].each { |g| subset.include(g) } [:add].each { |a| subset.add_raw(a, group: 'https://rubygems.org') } result = subset.to_gemfile(include_dev_deps: [:development]) if [:output].strip == '-' out.write(result) else File.write([:output], result) end end |