good_migrations 0.2.0 → 0.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/.github/workflows/ruby.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +43 -43
- data/Rakefile +1 -1
- data/example/config/application.rb +1 -1
- data/good_migrations.gemspec +1 -0
- data/lib/good_migrations/migration_details.rb +4 -3
- data/lib/good_migrations/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e08c6b787542e1a8881109c1f100e3e98c30a0da7ff9e05a53a1676f4526dd55
|
|
4
|
+
data.tar.gz: 07deb33dcb07c43abe3083081abaec2c3ffd7790b06032f07834a548e00eb0fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78ee5b98395010837864b20c06f111be13fd276620baf03283eb619028d4e8b585cf90d6e70804c0e32a189465910861aacba2572324181f6a789e126e3fc8f9
|
|
7
|
+
data.tar.gz: 3afeb8e60d5217df9a4b83069875c5ac52c106229909e1bbf4dccd84339f4911ee37d5c1900226323a2c28067c6a8f4a06e0695e2c5a70a250a3cd6c726eefcc
|
data/.github/workflows/ruby.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
good_migrations (0.2.
|
|
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 (
|
|
12
|
-
actionview (=
|
|
13
|
-
activesupport (=
|
|
14
|
-
rack (~> 2.0, >= 2.0
|
|
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 (
|
|
19
|
-
activesupport (=
|
|
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 (
|
|
25
|
-
activesupport (=
|
|
26
|
-
activerecord (
|
|
27
|
-
activemodel (=
|
|
28
|
-
activesupport (=
|
|
29
|
-
activesupport (
|
|
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.
|
|
37
|
+
concurrent-ruby (1.1.10)
|
|
39
38
|
crass (1.0.6)
|
|
40
39
|
erubi (1.10.0)
|
|
41
|
-
i18n (1.
|
|
40
|
+
i18n (1.10.0)
|
|
42
41
|
concurrent-ruby (~> 1.0)
|
|
43
|
-
loofah (2.
|
|
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.
|
|
48
|
-
minitest (5.
|
|
49
|
-
nokogiri (1.
|
|
50
|
-
mini_portile2 (~> 2.
|
|
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.
|
|
53
|
-
parser (3.
|
|
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 (
|
|
68
|
-
actionpack (=
|
|
69
|
-
activesupport (=
|
|
66
|
+
railties (7.0.2.3)
|
|
67
|
+
actionpack (= 7.0.2.3)
|
|
68
|
+
activesupport (= 7.0.2.3)
|
|
70
69
|
method_source
|
|
71
|
-
rake (>=
|
|
70
|
+
rake (>= 12.2)
|
|
72
71
|
thor (~> 1.0)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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.
|
|
77
|
+
rubocop (1.27.0)
|
|
78
78
|
parallel (~> 1.10)
|
|
79
|
-
parser (>= 3.
|
|
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.
|
|
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.
|
|
87
|
-
parser (>= 3.
|
|
88
|
-
rubocop-performance (1.
|
|
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.
|
|
93
|
-
rubocop (= 1.
|
|
94
|
-
rubocop-performance (= 1.
|
|
95
|
-
thor (1.1
|
|
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.
|
|
99
|
-
zeitwerk (2.5.
|
|
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.
|
|
113
|
+
2.3.11
|
data/Rakefile
CHANGED
|
@@ -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?(
|
|
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.
|
data/good_migrations.gemspec
CHANGED
|
@@ -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
|
-
|
|
13
|
-
|
|
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
|
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.
|
|
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:
|
|
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:
|
|
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.
|
|
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
|