bullet 7.0.3 → 7.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -1
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +7 -2
  5. data/lib/bullet/active_record4.rb +9 -0
  6. data/lib/bullet/active_record41.rb +9 -0
  7. data/lib/bullet/active_record42.rb +9 -0
  8. data/lib/bullet/active_record5.rb +24 -8
  9. data/lib/bullet/active_record52.rb +23 -7
  10. data/lib/bullet/active_record60.rb +22 -6
  11. data/lib/bullet/active_record61.rb +22 -6
  12. data/lib/bullet/active_record70.rb +43 -14
  13. data/lib/bullet/active_record71.rb +304 -0
  14. data/lib/bullet/dependency.rb +12 -0
  15. data/lib/bullet/detector/association.rb +8 -0
  16. data/lib/bullet/detector/n_plus_one_query.rb +17 -9
  17. data/lib/bullet/detector/unused_eager_loading.rb +6 -3
  18. data/lib/bullet/ext/object.rb +13 -3
  19. data/lib/bullet/mongoid7x.rb +8 -10
  20. data/lib/bullet/mongoid8x.rb +59 -0
  21. data/lib/bullet/notification/base.rb +9 -8
  22. data/lib/bullet/notification/counter_cache.rb +1 -1
  23. data/lib/bullet/rack.rb +41 -7
  24. data/lib/bullet/registry/association.rb +2 -1
  25. data/lib/bullet/registry/call_stack.rb +12 -0
  26. data/lib/bullet/registry.rb +1 -0
  27. data/lib/bullet/stack_trace_filter.rb +13 -10
  28. data/lib/bullet/version.rb +1 -1
  29. data/lib/bullet.rb +13 -3
  30. metadata +8 -153
  31. data/.github/workflows/main.yml +0 -82
  32. data/.gitignore +0 -15
  33. data/.rspec +0 -2
  34. data/Gemfile +0 -24
  35. data/Gemfile.mongoid +0 -12
  36. data/Gemfile.mongoid-4.0 +0 -15
  37. data/Gemfile.mongoid-5.0 +0 -15
  38. data/Gemfile.mongoid-6.0 +0 -15
  39. data/Gemfile.mongoid-7.0 +0 -15
  40. data/Gemfile.rails-4.0 +0 -16
  41. data/Gemfile.rails-4.1 +0 -16
  42. data/Gemfile.rails-4.2 +0 -16
  43. data/Gemfile.rails-5.0 +0 -15
  44. data/Gemfile.rails-5.1 +0 -15
  45. data/Gemfile.rails-5.2 +0 -15
  46. data/Gemfile.rails-6.0 +0 -15
  47. data/Gemfile.rails-6.1 +0 -15
  48. data/Gemfile.rails-7.0 +0 -10
  49. data/Guardfile +0 -8
  50. data/Hacking.md +0 -75
  51. data/Rakefile +0 -51
  52. data/bullet.gemspec +0 -33
  53. data/perf/benchmark.rb +0 -118
  54. data/rails/init.rb +0 -3
  55. data/spec/bullet/detector/association_spec.rb +0 -28
  56. data/spec/bullet/detector/base_spec.rb +0 -10
  57. data/spec/bullet/detector/counter_cache_spec.rb +0 -58
  58. data/spec/bullet/detector/n_plus_one_query_spec.rb +0 -182
  59. data/spec/bullet/detector/unused_eager_loading_spec.rb +0 -121
  60. data/spec/bullet/ext/object_spec.rb +0 -44
  61. data/spec/bullet/ext/string_spec.rb +0 -15
  62. data/spec/bullet/notification/base_spec.rb +0 -94
  63. data/spec/bullet/notification/counter_cache_spec.rb +0 -14
  64. data/spec/bullet/notification/n_plus_one_query_spec.rb +0 -29
  65. data/spec/bullet/notification/unused_eager_loading_spec.rb +0 -18
  66. data/spec/bullet/notification_collector_spec.rb +0 -34
  67. data/spec/bullet/rack_spec.rb +0 -279
  68. data/spec/bullet/registry/association_spec.rb +0 -28
  69. data/spec/bullet/registry/base_spec.rb +0 -46
  70. data/spec/bullet/registry/object_spec.rb +0 -26
  71. data/spec/bullet_spec.rb +0 -136
  72. data/spec/integration/active_record/association_spec.rb +0 -793
  73. data/spec/integration/counter_cache_spec.rb +0 -68
  74. data/spec/integration/mongoid/association_spec.rb +0 -246
  75. data/spec/models/address.rb +0 -5
  76. data/spec/models/attachment.rb +0 -5
  77. data/spec/models/author.rb +0 -5
  78. data/spec/models/base_user.rb +0 -7
  79. data/spec/models/category.rb +0 -12
  80. data/spec/models/city.rb +0 -5
  81. data/spec/models/client.rb +0 -8
  82. data/spec/models/comment.rb +0 -8
  83. data/spec/models/company.rb +0 -5
  84. data/spec/models/country.rb +0 -5
  85. data/spec/models/deal.rb +0 -5
  86. data/spec/models/document.rb +0 -7
  87. data/spec/models/entry.rb +0 -5
  88. data/spec/models/firm.rb +0 -7
  89. data/spec/models/folder.rb +0 -4
  90. data/spec/models/group.rb +0 -4
  91. data/spec/models/mongoid/address.rb +0 -9
  92. data/spec/models/mongoid/category.rb +0 -10
  93. data/spec/models/mongoid/comment.rb +0 -9
  94. data/spec/models/mongoid/company.rb +0 -9
  95. data/spec/models/mongoid/entry.rb +0 -9
  96. data/spec/models/mongoid/post.rb +0 -14
  97. data/spec/models/mongoid/user.rb +0 -7
  98. data/spec/models/newspaper.rb +0 -5
  99. data/spec/models/page.rb +0 -4
  100. data/spec/models/person.rb +0 -5
  101. data/spec/models/pet.rb +0 -5
  102. data/spec/models/post.rb +0 -34
  103. data/spec/models/relationship.rb +0 -6
  104. data/spec/models/reply.rb +0 -5
  105. data/spec/models/role.rb +0 -7
  106. data/spec/models/student.rb +0 -5
  107. data/spec/models/submission.rb +0 -7
  108. data/spec/models/teacher.rb +0 -5
  109. data/spec/models/user.rb +0 -8
  110. data/spec/models/writer.rb +0 -4
  111. data/spec/spec_helper.rb +0 -97
  112. data/spec/support/bullet_ext.rb +0 -56
  113. data/spec/support/mongo_seed.rb +0 -59
  114. data/spec/support/rack_double.rb +0 -49
  115. data/spec/support/sqlite_seed.rb +0 -284
  116. data/test.sh +0 -15
  117. data/update.sh +0 -10
@@ -8,7 +8,8 @@ module Bullet
8
8
  end
9
9
 
10
10
  def similarly_associated(base, associations)
11
- @registry.select { |key, value| key.include?(base) && value == associations }.collect(&:first).flatten
11
+ @registry.select { |key, value| key.include?(base) && value == associations }
12
+ .collect(&:first).flatten
12
13
  end
13
14
  end
14
15
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bullet
4
+ module Registry
5
+ class CallStack < Base
6
+ # remembers found association backtrace
7
+ def add(key)
8
+ @registry[key] = Thread.current.backtrace
9
+ end
10
+ end
11
+ end
12
+ end
@@ -5,5 +5,6 @@ module Bullet
5
5
  autoload :Base, 'bullet/registry/base'
6
6
  autoload :Object, 'bullet/registry/object'
7
7
  autoload :Association, 'bullet/registry/association'
8
+ autoload :CallStack, 'bullet/registry/call_stack'
8
9
  end
9
10
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "bundler"
3
4
 
4
5
  module Bullet
@@ -6,15 +7,16 @@ module Bullet
6
7
  VENDOR_PATH = '/vendor'
7
8
  IS_RUBY_19 = Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
8
9
 
9
- def caller_in_project
10
+ # @param bullet_key[String] - use this to get stored call stack from call_stacks object.
11
+ def caller_in_project(bullet_key = nil)
10
12
  vendor_root = Bullet.app_root + VENDOR_PATH
11
13
  bundler_path = Bundler.bundle_path.to_s
12
- select_caller_locations do |location|
14
+ select_caller_locations(bullet_key) do |location|
13
15
  caller_path = location_as_path(location)
14
16
  caller_path.include?(Bullet.app_root) && !caller_path.include?(vendor_root) &&
15
17
  !caller_path.include?(bundler_path) || Bullet.stacktrace_includes.any? { |include_pattern|
16
- pattern_matches?(location, include_pattern)
17
- }
18
+ pattern_matches?(location, include_pattern)
19
+ }
18
20
  end
19
21
  end
20
22
 
@@ -50,15 +52,16 @@ module Bullet
50
52
  end
51
53
 
52
54
  def location_as_path(location)
55
+ return location if location.is_a?(String)
56
+
53
57
  IS_RUBY_19 ? location : location.absolute_path.to_s
54
58
  end
55
59
 
56
- def select_caller_locations
57
- if IS_RUBY_19
58
- caller.select { |caller_path| yield caller_path }
59
- else
60
- caller_locations.select { |location| yield location }
61
- end
60
+ def select_caller_locations(bullet_key = nil)
61
+ return caller.select { |caller_path| yield caller_path } if IS_RUBY_19
62
+
63
+ call_stack = bullet_key ? call_stacks[bullet_key] : caller_locations
64
+ call_stack.select { |location| yield location }
62
65
  end
63
66
  end
64
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bullet
4
- VERSION = '7.0.3'
4
+ VERSION = '7.1.2'
5
5
  end
data/lib/bullet.rb CHANGED
@@ -23,7 +23,11 @@ module Bullet
23
23
  if defined?(Rails::Railtie)
24
24
  class BulletRailtie < Rails::Railtie
25
25
  initializer 'bullet.configure_rails_initialization' do |app|
26
- app.middleware.use Bullet::Rack
26
+ if defined?(ActionDispatch::ContentSecurityPolicy::Middleware) && Rails.application.config.content_security_policy
27
+ app.middleware.insert_before ActionDispatch::ContentSecurityPolicy::Middleware, Bullet::Rack
28
+ else
29
+ app.middleware.use Bullet::Rack
30
+ end
27
31
  end
28
32
  end
29
33
  end
@@ -36,10 +40,11 @@ module Bullet
36
40
  :stacktrace_excludes,
37
41
  :skip_html_injection
38
42
  attr_reader :safelist
39
- attr_accessor :add_footer, :orm_patches_applied, :skip_http_headers
43
+ attr_accessor :add_footer, :orm_patches_applied, :skip_http_headers, :always_append_html_body
40
44
 
41
45
  available_notifiers =
42
- UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }.map { |notifier| "#{notifier}=" }
46
+ UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }
47
+ .map { |notifier| "#{notifier}=" }
43
48
  available_notifiers_options = { to: UniformNotifier }
44
49
  delegate(*available_notifiers, **available_notifiers_options)
45
50
 
@@ -66,10 +71,14 @@ module Bullet
66
71
  end
67
72
  end
68
73
 
74
+ alias enabled= enable=
75
+
69
76
  def enable?
70
77
  !!@enable
71
78
  end
72
79
 
80
+ alias enabled? enable?
81
+
73
82
  # Rails.root might be nil if `railties` is a dependency on a project that does not use Rails
74
83
  def app_root
75
84
  @app_root ||= (defined?(::Rails.root) && !::Rails.root.nil? ? Rails.root.to_s : Dir.pwd).to_s
@@ -144,6 +153,7 @@ module Bullet
144
153
  Thread.current[:bullet_impossible_objects] = Bullet::Registry::Object.new
145
154
  Thread.current[:bullet_inversed_objects] = Bullet::Registry::Base.new
146
155
  Thread.current[:bullet_eager_loadings] = Bullet::Registry::Association.new
156
+ Thread.current[:bullet_call_stacks] = Bullet::Registry::CallStack.new
147
157
 
148
158
  Thread.current[:bullet_counter_possible_objects] ||= Bullet::Registry::Object.new
149
159
  Thread.current[:bullet_counter_impossible_objects] ||= Bullet::Registry::Object.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.3
4
+ version: 7.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-13 00:00:00.000000000 Z
11
+ date: 2023-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -45,31 +45,9 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".github/workflows/main.yml"
49
- - ".gitignore"
50
- - ".rspec"
51
48
  - CHANGELOG.md
52
- - Gemfile
53
- - Gemfile.mongoid
54
- - Gemfile.mongoid-4.0
55
- - Gemfile.mongoid-5.0
56
- - Gemfile.mongoid-6.0
57
- - Gemfile.mongoid-7.0
58
- - Gemfile.rails-4.0
59
- - Gemfile.rails-4.1
60
- - Gemfile.rails-4.2
61
- - Gemfile.rails-5.0
62
- - Gemfile.rails-5.1
63
- - Gemfile.rails-5.2
64
- - Gemfile.rails-6.0
65
- - Gemfile.rails-6.1
66
- - Gemfile.rails-7.0
67
- - Guardfile
68
- - Hacking.md
69
49
  - MIT-LICENSE
70
50
  - README.md
71
- - Rakefile
72
- - bullet.gemspec
73
51
  - lib/bullet.rb
74
52
  - lib/bullet/active_job.rb
75
53
  - lib/bullet/active_record4.rb
@@ -80,6 +58,7 @@ files:
80
58
  - lib/bullet/active_record60.rb
81
59
  - lib/bullet/active_record61.rb
82
60
  - lib/bullet/active_record70.rb
61
+ - lib/bullet/active_record71.rb
83
62
  - lib/bullet/bullet_xhr.js
84
63
  - lib/bullet/dependency.rb
85
64
  - lib/bullet/detector.rb
@@ -94,6 +73,7 @@ files:
94
73
  - lib/bullet/mongoid5x.rb
95
74
  - lib/bullet/mongoid6x.rb
96
75
  - lib/bullet/mongoid7x.rb
76
+ - lib/bullet/mongoid8x.rb
97
77
  - lib/bullet/notification.rb
98
78
  - lib/bullet/notification/base.rb
99
79
  - lib/bullet/notification/counter_cache.rb
@@ -104,81 +84,17 @@ files:
104
84
  - lib/bullet/registry.rb
105
85
  - lib/bullet/registry/association.rb
106
86
  - lib/bullet/registry/base.rb
87
+ - lib/bullet/registry/call_stack.rb
107
88
  - lib/bullet/registry/object.rb
108
89
  - lib/bullet/stack_trace_filter.rb
109
90
  - lib/bullet/version.rb
110
91
  - lib/generators/bullet/install_generator.rb
111
- - perf/benchmark.rb
112
- - rails/init.rb
113
- - spec/bullet/detector/association_spec.rb
114
- - spec/bullet/detector/base_spec.rb
115
- - spec/bullet/detector/counter_cache_spec.rb
116
- - spec/bullet/detector/n_plus_one_query_spec.rb
117
- - spec/bullet/detector/unused_eager_loading_spec.rb
118
- - spec/bullet/ext/object_spec.rb
119
- - spec/bullet/ext/string_spec.rb
120
- - spec/bullet/notification/base_spec.rb
121
- - spec/bullet/notification/counter_cache_spec.rb
122
- - spec/bullet/notification/n_plus_one_query_spec.rb
123
- - spec/bullet/notification/unused_eager_loading_spec.rb
124
- - spec/bullet/notification_collector_spec.rb
125
- - spec/bullet/rack_spec.rb
126
- - spec/bullet/registry/association_spec.rb
127
- - spec/bullet/registry/base_spec.rb
128
- - spec/bullet/registry/object_spec.rb
129
- - spec/bullet_spec.rb
130
- - spec/integration/active_record/association_spec.rb
131
- - spec/integration/counter_cache_spec.rb
132
- - spec/integration/mongoid/association_spec.rb
133
- - spec/models/address.rb
134
- - spec/models/attachment.rb
135
- - spec/models/author.rb
136
- - spec/models/base_user.rb
137
- - spec/models/category.rb
138
- - spec/models/city.rb
139
- - spec/models/client.rb
140
- - spec/models/comment.rb
141
- - spec/models/company.rb
142
- - spec/models/country.rb
143
- - spec/models/deal.rb
144
- - spec/models/document.rb
145
- - spec/models/entry.rb
146
- - spec/models/firm.rb
147
- - spec/models/folder.rb
148
- - spec/models/group.rb
149
- - spec/models/mongoid/address.rb
150
- - spec/models/mongoid/category.rb
151
- - spec/models/mongoid/comment.rb
152
- - spec/models/mongoid/company.rb
153
- - spec/models/mongoid/entry.rb
154
- - spec/models/mongoid/post.rb
155
- - spec/models/mongoid/user.rb
156
- - spec/models/newspaper.rb
157
- - spec/models/page.rb
158
- - spec/models/person.rb
159
- - spec/models/pet.rb
160
- - spec/models/post.rb
161
- - spec/models/relationship.rb
162
- - spec/models/reply.rb
163
- - spec/models/role.rb
164
- - spec/models/student.rb
165
- - spec/models/submission.rb
166
- - spec/models/teacher.rb
167
- - spec/models/user.rb
168
- - spec/models/writer.rb
169
- - spec/spec_helper.rb
170
- - spec/support/bullet_ext.rb
171
- - spec/support/mongo_seed.rb
172
- - spec/support/rack_double.rb
173
- - spec/support/sqlite_seed.rb
174
92
  - tasks/bullet_tasks.rake
175
- - test.sh
176
- - update.sh
177
93
  homepage: https://github.com/flyerhzm/bullet
178
94
  licenses:
179
95
  - MIT
180
96
  metadata:
181
- changelog_uri: https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md
97
+ changelog_uri: https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md
182
98
  source_code_uri: https://github.com/flyerhzm/bullet
183
99
  post_install_message:
184
100
  rdoc_options: []
@@ -195,69 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
111
  - !ruby/object:Gem::Version
196
112
  version: 1.3.6
197
113
  requirements: []
198
- rubygems_version: 3.3.7
114
+ rubygems_version: 3.4.20
199
115
  signing_key:
200
116
  specification_version: 4
201
117
  summary: help to kill N+1 queries and unused eager loading.
202
- test_files:
203
- - spec/bullet/detector/association_spec.rb
204
- - spec/bullet/detector/base_spec.rb
205
- - spec/bullet/detector/counter_cache_spec.rb
206
- - spec/bullet/detector/n_plus_one_query_spec.rb
207
- - spec/bullet/detector/unused_eager_loading_spec.rb
208
- - spec/bullet/ext/object_spec.rb
209
- - spec/bullet/ext/string_spec.rb
210
- - spec/bullet/notification/base_spec.rb
211
- - spec/bullet/notification/counter_cache_spec.rb
212
- - spec/bullet/notification/n_plus_one_query_spec.rb
213
- - spec/bullet/notification/unused_eager_loading_spec.rb
214
- - spec/bullet/notification_collector_spec.rb
215
- - spec/bullet/rack_spec.rb
216
- - spec/bullet/registry/association_spec.rb
217
- - spec/bullet/registry/base_spec.rb
218
- - spec/bullet/registry/object_spec.rb
219
- - spec/bullet_spec.rb
220
- - spec/integration/active_record/association_spec.rb
221
- - spec/integration/counter_cache_spec.rb
222
- - spec/integration/mongoid/association_spec.rb
223
- - spec/models/address.rb
224
- - spec/models/attachment.rb
225
- - spec/models/author.rb
226
- - spec/models/base_user.rb
227
- - spec/models/category.rb
228
- - spec/models/city.rb
229
- - spec/models/client.rb
230
- - spec/models/comment.rb
231
- - spec/models/company.rb
232
- - spec/models/country.rb
233
- - spec/models/deal.rb
234
- - spec/models/document.rb
235
- - spec/models/entry.rb
236
- - spec/models/firm.rb
237
- - spec/models/folder.rb
238
- - spec/models/group.rb
239
- - spec/models/mongoid/address.rb
240
- - spec/models/mongoid/category.rb
241
- - spec/models/mongoid/comment.rb
242
- - spec/models/mongoid/company.rb
243
- - spec/models/mongoid/entry.rb
244
- - spec/models/mongoid/post.rb
245
- - spec/models/mongoid/user.rb
246
- - spec/models/newspaper.rb
247
- - spec/models/page.rb
248
- - spec/models/person.rb
249
- - spec/models/pet.rb
250
- - spec/models/post.rb
251
- - spec/models/relationship.rb
252
- - spec/models/reply.rb
253
- - spec/models/role.rb
254
- - spec/models/student.rb
255
- - spec/models/submission.rb
256
- - spec/models/teacher.rb
257
- - spec/models/user.rb
258
- - spec/models/writer.rb
259
- - spec/spec_helper.rb
260
- - spec/support/bullet_ext.rb
261
- - spec/support/mongo_seed.rb
262
- - spec/support/rack_double.rb
263
- - spec/support/sqlite_seed.rb
118
+ test_files: []
@@ -1,82 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
- name: CI
9
-
10
- on:
11
- push:
12
- branches: [ master ]
13
- pull_request:
14
- branches: [ master ]
15
-
16
- jobs:
17
- test_rails_4:
18
- runs-on: ubuntu-latest
19
- strategy:
20
- matrix:
21
- gemfile: ['Gemfile.rails-4.0', 'Gemfile.rails-4.1', 'Gemfile.rails-4.2']
22
- env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
23
- BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
24
- steps:
25
- - uses: actions/checkout@v2
26
- - name: Set up Ruby
27
- uses: ruby/setup-ruby@v1
28
- with:
29
- ruby-version: 2.3
30
- bundler: 1
31
- bundler-cache: true
32
- - name: Run tests
33
- run: bundle exec rake
34
- test_rails_5:
35
- runs-on: ubuntu-latest
36
- strategy:
37
- matrix:
38
- gemfile: ['Gemfile.rails-5.0', 'Gemfile.rails-5.1', 'Gemfile.rails-5.2']
39
- env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
40
- BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
41
- steps:
42
- - uses: actions/checkout@v2
43
- - name: Set up Ruby
44
- uses: ruby/setup-ruby@v1
45
- with:
46
- ruby-version: 2.5
47
- bundler: 1
48
- bundler-cache: true
49
- - name: Run tests
50
- run: bundle exec rake
51
- test_rails_6:
52
- runs-on: ubuntu-latest
53
- strategy:
54
- matrix:
55
- gemfile: ['Gemfile.rails-6.0', 'Gemfile.rails-6.1']
56
- env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
57
- BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
58
- steps:
59
- - uses: actions/checkout@v2
60
- - name: Set up Ruby
61
- uses: ruby/setup-ruby@v1
62
- with:
63
- ruby-version: 2.7
64
- bundler-cache: true
65
- - name: Run tests
66
- run: bundle exec rake
67
- test_rails_7:
68
- runs-on: ubuntu-latest
69
- strategy:
70
- matrix:
71
- gemfile: ['Gemfile.rails-7.0']
72
- env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
73
- BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
74
- steps:
75
- - uses: actions/checkout@v2
76
- - name: Set up Ruby
77
- uses: ruby/setup-ruby@v1
78
- with:
79
- ruby-version: 3.1
80
- bundler-cache: true
81
- - name: Run tests
82
- run: bundle exec rake
data/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- log/**
2
- pkg/**
3
- .DS_Store
4
- lib/.DS_Store
5
- .*.swp
6
- coverage.data
7
- tags
8
- .bundle
9
- *.gem
10
- benchmark_profile*
11
- /nbproject/private/
12
- coverage/
13
- .coveralls.yml
14
- Gemfile*.lock
15
- .idea/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --colour
2
- --format progress
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- git_source(:github) do |repo_name|
4
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
5
- "https://github.com/#{repo_name}.git"
6
- end
7
-
8
- gemspec
9
-
10
- gem 'rails', github: 'rails'
11
- gem 'sqlite3', platforms: [:ruby]
12
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
13
- gem 'activerecord-import'
14
-
15
- gem 'rspec'
16
- gem 'guard'
17
- gem 'guard-rspec'
18
-
19
- gem 'coveralls', require: false
20
-
21
- platforms :rbx do
22
- gem 'rubysl', '~> 2.0'
23
- gem 'rubinius-developer_tools'
24
- end
data/Gemfile.mongoid DELETED
@@ -1,12 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails'
6
- gem 'sqlite3', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', github: 'mongoid/mongoid'
9
-
10
- gem "rspec"
11
-
12
- gem 'coveralls', require: false
data/Gemfile.mongoid-4.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.0.0'
6
- gem 'sqlite3', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 4.0.0'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.mongoid-5.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.0.0'
6
- gem 'sqlite3', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 5.1.0'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.mongoid-6.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.0.0'
6
- gem 'sqlite3', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 6.0.0'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.mongoid-7.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.0'
6
- gem 'sqlite3', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 7.0.0'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.rails-4.0 DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.0.0'
6
- gem 'sqlite3', '~> 1.3.6', platforms: [:ruby]
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
- gem 'tins', '~> 1.6.0', platforms: [:ruby_19]
10
-
11
- gem "rspec"
12
-
13
- platforms :rbx do
14
- gem 'rubysl', '~> 2.0'
15
- gem 'rubinius-developer_tools'
16
- end
data/Gemfile.rails-4.1 DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.1.0'
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
- gem 'tins', '~> 1.6.0', platforms: [:ruby_19]
10
-
11
- gem "rspec"
12
-
13
- platforms :rbx do
14
- gem 'rubysl', '~> 2.0'
15
- gem 'rubinius-developer_tools'
16
- end
data/Gemfile.rails-4.2 DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 4.2.0'
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
- gem 'tins', '~> 1.6.0', platforms: [:ruby_19]
10
-
11
- gem "rspec"
12
-
13
- platforms :rbx do
14
- gem 'rubysl', '~> 2.0'
15
- gem 'rubinius-developer_tools'
16
- end
data/Gemfile.rails-5.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.0.0'
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.rails-5.1 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.1.0'
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.rails-5.2 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 5.2.0'
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end
data/Gemfile.rails-6.0 DELETED
@@ -1,15 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'rails', '~> 6.0.0'
6
- gem 'sqlite3'
7
- gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'activerecord-import'
9
-
10
- gem "rspec"
11
-
12
- platforms :rbx do
13
- gem 'rubysl', '~> 2.0'
14
- gem 'rubinius-developer_tools'
15
- end