time_bandits 0.12.3 → 0.12.4

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
  SHA256:
3
- metadata.gz: b0fce6a47ee1df1c7b253b224baa214c7c13402d3da79f898fb0c3a97e2d722a
4
- data.tar.gz: 022c6a22fd197515a3730185f146eb979cfba9fca9fa1021cbb793eac796ecf4
3
+ metadata.gz: 9824d9fcd5eef40eebbf628d042f34604f310e563570c62e488bb8084533f24a
4
+ data.tar.gz: c7bc40bcbce473400e9216268bf2abc10f7c1d6fbfc0ac90305bfaba444e8706
5
5
  SHA512:
6
- metadata.gz: 790651148875c6d6010826198a7ea43de2a9ed2c50672fa50d176cac1ad6d677817956b1f63bdd8fde45b2682f388cd9f13814bcbfb0d4ad3f8a1961921b846c
7
- data.tar.gz: d19cab10410f48485ce67adec41c60124c26dab0fd720036613f936f6f97b9697aeb7e40f275bf334ee5674cb9ab6f996640fdb755f8501b75ad2e6953111bf2
6
+ metadata.gz: 3d78ca08b9d112fd2e4365b7df522badce8e57965d469dac2cf65c5ea51753078021729e066d798781e040140e306af4f274fed6da4b9246a7866c44bff6fb92
7
+ data.tar.gz: 1ac34b522398bdf6419a53e28fd068e434cc538c669160cc423a8a9590443724e1d7acfe4ecb40fe50f2268c1c30f8882e137e5907c6e66ac960e64d8023ae97
@@ -0,0 +1,46 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ ruby-version: [3.0.3, 2.7.5, 2.6.9]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+
21
+ - name: Start containers
22
+ run: docker-compose -f docker-compose.yml up -d
23
+
24
+ - name: Set up Ruby ${{ matrix.ruby-version }}
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ${{ matrix.ruby-version }}
28
+
29
+ - name: Install dependencies
30
+ run: sudo apt-get install libsasl2-dev
31
+
32
+ - name: Install gems
33
+ run: bundle install
34
+
35
+ - name: Run tests
36
+ run: bundle exec rake test
37
+
38
+ - name: Install appraisals
39
+ run: bundle exec appraisal install
40
+
41
+ - name: Run appraisals
42
+ run: bundle exec appraisal rake test
43
+
44
+ - name: Stop containers
45
+ if: always()
46
+ run: docker-compose -f "docker-compose.yml" down
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ pkg/*
6
6
  .DS_Store
7
7
  .rvmrc
8
8
  dump.rdb
9
+ gemfiles/*
data/Appraisals CHANGED
@@ -1,7 +1,12 @@
1
- [
2
- "5.2.4.3",
3
- "6.0.3.2"
4
- ].each do |rails_version|
1
+ appraisals = [
2
+ "6.0.4.4",
3
+ "6.1.4.4",
4
+ ]
5
+
6
+ appraisals.insert(0, "5.2.6") if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0")
7
+ appraisals << "7.0.0" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7.0")
8
+
9
+ appraisals.each do |rails_version|
5
10
  appraise "activesupport-#{rails_version}" do
6
11
  gem "activesupport", rails_version
7
12
  gem "activerecord", rails_version
data/README.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  Time Bandits is a gem plugin for Rails which enhances Rails' controller/view/db benchmark logging.
6
6
 
7
- [![Travis](https://travis-ci.org/skaes/time_bandits.svg?branch=master)](https://travis-ci.org/github/skaes/time_bandits)
7
+ ![Build](https://github.com/skaes/time_bandits/actions/workflows/run-tests.yml/badge.svg)
8
+
8
9
 
9
10
  ## Usage
10
11
 
@@ -7,7 +7,8 @@ module TimeBandits
7
7
  class Railtie < Rails::Railtie
8
8
 
9
9
  initializer "time_bandits" do |app|
10
- app.config.middleware.swap(Rails::Rack::Logger, TimeBandits::Rack::Logger)
10
+ app.config.middleware.insert_after(Rails::Rack::Logger, TimeBandits::Rack::Logger)
11
+ app.config.middleware.delete(Rails::Rack::Logger)
11
12
 
12
13
  ActiveSupport.on_load(:action_controller) do
13
14
  require 'time_bandits/monkey_patches/action_controller'
@@ -1,3 +1,3 @@
1
1
  module TimeBandits
2
- VERSION = "0.12.3"
2
+ VERSION = "0.12.4"
3
3
  end
@@ -32,11 +32,11 @@ class SequelTest < Test::Unit::TestCase
32
32
  end
33
33
 
34
34
  def mysql_port
35
- ENV['TRAVIS'] == "true" ? 3306 : 3601
35
+ 3601
36
36
  end
37
37
 
38
38
  def sequel
39
- @sequel ||= Sequel.mysql2(host: "localhost", port: mysql_port, user: "root")
39
+ @sequel ||= Sequel.mysql2(host: "127.0.0.1", port: mysql_port, user: "root")
40
40
  end
41
41
 
42
42
  def metrics
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.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-25 00:00:00.000000000 Z
11
+ date: 2022-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thread_variables
@@ -227,8 +227,8 @@ executables: []
227
227
  extensions: []
228
228
  extra_rdoc_files: []
229
229
  files:
230
+ - ".github/workflows/run-tests.yml"
230
231
  - ".gitignore"
231
- - ".travis.yml"
232
232
  - Appraisals
233
233
  - Gemfile
234
234
  - LICENSE.txt
@@ -236,10 +236,6 @@ files:
236
236
  - Rakefile
237
237
  - TODO
238
238
  - docker-compose.yml
239
- - gemfiles/activesupport_5.2.4.3.gemfile
240
- - gemfiles/activesupport_5.2.4.3.gemfile.lock
241
- - gemfiles/activesupport_6.0.3.2.gemfile
242
- - gemfiles/activesupport_6.0.3.2.gemfile.lock
243
239
  - lib/time_bandits.rb
244
240
  - lib/time_bandits/monkey_patches/action_controller.rb
245
241
  - lib/time_bandits/monkey_patches/active_record.rb
@@ -292,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
292
288
  - !ruby/object:Gem::Version
293
289
  version: '0'
294
290
  requirements: []
295
- rubygems_version: 3.1.4
291
+ rubygems_version: 3.2.33
296
292
  signing_key:
297
293
  specification_version: 4
298
294
  summary: Custom performance logging for Rails
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- dist: bionic
2
- language: ruby
3
- rvm:
4
- - 2.5.7
5
- - 2.6.5
6
- - 2.7.0
7
- before_install:
8
- - gem install bundler
9
- script: "bundle exec rake appraisal:test"
10
- services:
11
- - redis-server
12
- - memcached
13
- - rabbitmq
14
- - mysql
15
- addons:
16
- apt:
17
- sources:
18
- - sourceline: "deb https://packages.erlang-solutions.com/ubuntu bionic contrib"
19
- key_url: "https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc"
20
- - sourceline: "deb https://dl.bintray.com/rabbitmq/debian bionic main"
21
- key_url: "https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc"
22
- packages:
23
- - rabbitmq-server
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "activesupport", "5.2.4.3"
6
- gem "activerecord", "5.2.4.3"
7
-
8
- gemspec path: "../"
@@ -1,81 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- time_bandits (0.11.0)
5
- activesupport (>= 5.2.4.3)
6
- thread_variables
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- activemodel (5.2.4.3)
12
- activesupport (= 5.2.4.3)
13
- activerecord (5.2.4.3)
14
- activemodel (= 5.2.4.3)
15
- activesupport (= 5.2.4.3)
16
- arel (>= 9.0)
17
- activesupport (5.2.4.3)
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 0.7, < 2)
20
- minitest (~> 5.1)
21
- tzinfo (~> 1.1)
22
- amq-protocol (2.3.1)
23
- amqp (1.8.0)
24
- amq-protocol (>= 2.2.0)
25
- eventmachine
26
- ansi (1.5.0)
27
- appraisal (2.3.0)
28
- bundler
29
- rake
30
- thor (>= 0.14.0)
31
- arel (9.0.0)
32
- beetle (3.4.1)
33
- activesupport (>= 2.3.4)
34
- amq-protocol (= 2.3.1)
35
- amqp (= 1.8.0)
36
- bunny (~> 0.7.12)
37
- hiredis (>= 0.4.5)
38
- redis (>= 4.2.1)
39
- bunny (0.7.12)
40
- byebug (11.1.3)
41
- concurrent-ruby (1.1.6)
42
- dalli (2.7.10)
43
- eventmachine (1.2.7)
44
- hiredis (0.6.3)
45
- i18n (1.8.3)
46
- concurrent-ruby (~> 1.0)
47
- memcached (1.8.0)
48
- minitest (5.14.1)
49
- mocha (1.11.2)
50
- mysql2 (0.5.3)
51
- rake (13.0.1)
52
- redis (4.2.1)
53
- sequel (5.33.0)
54
- thor (1.0.1)
55
- thread_safe (0.3.6)
56
- thread_variables (0.2.0)
57
- tzinfo (1.2.7)
58
- thread_safe (~> 0.1)
59
-
60
- PLATFORMS
61
- ruby
62
-
63
- DEPENDENCIES
64
- activerecord (= 5.2.4.3)
65
- activesupport (= 5.2.4.3)
66
- ansi
67
- appraisal
68
- beetle (>= 3.4.1)
69
- byebug
70
- dalli
71
- memcached (~> 1.8.0)
72
- minitest (~> 5.5)
73
- mocha
74
- mysql2
75
- rake
76
- redis
77
- sequel
78
- time_bandits!
79
-
80
- BUNDLED WITH
81
- 2.1.4
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "activesupport", "6.0.3.2"
6
- gem "activerecord", "6.0.3.2"
7
-
8
- gemspec path: "../"
@@ -1,81 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- time_bandits (0.11.0)
5
- activesupport (>= 5.2.4.3)
6
- thread_variables
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- activemodel (6.0.3.2)
12
- activesupport (= 6.0.3.2)
13
- activerecord (6.0.3.2)
14
- activemodel (= 6.0.3.2)
15
- activesupport (= 6.0.3.2)
16
- activesupport (6.0.3.2)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- zeitwerk (~> 2.2, >= 2.2.2)
22
- amq-protocol (2.3.1)
23
- amqp (1.8.0)
24
- amq-protocol (>= 2.2.0)
25
- eventmachine
26
- ansi (1.5.0)
27
- appraisal (2.3.0)
28
- bundler
29
- rake
30
- thor (>= 0.14.0)
31
- beetle (3.4.1)
32
- activesupport (>= 2.3.4)
33
- amq-protocol (= 2.3.1)
34
- amqp (= 1.8.0)
35
- bunny (~> 0.7.12)
36
- hiredis (>= 0.4.5)
37
- redis (>= 4.2.1)
38
- bunny (0.7.12)
39
- byebug (11.1.3)
40
- concurrent-ruby (1.1.6)
41
- dalli (2.7.10)
42
- eventmachine (1.2.7)
43
- hiredis (0.6.3)
44
- i18n (1.8.3)
45
- concurrent-ruby (~> 1.0)
46
- memcached (1.8.0)
47
- minitest (5.14.1)
48
- mocha (1.11.2)
49
- mysql2 (0.5.3)
50
- rake (13.0.1)
51
- redis (4.2.1)
52
- sequel (5.33.0)
53
- thor (1.0.1)
54
- thread_safe (0.3.6)
55
- thread_variables (0.2.0)
56
- tzinfo (1.2.7)
57
- thread_safe (~> 0.1)
58
- zeitwerk (2.3.0)
59
-
60
- PLATFORMS
61
- ruby
62
-
63
- DEPENDENCIES
64
- activerecord (= 6.0.3.2)
65
- activesupport (= 6.0.3.2)
66
- ansi
67
- appraisal
68
- beetle (>= 3.4.1)
69
- byebug
70
- dalli
71
- memcached (~> 1.8.0)
72
- minitest (~> 5.5)
73
- mocha
74
- mysql2
75
- rake
76
- redis
77
- sequel
78
- time_bandits!
79
-
80
- BUNDLED WITH
81
- 2.1.4