denotificator 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef0dbbcea0b8737257967681d4cefcc502f766f4
4
- data.tar.gz: f29e2cd7eefaeac0aac13edecd2b6a951eb6e13e
3
+ metadata.gz: abe256f644a7e60683670d5fbc836e41c0cee92a
4
+ data.tar.gz: 9e2681b3572f76e77e1b4006a1950071036d32b8
5
5
  SHA512:
6
- metadata.gz: 137e76865f4b3120fb8dca36d94dea7e7143d0dde8906213e60c6ff8683eba1788fbccddcead0ceac6f582c579578cd9278ae5b95307b312664effd52f8a66a7
7
- data.tar.gz: ee279557dd46f9aa305dab935231b6b1e78b0b7433bf4d95e1c03d99e7cbd984d54059b1a0f888756f4545bc7896dafa5e3718f6cfa06dd8893d16d382d2477a
6
+ metadata.gz: fe67ba79aba5a8a18e82321d0ab962a61493adca8ded5be5c085fd41c8d9416dcd5b90cfffb92519ecf8e8d086c8ae3467e86f9a26e3e0db7e1675001038a833
7
+ data.tar.gz: b5e9253b74d0b34bfa884e16cfd83ae8d0b888940ab419c43378ebbb545ec29617d83360ea6c9edb17c067074533178716b487a7e96a03a4efb7137f53192f73
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ log
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ ### v0.0.2
2
+ * Check on AUTH_TOKEN before running
3
+ * New Relic support
4
+
5
+ ### v0.0.1
6
+
7
+ * Initial release.
data/README.md CHANGED
@@ -17,7 +17,13 @@ Or install it yourself as:
17
17
  ## Usage
18
18
 
19
19
  ```shell
20
- GITHUB_AUTH_TOKEN=your_token_here denotificator
20
+ AUTH_TOKEN=your_token_here denotificator
21
+ ```
22
+
23
+ To enable New Relic support add the environment variable NEWRELIC_LICENSE_KEY:
24
+
25
+ ```shell
26
+ AUTH_TOKEN=your_token_here NEWRELIC_LICENSE_KEY=new_relic_key denotificator
21
27
  ```
22
28
 
23
29
  You can run it manually or add it to a cronjob for it.
data/bin/denotificator CHANGED
@@ -1,5 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ if ENV['AUTH_TOKEN'].nil?
4
+ STDERR.puts "You must define the AUTH_TOKEN environment variable with your GitHub generated token"
5
+ exit -1
6
+ end
7
+
3
8
  require 'denotificator'
4
9
 
5
10
  Denotificator::Runtime.run!
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency "faraday", "~> 0.8.8"
22
22
  spec.add_runtime_dependency "yajl-ruby"
23
+ spec.add_runtime_dependency "newrelic_rpm"
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.3"
25
26
  spec.add_development_dependency "rake"
data/lib/denotificator.rb CHANGED
@@ -16,3 +16,5 @@ module Denotificator
16
16
  end
17
17
 
18
18
  Denotificator.auth_token = ENV['AUTH_TOKEN']
19
+
20
+ require 'denotificator/newrelic' if ENV['NEWRELIC_LICENSE_KEY']
@@ -0,0 +1,8 @@
1
+ require 'newrelic_rpm'
2
+
3
+ NEWRELIC_OPTIONS = {
4
+ license_key: ENV['NEWRELIC_LICENSE_KEY'],
5
+ app_name: "Denotificator",
6
+ }
7
+
8
+ NewRelic::Agent.manual_start NEWRELIC_OPTIONS
@@ -1,3 +1,3 @@
1
1
  module Denotificator
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: denotificator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Oliveira
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: newrelic_rpm
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -120,6 +134,7 @@ files:
120
134
  - ".gitignore"
121
135
  - ".rspec"
122
136
  - ".travis.yml"
137
+ - CHANGELOG.md
123
138
  - Gemfile
124
139
  - LICENSE.txt
125
140
  - README.md
@@ -128,6 +143,7 @@ files:
128
143
  - denotificator.gemspec
129
144
  - lib/denotificator.rb
130
145
  - lib/denotificator/api_client.rb
146
+ - lib/denotificator/newrelic.rb
131
147
  - lib/denotificator/runtime.rb
132
148
  - lib/denotificator/version.rb
133
149
  - spec/denotificator_spec.rb