chartbeat 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/chartbeat.gemspec +1 -1
- data/lib/chartbeat.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/chartbeat.gemspec
CHANGED
data/lib/chartbeat.rb
CHANGED
@@ -8,11 +8,11 @@ class Chartbeat
|
|
8
8
|
DASHAPI_METHODS = [:alerts, :snapshots, :stats, :data_series, :day_data_series]
|
9
9
|
DEFAULT_ARG_VALS = {:path => '/', :keys => 'n', :types => 'n', :since => YESTERDAY,
|
10
10
|
:timestamp => YESTERDAY, :days => 1, :minutes => 20, :type => 'path',
|
11
|
-
:breaks => 'n'}
|
11
|
+
:breaks => 'n', :limit => 10}
|
12
12
|
|
13
13
|
# c = Chartbeat.new :apikey => 'yourkey', :host => 'yourdomain.com'
|
14
14
|
def initialize(opts = {})
|
15
|
-
raise RuntimeError, "You must provide an API key
|
15
|
+
raise RuntimeError, "You must provide an API key and host" unless opts[:apikey] && opts[:host]
|
16
16
|
@apikey = opts[:apikey]
|
17
17
|
@host = opts[:host]
|
18
18
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,7 @@ def fixture_file(filename)
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def register_uri(uri, method)
|
19
|
-
query_string = "?breaks=n&type=path&types=n&path=%2F&since=#{Chartbeat::YESTERDAY}&apikey=fake_key×tamp=#{Chartbeat::YESTERDAY}&days=1&keys=n&minutes=20&host=fakehost.com"
|
19
|
+
query_string = "?breaks=n&type=path&types=n&path=%2F&since=#{Chartbeat::YESTERDAY}&limit=10&apikey=fake_key×tamp=#{Chartbeat::YESTERDAY}&days=1&keys=n&minutes=20&host=fakehost.com"
|
20
20
|
FakeWeb.register_uri(:get, "#{uri}#{query_string}", :body => fixture_file("#{method}.json"))
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chartbeat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Al Shaw
|