influxdb-rails 0.1.10 → 0.1.11

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.
@@ -12,21 +12,21 @@ describe InfluxDB::Rails::Backtrace do
12
12
  end
13
13
 
14
14
  it "should accept an exception into the initializer" do
15
- @backtrace.lines.should_not be_empty
16
- @backtrace.lines.count.should == 3
15
+ expect(@backtrace.lines).not_to be_empty
16
+ expect(@backtrace.lines.count).to eq(3)
17
17
  end
18
18
 
19
19
  it "should correctly parse lines into their elements" do
20
20
  line = @backtrace.lines.first
21
21
 
22
- line.file.should == "/var/www/current/app/models/foo.rb"
23
- line.number.should == "10"
24
- line.method.should == "bar"
22
+ expect(line.file).to eq("/var/www/current/app/models/foo.rb")
23
+ expect(line.number).to eq("10")
24
+ expect(line.method).to eq("bar")
25
25
  end
26
26
 
27
27
  describe "#to_a" do
28
28
  it "should return an array of lines" do
29
- @backtrace.to_a.is_a?(Array).should be_truthy
29
+ expect(@backtrace.to_a.is_a?(Array)).to be_truthy
30
30
  end
31
31
  end
32
32
 
@@ -38,13 +38,13 @@ describe InfluxDB::Rails::Backtrace do
38
38
  end
39
39
 
40
40
  it "should accept an exception into the initializer" do
41
- @backtrace.lines.should be_empty
42
- @backtrace.lines.count.should == 0
41
+ expect(@backtrace.lines).to be_empty
42
+ expect(@backtrace.lines.count).to eq(0)
43
43
  end
44
44
 
45
45
  describe "#to_a" do
46
46
  it "should return an array of lines" do
47
- @backtrace.to_a.is_a?(Array).should be_truthy
47
+ expect(@backtrace.to_a.is_a?(Array)).to be_truthy
48
48
  end
49
49
  end
50
50
 
@@ -61,7 +61,7 @@ describe InfluxDB::Rails::Backtrace do
61
61
  filtered_backtrace = InfluxDB::Rails::Backtrace.new(@raw_backtrace)
62
62
 
63
63
  line = filtered_backtrace.lines.first
64
- line.file.should == "[APP_ROOT]/app/models/foo.rb"
64
+ expect(line.file).to eq("[APP_ROOT]/app/models/foo.rb")
65
65
  end
66
66
 
67
67
  it "should all default backtrace filters correctly" do
@@ -69,8 +69,8 @@ describe InfluxDB::Rails::Backtrace do
69
69
  extended_backtrace << "#{Gem.path.first}/lib/foo_gem.rb:1:in `blah'"
70
70
 
71
71
  filtered_backtrace = InfluxDB::Rails::Backtrace.new(extended_backtrace)
72
- filtered_backtrace.lines.first.file.should == "[APP_ROOT]/app/models/foo.rb"
73
- filtered_backtrace.lines.last.file.should == "[GEM_ROOT]/lib/foo_gem.rb"
72
+ expect(filtered_backtrace.lines.first.file).to eq("[APP_ROOT]/app/models/foo.rb")
73
+ expect(filtered_backtrace.lines.last.file).to eq("[GEM_ROOT]/lib/foo_gem.rb")
74
74
  end
75
75
 
76
76
  it "should allow the addition of custom backtrace filters" do
@@ -81,7 +81,7 @@ describe InfluxDB::Rails::Backtrace do
81
81
  filtered_backtrace = InfluxDB::Rails::Backtrace.new(@raw_backtrace)
82
82
 
83
83
  line = filtered_backtrace.lines.first
84
- line.file.should == "[APP_ROOT]/app/models/F00.rb"
84
+ expect(line.file).to eq("[APP_ROOT]/app/models/F00.rb")
85
85
  end
86
86
  end
87
87
  end
@@ -8,22 +8,22 @@ describe InfluxDB::Rails::Configuration do
8
8
  describe "#ignore_user_agent?" do
9
9
  it "should be true for user agents that have been set as ignorable" do
10
10
  @configuration.ignored_user_agents = %w{Googlebot}
11
- @configuration.ignore_user_agent?("Googlebot/2.1").should be_truthy
11
+ expect(@configuration.ignore_user_agent?("Googlebot/2.1")).to be_truthy
12
12
  end
13
13
 
14
14
  it "should be false for user agents that have not been set as ignorable" do
15
15
  @configuration.ignored_user_agents = %w{Googlebot}
16
- @configuration.ignore_user_agent?("Mozilla/5.0").should be_falsey
16
+ expect(@configuration.ignore_user_agent?("Mozilla/5.0")).to be_falsey
17
17
  end
18
18
 
19
19
  it "should be false if the ignored user agents list is empty" do
20
20
  @configuration.ignored_user_agents = []
21
- @configuration.ignore_user_agent?("Googlebot/2.1").should be_falsey
21
+ expect(@configuration.ignore_user_agent?("Googlebot/2.1")).to be_falsey
22
22
  end
23
23
 
24
24
  it "should be false if the ignored user agents list is inadvertently set to nil" do
25
25
  @configuration.ignored_user_agents = nil
26
- @configuration.ignore_user_agent?("Googlebot/2.1").should be_falsey
26
+ expect(@configuration.ignore_user_agent?("Googlebot/2.1")).to be_falsey
27
27
  end
28
28
  end
29
29
  end
@@ -12,12 +12,12 @@ describe InfluxDB::Rails::ExceptionPresenter do
12
12
  describe ".new" do
13
13
  it "should create a new ExceptionPresenter" do
14
14
  exception_presenter = InfluxDB::Rails::ExceptionPresenter.new(@exception)
15
- exception_presenter.should be_a(InfluxDB::Rails::ExceptionPresenter)
15
+ expect(exception_presenter).to be_a(InfluxDB::Rails::ExceptionPresenter)
16
16
  end
17
17
 
18
18
  it "should accept an exception as a parameter" do
19
19
  exception_presenter = InfluxDB::Rails::ExceptionPresenter.new(@exception)
20
- exception_presenter.should_not be_nil
20
+ expect(exception_presenter).not_to be_nil
21
21
  end
22
22
  end
23
23
 
@@ -14,17 +14,17 @@ describe InfluxDB::Rails do
14
14
  config.ignored_exceptions << 'DummyException'
15
15
  end
16
16
 
17
- InfluxDB::Rails.ignorable_exception?(exception).should be_truthy
17
+ expect(InfluxDB::Rails.ignorable_exception?(exception)).to be_truthy
18
18
  end
19
19
 
20
20
  it "should be true for exception types specified in the configuration" do
21
21
  exception = ActionController::RoutingError.new("foo")
22
- InfluxDB::Rails.ignorable_exception?(exception).should be_truthy
22
+ expect(InfluxDB::Rails.ignorable_exception?(exception)).to be_truthy
23
23
  end
24
24
 
25
25
  it "should be false for valid exceptions" do
26
26
  exception = ZeroDivisionError.new
27
- InfluxDB::Rails.ignorable_exception?(exception).should be_falsey
27
+ expect(InfluxDB::Rails.ignorable_exception?(exception)).to be_falsey
28
28
  end
29
29
  end
30
30
 
@@ -35,7 +35,7 @@ describe InfluxDB::Rails do
35
35
  config.instrumentation_enabled = false
36
36
  end
37
37
 
38
- InfluxDB::Rails.client.should_receive(:write_point)
38
+ expect(InfluxDB::Rails.client).to receive(:write_point)
39
39
 
40
40
  InfluxDB::Rails.rescue do
41
41
  raise ArgumentError.new('wrong')
@@ -57,7 +57,7 @@ describe InfluxDB::Rails do
57
57
  it "should transmit an exception when passed" do
58
58
  InfluxDB::Rails.configure { |config| config.ignored_environments = [] }
59
59
 
60
- InfluxDB::Rails.client.should_receive(:write_point)
60
+ expect(InfluxDB::Rails.client).to receive(:write_point)
61
61
 
62
62
  expect {
63
63
  InfluxDB::Rails.rescue_and_reraise { raise ArgumentError.new('wrong') }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: influxdb-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Persen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-08 00:00:00.000000000 Z
11
+ date: 2016-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: influxdb
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -150,13 +150,11 @@ files:
150
150
  - Rakefile
151
151
  - config.ru
152
152
  - gemfiles/Gemfile.rails-3.0.x
153
- - gemfiles/Gemfile.rails-3.0.x.lock
154
153
  - gemfiles/Gemfile.rails-3.1.x
155
- - gemfiles/Gemfile.rails-3.1.x.lock
156
154
  - gemfiles/Gemfile.rails-3.2.x
157
- - gemfiles/Gemfile.rails-3.2.x.lock
158
155
  - gemfiles/Gemfile.rails-4.0.x
159
- - gemfiles/Gemfile.rails-4.0.x.lock
156
+ - gemfiles/Gemfile.rails-4.1.x
157
+ - gemfiles/Gemfile.rails-4.2.x
160
158
  - influxdb-rails.gemspec
161
159
  - lib/influxdb-rails.rb
162
160
  - lib/influxdb/rails/air_traffic_controller.rb
@@ -172,6 +170,7 @@ files:
172
170
  - lib/influxdb/rails/version.rb
173
171
  - lib/rails/generators/influxdb/influxdb_generator.rb
174
172
  - lib/rails/generators/influxdb/templates/initializer.rb
173
+ - pkg/influxdb-rails-0.1.11.gem
175
174
  - spec/controllers/widgets_controller_spec.rb
176
175
  - spec/integration/exceptions_spec.rb
177
176
  - spec/integration/integration_helper.rb
@@ -179,7 +178,6 @@ files:
179
178
  - spec/spec_helper.rb
180
179
  - spec/suite.sh
181
180
  - spec/support/rails3/app.rb
182
- - spec/support/rails3/log/test.log
183
181
  - spec/support/rails4/app.rb
184
182
  - spec/support/rails4/log/test.log
185
183
  - spec/unit/backtrace_spec.rb
@@ -206,22 +204,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
204
  version: '0'
207
205
  requirements: []
208
206
  rubyforge_project: influxdb-rails
209
- rubygems_version: 2.2.1
207
+ rubygems_version: 2.5.1
210
208
  signing_key:
211
209
  specification_version: 4
212
210
  summary: InfluxDB bindings for Ruby on Rails.
213
211
  test_files:
214
- - spec/controllers/widgets_controller_spec.rb
215
- - spec/integration/exceptions_spec.rb
216
- - spec/integration/integration_helper.rb
217
- - spec/integration/metrics_spec.rb
212
+ - spec/unit/exception_presenter_spec.rb
213
+ - spec/unit/influxdb_rails_spec.rb
214
+ - spec/unit/backtrace_spec.rb
215
+ - spec/unit/configuration_spec.rb
218
216
  - spec/spec_helper.rb
217
+ - spec/controllers/widgets_controller_spec.rb
219
218
  - spec/suite.sh
220
- - spec/support/rails3/app.rb
221
- - spec/support/rails3/log/test.log
222
- - spec/support/rails4/app.rb
223
219
  - spec/support/rails4/log/test.log
224
- - spec/unit/backtrace_spec.rb
225
- - spec/unit/configuration_spec.rb
226
- - spec/unit/exception_presenter_spec.rb
227
- - spec/unit/influxdb_rails_spec.rb
220
+ - spec/support/rails4/app.rb
221
+ - spec/support/rails3/app.rb
222
+ - spec/integration/metrics_spec.rb
223
+ - spec/integration/integration_helper.rb
224
+ - spec/integration/exceptions_spec.rb
@@ -1,94 +0,0 @@
1
- PATH
2
- remote: /Users/todd/Projects/errplane/errplane-ruby
3
- specs:
4
- errplane (1.0.12)
5
- json
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- abstract (1.0.0)
11
- actionpack (3.0.16)
12
- activemodel (= 3.0.16)
13
- activesupport (= 3.0.16)
14
- builder (~> 2.1.2)
15
- erubis (~> 2.6.6)
16
- i18n (~> 0.5.0)
17
- rack (~> 1.2.5)
18
- rack-mount (~> 0.6.14)
19
- rack-test (~> 0.5.7)
20
- tzinfo (~> 0.3.23)
21
- activemodel (3.0.16)
22
- activesupport (= 3.0.16)
23
- builder (~> 2.1.2)
24
- i18n (~> 0.5.0)
25
- activesupport (3.0.16)
26
- builder (2.1.2)
27
- diff-lcs (1.1.3)
28
- erubis (2.6.6)
29
- abstract (>= 1.0.0)
30
- fakeweb (1.3.0)
31
- ffi (1.1.4)
32
- guard (1.3.0)
33
- listen (>= 0.4.2)
34
- thor (>= 0.14.6)
35
- guard-rspec (1.2.1)
36
- guard (>= 1.1)
37
- i18n (0.5.0)
38
- json (1.7.4)
39
- listen (0.4.7)
40
- rb-fchange (~> 0.0.5)
41
- rb-fsevent (~> 0.9.1)
42
- rb-inotify (~> 0.8.8)
43
- rack (1.2.5)
44
- rack-mount (0.6.14)
45
- rack (>= 1.0.0)
46
- rack-test (0.5.7)
47
- rack (>= 1.0)
48
- railties (3.0.16)
49
- actionpack (= 3.0.16)
50
- activesupport (= 3.0.16)
51
- rake (>= 0.8.7)
52
- rdoc (~> 3.4)
53
- thor (~> 0.14.4)
54
- rake (0.9.2.2)
55
- rb-fchange (0.0.5)
56
- ffi
57
- rb-fsevent (0.9.1)
58
- rb-inotify (0.8.8)
59
- ffi (>= 0.5.0)
60
- rdoc (3.12)
61
- json (~> 1.4)
62
- rspec (2.11.0)
63
- rspec-core (~> 2.11.0)
64
- rspec-expectations (~> 2.11.0)
65
- rspec-mocks (~> 2.11.0)
66
- rspec-core (2.11.1)
67
- rspec-expectations (2.11.2)
68
- diff-lcs (~> 1.1.3)
69
- rspec-mocks (2.11.1)
70
- rspec-rails (2.11.0)
71
- actionpack (>= 3.0)
72
- activesupport (>= 3.0)
73
- railties (>= 3.0)
74
- rspec (~> 2.11.0)
75
- thor (0.14.6)
76
- tzinfo (0.3.33)
77
-
78
- PLATFORMS
79
- ruby
80
-
81
- DEPENDENCIES
82
- actionpack (~> 3.0.15)
83
- activesupport (~> 3.0.15)
84
- bundler (>= 1.0.0)
85
- errplane!
86
- fakeweb
87
- guard
88
- guard-rspec
89
- railties (~> 3.0.15)
90
- rake
91
- rdoc
92
- rspec
93
- rspec-rails (>= 2.0)
94
- tzinfo
@@ -1,121 +0,0 @@
1
- PATH
2
- remote: /Users/todd/Projects/errplane/errplane-ruby
3
- specs:
4
- errplane (1.0.12)
5
- json
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionpack (3.1.12)
11
- activemodel (= 3.1.12)
12
- activesupport (= 3.1.12)
13
- builder (~> 3.0.0)
14
- erubis (~> 2.7.0)
15
- i18n (~> 0.6)
16
- rack (~> 1.3.6)
17
- rack-cache (~> 1.2)
18
- rack-mount (~> 0.8.2)
19
- rack-test (~> 0.6.1)
20
- sprockets (~> 2.0.4)
21
- activemodel (3.1.12)
22
- activesupport (= 3.1.12)
23
- builder (~> 3.0.0)
24
- i18n (~> 0.6)
25
- activesupport (3.1.12)
26
- multi_json (~> 1.0)
27
- builder (3.0.4)
28
- coderay (1.0.9)
29
- diff-lcs (1.2.4)
30
- erubis (2.7.0)
31
- fakeweb (1.3.0)
32
- ffi (1.9.0)
33
- formatador (0.2.4)
34
- guard (1.8.1)
35
- formatador (>= 0.2.4)
36
- listen (>= 1.0.0)
37
- lumberjack (>= 1.0.2)
38
- pry (>= 0.9.10)
39
- thor (>= 0.14.6)
40
- guard-rspec (3.0.2)
41
- guard (>= 1.8)
42
- rspec (~> 2.13)
43
- hike (1.2.3)
44
- i18n (0.6.4)
45
- json (1.8.0)
46
- listen (1.2.2)
47
- rb-fsevent (>= 0.9.3)
48
- rb-inotify (>= 0.9)
49
- rb-kqueue (>= 0.2)
50
- lumberjack (1.0.4)
51
- method_source (0.8.1)
52
- multi_json (1.7.7)
53
- pry (0.9.12.2)
54
- coderay (~> 1.0.5)
55
- method_source (~> 0.8)
56
- slop (~> 3.4)
57
- rack (1.3.10)
58
- rack-cache (1.2)
59
- rack (>= 0.4)
60
- rack-mount (0.8.3)
61
- rack (>= 1.0.0)
62
- rack-ssl (1.3.3)
63
- rack
64
- rack-test (0.6.2)
65
- rack (>= 1.0)
66
- railties (3.1.12)
67
- actionpack (= 3.1.12)
68
- activesupport (= 3.1.12)
69
- rack-ssl (~> 1.3.2)
70
- rake (>= 0.8.7)
71
- rdoc (~> 3.4)
72
- thor (~> 0.14.6)
73
- rake (10.1.0)
74
- rb-fsevent (0.9.3)
75
- rb-inotify (0.9.0)
76
- ffi (>= 0.5.0)
77
- rb-kqueue (0.2.0)
78
- ffi (>= 0.5.0)
79
- rdoc (3.12.2)
80
- json (~> 1.4)
81
- rspec (2.14.0)
82
- rspec-core (~> 2.14.0)
83
- rspec-expectations (~> 2.14.0)
84
- rspec-mocks (~> 2.14.0)
85
- rspec-core (2.14.2)
86
- rspec-expectations (2.14.0)
87
- diff-lcs (>= 1.1.3, < 2.0)
88
- rspec-mocks (2.14.1)
89
- rspec-rails (2.14.0)
90
- actionpack (>= 3.0)
91
- activesupport (>= 3.0)
92
- railties (>= 3.0)
93
- rspec-core (~> 2.14.0)
94
- rspec-expectations (~> 2.14.0)
95
- rspec-mocks (~> 2.14.0)
96
- slop (3.4.5)
97
- sprockets (2.0.4)
98
- hike (~> 1.2)
99
- rack (~> 1.0)
100
- tilt (~> 1.1, != 1.3.0)
101
- thor (0.14.6)
102
- tilt (1.4.1)
103
- tzinfo (1.0.1)
104
-
105
- PLATFORMS
106
- ruby
107
-
108
- DEPENDENCIES
109
- actionpack (~> 3.1.5)
110
- activesupport (~> 3.1.5)
111
- bundler (>= 1.0.0)
112
- errplane!
113
- fakeweb
114
- guard
115
- guard-rspec
116
- railties (~> 3.1.5)
117
- rake
118
- rdoc
119
- rspec
120
- rspec-rails (>= 2.0)
121
- tzinfo