fishplate 8.1.2 → 8.1.2.1
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 +4 -4
- data/.bundler-version +1 -1
- data/.github/workflows/auto-approve.yml +1 -1
- data/.github/workflows/ci.yml +1 -1
- data/.gitignore +1 -2
- data/Gemfile +8 -10
- data/Gemfile.lock +35 -25
- data/Rakefile +5 -6
- data/fishplate.gemspec +20 -20
- data/lib/fishplate/tasks.rake +13 -2
- data/lib/fishplate/version.rb +1 -1
- data/lib/fishplate.rb +21 -21
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89948365736b6c8adabaef79627ae290b6560aaa8e90c4f7c149e681aee4bf39
|
|
4
|
+
data.tar.gz: a3ad517149f929a667378317c6ef420b853a5ca509af3b1d9f875cb54391fba2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bacee661f769429fe71b73489275d814376279b5178ceb7024dec8815f0d07aa1ffda3ac7b854fde1a223ee44725aa3d5428ad51043e90b0aa04c4239746b11
|
|
7
|
+
data.tar.gz: 7caa1bea134b604b2a8f7545faf30700c410e28caa744a36a82c86f96151eb616d9c0f7fc0ca51bf64d6d0d6fd301259779f0f831f7c275d11db388f60e00566
|
data/.bundler-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
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@
|
|
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 }}"
|
data/.github/workflows/ci.yml
CHANGED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
|
@@ -2,14 +2,12 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
-
gem
|
|
6
|
-
gem
|
|
7
|
-
gem
|
|
8
|
-
gem
|
|
9
|
-
gem
|
|
10
|
-
gem
|
|
11
|
-
gem
|
|
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
|
|
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.1)
|
|
5
5
|
a9n (~> 1.0)
|
|
6
6
|
activemodel (~> 8.1)
|
|
7
7
|
activerecord (~> 8.1)
|
|
@@ -42,32 +42,34 @@ GEM
|
|
|
42
42
|
date (3.5.1)
|
|
43
43
|
diff-lcs (1.6.2)
|
|
44
44
|
drb (2.2.3)
|
|
45
|
-
erb (6.0.
|
|
45
|
+
erb (6.0.2)
|
|
46
46
|
i18n (1.14.8)
|
|
47
47
|
concurrent-ruby (~> 1.0)
|
|
48
48
|
io-console (0.8.2)
|
|
49
|
-
irb (1.
|
|
49
|
+
irb (1.17.0)
|
|
50
50
|
pp (>= 0.6.0)
|
|
51
|
+
prism (>= 1.3.0)
|
|
51
52
|
rdoc (>= 4.0.0)
|
|
52
53
|
reline (>= 0.4.2)
|
|
53
|
-
json (2.
|
|
54
|
+
json (2.19.2)
|
|
54
55
|
language_server-protocol (3.17.0.5)
|
|
55
56
|
lint_roller (1.1.0)
|
|
56
57
|
logger (1.7.0)
|
|
57
58
|
method_source (1.1.0)
|
|
58
59
|
mini_portile2 (2.8.9)
|
|
59
|
-
minitest (6.0.
|
|
60
|
+
minitest (6.0.2)
|
|
61
|
+
drb (~> 2.0)
|
|
60
62
|
prism (~> 1.5)
|
|
61
|
-
openssl (4.0.
|
|
63
|
+
openssl (4.0.1)
|
|
62
64
|
ostruct (0.6.3)
|
|
63
65
|
parallel (1.27.0)
|
|
64
|
-
parser (3.3.10.
|
|
66
|
+
parser (3.3.10.2)
|
|
65
67
|
ast (~> 2.4.1)
|
|
66
68
|
racc
|
|
67
69
|
pp (0.6.3)
|
|
68
70
|
prettyprint
|
|
69
71
|
prettyprint (0.2.0)
|
|
70
|
-
prism (1.
|
|
72
|
+
prism (1.9.0)
|
|
71
73
|
pry (0.16.0)
|
|
72
74
|
coderay (~> 1.1)
|
|
73
75
|
method_source (~> 1.0)
|
|
@@ -78,7 +80,7 @@ GEM
|
|
|
78
80
|
racc (1.8.1)
|
|
79
81
|
rainbow (3.1.1)
|
|
80
82
|
rake (13.3.1)
|
|
81
|
-
rdoc (7.
|
|
83
|
+
rdoc (7.2.0)
|
|
82
84
|
erb
|
|
83
85
|
psych (>= 4.0.0)
|
|
84
86
|
tsort
|
|
@@ -94,11 +96,11 @@ GEM
|
|
|
94
96
|
rspec-expectations (3.13.5)
|
|
95
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
96
98
|
rspec-support (~> 3.13.0)
|
|
97
|
-
rspec-mocks (3.13.
|
|
99
|
+
rspec-mocks (3.13.8)
|
|
98
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
99
101
|
rspec-support (~> 3.13.0)
|
|
100
|
-
rspec-support (3.13.
|
|
101
|
-
rubocop (1.
|
|
102
|
+
rspec-support (3.13.7)
|
|
103
|
+
rubocop (1.84.2)
|
|
102
104
|
json (~> 2.3)
|
|
103
105
|
language_server-protocol (~> 3.17.0.2)
|
|
104
106
|
lint_roller (~> 1.1.0)
|
|
@@ -106,28 +108,38 @@ GEM
|
|
|
106
108
|
parser (>= 3.3.0.2)
|
|
107
109
|
rainbow (>= 2.2.2, < 4.0)
|
|
108
110
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
109
|
-
rubocop-ast (>= 1.
|
|
111
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
110
112
|
ruby-progressbar (~> 1.7)
|
|
111
113
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
112
|
-
rubocop-ast (1.49.
|
|
114
|
+
rubocop-ast (1.49.1)
|
|
113
115
|
parser (>= 3.3.7.2)
|
|
114
116
|
prism (~> 1.7)
|
|
115
|
-
rubocop-
|
|
117
|
+
rubocop-performance (1.26.1)
|
|
116
118
|
lint_roller (~> 1.1)
|
|
117
|
-
rubocop (>= 1.
|
|
118
|
-
|
|
119
|
-
lint_roller (~> 1.1)
|
|
120
|
-
rubocop (~> 1.81)
|
|
119
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
120
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
121
121
|
ruby-progressbar (1.13.0)
|
|
122
122
|
securerandom (0.4.1)
|
|
123
|
-
sqlite3 (2.9.
|
|
123
|
+
sqlite3 (2.9.2)
|
|
124
124
|
mini_portile2 (~> 2.8.0)
|
|
125
|
+
standard (1.54.0)
|
|
126
|
+
language_server-protocol (~> 3.17.0.2)
|
|
127
|
+
lint_roller (~> 1.0)
|
|
128
|
+
rubocop (~> 1.84.0)
|
|
129
|
+
standard-custom (~> 1.0.0)
|
|
130
|
+
standard-performance (~> 1.8)
|
|
131
|
+
standard-custom (1.0.2)
|
|
132
|
+
lint_roller (~> 1.0)
|
|
133
|
+
rubocop (~> 1.50)
|
|
134
|
+
standard-performance (1.9.0)
|
|
135
|
+
lint_roller (~> 1.1)
|
|
136
|
+
rubocop-performance (~> 1.26.0)
|
|
125
137
|
stringio (3.2.0)
|
|
126
|
-
timeout (0.6.
|
|
138
|
+
timeout (0.6.1)
|
|
127
139
|
tsort (0.2.0)
|
|
128
140
|
tzinfo (2.0.6)
|
|
129
141
|
concurrent-ruby (~> 1.0)
|
|
130
|
-
tzinfo-data (1.
|
|
142
|
+
tzinfo-data (1.2026.1)
|
|
131
143
|
tzinfo (>= 1.0.0)
|
|
132
144
|
unicode-display_width (3.2.0)
|
|
133
145
|
unicode-emoji (~> 4.1)
|
|
@@ -145,10 +157,8 @@ DEPENDENCIES
|
|
|
145
157
|
pry
|
|
146
158
|
rake
|
|
147
159
|
rspec
|
|
148
|
-
rubocop
|
|
149
|
-
rubocop-rake
|
|
150
|
-
rubocop-rspec
|
|
151
160
|
sqlite3 (~> 2.7)
|
|
161
|
+
standard
|
|
152
162
|
|
|
153
163
|
BUNDLED WITH
|
|
154
164
|
4.0.4
|
data/Rakefile
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
3
|
-
require
|
|
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
|
|
9
|
-
task default: %i[spec
|
|
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(
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require
|
|
3
|
+
require "fishplate/version"
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = "fishplate"
|
|
7
7
|
spec.version = Fishplate::VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email = [
|
|
8
|
+
spec.authors = ["Krzysztof Knapik"]
|
|
9
|
+
spec.email = ["knapo@knapo.net"]
|
|
10
10
|
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.homepage =
|
|
13
|
-
spec.license =
|
|
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[
|
|
16
|
-
spec.metadata[
|
|
17
|
-
spec.metadata[
|
|
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 =
|
|
22
|
+
spec.bindir = "exe"
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
24
|
-
spec.require_paths = [
|
|
24
|
+
spec.require_paths = ["lib"]
|
|
25
25
|
|
|
26
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
|
26
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.4.0")
|
|
27
27
|
|
|
28
|
-
spec.add_dependency
|
|
29
|
-
spec.add_dependency
|
|
30
|
-
spec.add_dependency
|
|
31
|
-
spec.add_dependency
|
|
32
|
-
spec.add_dependency
|
|
33
|
-
spec.add_dependency
|
|
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
|
data/lib/fishplate/tasks.rake
CHANGED
|
@@ -12,10 +12,21 @@ 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 do
|
|
18
|
+
raise "Only available in development or test environment" unless %w[development test].include?(A9n.env.to_s)
|
|
19
|
+
|
|
20
|
+
system("rake db:drop:all db:create:all") || abort("db:drop:all db:create:all failed")
|
|
21
|
+
FileUtils.rm_f("db/schema.rb")
|
|
22
|
+
system("rake db:migrate db:test:prepare") || abort("db:migrate db:test:prepare failed")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
15
26
|
namespace :generate do
|
|
16
27
|
desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
|
|
17
28
|
task :migration, [:name] do |name, args|
|
|
18
|
-
klass = args[:name].tr(
|
|
29
|
+
klass = args[:name].tr("-", "_").camelize
|
|
19
30
|
number = ActiveRecord::Migration.next_migration_number(0)
|
|
20
31
|
file_name = "#{number}_#{klass.underscore}.rb"
|
|
21
32
|
relative_file_path = File.join("db/migrate", file_name)
|
|
@@ -26,7 +37,7 @@ namespace :generate do
|
|
|
26
37
|
| end
|
|
27
38
|
|end
|
|
28
39
|
CONTENT
|
|
29
|
-
File.write(file_path, content.gsub(/( +\|)/,
|
|
40
|
+
File.write(file_path, content.gsub(/( +\|)/, ""))
|
|
30
41
|
puts "Created migration file: #{relative_file_path}"
|
|
31
42
|
end
|
|
32
43
|
end
|
data/lib/fishplate/version.rb
CHANGED
data/lib/fishplate.rb
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
3
|
-
require
|
|
4
|
-
require
|
|
5
|
-
require
|
|
1
|
+
require "a9n"
|
|
2
|
+
require "active_model"
|
|
3
|
+
require "active_record"
|
|
4
|
+
require "active_support/all"
|
|
5
|
+
require "logger"
|
|
6
6
|
|
|
7
|
-
require
|
|
8
|
-
require
|
|
9
|
-
require
|
|
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(
|
|
14
|
+
return unless A9n.root.join("db/seeds.rb").exist?
|
|
15
15
|
|
|
16
|
-
Kernel.load A9n.root.join(
|
|
16
|
+
Kernel.load A9n.root.join("db/seeds.rb")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def load_tasks
|
|
20
|
-
Kernel.load
|
|
21
|
-
Kernel.load File.expand_path(
|
|
22
|
-
A9n.root.join(
|
|
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(
|
|
28
|
-
if RUBY_VERSION >=
|
|
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[
|
|
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(
|
|
80
|
-
ActiveRecord::Tasks::DatabaseTasks.fixtures_path = A9n.root.join(
|
|
81
|
-
ActiveRecord::Tasks::DatabaseTasks.migrations_paths = A9n.root.join(
|
|
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(
|
|
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(
|
|
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.1
|
|
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.
|
|
146
|
+
rubygems_version: 4.0.7
|
|
147
147
|
specification_version: 4
|
|
148
148
|
summary: Fishplate is a library allowing running ActiveRecord without Railties.
|
|
149
149
|
test_files: []
|