class Sanity::CLI
Public Class Methods
run()
click to toggle source
# File lib/sanity/cli.rb, line 4 def self.run new.run end
Public Instance Methods
config()
click to toggle source
# File lib/sanity/cli.rb, line 14 def config config = {development: {email: 'email_you_registered_with@yourdomain.com', token: 'api_token_you_received', url: 'http://sanity-123.herokuapp.com/report'}, production: {email: 'email_you_registered_with@yourdomain.com', token: 'api_token_you_received', url: 'http://sanity-123.herokuapp.com/report'}} puts %{Create config/sanity.yml with contents: } puts config.to_yaml end
help()
click to toggle source
# File lib/sanity/cli.rb, line 8 def help puts %{Commands are: --config generate yaml config } end
run()
click to toggle source
# File lib/sanity/cli.rb, line 26 def run case ARGV when ["--config"] config else help end end