lib/sorenson/services/base.rb in 360_services-0.0.1 vs lib/sorenson/services/base.rb in 360_services-0.0.2
- old
+ new
@@ -16,15 +16,15 @@
if @@account_id.blank? || @@account_token.blank?
raise Invalid360ServiceSetup.new("You must specify an account_id and account_token before using 360 services")
end
end
- def self.login_no_resource(username, password)
+ def self.login_no_resource(username, password)
RestClient.post(host + "/sessions", :username => username, :password => password)
end
def self.host
- host = ENV['SORENSON_ENV'].eql?('cucumber') ? 'http://localhost:3001' : 'http://360services.sorensonmedia.com'
+ host = ['development', 'test', 'cucumber'].include?(ENV['RAILS_ENV']) ? 'http://localhost:3001' : 'http://360services.sorensonmedia.com'
host
end
def self.post_to(url, payload = {})
verify_account_settings
\ No newline at end of file