good_migrations 0.2.0 → 0.2.1

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: 9dee0175ec6d3a50dfbf5b22591311fb571d718c5f7d5fa56ddaa3e07a95860a
4
- data.tar.gz: 0c483eb30524bbe3a426f197d40dbb7de049db96b8db30d7835ad97f36e23c86
3
+ metadata.gz: e08c6b787542e1a8881109c1f100e3e98c30a0da7ff9e05a53a1676f4526dd55
4
+ data.tar.gz: 07deb33dcb07c43abe3083081abaec2c3ffd7790b06032f07834a548e00eb0fc
5
5
  SHA512:
6
- metadata.gz: 91d8a48741dd67c0163e5ad85958f6f623be07d36273aa8df78d94cc55a419bd72498dfb34501b7ecbdfba931ce1a20e3ce16c85c84ddb2b2905e5850152a3a5
7
- data.tar.gz: 55774f660e0aa7b9671dbcf4d734a1266515e37718045ac561ac076d0c9f8ca8a722b0e1c03e88498f848e3db980a7821bef31c298f14bcece1d300b29484b2a
6
+ metadata.gz: 78ee5b98395010837864b20c06f111be13fd276620baf03283eb619028d4e8b585cf90d6e70804c0e32a189465910861aacba2572324181f6a789e126e3fc8f9
7
+ data.tar.gz: 3afeb8e60d5217df9a4b83069875c5ac52c106229909e1bbf4dccd84339f4911ee37d5c1900226323a2c28067c6a8f4a06e0695e2c5a70a250a3cd6c726eefcc
@@ -19,7 +19,7 @@ jobs:
19
19
  runs-on: ubuntu-latest
20
20
  strategy:
21
21
  matrix:
22
- ruby-version: ['2.7', '3.0']
22
+ ruby-version: ['2.5', '2.7', '3.0']
23
23
 
24
24
  steps:
25
25
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.1
4
+
5
+ * Fix Windows paths [#31](https://github.com/testdouble/good-migrations/pull/31)
6
+ by [@MaxLap](https://github.com/MaxLap)
7
+
3
8
  ## 0.2.0
4
9
 
5
10
  * Add `permit_autoloading_before` configuration
data/Gemfile.lock CHANGED
@@ -1,56 +1,55 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- good_migrations (0.2.0)
4
+ good_migrations (0.2.1)
5
5
  activerecord (>= 3.1)
6
6
  railties (>= 3.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (6.1.4.1)
12
- actionview (= 6.1.4.1)
13
- activesupport (= 6.1.4.1)
14
- rack (~> 2.0, >= 2.0.9)
11
+ actionpack (7.0.2.3)
12
+ actionview (= 7.0.2.3)
13
+ activesupport (= 7.0.2.3)
14
+ rack (~> 2.0, >= 2.2.0)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.1.4.1)
19
- activesupport (= 6.1.4.1)
18
+ actionview (7.0.2.3)
19
+ activesupport (= 7.0.2.3)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activemodel (6.1.4.1)
25
- activesupport (= 6.1.4.1)
26
- activerecord (6.1.4.1)
27
- activemodel (= 6.1.4.1)
28
- activesupport (= 6.1.4.1)
29
- activesupport (6.1.4.1)
24
+ activemodel (7.0.2.3)
25
+ activesupport (= 7.0.2.3)
26
+ activerecord (7.0.2.3)
27
+ activemodel (= 7.0.2.3)
28
+ activesupport (= 7.0.2.3)
29
+ activesupport (7.0.2.3)
30
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
31
31
  i18n (>= 1.6, < 2)
32
32
  minitest (>= 5.1)
33
33
  tzinfo (~> 2.0)
34
- zeitwerk (~> 2.3)
35
34
  ast (2.4.2)
36
35
  builder (3.2.4)
37
36
  coderay (1.1.3)
38
- concurrent-ruby (1.1.9)
37
+ concurrent-ruby (1.1.10)
39
38
  crass (1.0.6)
40
39
  erubi (1.10.0)
41
- i18n (1.8.11)
40
+ i18n (1.10.0)
42
41
  concurrent-ruby (~> 1.0)
43
- loofah (2.12.0)
42
+ loofah (2.16.0)
44
43
  crass (~> 1.0.2)
45
44
  nokogiri (>= 1.5.9)
46
45
  method_source (1.0.0)
47
- mini_portile2 (2.6.1)
48
- minitest (5.14.4)
49
- nokogiri (1.12.5)
50
- mini_portile2 (~> 2.6.1)
46
+ mini_portile2 (2.8.0)
47
+ minitest (5.15.0)
48
+ nokogiri (1.13.4)
49
+ mini_portile2 (~> 2.8.0)
51
50
  racc (~> 1.4)
52
- parallel (1.20.1)
53
- parser (3.0.1.1)
51
+ parallel (1.22.1)
52
+ parser (3.1.2.0)
54
53
  ast (~> 2.4.1)
55
54
  pry (0.14.1)
56
55
  coderay (~> 1.1)
@@ -64,39 +63,40 @@ GEM
64
63
  nokogiri (>= 1.6)
65
64
  rails-html-sanitizer (1.4.2)
66
65
  loofah (~> 2.3)
67
- railties (6.1.4.1)
68
- actionpack (= 6.1.4.1)
69
- activesupport (= 6.1.4.1)
66
+ railties (7.0.2.3)
67
+ actionpack (= 7.0.2.3)
68
+ activesupport (= 7.0.2.3)
70
69
  method_source
71
- rake (>= 0.13)
70
+ rake (>= 12.2)
72
71
  thor (~> 1.0)
73
- rainbow (3.0.0)
74
- rake (13.0.3)
75
- regexp_parser (2.1.1)
72
+ zeitwerk (~> 2.5)
73
+ rainbow (3.1.1)
74
+ rake (13.0.6)
75
+ regexp_parser (2.3.0)
76
76
  rexml (3.2.5)
77
- rubocop (1.17.0)
77
+ rubocop (1.27.0)
78
78
  parallel (~> 1.10)
79
- parser (>= 3.0.0.0)
79
+ parser (>= 3.1.0.0)
80
80
  rainbow (>= 2.2.2, < 4.0)
81
81
  regexp_parser (>= 1.8, < 3.0)
82
82
  rexml
83
- rubocop-ast (>= 1.7.0, < 2.0)
83
+ rubocop-ast (>= 1.16.0, < 2.0)
84
84
  ruby-progressbar (~> 1.7)
85
85
  unicode-display_width (>= 1.4.0, < 3.0)
86
- rubocop-ast (1.7.0)
87
- parser (>= 3.0.1.1)
88
- rubocop-performance (1.11.2)
86
+ rubocop-ast (1.17.0)
87
+ parser (>= 3.1.1.0)
88
+ rubocop-performance (1.13.3)
89
89
  rubocop (>= 1.7.0, < 2.0)
90
90
  rubocop-ast (>= 0.4.0)
91
91
  ruby-progressbar (1.11.0)
92
- standard (1.1.2)
93
- rubocop (= 1.17.0)
94
- rubocop-performance (= 1.11.2)
95
- thor (1.1.0)
92
+ standard (1.10.0)
93
+ rubocop (= 1.27.0)
94
+ rubocop-performance (= 1.13.3)
95
+ thor (1.2.1)
96
96
  tzinfo (2.0.4)
97
97
  concurrent-ruby (~> 1.0)
98
- unicode-display_width (2.0.0)
99
- zeitwerk (2.5.1)
98
+ unicode-display_width (2.1.0)
99
+ zeitwerk (2.5.4)
100
100
 
101
101
  PLATFORMS
102
102
  ruby
@@ -110,4 +110,4 @@ DEPENDENCIES
110
110
  standard
111
111
 
112
112
  BUNDLED WITH
113
- 2.2.30
113
+ 2.3.11
data/Rakefile CHANGED
@@ -8,4 +8,4 @@ Rake::TestTask.new(:test) do |t|
8
8
  t.test_files = FileList["test/**/*_test.rb"]
9
9
  end
10
10
 
11
- task default: ["standard:fix", :test]
11
+ task default: [:test, "standard:fix"]
@@ -8,7 +8,7 @@ Bundler.require(:default, Rails.env) if defined?(Bundler)
8
8
 
9
9
  module Example
10
10
  class Application < Rails::Application
11
- if config.respond_to?("eager_load=")
11
+ if config.respond_to?(:eager_load=)
12
12
  config.eager_load = false
13
13
  end
14
14
  # Settings in config/environments/* take precedence over those specified here.
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Referencing code in app/ from a database migration risks breaking the migration when your app code changes; this gem prevents that mistake"
13
13
  spec.homepage = "https://github.com/testdouble/good-migrations"
14
14
  spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.3.0"
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
18
  spec.bindir = "exe"
@@ -8,9 +8,10 @@ module GoodMigrations
8
8
  def self.currently_executing
9
9
  migrate_dir_path = Rails.root.join("db/migrate/").to_s
10
10
 
11
- loc = caller.detect { |loc| loc.start_with?(migrate_dir_path) }
12
- return if loc.nil?
13
- new(loc.partition(":").first)
11
+ if (loc = caller.detect { |loc| loc.start_with?(migrate_dir_path) })
12
+ line_number_index = loc.index(":", migrate_dir_path.size)
13
+ new(loc[0...line_number_index])
14
+ end
14
15
  end
15
16
 
16
17
  def associated_time
@@ -1,3 +1,3 @@
1
1
  module GoodMigrations
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-11-17 00:00:00.000000000 Z
12
+ date: 2022-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -206,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - ">="
208
208
  - !ruby/object:Gem::Version
209
- version: '0'
209
+ version: 2.3.0
210
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  requirements: []
216
- rubygems_version: 3.2.22
216
+ rubygems_version: 3.3.6
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Prevents Rails from auto-loading app code in database migrations