alephant-logger-cloudwatch 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f769b58b65029c123878bdf032ff214241e7c99
4
- data.tar.gz: 1462ccb150578b50aa37d32749d449b4146b7198
3
+ metadata.gz: 626cd839f179ff162652ac9b48d8ad294b4657a9
4
+ data.tar.gz: 105f7e1f68ab905b0254ed63c8afce94437f9760
5
5
  SHA512:
6
- metadata.gz: 97285b71ffe34aae92ca3e8902d120f3848a49d5885dbe8dd426930b8500e917422f0dec11ce6719dc4488e0420050cabe56ae44c098d5cafb7f657c254bdc04
7
- data.tar.gz: 0e48608a860720df121f666df5d57b7b80aceb04fdab7a841332e0c1464f5d54dbbee40fb0da4be6c3a6ca1a16c9b7bd0943dbb1c51cd864a996b67490575349
6
+ metadata.gz: c00230f0ecdfdc93afaee0370e82da48b4adf36882405b2dc08c7c87ecdf69f8b51e04818fad84b5837e7d7c829b5f391f36ea689399c631d111482d622d3329
7
+ data.tar.gz: 467d34f6a7f2f75010b540b8100878a8f5eeae21d2d9299f9dfbef767baf6cea14606ddc5c2e22b8e0039cae924d836346871438e1a540619008b97c3f8aed12
data/README.md CHANGED
@@ -31,15 +31,16 @@ require "alephant/logger/cloudwatch"
31
31
  cloudwatch_driver = Alephant::Logger::CloudWatch.new(:namespace => "my_namespace")
32
32
 
33
33
  logger = Alephant::Logger.setup cloudwatch_driver
34
- logger.metric(:name => "FooBar", :unit => "Count", :value => 1)
34
+ logger.metric("FooBar", :unit => "Count", :value => 1)
35
35
  ```
36
36
 
37
- You can also prefill in certain values:
37
+ You can also prefill in default values when creating a new instance of the logger (and still override individual settings for each logger call):
38
38
 
39
39
  ```ruby
40
40
  require "alephant/logger"
41
41
  require "alephant/logger/cloudwatch"
42
42
 
43
+ # Define defaults
43
44
  cloudwatch_driver = Alephant::Logger::CloudWatch.new(
44
45
  :namespace => "my_namespace",
45
46
  :unit => "Count",
@@ -48,7 +49,12 @@ cloudwatch_driver = Alephant::Logger::CloudWatch.new(
48
49
  )
49
50
 
50
51
  logger = Alephant::Logger.setup cloudwatch_driver
51
- logger.metric(:name => "FooBar", :unit => "Count", :value => 1)
52
+
53
+ # Override specific settings for this logger call
54
+ logger.metric("FooBar", :unit => "Percent", :value => 2)
55
+
56
+ # Use predefined defaults
57
+ logger.metric("BazQux")
52
58
  ```
53
59
 
54
60
  ## Contributing
@@ -30,8 +30,8 @@ module Alephant
30
30
  def parse(dimensions)
31
31
  dimensions.map do |name, value|
32
32
  {
33
- :name => name,
34
- :value => value
33
+ "name" => name.to_s,
34
+ "value" => value
35
35
  }
36
36
  end
37
37
  end
@@ -1,7 +1,7 @@
1
1
  module Alephant
2
2
  module Logger
3
3
  module Cloudwatch
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,108 +1,108 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-logger-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC News
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ~>
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.7'
20
- type: :development
19
+ name: bundler
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ~>
32
31
  - !ruby/object:Gem::Version
33
32
  version: '10.0'
34
- type: :development
33
+ name: rake
35
34
  prerelease: false
35
+ type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ~>
46
45
  - !ruby/object:Gem::Version
47
46
  version: '3'
48
- type: :development
47
+ name: rspec
49
48
  prerelease: false
49
+ type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3'
55
55
  - !ruby/object:Gem::Dependency
56
- name: aws-sdk
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: '1'
62
- type: :development
61
+ name: aws-sdk
63
62
  prerelease: false
63
+ type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - '>='
74
73
  - !ruby/object:Gem::Version
75
74
  version: '0'
76
- type: :development
75
+ name: pry
77
76
  prerelease: false
77
+ type: :development
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake-rspec
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - '>='
88
87
  - !ruby/object:Gem::Version
89
88
  version: '0'
90
- type: :development
89
+ name: rake-rspec
91
90
  prerelease: false
91
+ type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec-nc
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
100
  - - '>='
102
101
  - !ruby/object:Gem::Version
103
102
  version: '0'
104
- type: :development
103
+ name: rspec-nc
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '>='
@@ -128,7 +128,7 @@ homepage: ''
128
128
  licenses:
129
129
  - MIT
130
130
  metadata: {}
131
- post_install_message:
131
+ post_install_message:
132
132
  rdoc_options: []
133
133
  require_paths:
134
134
  - lib
@@ -143,11 +143,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.0.14
148
- signing_key:
146
+ rubyforge_project:
147
+ rubygems_version: 2.1.9
148
+ signing_key:
149
149
  specification_version: 4
150
150
  summary: Cloudwatch driver for Alephant::Logger
151
151
  test_files:
152
152
  - spec/cloudwatch_spec.rb
153
- has_rdoc: