pronto-rails_migrations_annotated 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +20 -36
- data/lib/pronto/rails_migrations_annotated/version.rb +1 -1
- data/lib/pronto/rails_migrations_annotated.rb +11 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e35554920a786374696461d01c168c4ca1402367fac9a70a5b7773d0319fdaea
|
4
|
+
data.tar.gz: 58b72c0c38bd9c18c10d336ebb71da9571f6cb04e728ef4c1eabeddb7a321c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b895e654cf9b9b170d344093615014760d9fe377fedf8ccadf65c13817a5ce7fb7d9ea0a4d2e2ff9343e3ba366b53555614a6f36405ec1ff1f16ed652142d6
|
7
|
+
data.tar.gz: 86b29d8e6fc2783fdb70311d0613ce673db46af9f0934cbcb7ec321665f0651ccef4b673f0d059c043a2574ebe5d349be379b2d417aa6f04b8826d1f8bd1ef77
|
data/Gemfile.lock
CHANGED
@@ -1,49 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pronto-rails_migrations_annotated (0.0.
|
4
|
+
pronto-rails_migrations_annotated (0.0.5)
|
5
5
|
pronto (~> 0.11)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.8.
|
11
|
-
public_suffix (>= 2.0.2, <
|
10
|
+
addressable (2.8.1)
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
12
|
ast (2.4.2)
|
13
13
|
diff-lcs (1.4.4)
|
14
|
-
faraday (
|
15
|
-
faraday-
|
16
|
-
faraday-em_synchrony (~> 1.0)
|
17
|
-
faraday-excon (~> 1.1)
|
18
|
-
faraday-httpclient (~> 1.0.1)
|
19
|
-
faraday-net_http (~> 1.0)
|
20
|
-
faraday-net_http_persistent (~> 1.1)
|
21
|
-
faraday-patron (~> 1.0)
|
22
|
-
faraday-rack (~> 1.0)
|
23
|
-
multipart-post (>= 1.2, < 3)
|
14
|
+
faraday (2.5.2)
|
15
|
+
faraday-net_http (>= 2.0, < 3.1)
|
24
16
|
ruby2_keywords (>= 0.0.4)
|
25
|
-
faraday-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
faraday-net_http (1.0.1)
|
30
|
-
faraday-net_http_persistent (1.2.0)
|
31
|
-
faraday-patron (1.0.0)
|
32
|
-
faraday-rack (1.0.0)
|
33
|
-
gitlab (4.17.0)
|
34
|
-
httparty (~> 0.18)
|
35
|
-
terminal-table (~> 1.5, >= 1.5.1)
|
17
|
+
faraday-net_http (3.0.0)
|
18
|
+
gitlab (4.19.0)
|
19
|
+
httparty (~> 0.20)
|
20
|
+
terminal-table (>= 1.5.1)
|
36
21
|
httparty (0.20.0)
|
37
22
|
mime-types (~> 3.0)
|
38
23
|
multi_xml (>= 0.5.2)
|
39
24
|
mime-types (3.4.1)
|
40
25
|
mime-types-data (~> 3.2015)
|
41
|
-
mime-types-data (3.
|
26
|
+
mime-types-data (3.2022.0105)
|
42
27
|
multi_xml (0.6.0)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
28
|
+
octokit (4.25.1)
|
29
|
+
faraday (>= 1, < 3)
|
30
|
+
sawyer (~> 0.9)
|
47
31
|
parallel (1.21.0)
|
48
32
|
parser (3.0.2.0)
|
49
33
|
ast (~> 2.4.1)
|
@@ -55,7 +39,7 @@ GEM
|
|
55
39
|
rexml (~> 3.2)
|
56
40
|
rugged (>= 0.23.0, < 1.1.0)
|
57
41
|
thor (>= 0.20.3, < 2.0)
|
58
|
-
public_suffix (
|
42
|
+
public_suffix (5.0.0)
|
59
43
|
rainbow (3.0.0)
|
60
44
|
rake (13.0.6)
|
61
45
|
regexp_parser (2.1.1)
|
@@ -94,12 +78,12 @@ GEM
|
|
94
78
|
ruby-progressbar (1.11.0)
|
95
79
|
ruby2_keywords (0.0.5)
|
96
80
|
rugged (1.0.1)
|
97
|
-
sawyer (0.
|
81
|
+
sawyer (0.9.2)
|
98
82
|
addressable (>= 2.3.5)
|
99
|
-
faraday (
|
100
|
-
terminal-table (
|
101
|
-
unicode-display_width (
|
102
|
-
thor (1.1
|
83
|
+
faraday (>= 0.17.3, < 3)
|
84
|
+
terminal-table (3.0.2)
|
85
|
+
unicode-display_width (>= 1.1.1, < 3)
|
86
|
+
thor (1.2.1)
|
103
87
|
unicode-display_width (1.8.0)
|
104
88
|
|
105
89
|
PLATFORMS
|
@@ -115,4 +99,4 @@ DEPENDENCIES
|
|
115
99
|
rubocop-rspec
|
116
100
|
|
117
101
|
BUNDLED WITH
|
118
|
-
2.
|
102
|
+
2.3.10
|
@@ -97,7 +97,7 @@ module Pronto
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def check_structure_migration_version_numbers
|
100
|
-
return unless migration_patches.any?
|
100
|
+
# return unless migration_patches.any?
|
101
101
|
|
102
102
|
structure_file_name = "db/structure.sql"
|
103
103
|
return if !File.exist?(structure_file_name) || gitignored?(structure_file_name)
|
@@ -108,7 +108,7 @@ module Pronto
|
|
108
108
|
check_structure_versions_present(versions_from_schema)
|
109
109
|
check_structure_migration_missing
|
110
110
|
|
111
|
-
check_structure_versions_syntax(versions_from_schema)
|
111
|
+
check_structure_versions_syntax(versions_from_schema) if versions_from_schema.any?
|
112
112
|
check_structure_versions_sorted(versions_from_schema)
|
113
113
|
check_structure_ending(structure_file_lines)
|
114
114
|
end
|
@@ -129,14 +129,22 @@ module Pronto
|
|
129
129
|
|
130
130
|
def check_structure_migration_missing
|
131
131
|
structure_patches.each do |patch|
|
132
|
+
next if patch.delta.old_file[:oid] == "0000000000000000000000000000000000000000" # new structure.sql file
|
133
|
+
|
134
|
+
triggered = false
|
132
135
|
patch.added_lines.select { |line| line.content.match?(migration_line_regex) }.each do |line|
|
133
136
|
version = line.content.match(migration_line_regex)[:version]
|
134
137
|
next if migration_version_numbers.include?(version)
|
135
|
-
next if line.content.end_with?("
|
138
|
+
next if line.content.end_with?(",\n") &&
|
136
139
|
patch.deleted_lines.any? { |del| del.content.include?("#{version}');") }
|
137
140
|
|
141
|
+
triggered = true
|
138
142
|
add_message_at_patch(patch, "Migration #{version} is not present in this changeset", :error, line: line)
|
139
143
|
end
|
144
|
+
|
145
|
+
if !triggered && migration_version_numbers.none?
|
146
|
+
add_message_at_patch(patch, "structure.sql changed without migrations", :error, line: patch.lines.first)
|
147
|
+
end
|
140
148
|
end
|
141
149
|
end
|
142
150
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-rails_migrations_annotated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Fedoseyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
rubygems_version: 3.
|
67
|
+
rubygems_version: 3.1.6
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: Pronto runner to check rails migrations to be separate from other code, but
|