fix-db-schema-conflicts 3.0.3 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d333bf66122bebe3e479e9799bbefe7731181244f3877b29c15efa70dfdab5dd
4
- data.tar.gz: f94f107c5bac325dd24b50bcd78496bac9c4bfb0fb697e16a5fe945af36e25ac
3
+ metadata.gz: 33306ece42a5e78ae3f2fb97a437e41e940cdc7ebfc92936925f31e858d76b44
4
+ data.tar.gz: 897316e1cd4a0cd468cd81d9f517ad4ed24fcda62056bc977feb966e9a35e923
5
5
  SHA512:
6
- metadata.gz: d3dbbc8e064c1db6a7c14846b813ce2b60b4955c35f62af6ca9b4b67d0d28536bd93d8f5e97d2a1ec405697f874d4bdccd0757bdf7b5b280e06efb8661eb5100
7
- data.tar.gz: 0330e6fd3a1dac530b2eaab637b2a6bd5affc952711c43813e5266520aca72f693e8d0da41103d4354ad083b82286c45c5d1f314cebe36f0c24f6447e92eb78b
6
+ metadata.gz: c9a767548f197e89836187becd8211aff34a78312a81e8cf98fd0d60c43e8505474eb1e116f62682eae0cc520c189e1c549cb85534934c15d11f527915c8ced9
7
+ data.tar.gz: 7d8668f28334b218aefc3cd1e3ccff42e82687cbe6ccc88a0dd470d60ec597ad632673f85512eebb71606b23ed2095125b39947b607947d9cf0e70976aff616a
@@ -0,0 +1,22 @@
1
+ name: Run rspec
2
+ on:
3
+ push:
4
+ pull_request:
5
+ branches: [ master ]
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-18.04
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [ 2.4, 2.5, 2.6 ]
13
+ name: rspec with ruby ${{ matrix.ruby }}
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ bundler-cache: true
20
+ bundler: 1
21
+
22
+ - run: bundle exec rspec
@@ -0,0 +1,41 @@
1
+ # Configuration for Rubocop >= 0.77.0
2
+
3
+ Layout/ExtraSpacing:
4
+ # When true, allows most uses of extra spacing if the intent is to align
5
+ # things with the previous or next line, not counting empty lines or comment
6
+ # lines.
7
+ AllowForAlignment: false
8
+
9
+ Layout/HashAlignment:
10
+ EnforcedColonStyle: 'key'
11
+ EnforcedHashRocketStyle: 'key'
12
+
13
+ Layout/LineLength:
14
+ Enabled: false
15
+
16
+ Layout/SpaceBeforeFirstArg:
17
+ Enabled: true
18
+
19
+ Style/NumericLiterals:
20
+ Enabled: false
21
+
22
+ Metrics/BlockNesting:
23
+ Max: 2
24
+
25
+ Style/WordArray:
26
+ Enabled: false
27
+
28
+ Style/TrailingCommaInArrayLiteral:
29
+ EnforcedStyleForMultiline: 'comma'
30
+
31
+ Style/TrailingCommaInHashLiteral:
32
+ EnforcedStyleForMultiline: 'comma'
33
+
34
+ Style/TrailingCommaInArguments:
35
+ EnforcedStyleForMultiline: 'comma'
36
+
37
+ Style/HashSyntax:
38
+ EnforcedStyle: 'ruby19'
39
+
40
+ Style/StringLiterals:
41
+ EnforcedStyle: double_quotes
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://travis-ci.org/jakeonrails/fix-db-schema-conflicts.svg?branch=master)](https://travis-ci.org/jakeonrails/fix-db-schema-conflicts)
2
-
3
1
  # fix-db-schema-conflicts
4
2
 
5
3
  It prevents db/schema.rb conflicts in your Rails projects when working with
@@ -37,7 +35,7 @@ auto-correct flag to ensure a consistent output format.
37
35
  ## Usage
38
36
 
39
37
  You don't have to do anything different. It should just work. Simply run `rake
40
- db:migrate` or `rake db:schema:dump` as you would before and
38
+ db:migrate` or `rake db:schema:dump` as you would before and
41
39
  `fix-db-schema-conflicts` will do the rest.
42
40
 
43
41
  ## Installation
@@ -54,7 +52,7 @@ And then execute:
54
52
 
55
53
  ## Older versions of Rubocop:
56
54
 
57
- If you wish to use a version of Rubocop `< 0.36.0` or below, use
55
+ If you wish to use a version of Rubocop `< 0.36.0` or below, use
58
56
  `gem 'fix-db-schema-conflicts', '~> 1.0.2'`
59
57
 
60
58
  ## Older versions of Ruby:
@@ -82,8 +80,16 @@ old Ruby.
82
80
  - [@claytron](https://github.com/claytron)
83
81
  - [@amckinnell](https://github.com/amckinnell)
84
82
  - [@rosscooperman](https://github.com/rosscooperman)
83
+ - [@cabello](https://github.com/cabello)
84
+ - [@justisb](https://github.com/justisb)
85
+ - [@sg650](https://github.com/sg650)
85
86
 
86
87
  ## Releases
88
+ - 3.1.1
89
+ - Use modern autocorrect flag for rubocop >= 1.30 (sg650)
90
+ - 3.1.0
91
+ - Added support for ruby 3 (cabello)
92
+ - Added support for new Rubocop 0.77+ schema (justisb)
87
93
  - 3.0.3
88
94
  - Added support for new Rubocop 0.53+ schema (rosscooperman)
89
95
  - 3.0.2
@@ -98,7 +104,7 @@ old Ruby.
98
104
  - 2.0.0
99
105
  - Allow usage of Rubocop >= 0.38.0
100
106
  - Remove Rails 5 deprecation warnings for using alias_method_chain
101
- - This upgrade breaks compatibility with Ruby 1.9x since 1.9x lacks #prepend
107
+ - This upgrade breaks compatibility with Ruby 1.9x since 1.9x lacks #prepend
102
108
  - 1.2.2
103
109
  - Remove dependency on sed
104
110
  - 1.2.1
@@ -18,13 +18,13 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency 'bundler', '~> 1.6'
22
- spec.add_development_dependency 'rake', '~> 11.2.0'
21
+ spec.add_development_dependency 'bundler'
22
+ spec.add_development_dependency 'rake'
23
23
  spec.add_development_dependency 'rspec', '~>3.4.0'
24
24
  spec.add_development_dependency 'rails', '~> 4.2.0'
25
25
  spec.add_development_dependency 'sqlite3', '~> 1.3.0'
26
26
 
27
27
  spec.add_dependency 'rubocop', '>= 0.38.0'
28
28
 
29
- spec.required_ruby_version = '~> 2.0'
29
+ spec.required_ruby_version = '>= 2.0.0', '< 4'
30
30
  end
@@ -9,8 +9,10 @@ module FixDBSchemaConflicts
9
9
  '.rubocop_schema.yml'
10
10
  elsif less_than_rubocop?(53)
11
11
  '.rubocop_schema.49.yml'
12
- else
12
+ elsif less_than_rubocop?(77)
13
13
  '.rubocop_schema.53.yml'
14
+ else
15
+ '.rubocop_schema.77.yml'
14
16
  end
15
17
  end
16
18
 
@@ -13,7 +13,13 @@ namespace :db do
13
13
  end
14
14
  autocorrect_config = FixDBSchemaConflicts::AutocorrectConfiguration.load
15
15
  rubocop_yml = File.expand_path("../../../../#{autocorrect_config}", __FILE__)
16
- `bundle exec rubocop --auto-correct --config #{rubocop_yml} #{filename.shellescape}`
16
+ auto_correct_arg = if Gem.loaded_specs['rubocop'].version >= Gem::Version.new('1.30')
17
+ 'autocorrect'
18
+ else
19
+ 'auto-correct'
20
+ end
21
+
22
+ `bundle exec rubocop --#{auto_correct_arg} --config #{rubocop_yml} #{filename.shellescape}`
17
23
  end
18
24
  end
19
25
  end
@@ -1,3 +1,3 @@
1
1
  module FixDBSchemaConflicts
2
- VERSION='3.0.3'
2
+ VERSION='3.1.1'
3
3
  end
File without changes
@@ -22,6 +22,12 @@ RSpec.describe FixDBSchemaConflicts::AutocorrectConfiguration do
22
22
  expect(autocorrect_config.load).to eq('.rubocop_schema.53.yml')
23
23
  end
24
24
 
25
+ it 'for versions 0.77.0 and above' do
26
+ installed_rubocop(version: '0.77.0')
27
+
28
+ expect(autocorrect_config.load).to eq('.rubocop_schema.77.yml')
29
+ end
30
+
25
31
  def installed_rubocop(version:)
26
32
  allow(Gem).to receive_message_chain(:loaded_specs, :[], :version)
27
33
  .and_return(Gem::Version.new(version))
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix-db-schema-conflicts
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Moffatt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 11.2.0
33
+ version: '0'
34
34
  type: :development
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: 11.2.0
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -102,12 +102,13 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".github/workflows/rspec.yml"
105
106
  - ".gitignore"
106
107
  - ".rspec"
107
108
  - ".rubocop_schema.49.yml"
108
109
  - ".rubocop_schema.53.yml"
110
+ - ".rubocop_schema.77.yml"
109
111
  - ".rubocop_schema.yml"
110
- - ".travis.yml"
111
112
  - Gemfile
112
113
  - LICENSE.txt
113
114
  - README.md
@@ -126,6 +127,7 @@ files:
126
127
  - spec/test-app/Gemfile.lock
127
128
  - spec/test-app/README.rdoc
128
129
  - spec/test-app/Rakefile
130
+ - spec/test-app/app/assets/config/manifest.js
129
131
  - spec/test-app/app/assets/images/.keep
130
132
  - spec/test-app/app/assets/javascripts/application.js
131
133
  - spec/test-app/app/assets/stylesheets/application.css
@@ -192,24 +194,26 @@ homepage: https://github.com/jakeonrails/fix-db-schema-conflicts
192
194
  licenses:
193
195
  - MIT
194
196
  metadata: {}
195
- post_install_message:
197
+ post_install_message:
196
198
  rdoc_options: []
197
199
  require_paths:
198
200
  - lib
199
201
  required_ruby_version: !ruby/object:Gem::Requirement
200
202
  requirements:
201
- - - "~>"
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: 2.0.0
206
+ - - "<"
202
207
  - !ruby/object:Gem::Version
203
- version: '2.0'
208
+ version: '4'
204
209
  required_rubygems_version: !ruby/object:Gem::Requirement
205
210
  requirements:
206
211
  - - ">="
207
212
  - !ruby/object:Gem::Version
208
213
  version: '0'
209
214
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.7.8
212
- signing_key:
215
+ rubygems_version: 3.0.9
216
+ signing_key:
213
217
  specification_version: 4
214
218
  summary: Helps prevent unneeded db/schema.rb conflicts
215
219
  test_files:
@@ -220,6 +224,7 @@ test_files:
220
224
  - spec/test-app/Gemfile.lock
221
225
  - spec/test-app/README.rdoc
222
226
  - spec/test-app/Rakefile
227
+ - spec/test-app/app/assets/config/manifest.js
223
228
  - spec/test-app/app/assets/images/.keep
224
229
  - spec/test-app/app/assets/javascripts/application.js
225
230
  - spec/test-app/app/assets/stylesheets/application.css
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.2.0"
4
- - "2.3.0"
5
- - "2.4.0"