Class: BundleDepot::CLI
- Inherits:
-
Thor
- Object
- Thor
- BundleDepot::CLI
- Defined in:
- lib/bundle_depot/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
7 8 9 |
# File 'lib/bundle_depot/cli.rb', line 7 def self.exit_on_failure? true end |
Instance Method Details
#fetch ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/bundle_depot/cli.rb', line 17 def fetch unless File.exist?("Gemfile.lock") say "Couldn't find Gemfile.lock" exit 1 end BundleDepot::Cache.new.fetch end |
#store ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/bundle_depot/cli.rb', line 32 def store unless File.exist?("Gemfile.lock") say "Couldn't find Gemfile.lock" exit 1 end BundleDepot::Cache.new.store rescue BundleNotFound say "Couldn't find the cached bundle. Please run 'bundle-depot fetch' before calling this command..." exit 2 # Calculate Checksum # Check local cache # Check remote cache # Pack # Upload end |