cloudwatch-metrics 0.1.2 → 0.1.4

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
  SHA256:
3
- metadata.gz: d8313df8b793174b06bf1e26370a2b46c15b69be5218177e40df42942068e415
4
- data.tar.gz: f351a3952ff54d0dcf31cb9042617fbac9ccaa21e6b739bc4e89355438b362ab
3
+ metadata.gz: 1c72dffbea80fed693f0534fe877fb3e9c8b8a8ec3d61bb23b88f1926c0c16cb
4
+ data.tar.gz: 1edd1d4e525d361a5e1d062148c4b01de76d4307d4f902673b89a26bbf973cec
5
5
  SHA512:
6
- metadata.gz: eae484ba8ee474222745a670f3177ad806072dd724da0824e264f9563ddf9a855ba0af067eb5981a22621c1e7afe44a365ab550dbaac1430137ef89b7b5c77e6
7
- data.tar.gz: 9665366590a967b38b6a2af381439bb075e4c7185286c0eecef1f6fb343406b67990787139074fbb084858523e3b82acf1a01e99249aa3103c1507df85dd01cb
6
+ metadata.gz: 5b400ec9737e28061e56fd0ed699390c41f4c65cfd640dbd9419f2a2f2fa9a2eeca88209d752bb9451a186e3a822410cdf029a503255b175ab3136d0b3e52d94
7
+ data.tar.gz: 31f3b87b8975060825b12df6b4a56a78a19d6ae2ef6b083c43b2457ed008dbef054b9e6225ffbae1be5b553666c2fa3d1cb1016b7aed3fe12202f2ff255f0e6f
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CloudwatchMetrics
4
+ class Configuration
5
+ attr_accessor :namespace
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudwatchMetrics
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -5,7 +5,17 @@ require_relative "cloudwatch_metrics/version"
5
5
  module CloudwatchMetrics
6
6
  class Error < StandardError; end
7
7
 
8
- def self.hi
9
- puts "Hello"
8
+ class << self
9
+ def configuration
10
+ @configuration ||= Configuration.new
11
+ end
12
+
13
+ def configure
14
+ yield(configuration)
15
+ end
16
+
17
+ def hi
18
+ puts "Hello, #{configuration.namespace}"
19
+ end
10
20
  end
11
21
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class InitializerGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('templates', __dir__)
5
+
6
+ def copy_initializer_file
7
+ copy_file "initializer.rb", "config/initializers/cloudwatch_metrics.rb"
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ CloudwatchMetrics.configure do |config|
4
+ # This is the default namespace that all metrics from this application will be published to.
5
+ # It should most likely be the name of the application/service.
6
+ config.namespace = "APPLICATION_NAME"
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudwatch-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Puckett
@@ -82,7 +82,10 @@ files:
82
82
  - bin/console
83
83
  - bin/setup
84
84
  - lib/cloudwatch_metrics.rb
85
+ - lib/cloudwatch_metrics/configuration.rb
85
86
  - lib/cloudwatch_metrics/version.rb
87
+ - lib/generators/initializer/initializer_generator.rb
88
+ - lib/generators/initializer/templates/initializer.rb
86
89
  homepage: https://github.com/pathccm/cloudwatch_metrics
87
90
  licenses: []
88
91
  metadata: