metric 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -16,7 +16,7 @@ module Metric
16
16
  trigger = options[:trigger]
17
17
 
18
18
  key = "?api_key=" + Metric.configuration.api_key
19
- url = Metric.configuration.metric_host + '/track.js'
19
+ url = Metric.configuration.metric_host + '/track'
20
20
  url << key
21
21
  url << parse_metric(metric)
22
22
  url << "&amount=#{amount}" if amount
@@ -6,7 +6,7 @@ module Metric
6
6
  attr_accessor :metric_host
7
7
 
8
8
  def initialize
9
- @metric_host = "http://track.metric.io"
9
+ @metric_host = "http://api.metric.io"
10
10
  end
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module Metric
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -5,7 +5,7 @@ describe Metric::Configuration do
5
5
  Metric.configure do |config|
6
6
  config.api_key = "test"
7
7
  end
8
- Metric.configuration.metric_host.should == "http://metric.io"
8
+ Metric.configuration.metric_host.should == "http://api.metric.io"
9
9
  end
10
10
 
11
11
  it "configures api_key" do
@@ -6,7 +6,7 @@ describe Metric do
6
6
  end
7
7
 
8
8
  it "composes the request url" do
9
- Metric.compose("hits").should == "http://metric.io/track.js?api_key=spec&metric=hits"
9
+ Metric.compose("hits").should == "http://api.metric.io/track?api_key=spec&metric=hits"
10
10
  end
11
11
 
12
12
  it "gets correct url when tracking" do
@@ -19,12 +19,12 @@ describe Metric do
19
19
  end
20
20
 
21
21
  it "sends trigger param" do
22
- url = "http://metric.io/track.js?api_key=spec&metric=hits&trigger=1"
22
+ url = "http://api.metric.io/track?api_key=spec&metric=hits&trigger=1"
23
23
  Metric.compose("hits", {:trigger => true}).should == url
24
24
  end
25
25
 
26
26
  it "sends custom amount" do
27
- url = "http://metric.io/track.js?api_key=spec&metric=hits&amount=42"
27
+ url = "http://api.metric.io/track?api_key=spec&metric=hits&amount=42"
28
28
  Metric.compose("hits", {:amount => 42}).should == url
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metric
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mark Mulder
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-16 00:00:00 +02:00
18
+ date: 2011-08-31 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -57,6 +57,7 @@ extra_rdoc_files: []
57
57
 
58
58
  files:
59
59
  - .gitignore
60
+ - .rspec
60
61
  - .travis.yml
61
62
  - Gemfile
62
63
  - README.markdown