librato-rails 0.3.0 → 0.3.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/README.md +4 -2
- data/lib/librato/rails/version.rb +1 -1
- data/lib/librato/rails.rb +6 -6
- data/test/dummy/log/test.log +2290 -0
- data/test/fixtures/config/librato.yml +4 -4
- data/test/remote/rails_remote_test.rb +2 -2
- data/test/unit/configuration_test.rb +6 -6
- metadata +3 -3
@@ -1,10 +1,10 @@
|
|
1
1
|
test:
|
2
|
-
|
3
|
-
|
2
|
+
user: 'test@bar.com'
|
3
|
+
token: 'test api key'
|
4
4
|
prefix: 'rails-test'
|
5
5
|
flush_interval: 30
|
6
6
|
source: 'custom-1'
|
7
7
|
|
8
8
|
production:
|
9
|
-
|
10
|
-
|
9
|
+
user: 'live@bar.com'
|
10
|
+
token: 'live api key'
|
@@ -12,8 +12,8 @@ class LibratoRailsRemoteTest < ActiveSupport::TestCase
|
|
12
12
|
|
13
13
|
setup do
|
14
14
|
# delete any generated Librato::Rails
|
15
|
-
Librato::Rails.
|
16
|
-
Librato::Rails.
|
15
|
+
Librato::Rails.user = ENV['LIBRATO_RAILS_TEST_EMAIL']
|
16
|
+
Librato::Rails.token = ENV['LIBRATO_RAILS_TEST_API_KEY']
|
17
17
|
if ENV['LIBRATO_RAILS_TEST_API_ENDPOINT']
|
18
18
|
Librato::Rails.api_endpoint = ENV['LIBRATO_RAILS_TEST_API_ENDPOINT']
|
19
19
|
end
|
@@ -12,14 +12,14 @@ class LibratoRailsAggregatorTest < MiniTest::Unit::TestCase
|
|
12
12
|
ENV['LIBRATO_METRICS_USER'] = 'foo@bar.com'
|
13
13
|
ENV['LIBRATO_METRICS_TOKEN'] = 'api_key'
|
14
14
|
Librato::Rails.check_config
|
15
|
-
assert_equal 'foo@bar.com', Librato::Rails.
|
16
|
-
assert_equal 'api_key', Librato::Rails.
|
15
|
+
assert_equal 'foo@bar.com', Librato::Rails.user
|
16
|
+
assert_equal 'api_key', Librato::Rails.token
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_config_file_config
|
20
20
|
with_fixture_config do
|
21
|
-
assert_equal 'test@bar.com', Librato::Rails.
|
22
|
-
assert_equal 'test api key', Librato::Rails.
|
21
|
+
assert_equal 'test@bar.com', Librato::Rails.user
|
22
|
+
assert_equal 'test api key', Librato::Rails.token
|
23
23
|
assert_equal 'rails-test', Librato::Rails.prefix
|
24
24
|
assert_equal 30, Librato::Rails.flush_interval
|
25
25
|
assert_equal 'custom-1', Librato::Rails.source
|
@@ -30,8 +30,8 @@ class LibratoRailsAggregatorTest < MiniTest::Unit::TestCase
|
|
30
30
|
ENV['LIBRATO_METRICS_USER'] = 'foo@bar.com'
|
31
31
|
ENV['LIBRATO_METRICS_TOKEN'] = 'api_key'
|
32
32
|
with_fixture_config do
|
33
|
-
assert_equal 'foo@bar.com', Librato::Rails.
|
34
|
-
assert_equal 'api_key', Librato::Rails.
|
33
|
+
assert_equal 'foo@bar.com', Librato::Rails.user # from env
|
34
|
+
assert_equal 'api_key', Librato::Rails.token # from env
|
35
35
|
assert_equal 'rails-test', Librato::Rails.prefix # from config file
|
36
36
|
assert_equal 30, Librato::Rails.flush_interval # from config file
|
37
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -197,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
segments:
|
199
199
|
- 0
|
200
|
-
hash:
|
200
|
+
hash: 2674653082492726438
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
202
|
none: false
|
203
203
|
requirements:
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
segments:
|
208
208
|
- 0
|
209
|
-
hash:
|
209
|
+
hash: 2674653082492726438
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
212
|
rubygems_version: 1.8.24
|