time_bandits 0.10.1 → 0.10.3

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
  SHA1:
3
- metadata.gz: bcb05c1f6bed4183b03464ccf287213d7a63fa71
4
- data.tar.gz: b5884ccf87fc56dea4e4c33f8ac38c2e9785250c
3
+ metadata.gz: 01eaedc2476f9acf317bb48a0a2c9e1aa77742a2
4
+ data.tar.gz: 1fbf51beb7e4d4992639e3ae035fcd66ed3bec6f
5
5
  SHA512:
6
- metadata.gz: 9cd285de7afc229b8e07a6d8c313de847262bdbba3603020288a73eff780553831985f818815df4e99fe69d73e390907a31cf520abd897cc8ad6ac76de3383e6
7
- data.tar.gz: 2dec6460a84975639cab160980b07ed6cdf2dfaec80ee40ab06f44bd2b98400b7011b75d5acad10fd9224e66ad7b241c2790453be3aa5db879461e5e81a383e7
6
+ metadata.gz: f660bf5ae9ff600eecf8300247d6995564c97f87d662f1a46f5cd7a27997b55156e31ed464a26cc166066e1bdff9ab2ee9111fe234fb1116597efd8f32f0f862
7
+ data.tar.gz: 404ea48c566456ab5c9d1aaf3dae5c9270e376a068fa3cd1f49615a83b46e14c7cca466812d617e6d1fda934cc20bafcbf3bd9afcaa436e93b0d2081dcd7e51b
data/README.rdoc CHANGED
@@ -84,6 +84,12 @@ In order for the test to run you need a running memcached, redis-server and mysq
84
84
 
85
85
  == Release Notes
86
86
 
87
+ version 0.10.3
88
+ -- fixed activerecord monkeypatch
89
+
90
+ version 0.10.2
91
+ -- controller testing fixed for rspec
92
+
87
93
  version 0.10.1
88
94
  -- fixed incorrect module prepend which broke controller testing
89
95
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- time_bandits (0.9.2)
4
+ time_bandits (0.10.2)
5
5
  activesupport (>= 2.3.2)
6
6
  thread_variables
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- time_bandits (0.9.2)
4
+ time_bandits (0.10.2)
5
5
  activesupport (>= 2.3.2)
6
6
  thread_variables
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- time_bandits (0.9.2)
4
+ time_bandits (0.10.2)
5
5
  activesupport (>= 2.3.2)
6
6
  thread_variables
7
7
 
@@ -84,7 +84,7 @@ module ActiveRecord
84
84
  public
85
85
 
86
86
  private
87
- if Rails::VERSION::STRING < "5.0"
87
+ if Rails::VERSION::STRING >= "5.0"
88
88
  def log_sql_statement(payload, event)
89
89
  name = '%s (%.1fms)' % [payload[:name], event.duration]
90
90
  sql = payload[:sql].squeeze(' ')
@@ -19,14 +19,15 @@ module TimeBandits
19
19
 
20
20
  # make sure TimeBandits.reset is called in test environment as middlewares are not executed
21
21
  if Rails.env.test?
22
- module TestWithTimeBanditsReset
23
- def process(*args)
22
+ require 'action_controller/test_case'
23
+ module ActionController::TestCase::Behavior
24
+ def process_with_time_bandits(*args)
24
25
  TimeBandits.reset
25
- super
26
+ process_without_time_bandits(*args)
26
27
  end
28
+ alias_method :process_without_time_bandits, :process
29
+ alias_method :process, :process_with_time_bandits
27
30
  end
28
- require 'action_controller/test_case'
29
- ActionController::TestCase.prepend TestWithTimeBanditsReset
30
31
  end
31
32
  end
32
33
 
@@ -1,3 +1,3 @@
1
1
  module TimeBandits
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_bandits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-11 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thread_variables