textacular 5.6.0 → 5.7.0

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: 7c39daa8d9c982d9587abcff6d933d52e9a52d68ef03bda9f5eed512adb164e9
4
- data.tar.gz: 934b8f16721f361531970c7c6f222f30ea10c971b271a9bc645f71b912dffa7b
3
+ metadata.gz: a50c0b7cd47b58a8bc97486e1cb01ca2f2f987c0d3634180ebb02c521585fdf0
4
+ data.tar.gz: c6b71a207530b8bed1ff5b261b59a90493fde59a295e3f8c13585f0f1e551e8f
5
5
  SHA512:
6
- metadata.gz: 05f12605ab99f20772a326a45279c8f30eea56cb58687fdd7d0584cf756212374779432e674efbaa556888d32e37b691e738571ceb747276b888ffc56752400e
7
- data.tar.gz: 4d3111ee2e70c83c5dda936b87761658599c7420e6c54bcc139410cf49da6dae65cb603e98805823c737e5d9d93393826065d64cd8406317b604f3bdf7073dc9
6
+ metadata.gz: 7ceb9851288d634618d85ab654b5faec8f3957e13a1bf5b93191107911bdcc536d4abe164fb4f2323cdd393a07f54c2789ee7bb7df0d6744a6af7e6ca984c158
7
+ data.tar.gz: f33e73a565c3f84fdb9184c8143857707cb8b7dc46a88b6fc3b6c916f0d9123e1d625a4b7eab00ed35352dbeb9c390d6839b1dea8f028b267c2bc381d691f0d3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.7.0
6
+
7
+ * ActiveRecord 7.2 compatibility
8
+ * Defer extending ActiveRecord::Base until Active Record is loaded
9
+
5
10
  ## 5.6.0
6
11
 
7
12
  * ActiveRecord 7.1 compatibility
data/Rakefile CHANGED
@@ -50,27 +50,32 @@ namespace :db do
50
50
 
51
51
  desc 'Run the test database migrations'
52
52
  task :up => :'db:connect' do
53
- if ActiveRecord.version >= Gem::Version.new('6.0.0')
54
- ActiveRecord::Migration.new.migration_context.migrate
53
+ if ActiveRecord.version >= Gem::Version.new('7.2.0')
54
+ ActiveRecord::Base.connection_pool.migration_context.up
55
+ elsif ActiveRecord.version >= Gem::Version.new('6.0.0')
56
+ ActiveRecord::Migration.new.migration_context.up
55
57
  elsif ActiveRecord.version >= Gem::Version.new('5.2')
56
58
  migrations = ActiveRecord::Migration.new.migration_context.migrations
57
- schema_migration = nil
58
- ActiveRecord::Migrator.new(:up, migrations, schema_migration).migrate
59
+ ActiveRecord::Migrator.new(:up, migrations, nil).migrate
59
60
  else
60
61
  migrations = ActiveRecord::Migrator.migrations('db/migrate')
61
- schema_migration = nil
62
- ActiveRecord::Migrator.new(:up, migrations, schema_migration).migrate
62
+ ActiveRecord::Migrator.new(:up, migrations, nil).migrate
63
63
  end
64
64
  end
65
65
 
66
66
  desc 'Reverse the test database migrations'
67
67
  task :down => :'db:connect' do
68
- migrations = if ActiveRecord.version.version >= '5.2'
69
- ActiveRecord::Migration.new.migration_context.migrations
68
+ if ActiveRecord.version >= Gem::Version.new('7.2.0')
69
+ ActiveRecord::Base.connection_pool.migration_context.down
70
+ elsif ActiveRecord.version >= Gem::Version.new('6.0.0')
71
+ ActiveRecord::Migration.new.migration_context.down
72
+ elsif ActiveRecord.version >= Gem::Version.new('5.2')
73
+ migrations = ActiveRecord::Migration.new.migration_context.migrations
74
+ ActiveRecord::Migrator.new(:down, migrations, nil).migrate
70
75
  else
71
- ActiveRecord::Migrator.migrations('db/migrate')
76
+ migrations = ActiveRecord::Migrator.migrations('db/migrate')
77
+ ActiveRecord::Migrator.new(:down, migrations, nil).migrate
72
78
  end
73
- ActiveRecord::Migrator.new(:down, migrations, nil).migrate
74
79
  end
75
80
  end
76
81
  task :migrate => :'migrate:up'
@@ -4,7 +4,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../textacular')
4
4
  module Textacular
5
5
  class Railtie < Rails::Railtie
6
6
  initializer "textacular.configure_rails_initialization" do
7
- ActiveRecord::Base.extend(Textacular)
7
+ ActiveSupport.on_load(:active_record) do
8
+ ActiveRecord::Base.extend(Textacular)
9
+ end
8
10
  end
9
11
 
10
12
  rake_tasks do
@@ -1,5 +1,5 @@
1
1
  module Textacular
2
- VERSION = '5.6.0'
2
+ VERSION = '5.7.0'
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.0
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hamill
@@ -11,10 +11,10 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-10-30 00:00:00.000000000 Z
14
+ date: 2024-08-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: pg
17
+ name: activesupport
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
20
  - - ">="
@@ -28,7 +28,7 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: rspec
31
+ name: byebug
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - ">="
@@ -42,7 +42,7 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  - !ruby/object:Gem::Dependency
45
- name: activesupport
45
+ name: database_cleaner-active_record
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - ">="
@@ -70,7 +70,7 @@ dependencies:
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  - !ruby/object:Gem::Dependency
73
- name: database_cleaner-active_record
73
+ name: pg
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
@@ -84,7 +84,7 @@ dependencies:
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  - !ruby/object:Gem::Dependency
87
- name: rake
87
+ name: pry
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ">="
@@ -98,7 +98,7 @@ dependencies:
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  - !ruby/object:Gem::Dependency
101
- name: pry
101
+ name: pry-doc
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - ">="
@@ -112,7 +112,7 @@ dependencies:
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  - !ruby/object:Gem::Dependency
115
- name: pry-doc
115
+ name: rake
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - ">="
@@ -126,7 +126,7 @@ dependencies:
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  - !ruby/object:Gem::Dependency
129
- name: byebug
129
+ name: rspec
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - ">="
@@ -146,9 +146,6 @@ dependencies:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: '5.0'
149
- - - "<"
150
- - !ruby/object:Gem::Version
151
- version: '7.2'
152
149
  type: :runtime
153
150
  prerelease: false
154
151
  version_requirements: !ruby/object:Gem::Requirement
@@ -156,9 +153,6 @@ dependencies:
156
153
  - - ">="
157
154
  - !ruby/object:Gem::Version
158
155
  version: '5.0'
159
- - - "<"
160
- - !ruby/object:Gem::Version
161
- version: '7.2'
162
156
  description: |-
163
157
  Textacular exposes full text search capabilities from PostgreSQL, extending
164
158
  ActiveRecord with scopes making search easy and fun!
@@ -201,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
195
  - !ruby/object:Gem::Version
202
196
  version: '0'
203
197
  requirements: []
204
- rubygems_version: 3.3.7
198
+ rubygems_version: 3.5.3
205
199
  signing_key:
206
200
  specification_version: 4
207
201
  summary: Textacular exposes full text search capabilities from PostgreSQL