fishplate 1.0.1 → 1.0.6

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: 8e989be0e676139c61150704dd7d572361e8e938c395888fe0990d1483c36b61
4
- data.tar.gz: e40a0d674b9fa446dbec7142b4d464af78fa887e2fc9e9618cf52330dd3664a3
3
+ metadata.gz: 9c8e4415200bde321e9aeab07fb044bad7aa2656f50dc6ed36b2dc0a1ce6a398
4
+ data.tar.gz: 4bf052cfc9bff10d183355d902c06e34c9c6ea4898e175b60f036cae876af182
5
5
  SHA512:
6
- metadata.gz: 9674364a4dce4dcbdb4ab51b83ea24ff0f9434f63cbdd7d09aef9043ebc69b848c69684f72fada366d0659073e94c746be70d2b1898903931b184a5c098c1d3f
7
- data.tar.gz: 6dfb9a75a907ea724bd47d507463f0dc2cf13c5ba710a53803d9b523e62a36d3ae6d425bef24990021ba60be1e47c9c13aff80d824a2d5d63171bf7280eadc04
6
+ metadata.gz: '03689f60b5a15e0255b969c32e8b715af4b22376e98d8d2d3246ad710a8c419ccf594ef6018f4e170198458a5992d09700c9b015d9e92fe169458a135d712537'
7
+ data.tar.gz: bb5ef2e780e3e603a95b67a7d5ccc7aa525698aabb4b9875c88e59d6def0c11099759725da7d18938d72d8658d47345c424e009b744d98b331f540e0b5ea986a
@@ -0,0 +1,11 @@
1
+ version: 1
2
+
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "monthly"
7
+ commit_message:
8
+ prefix: "[dependabot]"
9
+ allowed_updates:
10
+ - match:
11
+ update_type: "all"
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to track an issue that has been identified
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Mutation/Query**
24
+
25
+ **URL and HTTP method (for non-GQL):**
26
+
27
+ **Sentry or Logs URL:**
28
+
29
+ **User/authentication details**
30
+ Impacted user name or service account
31
+
32
+ **Additional context**
33
+ Add any other context about the problem here.
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: New story
3
+ about: Add a new story for implementation
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the solution**
11
+ A clear and concise description of what you want to happen.
12
+ When will this feature be done?
13
+
14
+ **Describe the users**
15
+ Who are we building this feature for?
16
+
17
+ **Additional context**
18
+ Add any other context or screenshots about the feature request here.
19
+ Link to any applicable documents describing the feature.
20
+
21
+ **Designs**
22
+ Link to any applicable designs on Invision.
@@ -0,0 +1,18 @@
1
+ ## Description
2
+ <!--- Describe your changes in detail -->
3
+
4
+ ## Related issue(s)
5
+ <!--- GH issue number -->
6
+
7
+ ## Motivation and Context
8
+ <!--- Why is this change required? What problem does it solve? -->
9
+ <!--- If it fixes an open issue, please link to the issue here. -->
10
+
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). -->
@@ -0,0 +1,16 @@
1
+ # automatically approve PRs submitted by Dependabot
2
+ # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
+ # from: https://github.com/hmarr/auto-approve-action
4
+ name: Auto approve Dependabot PRs
5
+
6
+ on:
7
+ pull_request
8
+
9
+ jobs:
10
+ auto-approve:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: hmarr/auto-approve-action@v2.0.0
14
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
15
+ with:
16
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -3,8 +3,9 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.5
7
6
  - 2.6
7
+ - 2.7
8
8
  before_install: gem install bundler
9
9
  script:
10
- - bundle exec rake
10
+ - bundle exec rake spec
11
+ - bundle exec rake rubocop
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fishplate (1.0.1)
4
+ fishplate (1.0.6)
5
5
  a9n (~> 1.0)
6
6
  activemodel (~> 6.0)
7
7
  activerecord (~> 6.0)
@@ -12,65 +12,73 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- a9n (1.0.0)
16
- activemodel (6.0.2.1)
17
- activesupport (= 6.0.2.1)
18
- activerecord (6.0.2.1)
19
- activemodel (= 6.0.2.1)
20
- activesupport (= 6.0.2.1)
21
- activesupport (6.0.2.1)
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)
22
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
23
  i18n (>= 0.7, < 2)
24
24
  minitest (~> 5.1)
25
25
  tzinfo (~> 1.1)
26
- zeitwerk (~> 2.2)
27
- ast (2.4.0)
28
- coderay (1.1.2)
29
- concurrent-ruby (1.1.5)
30
- diff-lcs (1.3)
31
- i18n (1.7.0)
26
+ zeitwerk (~> 2.2, >= 2.2.2)
27
+ ast (2.4.1)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.1.7)
30
+ diff-lcs (1.4.4)
31
+ i18n (1.8.5)
32
32
  concurrent-ruby (~> 1.0)
33
- jaro_winkler (1.5.4)
34
- method_source (0.9.2)
35
- minitest (5.13.0)
36
- parallel (1.19.1)
37
- parser (2.7.0.0)
38
- ast (~> 2.4.0)
39
- pry (0.12.2)
40
- coderay (~> 1.1.0)
41
- method_source (~> 0.9.0)
33
+ method_source (1.0.0)
34
+ minitest (5.14.1)
35
+ parallel (1.19.2)
36
+ parser (2.7.1.4)
37
+ ast (~> 2.4.1)
38
+ pry (0.13.1)
39
+ coderay (~> 1.1)
40
+ method_source (~> 1.0)
42
41
  rainbow (3.0.0)
43
42
  rake (13.0.1)
43
+ regexp_parser (1.7.1)
44
+ rexml (3.2.4)
44
45
  rspec (3.9.0)
45
46
  rspec-core (~> 3.9.0)
46
47
  rspec-expectations (~> 3.9.0)
47
48
  rspec-mocks (~> 3.9.0)
48
- rspec-core (3.9.0)
49
- rspec-support (~> 3.9.0)
50
- rspec-expectations (3.9.0)
49
+ rspec-core (3.9.2)
50
+ rspec-support (~> 3.9.3)
51
+ rspec-expectations (3.9.2)
51
52
  diff-lcs (>= 1.2.0, < 2.0)
52
53
  rspec-support (~> 3.9.0)
53
- rspec-mocks (3.9.0)
54
+ rspec-mocks (3.9.1)
54
55
  diff-lcs (>= 1.2.0, < 2.0)
55
56
  rspec-support (~> 3.9.0)
56
- rspec-support (3.9.0)
57
- rubocop (0.78.0)
58
- jaro_winkler (~> 1.5.1)
57
+ rspec-support (3.9.3)
58
+ rubocop (0.89.1)
59
59
  parallel (~> 1.10)
60
- parser (>= 2.6)
60
+ parser (>= 2.7.1.1)
61
61
  rainbow (>= 2.2.2, < 4.0)
62
+ regexp_parser (>= 1.7)
63
+ rexml
64
+ rubocop-ast (>= 0.3.0, < 1.0)
62
65
  ruby-progressbar (~> 1.7)
63
- unicode-display_width (>= 1.4.0, < 1.7)
64
- rubocop-performance (1.5.2)
65
- rubocop (>= 0.71.0)
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.42.0)
72
+ rubocop (>= 0.87.0)
66
73
  ruby-progressbar (1.10.1)
74
+ sqlite3 (1.4.2)
67
75
  thread_safe (0.3.6)
68
- tzinfo (1.2.6)
76
+ tzinfo (1.2.7)
69
77
  thread_safe (~> 0.1)
70
- tzinfo-data (1.2019.3)
78
+ tzinfo-data (1.2020.1)
71
79
  tzinfo (>= 1.0.0)
72
- unicode-display_width (1.6.0)
73
- zeitwerk (2.2.2)
80
+ unicode-display_width (1.7.0)
81
+ zeitwerk (2.4.0)
74
82
 
75
83
  PLATFORMS
76
84
  ruby
@@ -83,6 +91,8 @@ DEPENDENCIES
83
91
  rspec
84
92
  rubocop
85
93
  rubocop-performance
94
+ rubocop-rspec
95
+ sqlite3
86
96
 
87
97
  BUNDLED WITH
88
- 1.17.3
98
+ 2.1.4
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- # Fishplate
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
3
 
3
- Fishplate is a library to run `ActiveRecord` without `railties` gem
4
+ # fishplate
5
+
6
+ `fishplate` is a library to run `ActiveRecord` without `railties` gem
4
7
 
5
8
  ![fishplate](https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Fishplate_UK_2006.jpg/440px-Fishplate_UK_2006.jpg "Fishplate")
6
9
 
data/Rakefile CHANGED
@@ -5,4 +5,4 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop spec]
8
+ task default: %i[rubocop:auto_correct spec]
@@ -3,14 +3,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'fishplate/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'fishplate'
7
- spec.version = Fishplate::VERSION
8
- spec.authors = ['Krzysztof Knapik']
9
- spec.email = ['knapo@knapo.net']
6
+ spec.name = 'fishplate'
7
+ spec.version = Fishplate::VERSION
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.'
11
+ spec.summary = 'Fishplate is a library allowing running ActiveRecord without Railties.'
12
12
  spec.homepage = 'https://github.com/RenoFi/fishplate'
13
- spec.license = 'MIT'
13
+ spec.license = 'MIT'
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'
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.files = Dir.chdir(__dir__) do
19
19
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
20
20
  end
21
- spec.bindir = 'exe'
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.bindir = 'exe'
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  spec.required_ruby_version = '>= 2.6'
@@ -37,4 +37,6 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency 'rspec'
38
38
  spec.add_development_dependency 'rubocop'
39
39
  spec.add_development_dependency 'rubocop-performance'
40
+ spec.add_development_dependency 'rubocop-rspec'
41
+ spec.add_development_dependency 'sqlite3'
40
42
  end
@@ -36,18 +36,18 @@ module Fishplate
36
36
  attr_writer :logger
37
37
 
38
38
  def logger
39
- @logger ||= ::Logger.new(STDOUT)
39
+ @logger ||= ::Logger.new($stdout)
40
40
  end
41
41
 
42
42
  def setup!
43
- A9n.root.join('config/initializers').glob('*.rb').sort.each { |f| require f }
44
-
45
43
  configure_active_record
46
44
 
47
45
  setup_database_tasks
48
46
 
49
47
  setup_db_connection
50
48
 
49
+ load_initializers
50
+
51
51
  add_sidekiq_middleware if defined?(Sidekiq)
52
52
  end
53
53
 
@@ -78,6 +78,10 @@ module Fishplate
78
78
  ActiveRecord::Base.establish_connection
79
79
  end
80
80
 
81
+ def load_initializers
82
+ A9n.root.join('config/initializers').glob('*.rb').sort.each { |f| require f }
83
+ end
84
+
81
85
  def add_sidekiq_middleware
82
86
  Sidekiq.configure_server do |config|
83
87
  config.server_middleware do |chain|
@@ -15,17 +15,19 @@ end
15
15
  desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
16
16
  namespace :generate do
17
17
  task :migration, [:name] do |name, args|
18
- klass = args[:name].tr('-', '_').camelize
19
- number = ActiveRecord::Migration.next_migration_number(0)
18
+ klass = args[:name].tr('-', '_').camelize
19
+ number = ActiveRecord::Migration.next_migration_number(0)
20
20
  file_name = "#{number}_#{klass.underscore}.rb"
21
- file_path = A9n.root.join("db/migrate", file_name)
22
- content = <<-CONTENT
21
+ relative_file_path = File.join("db/migrate", file_name)
22
+ file_path = A9n.root.join(relative_file_path)
23
+ content = <<-CONTENT
23
24
  |class #{klass} < ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]
24
25
  | def change
25
26
  | end
26
27
  |end
27
28
  CONTENT
28
29
  File.open(file_path, "w+") { |f| f.write(content.gsub(/( +\|)/, '')) }
30
+ puts "Created migration file: #{relative_file_path}"
29
31
  end
30
32
  end
31
33
 
@@ -1,3 +1,3 @@
1
1
  module Fishplate
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.0.6".freeze
3
3
  end
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.0.1
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-28 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: a9n
@@ -178,13 +178,47 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
- description:
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: sqlite3
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ description:
182
210
  email:
183
211
  - knapo@knapo.net
184
212
  executables: []
185
213
  extensions: []
186
214
  extra_rdoc_files: []
187
215
  files:
216
+ - ".dependabot/config.yml"
217
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
218
+ - ".github/ISSUE_TEMPLATE/config.yml"
219
+ - ".github/ISSUE_TEMPLATE/story.md"
220
+ - ".github/PULL_REQUEST_TEMPLATE.md"
221
+ - ".github/workflows/auto-approve.yml"
188
222
  - ".gitignore"
189
223
  - ".rspec"
190
224
  - ".travis.yml"
@@ -205,7 +239,7 @@ licenses:
205
239
  metadata:
206
240
  homepage_uri: https://github.com/RenoFi/fishplate
207
241
  source_code_uri: https://github.com/RenoFi/fishplate
208
- post_install_message:
242
+ post_install_message:
209
243
  rdoc_options: []
210
244
  require_paths:
211
245
  - lib
@@ -220,8 +254,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
254
  - !ruby/object:Gem::Version
221
255
  version: '0'
222
256
  requirements: []
223
- rubygems_version: 3.0.6
224
- signing_key:
257
+ rubygems_version: 3.1.2
258
+ signing_key:
225
259
  specification_version: 4
226
260
  summary: Fishplate is a library allowing running ActiveRecord without Railties.
227
261
  test_files: []