rnotifier 0.1.4 → 0.1.5

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: cef52d8a3834d6330dac03da18ad5818b39d4827
4
- data.tar.gz: 8f43aefa2e62a789143777ef5611159913492f93
3
+ metadata.gz: fc84d512316e499511326cf82a62259c8ded533c
4
+ data.tar.gz: 3ef8d68f367a2eb04b8d6ba0abcd262077bb643a
5
5
  SHA512:
6
- metadata.gz: 469d40fde0290c0358022b086a3090c7e27d1096cc016a83691ec6f87cdf827695539d8ace509ea5e204caaf80a84373b71f3fe540f0c86db2ab75ae464e4c79
7
- data.tar.gz: 73f0251a3f9b57930b637e14f9bff14e4db7a6d36f4b3e71ccef4b32a3dd07f1ef0b8d6f918e03882a3d40e47798a9f3b0d7fecccf5740b559d57605cf91649e
6
+ metadata.gz: ad2ef2660995c4b2f047d323c9ed73b994db6c559411e86f68e57c455c95eeebce748f745b6eeff56c2d57a13f492ba1b599869d82a89adaeb29828ececf9cc5
7
+ data.tar.gz: 13e3480ae9fddf51a4fc8d6bc33e109397723733ff7e224e5948870d58ac54a0c2d7ef2cd9cb9b3917765d467f8383ff867069d2698a81cf8d0de16201a8cb8c
@@ -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
 
@@ -35,7 +35,8 @@ module Rnotifier
35
35
  :env => Config.current_env,
36
36
  :pid => $$,
37
37
  :host => (Socket.gethostname rescue ''),
38
- :language => 'ruby'
38
+ :language => 'ruby',
39
+ :timezone => (Time.now.zone rescue nil)
39
40
  }
40
41
  end
41
42
 
@@ -1,3 +1,3 @@
1
1
  module Rnotifier
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -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
@@ -49,4 +49,9 @@ describe Rnotifier::EventData do
49
49
  end
50
50
  end
51
51
 
52
+ it 'app env should have time zone' do
53
+ env = Rnotifier::EventData.app_env
54
+ expect(env[:timezone]).not_to be_nil
55
+ end
56
+
52
57
  end
@@ -1,3 +1,3 @@
1
1
  apikey: API-KEY
2
- environments: production,staging,test
2
+ environments: production,staging, test
3
3
  ignore_bots: Googlebot
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
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-08-08 00:00:00.000000000 Z
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.3
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