generators/eotb/eotb_generator.rb in eotb-0.5.11 vs generators/eotb/eotb_generator.rb in eotb-0.5.12

- old
+ new

@@ -1,29 +1,20 @@ class EotbGenerator < Rails::Generator::Base def add_options!(opt) opt.on('-k', '--api-key=key', String, "Your Beholder API key") {|v| options[:api_key] = v} - opt.on('-e', '--events=number_of_event', Integer, "Number of events sent in one package to Beholder") {|v| options[:events] = v} end def manifest record do |m| ensure_parameter_was_set - m.template "initializer.rb", "config/initializers/eotb.rb", :assigns => {:api_key => api_key_exp, :events => events_exp} + m.template "initializer.rb", "config/initializers/eotb.rb", :assigns => {:api_key => api_key_exp} end end def api_key_exp "#{options[:api_key]}" - end - - def events_exp - s = if options[:events] - "#{options[:events]}" - else - "1" - end end def ensure_parameter_was_set if !options[:api_key] puts "Must pass --api-key or create config/initializers/eotb.rb"