rnotifier 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rnotifier/config.rb +4 -5
- data/lib/rnotifier/event_data.rb +2 -1
- data/lib/rnotifier/version.rb +1 -1
- data/spec/config_spec.rb +13 -0
- data/spec/event_data_spec.rb +5 -0
- data/spec/fixtures/rnotifier.yaml +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc84d512316e499511326cf82a62259c8ded533c
|
4
|
+
data.tar.gz: 3ef8d68f367a2eb04b8d6ba0abcd262077bb643a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad2ef2660995c4b2f047d323c9ed73b994db6c559411e86f68e57c455c95eeebce748f745b6eeff56c2d57a13f492ba1b599869d82a89adaeb29828ececf9cc5
|
7
|
+
data.tar.gz: 13e3480ae9fddf51a4fc8d6bc33e109397723733ff7e224e5948870d58ac54a0c2d7ef2cd9cb9b3917765d467f8383ff867069d2698a81cf8d0de16201a8cb8c
|
data/lib/rnotifier/config.rb
CHANGED
@@ -28,7 +28,7 @@ module Rnotifier
|
|
28
28
|
self.environments ||= []
|
29
29
|
|
30
30
|
if self.environments.is_a?(String) || self.environments.is_a?(Symbol)
|
31
|
-
self.environments = self.environments.to_s.split(',')
|
31
|
+
self.environments = self.environments.to_s.split(',').collect(&:strip)
|
32
32
|
end
|
33
33
|
|
34
34
|
#Return if config environments not include current env
|
@@ -70,13 +70,12 @@ module Rnotifier
|
|
70
70
|
:app_root => self.app_root,
|
71
71
|
:language => {
|
72
72
|
:name => 'ruby',
|
73
|
-
:version => (RUBY_VERSION rescue ''),
|
74
|
-
:patch_level => (RUBY_PATCHLEVEL rescue ''),
|
73
|
+
:version => "#{(RUBY_VERSION rescue '')}-p#{(RUBY_PATCHLEVEL rescue '')}",
|
75
74
|
:platform => (RUBY_PLATFORM rescue ''),
|
76
|
-
:release_date => (RUBY_RELEASE_DATE rescue ''),
|
77
75
|
:ruby_path => Gem.ruby,
|
78
76
|
:gem_path => Gem.path
|
79
|
-
}
|
77
|
+
},
|
78
|
+
:timezone => (Time.now.zone rescue nil)
|
80
79
|
}
|
81
80
|
end
|
82
81
|
|
data/lib/rnotifier/event_data.rb
CHANGED
data/lib/rnotifier/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
@@ -60,6 +60,13 @@ describe Rnotifier::Config do
|
|
60
60
|
expect(Rnotifier::Config.valid?).to be_true
|
61
61
|
end
|
62
62
|
|
63
|
+
it 'strip environments string' do
|
64
|
+
clear_config
|
65
|
+
Rnotifier.load_config("#{Dir.pwd}/spec/fixtures/rnotifier.yaml")
|
66
|
+
|
67
|
+
expect(Rnotifier::Config.environments).to include('test')
|
68
|
+
end
|
69
|
+
|
63
70
|
it 'set config invalid if environments not set in config and app env is test or development' do
|
64
71
|
clear_config
|
65
72
|
ENV['RACK_ENV'] = 'test'
|
@@ -78,4 +85,10 @@ describe Rnotifier::Config do
|
|
78
85
|
ENV['RNOTIFIER_API_KEY'] = nil
|
79
86
|
end
|
80
87
|
|
88
|
+
it 'app env should have time zone' do
|
89
|
+
env = Rnotifier::Config.get_app_env
|
90
|
+
expect(env[:timezone]).not_to be_nil
|
91
|
+
end
|
92
|
+
|
93
|
+
|
81
94
|
end
|
data/spec/event_data_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rnotifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jiren Patel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.0.
|
175
|
+
rubygems_version: 2.0.6
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: Exception catcher for Rails and other Rack apps
|