fishplate 8.1.2 → 8.1.2.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: bb80555a3e5d5f29ef0eaa34eb648b577c754e2ecb8380b4515b7352f0cd515c
4
- data.tar.gz: 7ac9ed47aee4f9cf8a7aad2742f00b583182dada38752decae808e1320a3333b
3
+ metadata.gz: 4611b44b39e4f743e2324e678713933040674d5bc61675776eb8833a9e336b59
4
+ data.tar.gz: 8c2123f1fbed710bc78a4d0919dadec9068fa25f6b3d9507866c82f421bee3cd
5
5
  SHA512:
6
- metadata.gz: 5207994a18e59284411f6e4b07faba49761e6ec9f107286632cff33a36db0adf9a6a6fea0c877781efbc8dfc410c878cf26f5b5d652bcbf5bc9ec4ce7dddf377
7
- data.tar.gz: 4a86f5c597b94a944b6169e365d63918499d2bc2346e55d533fce2241910110ca64a3d8755906a4443e3aa7d28e648167d918ff0c05c711b2f80453c237854d9
6
+ metadata.gz: 554895f4a0d2bb6945c0726325aee0bcd904564e28019bfc341b8875234a223d9262720050812147d2cc73d86d356e45b98fc399f1ea9f4a58975a718c4dc165
7
+ data.tar.gz: f88a71c345890219704c2597fdd3617f770ad2853cd8c469940cbd209bb622b5cfba7e05f8362607a38d77f89f5ab999fb8e36f9663bfba79dbb232b090c13c4
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 4.0.4
1
+ 4.0.7
@@ -8,7 +8,7 @@ jobs:
8
8
  auto-approve:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: hmarr/auto-approve-action@v3
11
+ - uses: hmarr/auto-approve-action@v4.0.0
12
12
  if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'self-approve') || contains(github.event.pull_request.labels.*.name, 'dependencies')
13
13
  with:
14
14
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -14,7 +14,7 @@ jobs:
14
14
  ruby-version: [3.4, 4.0]
15
15
 
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@v4
18
18
  - name: Set up Ruby
19
19
  uses: ruby/setup-ruby@v1
20
20
  with:
data/.gitignore CHANGED
@@ -11,5 +11,4 @@
11
11
  .rspec_status
12
12
 
13
13
  # Cached rubocop config files
14
- .rubocop-remote*
15
- .rubocop-http*
14
+ .rubocop-*
data/Gemfile CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'bundler'
6
- gem 'irb'
7
- gem 'pry'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'rubocop'
11
- gem 'rubocop-rake'
12
- gem 'rubocop-rspec'
13
- gem 'sqlite3', '~> 2.7'
5
+ gem "bundler"
6
+ gem "irb"
7
+ gem "pry"
8
+ gem "rake"
9
+ gem "rspec"
10
+ gem "standard"
11
+ gem "sqlite3", "~> 2.7"
14
12
 
15
- gem 'openssl'
13
+ gem "openssl"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fishplate (8.1.2)
4
+ fishplate (8.1.2.4)
5
5
  a9n (~> 1.0)
6
6
  activemodel (~> 8.1)
7
7
  activerecord (~> 8.1)
@@ -12,15 +12,16 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- a9n (1.6.0)
15
+ a9n (1.8.0)
16
+ logger
16
17
  ostruct
17
- activemodel (8.1.2)
18
- activesupport (= 8.1.2)
19
- activerecord (8.1.2)
20
- activemodel (= 8.1.2)
21
- activesupport (= 8.1.2)
18
+ activemodel (8.1.3)
19
+ activesupport (= 8.1.3)
20
+ activerecord (8.1.3)
21
+ activemodel (= 8.1.3)
22
+ activesupport (= 8.1.3)
22
23
  timeout (>= 0.4.0)
23
- activesupport (8.1.2)
24
+ activesupport (8.1.3)
24
25
  base64
25
26
  bigdecimal
26
27
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -42,32 +43,34 @@ GEM
42
43
  date (3.5.1)
43
44
  diff-lcs (1.6.2)
44
45
  drb (2.2.3)
45
- erb (6.0.1)
46
+ erb (6.0.2)
46
47
  i18n (1.14.8)
47
48
  concurrent-ruby (~> 1.0)
48
49
  io-console (0.8.2)
49
- irb (1.16.0)
50
+ irb (1.17.0)
50
51
  pp (>= 0.6.0)
52
+ prism (>= 1.3.0)
51
53
  rdoc (>= 4.0.0)
52
54
  reline (>= 0.4.2)
53
- json (2.18.0)
55
+ json (2.19.3)
54
56
  language_server-protocol (3.17.0.5)
55
57
  lint_roller (1.1.0)
56
58
  logger (1.7.0)
57
59
  method_source (1.1.0)
58
60
  mini_portile2 (2.8.9)
59
- minitest (6.0.1)
61
+ minitest (6.0.2)
62
+ drb (~> 2.0)
60
63
  prism (~> 1.5)
61
- openssl (4.0.0)
64
+ openssl (4.0.1)
62
65
  ostruct (0.6.3)
63
66
  parallel (1.27.0)
64
- parser (3.3.10.1)
67
+ parser (3.3.11.0)
65
68
  ast (~> 2.4.1)
66
69
  racc
67
70
  pp (0.6.3)
68
71
  prettyprint
69
72
  prettyprint (0.2.0)
70
- prism (1.8.0)
73
+ prism (1.9.0)
71
74
  pry (0.16.0)
72
75
  coderay (~> 1.1)
73
76
  method_source (~> 1.0)
@@ -78,7 +81,7 @@ GEM
78
81
  racc (1.8.1)
79
82
  rainbow (3.1.1)
80
83
  rake (13.3.1)
81
- rdoc (7.1.0)
84
+ rdoc (7.2.0)
82
85
  erb
83
86
  psych (>= 4.0.0)
84
87
  tsort
@@ -94,11 +97,11 @@ GEM
94
97
  rspec-expectations (3.13.5)
95
98
  diff-lcs (>= 1.2.0, < 2.0)
96
99
  rspec-support (~> 3.13.0)
97
- rspec-mocks (3.13.7)
100
+ rspec-mocks (3.13.8)
98
101
  diff-lcs (>= 1.2.0, < 2.0)
99
102
  rspec-support (~> 3.13.0)
100
- rspec-support (3.13.6)
101
- rubocop (1.82.1)
103
+ rspec-support (3.13.7)
104
+ rubocop (1.84.2)
102
105
  json (~> 2.3)
103
106
  language_server-protocol (~> 3.17.0.2)
104
107
  lint_roller (~> 1.1.0)
@@ -106,28 +109,38 @@ GEM
106
109
  parser (>= 3.3.0.2)
107
110
  rainbow (>= 2.2.2, < 4.0)
108
111
  regexp_parser (>= 2.9.3, < 3.0)
109
- rubocop-ast (>= 1.48.0, < 2.0)
112
+ rubocop-ast (>= 1.49.0, < 2.0)
110
113
  ruby-progressbar (~> 1.7)
111
114
  unicode-display_width (>= 2.4.0, < 4.0)
112
- rubocop-ast (1.49.0)
115
+ rubocop-ast (1.49.1)
113
116
  parser (>= 3.3.7.2)
114
117
  prism (~> 1.7)
115
- rubocop-rake (0.7.1)
118
+ rubocop-performance (1.26.1)
116
119
  lint_roller (~> 1.1)
117
- rubocop (>= 1.72.1)
118
- rubocop-rspec (3.9.0)
119
- lint_roller (~> 1.1)
120
- rubocop (~> 1.81)
120
+ rubocop (>= 1.75.0, < 2.0)
121
+ rubocop-ast (>= 1.47.1, < 2.0)
121
122
  ruby-progressbar (1.13.0)
122
123
  securerandom (0.4.1)
123
- sqlite3 (2.9.0)
124
+ sqlite3 (2.9.2)
124
125
  mini_portile2 (~> 2.8.0)
126
+ standard (1.54.0)
127
+ language_server-protocol (~> 3.17.0.2)
128
+ lint_roller (~> 1.0)
129
+ rubocop (~> 1.84.0)
130
+ standard-custom (~> 1.0.0)
131
+ standard-performance (~> 1.8)
132
+ standard-custom (1.0.2)
133
+ lint_roller (~> 1.0)
134
+ rubocop (~> 1.50)
135
+ standard-performance (1.9.0)
136
+ lint_roller (~> 1.1)
137
+ rubocop-performance (~> 1.26.0)
125
138
  stringio (3.2.0)
126
- timeout (0.6.0)
139
+ timeout (0.6.1)
127
140
  tsort (0.2.0)
128
141
  tzinfo (2.0.6)
129
142
  concurrent-ruby (~> 1.0)
130
- tzinfo-data (1.2025.3)
143
+ tzinfo-data (1.2026.1)
131
144
  tzinfo (>= 1.0.0)
132
145
  unicode-display_width (3.2.0)
133
146
  unicode-emoji (~> 4.1)
@@ -145,10 +158,8 @@ DEPENDENCIES
145
158
  pry
146
159
  rake
147
160
  rspec
148
- rubocop
149
- rubocop-rake
150
- rubocop-rspec
151
161
  sqlite3 (~> 2.7)
162
+ standard
152
163
 
153
164
  BUNDLED WITH
154
165
  4.0.4
data/Rakefile CHANGED
@@ -1,9 +1,8 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'rubocop/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "standard/rake"
4
4
 
5
5
  RSpec::Core::RakeTask.new(:spec)
6
- RuboCop::RakeTask.new
7
6
 
8
- task ci: %i[spec rubocop]
9
- task default: %i[spec rubocop:autocorrect]
7
+ task ci: %i[spec standard]
8
+ task default: %i[spec standard:fix]
data/fishplate.gemspec CHANGED
@@ -1,34 +1,34 @@
1
- lib = File.expand_path('lib', __dir__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'fishplate/version'
3
+ require "fishplate/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'fishplate'
6
+ spec.name = "fishplate"
7
7
  spec.version = Fishplate::VERSION
8
- spec.authors = ['Krzysztof Knapik']
9
- spec.email = ['knapo@knapo.net']
8
+ spec.authors = ["Krzysztof Knapik"]
9
+ spec.email = ["knapo@knapo.net"]
10
10
 
11
- spec.summary = 'Fishplate is a library allowing running ActiveRecord without Railties.'
12
- spec.homepage = 'https://github.com/RenoFi/fishplate'
13
- spec.license = 'MIT'
11
+ spec.summary = "Fishplate is a library allowing running ActiveRecord without Railties."
12
+ spec.homepage = "https://github.com/RenoFi/fishplate"
13
+ spec.license = "MIT"
14
14
 
15
- spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/fishplate'
16
- spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/fishplate'
17
- spec.metadata['rubygems_mfa_required'] = 'true'
15
+ spec.metadata["homepage_uri"] = "https://github.com/RenoFi/fishplate"
16
+ spec.metadata["source_code_uri"] = "https://github.com/RenoFi/fishplate"
17
+ spec.metadata["rubygems_mfa_required"] = "true"
18
18
 
19
19
  spec.files = Dir.chdir(__dir__) do
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
21
21
  end
22
- spec.bindir = 'exe'
22
+ spec.bindir = "exe"
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
- spec.require_paths = ['lib']
24
+ spec.require_paths = ["lib"]
25
25
 
26
- spec.required_ruby_version = Gem::Requirement.new('>= 3.4.0')
26
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.4.0")
27
27
 
28
- spec.add_dependency 'a9n', '~> 1.0'
29
- spec.add_dependency 'activemodel', '~> 8.1'
30
- spec.add_dependency 'activerecord', '~> 8.1'
31
- spec.add_dependency 'activesupport', '~> 8.1'
32
- spec.add_dependency 'rake'
33
- spec.add_dependency 'tzinfo-data'
28
+ spec.add_dependency "a9n", "~> 1.0"
29
+ spec.add_dependency "activemodel", "~> 8.1"
30
+ spec.add_dependency "activerecord", "~> 8.1"
31
+ spec.add_dependency "activesupport", "~> 8.1"
32
+ spec.add_dependency "rake"
33
+ spec.add_dependency "tzinfo-data"
34
34
  end
@@ -12,10 +12,22 @@ task console: :environment do
12
12
  IRB.start
13
13
  end
14
14
 
15
+ namespace :db do
16
+ desc "Reset database: drop, create, remove schema.rb, migrate, and prepare test db"
17
+ task recreate: :environment do
18
+ env_name = A9n.env || ENV["APP_ENV"] || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
19
+ raise "Only available in development or test environment" unless %w[development test].include?(env_name)
20
+
21
+ system("rake db:drop:all db:create:all") || abort("db:drop:all db:create:all failed")
22
+ FileUtils.rm_f("db/schema.rb")
23
+ system("rake db:migrate db:test:prepare") || abort("db:migrate db:test:prepare failed")
24
+ end
25
+ end
26
+
15
27
  namespace :generate do
16
28
  desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
17
29
  task :migration, [:name] do |name, args|
18
- klass = args[:name].tr('-', '_').camelize
30
+ klass = args[:name].tr("-", "_").camelize
19
31
  number = ActiveRecord::Migration.next_migration_number(0)
20
32
  file_name = "#{number}_#{klass.underscore}.rb"
21
33
  relative_file_path = File.join("db/migrate", file_name)
@@ -26,7 +38,7 @@ namespace :generate do
26
38
  | end
27
39
  |end
28
40
  CONTENT
29
- File.write(file_path, content.gsub(/( +\|)/, ''))
41
+ File.write(file_path, content.gsub(/( +\|)/, ""))
30
42
  puts "Created migration file: #{relative_file_path}"
31
43
  end
32
44
  end
@@ -1,3 +1,3 @@
1
1
  module Fishplate
2
- VERSION = "8.1.2".freeze
2
+ VERSION = "8.1.2.4".freeze
3
3
  end
data/lib/fishplate.rb CHANGED
@@ -1,31 +1,31 @@
1
- require 'a9n'
2
- require 'active_model'
3
- require 'active_record'
4
- require 'active_support/all'
5
- require 'logger'
1
+ require "a9n"
2
+ require "active_model"
3
+ require "active_record"
4
+ require "active_support/all"
5
+ require "logger"
6
6
 
7
- require 'fishplate/version'
8
- require 'fishplate/rack'
9
- require 'fishplate/sidekiq_middleware'
7
+ require "fishplate/version"
8
+ require "fishplate/rack"
9
+ require "fishplate/sidekiq_middleware"
10
10
 
11
11
  module Fishplate
12
12
  class << self
13
13
  def load_seed
14
- return unless A9n.root.join('db/seeds.rb').exist?
14
+ return unless A9n.root.join("db/seeds.rb").exist?
15
15
 
16
- Kernel.load A9n.root.join('db/seeds.rb')
16
+ Kernel.load A9n.root.join("db/seeds.rb")
17
17
  end
18
18
 
19
19
  def load_tasks
20
- Kernel.load 'active_record/railties/databases.rake'
21
- Kernel.load File.expand_path('fishplate/tasks.rake', __dir__)
22
- A9n.root.join('lib/tasks').glob('**/*.rake').sort.each { |f| Kernel.load f }
20
+ Kernel.load "active_record/railties/databases.rake"
21
+ Kernel.load File.expand_path("fishplate/tasks.rake", __dir__)
22
+ A9n.root.join("lib/tasks").glob("**/*.rake").sort.each { |f| Kernel.load f }
23
23
  end
24
24
 
25
25
  def database_configuration
26
26
  @database_configuration ||= begin
27
- content = ERB.new(A9n.root.join('config/database.yml').read).result
28
- if RUBY_VERSION >= '3.1'
27
+ content = ERB.new(A9n.root.join("config/database.yml").read).result
28
+ if RUBY_VERSION >= "3.1"
29
29
  YAML.load(content, aliases: true)
30
30
  else
31
31
  YAML.load(content)
@@ -67,7 +67,7 @@ module Fishplate
67
67
  ActiveRecord.eager_load!
68
68
  ActiveRecord.default_timezone = :utc
69
69
  ActiveRecord::Base.logger = logger
70
- ActiveRecord::Base.logger.level = ENV['LOG_LEVEL'] || 'debug'
70
+ ActiveRecord::Base.logger.level = ENV["LOG_LEVEL"] || "debug"
71
71
  ActiveRecord::Base.time_zone_aware_attributes = true
72
72
  ActiveRecord::Base.configurations = database_configuration
73
73
  end
@@ -76,9 +76,9 @@ module Fishplate
76
76
  # Check active_record/tasks/database_tasks.rb for possible config values
77
77
  ActiveRecord::Tasks::DatabaseTasks.env = A9n.env
78
78
  ActiveRecord::Tasks::DatabaseTasks.database_configuration = database_configuration
79
- ActiveRecord::Tasks::DatabaseTasks.db_dir = A9n.root.join('db')
80
- ActiveRecord::Tasks::DatabaseTasks.fixtures_path = A9n.root.join('db/fixtures')
81
- ActiveRecord::Tasks::DatabaseTasks.migrations_paths = A9n.root.join('db/migrate')
79
+ ActiveRecord::Tasks::DatabaseTasks.db_dir = A9n.root.join("db")
80
+ ActiveRecord::Tasks::DatabaseTasks.fixtures_path = A9n.root.join("db/fixtures")
81
+ ActiveRecord::Tasks::DatabaseTasks.migrations_paths = A9n.root.join("db/migrate")
82
82
  ActiveRecord::Tasks::DatabaseTasks.seed_loader = self
83
83
  ActiveRecord::Tasks::DatabaseTasks.root = A9n.root
84
84
  end
@@ -90,11 +90,11 @@ module Fishplate
90
90
  end
91
91
 
92
92
  def load_initializers
93
- A9n.root.join('config/initializers').glob('*.rb').sort.each { |f| require f }
93
+ A9n.root.join("config/initializers").glob("*.rb").sort.each { |f| require f }
94
94
  end
95
95
 
96
96
  def add_i18n_load_paths
97
- I18n.load_path |= A9n.root.join('config/locales').glob('**/*.yml')
97
+ I18n.load_path |= A9n.root.join("config/locales").glob("**/*.yml")
98
98
  end
99
99
 
100
100
  def add_sidekiq_middleware
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fishplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.2
4
+ version: 8.1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 4.0.4
146
+ rubygems_version: 4.0.8
147
147
  specification_version: 4
148
148
  summary: Fishplate is a library allowing running ActiveRecord without Railties.
149
149
  test_files: []