lib/time_cop/runner.rb in time_cop-0.8.0 vs lib/time_cop/runner.rb in time_cop-0.8.1

- old
+ new

@@ -14,12 +14,15 @@ username = ENV['HARVEST_USERNAME'].nil? ? cli.ask('Harvest Username: ') : ENV['HARVEST_USERNAME'] password = ENV['HARVEST_PASSWORD'].nil? ? cli.ask('Harvest Password: ') { |q| q.echo = false } : ENV['HARVEST_PASSWORD'] interactive_hash[:hours_per_week] = ENV['HARVEST_HOURS_PER_WEEK'].nil? ? cli.ask('Hours per week? Defaults to Full Time (34)') { |q| q.default = 34 }.to_f : ENV['HARVEST_HOURS_PER_WEEK'].to_f year = cli.ask("Year? Defaults to #{Date.today.year}") { |q| q.default = Date.today.year }.to_i accountability_options = { - username: (username.nil? ? options[:username] : username), - password: (password.nil? ? options[:password] : password), + harvest_client: Harvest.client( + username: (username.nil? ? options[:username] : username), + password: (password.nil? ? options[:password] : password), + subdomain: 'wildland' + ), email: options[:email] } q_dates = [ { range: Date.new(year, 1, 1)...Date.new(year, 3, 31), @@ -82,11 +85,10 @@ end end end else accountability_options = { - username: (options[:username]), - password: (options[:password]), + harvest_client: Harvest.client(username: options[:username], password: options[:password], subdomain: 'wildland'), email: options[:email] } accountability = Accountability.new( accountability_options )