Class: Dotenv::Sync::CommandLine
- Inherits:
-
Thor
- Object
- Thor
- Dotenv::Sync::CommandLine
- Defined in:
- lib/dotenv/sync/command_line.rb
Class Method Summary collapse
Instance Method Summary collapse
- #any ⇒ Object
- #generate_key ⇒ Object
- #merge ⇒ Object
- #pull ⇒ Object
- #push ⇒ Object
- #sort(filename = Dotenv::Sync::Syncer::DEFAULT_SORT_FILE) ⇒ Object
Class Method Details
.handle_no_command_error(command) ⇒ Object
63 64 65 |
# File 'lib/dotenv/sync/command_line.rb', line 63 def self.handle_no_command_error(command) raise CommandNotFound.new end |
.start(args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dotenv/sync/command_line.rb', line 9 def self.start(args) begin super(args) rescue Dotenv::Sync::CommandNotFound => e begin require "dotenv/cli" Dotenv::CLI.new(ARGV).run rescue Exception puts "dotenv gem not installed, falling back to dotenv-sync" super(["--help"]) end end end |
Instance Method Details
#any ⇒ Object
24 25 26 |
# File 'lib/dotenv/sync/command_line.rb', line 24 def any() raise NotImplementedError.new end |
#generate_key ⇒ Object
59 60 61 |
# File 'lib/dotenv/sync/command_line.rb', line 59 def generate_key Syncer.new().generate_key end |
#merge ⇒ Object
45 46 47 |
# File 'lib/dotenv/sync/command_line.rb', line 45 def merge Syncer.new().merge end |
#pull ⇒ Object
37 38 39 |
# File 'lib/dotenv/sync/command_line.rb', line 37 def pull Syncer.new().pull end |