Permalink
Browse files

Updated to use https://secure.gaug.es

  • Loading branch information...
1 parent ef000e9 commit 40c4de2d0305fd21384c02f1bf48d9d453a23574 @jonmagic jonmagic committed Nov 3, 2011
Showing with 29 additions and 29 deletions.
  1. +1 −1 lib/gauges.rb
  2. +27 −27 spec/gauges_spec.rb
  3. +1 −1 spec/helper.rb
View
@@ -3,7 +3,7 @@
class Gauges
include HTTParty
- base_uri 'api.gaug.es'
+ base_uri 'https://secure.gaug.es'
# :email/:password or :token
def initialize(options={})
View
@@ -43,7 +43,7 @@
context "http auth failure" do
before do
- stub_get('http://api.gaug.es/clients', :clients_http_auth_failure)
+ stub_get('https://secure.gaug.es/clients', :clients_http_auth_failure)
@client = Gauges.new(:token => 'asdf')
@response = @client.clients
end
@@ -67,7 +67,7 @@
context "making request with token" do
before do
- stub_get('http://api.gaug.es/me', :me)
+ stub_get('https://secure.gaug.es/me', :me)
@client = Gauges.new(:token => 'asdf')
end
@@ -81,7 +81,7 @@
context "making request with basic auth" do
before do
- stub_get('http://api.gaug.es/me', :me)
+ stub_get('https://secure.gaug.es/me', :me)
@client = Gauges.new(:email => 'john@orderedlist.com', :password => 'foobar')
end
@@ -96,7 +96,7 @@
describe "#me" do
before do
- stub_get('http://api.gaug.es/me', :me)
+ stub_get('https://secure.gaug.es/me', :me)
@client = Gauges.new(:token => 'asdf')
@response = @client.me
end
@@ -115,7 +115,7 @@
describe "#clients" do
before do
- stub_get('http://api.gaug.es/clients', :clients)
+ stub_get('https://secure.gaug.es/clients', :clients)
@client = Gauges.new(:token => 'asdf')
@response = @client.clients
end
@@ -134,7 +134,7 @@
describe "#create_client" do
before do
- stub_post('http://api.gaug.es/clients', :client_create)
+ stub_post('https://secure.gaug.es/clients', :client_create)
@client = Gauges.new(:token => 'asdf')
@response = @client.create_client(:description => 'HipChat')
end
@@ -155,7 +155,7 @@
describe "#delete_client" do
before do
- stub_delete('http://api.gaug.es/clients/6c6b748646bb371a0027683cda32b7ff', :client_delete)
+ stub_delete('https://secure.gaug.es/clients/6c6b748646bb371a0027683cda32b7ff', :client_delete)
@client = Gauges.new(:token => 'asdf')
@response = @client.delete_client('6c6b748646bb371a0027683cda32b7ff')
end
@@ -175,7 +175,7 @@
describe "#update_me" do
context "valid" do
before do
- stub_put('http://api.gaug.es/me', :me_update)
+ stub_put('https://secure.gaug.es/me', :me_update)
@client = Gauges.new(:token => 'asdf')
@response = @client.update_me(:first_name => 'Frank', :last_name => 'Furter')
end
@@ -200,7 +200,7 @@
describe "#gauges" do
before do
- stub_get('http://api.gaug.es/gauges', :gauges)
+ stub_get('https://secure.gaug.es/gauges', :gauges)
@client = Gauges.new(:token => 'asdf')
@response = @client.gauges
end
@@ -316,7 +316,7 @@
describe "#create_gauge" do
context "valid" do
before do
- stub_post('http://api.gaug.es/gauges', :gauge_create_valid)
+ stub_post('https://secure.gaug.es/gauges', :gauge_create_valid)
@client = Gauges.new(:token => 'asdf')
@response = @client.create_gauge({
:title => 'Example',
@@ -351,7 +351,7 @@
context "invalid" do
before do
- stub_post('http://api.gaug.es/gauges', :gauge_create_invalid)
+ stub_post('https://secure.gaug.es/gauges', :gauge_create_invalid)
@client = Gauges.new(:token => 'asdf')
@response = @client.create_gauge({
:title => 'Testing',
@@ -377,7 +377,7 @@
describe "#gauge" do
context "found" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003', :gauge)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003', :gauge)
@client = Gauges.new(:token => 'asdf')
@response = @client.gauge('4d597dfd6bb4ba2c48000003')
end
@@ -409,7 +409,7 @@
context "not found" do
before do
- stub_get('http://api.gaug.es/gauges/1234', :gauge_not_found)
+ stub_get('https://secure.gaug.es/gauges/1234', :gauge_not_found)
@client = Gauges.new(:token => 'asdf')
@response = @client.gauge('1234')
end
@@ -427,7 +427,7 @@
describe "#update_gauge" do
before do
- stub_put('http://api.gaug.es/gauges/4eb1eaf5e5947c7408000001', :gauge_update)
+ stub_put('https://secure.gaug.es/gauges/4eb1eaf5e5947c7408000001', :gauge_update)
@client = Gauges.new(:token => 'asdf')
@response = @client.update_gauge('4eb1eaf5e5947c7408000001', :title => 'Testing')
end
@@ -459,7 +459,7 @@
describe "#delete_gauge" do
before do
- stub_delete('http://api.gaug.es/gauges/4eb1eaf5e5947c7408000001', :gauge_delete)
+ stub_delete('https://secure.gaug.es/gauges/4eb1eaf5e5947c7408000001', :gauge_delete)
@client = Gauges.new(:token => 'asdf')
@response = @client.delete_gauge('4eb1eaf5e5947c7408000001')
end
@@ -491,7 +491,7 @@
describe "#shares" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :shares)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :shares)
@client = Gauges.new(:token => 'asdf')
@response = @client.shares('4d597dfd6bb4ba2c48000003')
end
@@ -517,7 +517,7 @@
describe "#share" do
context "valid" do
before do
- stub_post('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :share_add_valid)
+ stub_post('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :share_add_valid)
@client = Gauges.new(:token => 'asdf')
@response = @client.share('4d597dfd6bb4ba2c48000003', {:email => 'greg@acme.com'})
end
@@ -541,7 +541,7 @@
context "invalid" do
before do
- stub_post('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :share_add_invalid)
+ stub_post('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares', :share_add_invalid)
@client = Gauges.new(:token => 'asdf')
@response = @client.share('4d597dfd6bb4ba2c48000003', {:email => 'greg@acme'})
end
@@ -564,7 +564,7 @@
describe "#unshare" do
before do
- stub_delete('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares/4eb1ed03e5947c7408000002', :share_remove)
+ stub_delete('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/shares/4eb1ed03e5947c7408000002', :share_remove)
@client = Gauges.new(:token => 'asdf')
@response = @client.unshare('4d597dfd6bb4ba2c48000003', '4eb1ed03e5947c7408000002')
end
@@ -588,7 +588,7 @@
describe "#content" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/content', :content)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/content', :content)
@client = Gauges.new(:token => 'asdf')
@response = @client.content('4d597dfd6bb4ba2c48000003')
end
@@ -616,7 +616,7 @@
describe "#referrers" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/referrers', :referrers)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/referrers', :referrers)
@client = Gauges.new(:token => 'asdf')
@response = @client.referrers('4d597dfd6bb4ba2c48000003')
end
@@ -645,7 +645,7 @@
describe "#traffic" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/traffic', :traffic)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/traffic', :traffic)
@client = Gauges.new(:token => 'asdf')
@response = @client.traffic('4d597dfd6bb4ba2c48000003')
end
@@ -673,7 +673,7 @@
describe "#resolutions" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/resolutions', :resolutions)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/resolutions', :resolutions)
@client = Gauges.new(:token => 'asdf')
@response = @client.resolutions('4d597dfd6bb4ba2c48000003')
end
@@ -709,7 +709,7 @@
describe "#technology" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/technology', :technology)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/technology', :technology)
@client = Gauges.new(:token => 'asdf')
@response = @client.technology('4d597dfd6bb4ba2c48000003')
end
@@ -743,7 +743,7 @@
describe "#terms" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/terms', :terms)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/terms', :terms)
@client = Gauges.new(:token => 'asdf')
@response = @client.terms('4d597dfd6bb4ba2c48000003')
end
@@ -769,7 +769,7 @@
describe "#engines" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/engines', :engines)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/engines', :engines)
@client = Gauges.new(:token => 'asdf')
@response = @client.engines('4d597dfd6bb4ba2c48000003')
end
@@ -796,7 +796,7 @@
describe "#locations" do
before do
- stub_get('http://api.gaug.es/gauges/4d597dfd6bb4ba2c48000003/locations', :locations)
+ stub_get('https://secure.gaug.es/gauges/4d597dfd6bb4ba2c48000003/locations', :locations)
@client = Gauges.new(:token => 'asdf')
@response = @client.locations('4d597dfd6bb4ba2c48000003')
end
View
@@ -51,4 +51,4 @@ def stub_delete(url, name)
FakeWeb.allow_net_connect = false
# Creating fixtures:
-# curl -is -H "X-Gauges-Token: <token here>" http://api.gaug.es/gauges/1234 > spec/fixtures/gauge_not_found
+# curl -is -H "X-Gauges-Token: <token here>" https://secure.gaug.es/gauges/1234 > spec/fixtures/gauge_not_found

0 comments on commit 40c4de2

Please sign in to comment.