outrigger 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/outrigger/cops/migration/tagged.rb +13 -7
- data/lib/outrigger/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a63553d16f5a85d6d18cea29ea8a07f9d5f1f0a9
|
4
|
+
data.tar.gz: b3a9636b7851d488a152fbc9ed03dac3b9345b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407cc16bda5c6c9f80294b887c057529f514dd416397a512703fc33dcaba3fba31159b2c7256d6760a1f49a8dc39eb1509e34317c47b3e3cbc1f39e8850dffcc
|
7
|
+
data.tar.gz: 28dc388ab405ed7c03352577f21fa9e995fa35307701eb7fc46a922f69e4d28062934c9aa5be08154a3977c8afc7985e91f60fcfca8c4e703983d5f803715751
|
@@ -13,14 +13,14 @@ module RuboCop
|
|
13
13
|
def_node_matcher :migration_class?, <<~PATTERN
|
14
14
|
{
|
15
15
|
(class
|
16
|
-
(const nil _)
|
16
|
+
(const nil? _)
|
17
17
|
(const
|
18
|
-
(const nil :ActiveRecord) :Migration) ...)
|
18
|
+
(const nil? :ActiveRecord) :Migration) ...)
|
19
19
|
(class
|
20
|
-
(const nil _)
|
20
|
+
(const nil? _)
|
21
21
|
(send
|
22
22
|
(const
|
23
|
-
(const nil :ActiveRecord) :Migration) :[] _) ...)
|
23
|
+
(const nil? :ActiveRecord) :Migration) :[] _) ...)
|
24
24
|
}
|
25
25
|
PATTERN
|
26
26
|
|
@@ -28,12 +28,18 @@ module RuboCop
|
|
28
28
|
tag = tag_node(node)
|
29
29
|
|
30
30
|
if allowed_tags.empty?
|
31
|
-
add_offense(tag,
|
31
|
+
add_offense(tag,
|
32
|
+
location: :expression,
|
33
|
+
message: 'No allowed tags have been defined in the RuboCop configuration.')
|
32
34
|
elsif tag
|
33
35
|
return if allowed_tags.include? tag.children.last.to_a.last
|
34
|
-
add_offense(tag,
|
36
|
+
add_offense(tag,
|
37
|
+
location: :expression,
|
38
|
+
message: "Tags may only be one of #{allowed_tags}.")
|
35
39
|
else
|
36
|
-
add_offense(klass,
|
40
|
+
add_offense(klass,
|
41
|
+
location: :expression,
|
42
|
+
message: "All migrations require a tag from #{allowed_tags}.")
|
37
43
|
end
|
38
44
|
end
|
39
45
|
|
data/lib/outrigger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outrigger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Drew Bowman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -98,14 +98,14 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.
|
101
|
+
version: 0.52.0
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 0.
|
108
|
+
version: 0.52.0
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: simplecov
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.6.
|
167
|
+
rubygems_version: 2.6.14.1
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Tag migrations and run them separately
|