rspec-sqlimit 0.0.5 → 0.0.6

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
  SHA256:
3
- metadata.gz: 0ef12b607f4a6ec3c874a69637dd3e9717224998ca13177d8a907b6c6f413068
4
- data.tar.gz: 3d490548445a3bc92381a19d624a09e2a591ccbcabe4d0a0c8d2bdd2028d6ed1
3
+ metadata.gz: dbfb3f94e9efc6f825eaf61d4cc463c72dfbca0ebdab8c88c055694810397b2a
4
+ data.tar.gz: ed446933f01a0039dba15cc97c8c69b040a39fb28053e5a3cccedd95bf7347ab
5
5
  SHA512:
6
- metadata.gz: 5c05ef3f272c574a748cb5d4065122ad0b649a94078f01f9520ae18d855a9c8e1ca386f8a085bb3ea1cf9e3c87e011b9288b44eb39930757c7d5e3456df37faf
7
- data.tar.gz: ab6c401133cb90c82e0d8123d47394570ea143ba9af068c2f8b04e1c8ab474dbccb3dd61e999ce53e44019a7350693ff7a2026bea6adf7791778c14cabf89465
6
+ metadata.gz: 67dc3b59f8fe5b5582c723d4128f8bd02c33e534138fc99556b2939c70cbd0000d82feb9522fe6fbd4aff928a8bf292b475145d2fd3827f21b840e96dfe4710d
7
+ data.tar.gz: acad8d16692dce8f9cf861d61a874e79d33bf2f924f79704a2826398516e5e592a2152a6418484d4e0066f09cfa16d591f046226162e11cda96b9b9451e3092a
@@ -0,0 +1,16 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '../..'
4
+
5
+ group :test do
6
+ gem "database_cleaner", ">= 1.5"
7
+ end
8
+
9
+ group :test, :development do
10
+ gem "pry"
11
+ gem "pry-byebug", "3.7.0"
12
+ gem "rails", "4.2.0"
13
+ gem "rake", ">= 10"
14
+ gem "rubocop", "0.81.0"
15
+ gem "sqlite3", "~> 1.3.6"
16
+ end
@@ -0,0 +1,16 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '../..'
4
+
5
+ group :test do
6
+ gem "database_cleaner", ">= 1.5"
7
+ end
8
+
9
+ group :test, :development do
10
+ gem "pry"
11
+ gem "pry-byebug"
12
+ gem "rails", "~> 6.0"
13
+ gem "rake", ">= 10"
14
+ gem "rubocop"
15
+ gem "sqlite3", "~> 1.4.0"
16
+ end
@@ -0,0 +1,16 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '../..'
4
+
5
+ group :test do
6
+ gem "database_cleaner", ">= 1.5"
7
+ end
8
+
9
+ group :test, :development do
10
+ gem "pry"
11
+ gem "pry-byebug"
12
+ gem "rails", "~> 7.1.0"
13
+ gem "rake", ">= 10"
14
+ gem "rubocop"
15
+ gem "sqlite3", "~> 1.6"
16
+ end
@@ -0,0 +1,64 @@
1
+ name: Check the code
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ branches:
8
+ - master
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11
+ cancel-in-progress: true
12
+ defaults:
13
+ run:
14
+ shell: bash
15
+ jobs:
16
+ lint:
17
+ name: lint (ruby 3.2, rails 7.1)
18
+ runs-on: ubuntu-latest
19
+ env:
20
+ BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_7.1.gemfile
21
+ BUNDLE_RETRY: 1
22
+ steps:
23
+ - uses: actions/checkout@v3
24
+ - uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: '3.2'
27
+ bundler-cache: true
28
+ - run: bundle exec rubocop
29
+
30
+ test-legacy:
31
+ name: test (ruby 2.3, rails 4.2)
32
+ runs-on: ubuntu-latest
33
+ env:
34
+ BUNDLER_VERSION: '1.17.3'
35
+ BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_4.2.gemfile
36
+ BUNDLE_RETRY: 1
37
+ steps:
38
+ - uses: actions/checkout@v3
39
+ - uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: 2.3
42
+ rubygems: 3.2.3
43
+ bundler: 1
44
+ bundler-cache: true
45
+ - run: bundle exec rake
46
+
47
+ test:
48
+ name: test (ruby ${{ matrix.ruby }}, rails ${{ matrix.rails }})
49
+ runs-on: ubuntu-latest
50
+ strategy:
51
+ fail-fast: false
52
+ matrix:
53
+ ruby: ['3.2']
54
+ rails: ['6.0', '7.1']
55
+ env:
56
+ BUNDLE_GEMFILE: ${{ github.workspace }}/.github/gemfiles/rails_${{ matrix.rails }}.gemfile
57
+ BUNDLE_RETRY: 1
58
+ steps:
59
+ - uses: actions/checkout@v3
60
+ - uses: ruby/setup-ruby@v1
61
+ with:
62
+ ruby-version: ${{ matrix.ruby }}
63
+ bundler-cache: true
64
+ - run: bundle exec rake
@@ -0,0 +1,15 @@
1
+ name: Release a new version
2
+ on:
3
+ release:
4
+ types: [created]
5
+ jobs:
6
+ release:
7
+ name: Publish new version on RubyGems
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+ - uses: cadwallion/publish-rubygems-action@master
12
+ env:
13
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
14
+ RUBYGEMS_API_KEY: ${{secrets.PUSH_RSPEC_SQLIMIT}}
15
+ RELEASE_COMMAND: rake release
data/.gitignore CHANGED
@@ -8,7 +8,10 @@
8
8
  /pkg/
9
9
  /spec/reports/
10
10
  /tmp/
11
- /spec/dummy/db/*.sqlite3
11
+ /log/
12
+ /spec/dummy/log/
13
+ /spec/dummy/tmp/
14
+ /spec/dummy/storage/
12
15
  *.gem
13
16
  .rspec_status
14
17
  .idea/
data/.rubocop.yml CHANGED
@@ -1,23 +1,25 @@
1
1
  ---
2
2
  AllCops:
3
- DisplayCopNames: true
4
- DisplayStyleGuide: true
3
+ DisplayCopNames: true
4
+ DisplayStyleGuide: true
5
+ NewCops: enable
5
6
  StyleGuideCopsOnly: true
6
- TargetRubyVersion: 2.6
7
+ TargetRubyVersion: 2.3
7
8
  Exclude:
8
9
  - spec/dummy/db/schema.rb
9
10
  - vendor/bundle/**/*
10
11
  - gemfiles/vendor/**/*
12
+
11
13
  Metrics/ParameterLists:
12
14
  Max: 5
13
15
 
14
- Style/Alias:
16
+ Naming/FileName:
15
17
  Enabled: false
16
18
 
17
- Style/ClassAndModuleChildren:
19
+ Style/Alias:
18
20
  Enabled: false
19
21
 
20
- Style/FileName:
22
+ Style/ClassAndModuleChildren:
21
23
  Enabled: false
22
24
 
23
25
  Style/FrozenStringLiteralComment:
@@ -26,6 +28,9 @@ Style/FrozenStringLiteralComment:
26
28
  Style/ModuleFunction:
27
29
  Enabled: false
28
30
 
31
+ Style/OptionalBooleanParameter:
32
+ Enabled: false
33
+
29
34
  Style/StringLiterals:
30
35
  EnforcedStyle: double_quotes
31
36
 
data/CHANGELOG.md CHANGED
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## [0.0.6] - [2023-10-06]
9
+ - Support of Rails 7+ (@terracatta)
10
+
8
11
  ## [0.0.5] - [2022-02-13]
9
12
  - Support of Rails 7 (@kivanio)
10
13
  - Fix README (@rcclemente)
@@ -34,3 +37,4 @@ This is a first public release (@nepalez)
34
37
  [0.0.3]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.2...v0.0.3
35
38
  [0.0.4]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.3...v0.0.4
36
39
  [0.0.5]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.4...v0.0.5
40
+ [0.0.6]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.4...v0.0.5
data/Gemfile CHANGED
@@ -1,12 +1,16 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in tram-form.gemspec
4
3
  gemspec
5
4
 
6
- gem "rails"
7
- gem "sqlite3"
5
+ group :test do
6
+ gem "database_cleaner", ">= 1.5"
7
+ end
8
8
 
9
9
  group :test, :development do
10
10
  gem "pry"
11
11
  gem "pry-byebug"
12
+ gem "rails"
13
+ gem "rake", ">= 10"
14
+ gem "rubocop"
15
+ gem "sqlite3", ">= 1.3"
12
16
  end
data/README.md CHANGED
@@ -7,9 +7,6 @@ It wraps [the answer at Stack Overflow][stack-answer] by [Ryan Bigg][ryan-bigg],
7
7
  For motivation and details see my [blog post "Fighting the Hydra of N+1 queries" in the Martian Chronicles][hydra].
8
8
 
9
9
  [![Gem Version][gem-badger]][gem]
10
- [![Build Status][travis-badger]][travis]
11
- [![Dependency Status][gemnasium-badger]][gemnasium]
12
- [![Code Climate][codeclimate-badger]][codeclimate]
13
10
 
14
11
  <a href="https://evilmartians.com/">
15
12
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
@@ -89,14 +86,8 @@ In the last example you can see that binded values are shown after the query fol
89
86
 
90
87
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
91
88
 
92
- [codeclimate-badger]: https://img.shields.io/codeclimate/github/nepalez/rspec-sqlimit.svg?style=flat
93
- [codeclimate]: https://codeclimate.com/github/nepalez/rspec-sqlimit
94
89
  [gem-badger]: https://img.shields.io/gem/v/rspec-sqlimit.svg?style=flat
95
90
  [gem]: https://rubygems.org/gems/rspec-sqlimit
96
- [gemnasium-badger]: https://img.shields.io/gemnasium/nepalez/rspec-sqlimit.svg?style=flat
97
- [gemnasium]: https://gemnasium.com/nepalez/rspec-sqlimit
98
- [travis-badger]: https://img.shields.io/travis/nepalez/rspec-sqlimit/master.svg?style=flat
99
- [travis]: https://travis-ci.org/nepalez/rspec-sqlimit
100
91
  [stack-answer]: http://stackoverflow.com/a/5492207/1869912
101
92
  [ryan-bigg]: http://ryanbigg.com/
102
93
  [notification]: http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html
data/Rakefile CHANGED
@@ -6,24 +6,7 @@ require "rspec/core/rake_task"
6
6
  # Adds dummy:db tasks.
7
7
  load "spec/dummy/Rakefile"
8
8
 
9
- # Declares gem's own tasks.
10
- desc "Runs test suite over all rails versions."
11
- task :default do
12
- if ENV["BUNDLE_GEMFILE"] =~ /gemfiles/
13
- Rake::Task["dummy:db:create"].reenable
14
- Rake::Task["dummy:db:migrate"].reenable
15
- Rake::Task[:spec].invoke
16
- else
17
- Rake::Task[:appraise].invoke
18
- end
19
- end
20
-
21
9
  desc "Runs test suite."
22
- task default: %w[dummy:db:create dummy:db:migrate] do
10
+ task default: %w[db:reset db:schema:load] do
23
11
  exec "bundle exec rspec spec"
24
- exec "bundle exec rubocop"
25
- end
26
-
27
- task :appraise do
28
- exec "appraisal install && appraisal rake"
29
12
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "rspec-sqlimit"
3
- gem.version = "0.0.5"
3
+ gem.version = "0.0.6"
4
4
  gem.author = "Andrew Kozin (nepalez)"
5
5
  gem.email = "andrew.kozin@gmail.com"
6
6
  gem.homepage = "https://github.com/nepalez/rspec-sqlimit"
@@ -13,13 +13,6 @@ Gem::Specification.new do |gem|
13
13
 
14
14
  gem.required_ruby_version = ">= 2.3"
15
15
 
16
- gem.add_runtime_dependency "activerecord", "> 4.2", "< 7.1"
16
+ gem.add_runtime_dependency "activerecord", ">= 4.2.0", "< 8"
17
17
  gem.add_runtime_dependency "rspec", "~> 3.0"
18
-
19
- gem.add_development_dependency "appraisal", "~> 2.2"
20
- gem.add_development_dependency "rspec", "~> 3.0"
21
- gem.add_development_dependency "rake", "> 10.0"
22
- gem.add_development_dependency "sqlite3", "~> 1.3"
23
- gem.add_development_dependency "database_cleaner", "~> 1.5"
24
- gem.add_development_dependency "rubocop", "~> 0.49"
25
18
  end
data/spec/dummy/Rakefile CHANGED
@@ -1,14 +1,6 @@
1
- require "active_record"
2
- require "bundler/setup"
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- namespace :dummy do
5
- task :environment do
6
- require_relative "lib/dummy"
7
- end
4
+ require_relative "config/application"
8
5
 
9
- namespace :db do
10
- task load_config: :environment
11
- end
12
-
13
- load "active_record/railties/databases.rake"
14
- end
6
+ Rails.application.load_tasks
@@ -0,0 +1,10 @@
1
+ require "active_record/railtie"
2
+
3
+ module Dummy
4
+ class Application < Rails::Application
5
+ config.api_only = true
6
+ config.eager_load = false
7
+ config.enable_reloading = false
8
+ config.cache_store = :null_store
9
+ end
10
+ end
@@ -1,6 +1,12 @@
1
- ---
1
+ default: &default
2
+ adapter: sqlite3
3
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
4
+ timeout: 5000
5
+
6
+ development:
7
+ <<: *default
8
+ database: storage/development.sqlite3
9
+
2
10
  test:
3
- adapter: :sqlite3
4
- database: spec/dummy/db/test.sqlite3
5
- pool: 5
6
- timeout: 5000
11
+ <<: *default
12
+ database: storage/test.sqlite3
@@ -1,10 +1,5 @@
1
- Dummy::Application.configure do |config|
2
- dummy = File.expand_path "../..", __FILE__
3
- database_yml = File.join(dummy, "config/database.yml")
1
+ # Load the Rails application.
2
+ require_relative "application"
4
3
 
5
- config.database_configuration = YAML.load File.read(database_yml)
6
- config.db_dir = File.join(dummy, "db")
7
- config.env = :test
8
- config.migrations_paths = [File.join(dummy, "db/migrate")]
9
- config.root = dummy
10
- end
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
File without changes
@@ -1,18 +1,4 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 20170211104800) do
14
-
1
+ ActiveRecord::Schema.define(version: 2017_02_11_104800) do
15
2
  create_table "users", force: :cascade do |t|
16
3
  end
17
-
18
4
  end
@@ -31,7 +31,8 @@ describe RSpec::SQLimit::Reporter do
31
31
 
32
32
  it "prints param as an array with one element" do
33
33
  # INSERT INTO "users" ("id") VALUES (?); [1] (0.234 ms)
34
- expect(subject.call).to include("VALUES (?); [1]")
34
+ # INSERT INTO "users" ("id") VALUES (?) RETURNING "id"; [1] (1.12 ms)
35
+ expect(subject.call).to match(/VALUES \(\?\).*; \[1\]/)
35
36
  end
36
37
  end
37
38
 
@@ -43,11 +44,10 @@ describe RSpec::SQLimit::Reporter do
43
44
  end
44
45
 
45
46
  it "prints all params" do
46
- # rubocop: disable Metrics/LineLength
47
47
  # SELECT "users".* FROM "users" WHERE "users"."id" IN (1, 2, 3) (0.17 ms))
48
48
  # Rails >= 6:
49
49
  # SELECT "users".* FROM "users" WHERE "users"."id" IN (?, ?, ?); [1, 2, 3] (0.121 ms)
50
- # rubocop: enable Metrics/LineLength
50
+ # rubocop: enable Layout/LineLength
51
51
  expect(subject.call).to include("1, 2, 3")
52
52
  end
53
53
  end
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,7 @@ require "pry"
2
2
  require "rspec-sqlimit"
3
3
  require "database_cleaner"
4
4
 
5
- require_relative "dummy/lib/dummy"
5
+ require_relative "dummy/config/environment"
6
6
 
7
7
  DatabaseCleaner.strategy = :truncation
8
8
 
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-sqlimit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kozin (nepalez)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-12 00:00:00.000000000 Z
11
+ date: 2023-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: 4.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '4.2'
29
+ version: 4.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,90 +44,6 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3.0'
47
- - !ruby/object:Gem::Dependency
48
- name: appraisal
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '2.2'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '2.2'
61
- - !ruby/object:Gem::Dependency
62
- name: rspec
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '3.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '3.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rake
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">"
80
- - !ruby/object:Gem::Version
81
- version: '10.0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">"
87
- - !ruby/object:Gem::Version
88
- version: '10.0'
89
- - !ruby/object:Gem::Dependency
90
- name: sqlite3
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '1.3'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '1.3'
103
- - !ruby/object:Gem::Dependency
104
- name: database_cleaner
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '1.5'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '1.5'
117
- - !ruby/object:Gem::Dependency
118
- name: rubocop
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '0.49'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '0.49'
131
47
  description:
132
48
  email: andrew.kozin@gmail.com
133
49
  executables: []
@@ -136,23 +52,19 @@ extra_rdoc_files:
136
52
  - README.md
137
53
  - CHANGELOG.md
138
54
  files:
139
- - ".codeclimate.yml"
55
+ - ".github/gemfiles/rails_4.2.gemfile"
56
+ - ".github/gemfiles/rails_6.0.gemfile"
57
+ - ".github/gemfiles/rails_7.1.gemfile"
58
+ - ".github/workflows/check.yml"
59
+ - ".github/workflows/release.yml"
140
60
  - ".gitignore"
141
61
  - ".rspec"
142
62
  - ".rubocop.yml"
143
- - ".travis.yml"
144
- - Appraisals
145
63
  - CHANGELOG.md
146
64
  - Gemfile
147
65
  - LICENSE.txt
148
66
  - README.md
149
67
  - Rakefile
150
- - gemfiles/.bundle/config
151
- - gemfiles/rails_4.2.gemfile
152
- - gemfiles/rails_5.0.gemfile
153
- - gemfiles/rails_5.1.gemfile
154
- - gemfiles/rails_6.0.gemfile
155
- - gemfiles/rails_7.0.gemfile
156
68
  - lib/rspec-sqlimit.rb
157
69
  - lib/rspec/sqlimit.rb
158
70
  - lib/rspec/sqlimit/counter.rb
@@ -160,13 +72,12 @@ files:
160
72
  - rspec-sqlimit.gemspec
161
73
  - spec/dummy/Rakefile
162
74
  - spec/dummy/app/models/user.rb
75
+ - spec/dummy/config.ru
76
+ - spec/dummy/config/application.rb
163
77
  - spec/dummy/config/database.yml
164
78
  - spec/dummy/config/environment.rb
165
79
  - spec/dummy/db/migrate/20170211104800_create_users.rb
166
80
  - spec/dummy/db/schema.rb
167
- - spec/dummy/lib/dummy.rb
168
- - spec/dummy/lib/dummy/application.rb
169
- - spec/dummy/lib/dummy/compatibility.rb
170
81
  - spec/rspec/sqlimit/reporter_spec.rb
171
82
  - spec/rspec/sqlimit_spec.rb
172
83
  - spec/spec_helper.rb
@@ -189,20 +100,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
100
  - !ruby/object:Gem::Version
190
101
  version: '0'
191
102
  requirements: []
192
- rubygems_version: 3.2.3
103
+ rubygems_version: 3.4.19
193
104
  signing_key:
194
105
  specification_version: 4
195
106
  summary: RSpec matcher to control SQL queries made by block of code
196
107
  test_files:
197
108
  - spec/dummy/Rakefile
198
109
  - spec/dummy/app/models/user.rb
110
+ - spec/dummy/config.ru
111
+ - spec/dummy/config/application.rb
199
112
  - spec/dummy/config/database.yml
200
113
  - spec/dummy/config/environment.rb
201
114
  - spec/dummy/db/migrate/20170211104800_create_users.rb
202
115
  - spec/dummy/db/schema.rb
203
- - spec/dummy/lib/dummy.rb
204
- - spec/dummy/lib/dummy/application.rb
205
- - spec/dummy/lib/dummy/compatibility.rb
206
116
  - spec/rspec/sqlimit/reporter_spec.rb
207
117
  - spec/rspec/sqlimit_spec.rb
208
118
  - spec/spec_helper.rb
data/.codeclimate.yml DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- engines:
3
- bundler-audit:
4
- enabled: true
5
- duplication:
6
- enabled: true
7
- config:
8
- languages:
9
- - ruby
10
- fixme:
11
- enabled: true
12
- rubocop:
13
- enabled: true
14
- ratings:
15
- paths:
16
- - "**.rb"
17
- exclude_paths:
18
- - spec/
data/.travis.yml DELETED
@@ -1,37 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- before_install:
6
- - gem update --system
7
- - gem uninstall -v '>= 1' -i $(rvm gemdir)@global -ax bundler || true
8
- - gem install bundler -v 1.3.0
9
- - gem update --system
10
- script:
11
- - bundle exec rake
12
- rvm:
13
- - 2.3
14
- - 2.6
15
- - 2.7
16
- - 3.0
17
- - ruby-head
18
- gemfile:
19
- - gemfiles/rails_4.2.gemfile
20
- - gemfiles/rails_5.0.gemfile
21
- - gemfiles/rails_5.1.gemfile
22
- - gemfiles/rails_6.0.gemfile
23
- - gemfiles/rails_7.0.gemfile
24
- matrix:
25
- exclude:
26
- - rvm: 2.3
27
- gemfile: gemfiles/rails_7.0.gemfile
28
- - rvm: 2.3
29
- gemfile: gemfiles/rails_6.0.gemfile
30
- - rvm: 3.0
31
- gemfile: gemfiles/rails_4.2.gemfile
32
- - rvm: 2.7
33
- gemfile: gemfiles/rails_4.2.gemfile
34
- - rvm: ruby-head
35
- gemfile: gemfiles/rails_4.2.gemfile
36
- allow_failures:
37
- - rvm: ruby-head
data/Appraisals DELETED
@@ -1,24 +0,0 @@
1
- appraise "rails-4.2" do
2
- gem "rails", "~> 4.2.0"
3
- gem "sqlite3", "~> 1.3.0"
4
- end
5
-
6
- appraise "rails-5.0" do
7
- gem "rails", "~> 5.0.0"
8
- gem "sqlite3", "~> 1.3.0"
9
- end
10
-
11
- appraise "rails-5.1" do
12
- gem "rails", "~> 5.1.0"
13
- gem "sqlite3", "~> 1.3.0"
14
- end
15
-
16
- appraise "rails-6.0" do
17
- gem "rails", "~> 6.0.0"
18
- gem "sqlite3", "~> 1.4"
19
- end
20
-
21
- appraise "rails-7.0" do
22
- gem "rails", "~> 7.0.0"
23
- gem "sqlite3", "~> 1.4"
24
- end
@@ -1,2 +0,0 @@
1
- ---
2
- BUNDLE_RETRY: "1"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 4.2.0"
6
- gem "sqlite3", "~> 1.3.0"
7
-
8
- group :test, :development do
9
- gem "pry"
10
- gem "pry-byebug"
11
- end
12
-
13
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 5.0.0"
6
- gem "sqlite3", "~> 1.3.0"
7
-
8
- group :test, :development do
9
- gem "pry"
10
- gem "pry-byebug"
11
- end
12
-
13
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 5.1.0"
6
- gem "sqlite3", "~> 1.3.0"
7
-
8
- group :test, :development do
9
- gem "pry"
10
- gem "pry-byebug"
11
- end
12
-
13
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 6.0.0"
6
- gem "sqlite3", "~> 1.4"
7
-
8
- group :test, :development do
9
- gem "pry"
10
- gem "pry-byebug"
11
- end
12
-
13
- gemspec path: "../"
@@ -1,13 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 7.0.0"
6
- gem "sqlite3", "~> 1.4"
7
-
8
- group :test, :development do
9
- gem "pry"
10
- gem "pry-byebug"
11
- end
12
-
13
- gemspec path: "../"
@@ -1,26 +0,0 @@
1
- module Dummy
2
- class Application
3
- class << self
4
- # Configuration settings wrapper for the
5
- # <tt>ActiveRecord::Tasks::DatabaseTasks</tt>.
6
- #
7
- # Establishes AR connection after configuration.
8
- #
9
- def configure
10
- yield tasks
11
- base.configurations = tasks.database_configuration
12
- base.establish_connection(tasks.env)
13
- end
14
-
15
- private
16
-
17
- def base
18
- @base ||= ActiveRecord::Base
19
- end
20
-
21
- def tasks
22
- @tasks ||= ActiveRecord::Tasks::DatabaseTasks
23
- end
24
- end
25
- end
26
- end
@@ -1,11 +0,0 @@
1
- # ActiveRecord::Migration['5.0'] syntax is not supported prior to Rails 5.0
2
- # This snippet supports it on Rails 4.2
3
- unless ActiveRecord::Migration.respond_to?(:[])
4
- class ActiveRecord::Migration
5
- class << self
6
- def [](_version)
7
- self
8
- end
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- require "active_record"
2
- require "bundler/setup"
3
-
4
- module Dummy
5
- require_relative "dummy/compatibility"
6
- require_relative "dummy/application"
7
- require_relative "../config/environment"
8
- require_relative "../app/models/user.rb"
9
- end