fishplate 1.1.1 → 7.0.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: 6dba59d1794fd6223fdc2dbbc70b7d858ac594b0009cf3bfa4cbbde8decb5b2a
4
- data.tar.gz: 87137068574dae905b2e12099eef0f3044fec8ca1be527a2c1cf016482bd9a75
3
+ metadata.gz: f292c17488c535a30fdf086eae8d9798533a072e0a44c8a5620d45466ff8dbba
4
+ data.tar.gz: fa788d1d5d376185b67aaf249228979c1975d9334e4c917ee58b3be9b32dda05
5
5
  SHA512:
6
- metadata.gz: 8ce4e57904bb2600792c4bf07e33b55e4fc65e9f530d4408d5690f7fe92aeb5c4d288fbb6d55b2aa26d3e4272d3ac77074bedb3f1f986bbc2a9a69c0bb868f10
7
- data.tar.gz: 820ef56f33a7518924c75164fe82ae82145df0b90f5930dd149598ebf9a547e3ccb5b125b3e3b72a79be4b5b2d1c575cd2d0d7df02aea108af85f06cba2ad624
6
+ metadata.gz: 9955fa782c4abcbcbc4f4490bb62474cf4d1cea76776521cfd81cba89103995d3a774f5e4acc7e74fe49e0b0096ee87d45985cbdc7bbbf1ecd1f8efcda34a03e
7
+ data.tar.gz: 53705d4b34ea0aeb8d4ee999d321f5559b1fb047a3797979b39c2566cd3574b4a88d2d81ac664ac5ccb824a8065c89282e500418d168c2711749e206a6627cf6
data/.bundler-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.32
@@ -3,9 +3,14 @@ version: 1
3
3
  update_configs:
4
4
  - package_manager: "ruby:bundler"
5
5
  directory: "/"
6
- update_schedule: "monthly"
6
+ update_schedule: "daily"
7
7
  commit_message:
8
8
  prefix: "[dependabot]"
9
9
  allowed_updates:
10
10
  - match:
11
- update_type: "all"
11
+ dependency_type: "all"
12
+ update_type: "security"
13
+ automerged_updates:
14
+ - match:
15
+ dependency_type: "all"
16
+ update_type: "security:patch"
@@ -1,18 +1,6 @@
1
- ## Description
1
+ ## Description, motivation and context
2
2
  <!--- Describe your changes in detail -->
3
-
4
- ## Related issue(s)
5
- <!--- GH issue number -->
6
-
7
- ## Motivation and Context
8
3
  <!--- Why is this change required? What problem does it solve? -->
9
- <!--- If it fixes an open issue, please link to the issue here. -->
10
4
 
11
- ## How Has This Been Tested?
12
- <!--- Please describe in detail how you tested your changes. -->
13
-
14
- ## Screenshots (if appropriate):
15
- <!--- Please add any screenshots of the feature. -->
16
-
17
- ## Related PRs
18
- <!--- Please add links to any related PRs (backend, component packages, etc). -->
5
+ ## Related issue(s) or PR(s)
6
+ <!--- GH issue number -->
@@ -1,7 +1,7 @@
1
- # automatically approve PRs submitted by Dependabot
1
+ # automatically approve PRs submitted by Dependabot or Renofidev
2
2
  # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
3
  # from: https://github.com/hmarr/auto-approve-action
4
- name: Auto approve Dependabot PRs
4
+ name: Auto approve dependency upgrades PRs
5
5
 
6
6
  on:
7
7
  pull_request
@@ -10,7 +10,7 @@ jobs:
10
10
  auto-approve:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: hmarr/auto-approve-action@v2.0.0
14
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
13
+ - uses: hmarr/auto-approve-action@v2
14
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev'
15
15
  with:
16
16
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,19 @@
1
+ name: automerge
2
+ on:
3
+ pull_request_review:
4
+ types:
5
+ - submitted
6
+ check_suite:
7
+ types:
8
+ - completed
9
+ status: {}
10
+ jobs:
11
+ automerge:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: automerge
15
+ uses: "pascalgn/automerge-action@v0.12.0"
16
+ env:
17
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18
+ MERGE_METHOD: squash
19
+ MERGE_DELETE_BRANCH: true
@@ -0,0 +1,28 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['3.0']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby
19
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
20
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
21
+ # uses: ruby/setup-ruby@v1
22
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26
+
27
+ - name: Run tests
28
+ run: bundle exec rake ci
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in fishplate.gemspec
4
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,87 +1,88 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fishplate (1.1.1)
4
+ fishplate (7.0.0)
5
5
  a9n (~> 1.0)
6
- activemodel (~> 6.0)
7
- activerecord (~> 6.0)
8
- activesupport (~> 6.0)
9
- rake (~> 13.0)
6
+ activemodel (~> 7.0)
7
+ activerecord (~> 7.0)
8
+ activesupport (~> 7.0)
9
+ rake (~> 13)
10
10
  tzinfo-data
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- a9n (1.2.2)
16
- activemodel (6.0.3.2)
17
- activesupport (= 6.0.3.2)
18
- activerecord (6.0.3.2)
19
- activemodel (= 6.0.3.2)
20
- activesupport (= 6.0.3.2)
21
- activesupport (6.0.3.2)
15
+ a9n (1.2.3)
16
+ activemodel (7.0.0)
17
+ activesupport (= 7.0.0)
18
+ activerecord (7.0.0)
19
+ activemodel (= 7.0.0)
20
+ activesupport (= 7.0.0)
21
+ activesupport (7.0.0)
22
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
- i18n (>= 0.7, < 2)
24
- minitest (~> 5.1)
25
- tzinfo (~> 1.1)
26
- zeitwerk (~> 2.2, >= 2.2.2)
27
- ast (2.4.1)
23
+ i18n (>= 1.6, < 2)
24
+ minitest (>= 5.1)
25
+ tzinfo (~> 2.0)
26
+ ast (2.4.2)
28
27
  coderay (1.1.3)
29
- concurrent-ruby (1.1.7)
28
+ concurrent-ruby (1.1.9)
30
29
  diff-lcs (1.4.4)
31
- i18n (1.8.5)
30
+ i18n (1.8.11)
32
31
  concurrent-ruby (~> 1.0)
33
32
  method_source (1.0.0)
34
- minitest (5.14.2)
35
- parallel (1.19.2)
36
- parser (2.7.1.4)
33
+ minitest (5.15.0)
34
+ parallel (1.21.0)
35
+ parser (3.0.3.2)
37
36
  ast (~> 2.4.1)
38
- pry (0.13.1)
37
+ pry (0.14.1)
39
38
  coderay (~> 1.1)
40
39
  method_source (~> 1.0)
41
40
  rainbow (3.0.0)
42
- rake (13.0.1)
43
- regexp_parser (1.7.1)
44
- rexml (3.2.4)
45
- rspec (3.9.0)
46
- rspec-core (~> 3.9.0)
47
- rspec-expectations (~> 3.9.0)
48
- rspec-mocks (~> 3.9.0)
49
- rspec-core (3.9.2)
50
- rspec-support (~> 3.9.3)
51
- rspec-expectations (3.9.2)
41
+ rake (13.0.6)
42
+ regexp_parser (2.2.0)
43
+ rexml (3.2.5)
44
+ rspec (3.10.0)
45
+ rspec-core (~> 3.10.0)
46
+ rspec-expectations (~> 3.10.0)
47
+ rspec-mocks (~> 3.10.0)
48
+ rspec-core (3.10.1)
49
+ rspec-support (~> 3.10.0)
50
+ rspec-expectations (3.10.1)
52
51
  diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.9.0)
54
- rspec-mocks (3.9.1)
52
+ rspec-support (~> 3.10.0)
53
+ rspec-mocks (3.10.2)
55
54
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.9.0)
57
- rspec-support (3.9.3)
58
- rubocop (0.90.0)
55
+ rspec-support (~> 3.10.0)
56
+ rspec-support (3.10.3)
57
+ rubocop (1.23.0)
59
58
  parallel (~> 1.10)
60
- parser (>= 2.7.1.1)
59
+ parser (>= 3.0.0.0)
61
60
  rainbow (>= 2.2.2, < 4.0)
62
- regexp_parser (>= 1.7)
61
+ regexp_parser (>= 1.8, < 3.0)
63
62
  rexml
64
- rubocop-ast (>= 0.3.0, < 1.0)
63
+ rubocop-ast (>= 1.12.0, < 2.0)
65
64
  ruby-progressbar (~> 1.7)
66
- unicode-display_width (>= 1.4.0, < 2.0)
67
- rubocop-ast (0.3.0)
68
- parser (>= 2.7.1.4)
69
- rubocop-performance (1.7.1)
70
- rubocop (>= 0.82.0)
71
- rubocop-rspec (1.43.2)
72
- rubocop (~> 0.87)
73
- ruby-progressbar (1.10.1)
65
+ unicode-display_width (>= 1.4.0, < 3.0)
66
+ rubocop-ast (1.15.0)
67
+ parser (>= 3.0.1.1)
68
+ rubocop-rake (0.6.0)
69
+ rubocop (~> 1.0)
70
+ rubocop-rspec (2.6.0)
71
+ rubocop (~> 1.19)
72
+ ruby-progressbar (1.11.0)
74
73
  sqlite3 (1.4.2)
75
- thread_safe (0.3.6)
76
- tzinfo (1.2.7)
77
- thread_safe (~> 0.1)
78
- tzinfo-data (1.2020.1)
74
+ tzinfo (2.0.4)
75
+ concurrent-ruby (~> 1.0)
76
+ tzinfo-data (1.2021.5)
79
77
  tzinfo (>= 1.0.0)
80
- unicode-display_width (1.7.0)
81
- zeitwerk (2.4.0)
78
+ unicode-display_width (2.1.0)
82
79
 
83
80
  PLATFORMS
84
- ruby
81
+ aarch64-linux-musl
82
+ x86_64-darwin-18
83
+ x86_64-darwin-19
84
+ x86_64-darwin-20
85
+ x86_64-linux
85
86
 
86
87
  DEPENDENCIES
87
88
  bundler
@@ -90,9 +91,9 @@ DEPENDENCIES
90
91
  rake
91
92
  rspec
92
93
  rubocop
93
- rubocop-performance
94
+ rubocop-rake
94
95
  rubocop-rspec
95
96
  sqlite3
96
97
 
97
98
  BUNDLED WITH
98
- 2.1.4
99
+ 2.2.29
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/fishplate.svg)](https://rubygems.org/gems/fishplate)
2
- [![Build Status](https://travis-ci.org/RenoFi/fishplate.svg?branch=master)](https://travis-ci.org/RenoFi/fishplate)
2
+ [![Build Status](https://github.com/RenoFi/fishplate/actions/workflows/ci.yml/badge.svg)](https://github.com/RenoFi/fishplate/actions/workflows/ci.yml?query=branch%3Amain)
3
3
 
4
4
  # fishplate
5
5
 
@@ -43,7 +43,7 @@ Fishplate.load_tasks
43
43
  Available rake tasks are:
44
44
  ```
45
45
  rake console # Run application console
46
- rake generate:migration[name] # Generate new migration with name given, e.g
46
+ rake generate:migration[name] # Generate new migration with name given, e.g rake generate:migration[CreateUsers]
47
47
 
48
48
  rake db:create # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config). Wi...
49
49
  rake db:drop # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without ...
@@ -65,15 +65,11 @@ rake db:structure:load # Recreates the databases from the struc
65
65
  rake db:version # Retrieves the current schema version number
66
66
  ```
67
67
 
68
- When `rubocop` is available:
69
- ```
70
- rake rubocop # Run RuboCop
71
- rake rubocop:auto_correct # Auto-correct RuboCop offenses
72
- ```
68
+ ### Rack Middleware
73
69
 
74
- When `rspec` is available:
75
- ```
76
- rake spec # Run RSpec code examples
70
+ To free up DB connections after each request, add middleware to your `config.ru`:
71
+ ```ruby
72
+ use Fishplate::Rack
77
73
  ```
78
74
 
79
75
  ## Contributing
data/Rakefile CHANGED
@@ -5,4 +5,5 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop:auto_correct spec]
8
+ task ci: %i[spec rubocop]
9
+ task default: %i[spec rubocop:auto_correct]
data/fishplate.gemspec CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
14
14
 
15
15
  spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/fishplate'
16
16
  spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/fishplate'
17
+ spec.metadata['rubygems_mfa_required'] = 'true'
17
18
 
18
19
  spec.files = Dir.chdir(__dir__) do
19
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
@@ -22,13 +23,13 @@ Gem::Specification.new do |spec|
22
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
24
  spec.require_paths = ['lib']
24
25
 
25
- spec.required_ruby_version = '>= 2.6'
26
+ spec.required_ruby_version = '>= 3.0'
26
27
 
27
28
  spec.add_dependency 'a9n', '~> 1.0'
28
- spec.add_dependency 'activemodel', '~> 6.0'
29
- spec.add_dependency 'activerecord', '~> 6.0'
30
- spec.add_dependency 'activesupport', '~> 6.0'
31
- spec.add_dependency 'rake', '~> 13.0'
29
+ spec.add_dependency 'activemodel', '~> 7.0'
30
+ spec.add_dependency 'activerecord', '~> 7.0'
31
+ spec.add_dependency 'activesupport', '~> 7.0'
32
+ spec.add_dependency 'rake', '~> 13'
32
33
  spec.add_dependency 'tzinfo-data'
33
34
 
34
35
  spec.add_development_dependency 'bundler'
@@ -36,7 +37,7 @@ Gem::Specification.new do |spec|
36
37
  spec.add_development_dependency 'rake'
37
38
  spec.add_development_dependency 'rspec'
38
39
  spec.add_development_dependency 'rubocop'
39
- spec.add_development_dependency 'rubocop-performance'
40
+ spec.add_development_dependency 'rubocop-rake'
40
41
  spec.add_development_dependency 'rubocop-rspec'
41
42
  spec.add_development_dependency 'sqlite3'
42
43
  end
@@ -12,8 +12,8 @@ task console: :environment do
12
12
  IRB.start
13
13
  end
14
14
 
15
- desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
16
15
  namespace :generate do
16
+ desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
17
17
  task :migration, [:name] do |name, args|
18
18
  klass = args[:name].tr('-', '_').camelize
19
19
  number = ActiveRecord::Migration.next_migration_number(0)
@@ -1,3 +1,3 @@
1
1
  module Fishplate
2
- VERSION = "1.1.1".freeze
2
+ VERSION = "7.0.0".freeze
3
3
  end
data/lib/fishplate.rb CHANGED
@@ -12,13 +12,14 @@ module Fishplate
12
12
  class << self
13
13
  def load_seed
14
14
  return unless A9n.root.join('db/seeds.rb').exist?
15
+
15
16
  Kernel.load A9n.root.join('db/seeds.rb')
16
17
  end
17
18
 
18
19
  def load_tasks
19
20
  Kernel.load 'active_record/railties/databases.rake'
20
21
  Kernel.load File.expand_path('fishplate/tasks.rake', __dir__)
21
- A9n.root.join('lib/tasks').glob('*.rake').sort.each { |f| Kernel.load f }
22
+ A9n.root.join('lib/tasks').glob('**/*.rake').sort.each { |f| Kernel.load f }
22
23
  end
23
24
 
24
25
  def database_configuration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fishplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-02 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: a9n
@@ -30,56 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '6.0'
40
+ version: '7.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activerecord
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '6.0'
47
+ version: '7.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '6.0'
54
+ version: '7.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '6.0'
61
+ version: '7.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '6.0'
68
+ version: '7.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '13.0'
75
+ version: '13'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '13.0'
82
+ version: '13'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: tzinfo-data
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +165,7 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: rubocop-performance
168
+ name: rubocop-rake
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
@@ -213,15 +213,17 @@ executables: []
213
213
  extensions: []
214
214
  extra_rdoc_files: []
215
215
  files:
216
+ - ".bundler-version"
216
217
  - ".dependabot/config.yml"
217
218
  - ".github/ISSUE_TEMPLATE/bug_report.md"
218
219
  - ".github/ISSUE_TEMPLATE/config.yml"
219
220
  - ".github/ISSUE_TEMPLATE/story.md"
220
221
  - ".github/PULL_REQUEST_TEMPLATE.md"
221
222
  - ".github/workflows/auto-approve.yml"
223
+ - ".github/workflows/auto-merge.yml"
224
+ - ".github/workflows/ci.yml"
222
225
  - ".gitignore"
223
226
  - ".rspec"
224
- - ".travis.yml"
225
227
  - Gemfile
226
228
  - Gemfile.lock
227
229
  - LICENSE
@@ -239,6 +241,7 @@ licenses:
239
241
  metadata:
240
242
  homepage_uri: https://github.com/RenoFi/fishplate
241
243
  source_code_uri: https://github.com/RenoFi/fishplate
244
+ rubygems_mfa_required: 'true'
242
245
  post_install_message:
243
246
  rdoc_options: []
244
247
  require_paths:
@@ -247,14 +250,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
250
  requirements:
248
251
  - - ">="
249
252
  - !ruby/object:Gem::Version
250
- version: '2.6'
253
+ version: '3.0'
251
254
  required_rubygems_version: !ruby/object:Gem::Requirement
252
255
  requirements:
253
256
  - - ">="
254
257
  - !ruby/object:Gem::Version
255
258
  version: '0'
256
259
  requirements: []
257
- rubygems_version: 3.1.2
260
+ rubygems_version: 3.2.23
258
261
  signing_key:
259
262
  specification_version: 4
260
263
  summary: Fishplate is a library allowing running ActiveRecord without Railties.
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6
7
- - 2.7
8
- before_install: gem install bundler
9
- script:
10
- - bundle exec rake spec
11
- - bundle exec rake rubocop