ducalis 0.5.9 → 0.5.10
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/DOCUMENTATION.md +4 -2
- data/Gemfile.lock +1 -1
- data/lib/ducalis/cops/possible_tap.rb +2 -1
- data/lib/ducalis/cops/rest_only_cop.rb +5 -1
- data/lib/ducalis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '04397f76396f26b3580241dec8c514e605122819'
|
|
4
|
+
data.tar.gz: dca5ae9744fdc0d42f5e590d87898802668f1f25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0982cd88ca55631580c818f5447ae185eb4b43977ae8b1ad395782c944e412548c814406176b6816b35f0260a214b3b50932c2c85b166e3ed4bad583aed30097'
|
|
7
|
+
data.tar.gz: 9cea3e6216bc80ef22458c066548dcfb42531c73d95fadab116bcd8395c25be746c13e04565983451a08c491634b69533913b70c832e7154464ee1134a8dbe55
|
data/DOCUMENTATION.md
CHANGED
|
@@ -395,7 +395,8 @@ end
|
|
|
395
395
|
Consider of using `.tap`, default ruby
|
|
396
396
|
[method](<https://apidock.com/ruby/Object/tap>)
|
|
397
397
|
which allows to replace intermediate variables with block, by this you
|
|
398
|
-
are limiting scope pollution and make scope more clear.
|
|
398
|
+
are limiting scope pollution and make method scope more clear. If it isn't
|
|
399
|
+
possible, consider of moving it to method or even inline it.
|
|
399
400
|
[Related article](<http://seejohncode.com/2012/01/02/ruby-tap-that/>).
|
|
400
401
|
|
|
401
402
|
 raises for methods with scope variable return
|
|
@@ -698,7 +699,8 @@ puts "hi" if name =~ /.{#{name.length}}/
|
|
|
698
699
|
## Ducalis::RestOnlyCop
|
|
699
700
|
|
|
700
701
|
It's better for controllers to stay adherent to REST:
|
|
701
|
-
http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers
|
|
702
|
+
http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers/.
|
|
703
|
+
[About RESTful architecture](<https://confreaks.tv/videos/railsconf2017-in-relentless-pursuit-of-rest>)
|
|
702
704
|
|
|
703
705
|
 raises for controllers with non-REST methods
|
|
704
706
|
```ruby
|
data/Gemfile.lock
CHANGED
|
@@ -8,7 +8,8 @@ module Ducalis
|
|
|
8
8
|
| Consider of using `.tap`, default ruby
|
|
9
9
|
| [method](<https://apidock.com/ruby/Object/tap>)
|
|
10
10
|
| which allows to replace intermediate variables with block, by this you
|
|
11
|
-
| are limiting scope pollution and make scope more clear.
|
|
11
|
+
| are limiting scope pollution and make method scope more clear. If it isn't
|
|
12
|
+
| possible, consider of moving it to method or even inline it.
|
|
12
13
|
| [Related article](<http://seejohncode.com/2012/01/02/ruby-tap-that/>).
|
|
13
14
|
MESSAGE
|
|
14
15
|
|
|
@@ -7,7 +7,11 @@ module Ducalis
|
|
|
7
7
|
include RuboCop::Cop::DefNode
|
|
8
8
|
OFFENSE = <<-MESSAGE.gsub(/^ +\|/, '').strip
|
|
9
9
|
| It's better for controllers to stay adherent to REST:
|
|
10
|
-
| http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers
|
|
10
|
+
| http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers/.
|
|
11
|
+
MESSAGE
|
|
12
|
+
|
|
13
|
+
DETAILS = <<-MESSAGE.gsub(/^ +\|/, '').strip
|
|
14
|
+
| [About RESTful architecture](<https://confreaks.tv/videos/railsconf2017-in-relentless-pursuit-of-rest>)
|
|
11
15
|
MESSAGE
|
|
12
16
|
|
|
13
17
|
WHITELIST = %i(index show new edit create update destroy).freeze
|
data/lib/ducalis/version.rb
CHANGED