Class: Firebase::CommandsGenerator

Inherits:
Object
  • Object
show all
Includes:
Commander::Methods
Defined in:
lib/fastlane/plugin/firebase/lib/commands_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.startObject



9
10
11
# File 'lib/fastlane/plugin/firebase/lib/commands_generator.rb', line 9

def self.start
  self.new.run
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fastlane/plugin/firebase/lib/commands_generator.rb', line 13

def run
  program :name, 'firebase'
  program :version, Fastlane::VERSION
  program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles'
  program :help, 'Author', 'Felix Krause <[email protected]>'
  program :help, 'Website', 'https://fastlane.tools'
  program :help, 'GitHub', 'https://github.com/fastlane/PEM'
  program :help_formatter, :compact

  global_option('--verbose') { FastlaneCore::Globals.verbose = true }

  command :list do |c|
    c.syntax = 'fastlane firebase list'
    c.description = 'Lists all projects in your firebase'

    FastlaneCore::CommanderGenerator.new.generate(Firebase::Options.available_options, command: c)

    c.action do |args, options|
      Firebase.config = FastlaneCore::Configuration.create(Firebase::Options.available_options, options.__hash__)
      #Firebase::Manager.start
    end
  end

  default_command :list

  run!
end