bookingsync-stylecheck 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 92819b73ba7f92a92dc9b29d735c496c168e0af1
4
- data.tar.gz: 43905010ecd2e7a59ea7b50f36afdae5d66bda82
3
+ metadata.gz: ea9831c75687676f1abbd6adc7eff3777789d811
4
+ data.tar.gz: ad16740e84dc1aca0d6d9ed4ce9278c24f9c5c83
5
5
  SHA512:
6
- metadata.gz: 7649320827883caf83b7330f06ac70d920c08956f2b44bae995c07006e8390289aabe248bf70a8f11402f5aae2baf1b8794a6dba6b9b59f90abee25335b3316a
7
- data.tar.gz: e5a2d69d10cd1fb1be1e2e99cdaebe7b5e27c78988e7bb0fd147e2de0b2c7d1ad207d4430a006bc3d162cb14bd4587672c8ba54147af7246834afd5a1447dce3
6
+ metadata.gz: 54c2563177c6f239a2040eca366298ca0d98b96f7724cdeb2d00a04ffbddbce4fdb4e2ea3a70ac8373a01885068a058d214c79d3c5be9c03fd2cb73d3ad3d66b
7
+ data.tar.gz: f8cc034d2cefe02c83d05f14831cf46d9ae4e45fb8a143478f3a0e21f2c86822fab9886cd0c3a7c77749b90078b8eadea2069385580c4926ee59019d61e82783
data/README.md CHANGED
@@ -6,6 +6,18 @@ This gem should streamline using of rubocop and potentially other automated styl
6
6
 
7
7
  Just add to gemfile and new rake task should be available
8
8
 
9
- * `bundle exec rake style`
9
+ # Tasks
10
+
11
+ ## Default
12
+
13
+ `bundle exec rake style`
10
14
 
11
15
  This for now just prepares a rubocop config and runs the rubocop check
16
+
17
+ ## Custom
18
+
19
+ The first argument will be concatenated to the commands that Rubocop receives.
20
+ The second argument, when set to true, makes the task always return with success.
21
+ For example:
22
+
23
+ `bundle exec rake style:rubocop:custom[--auto-correct app/controllers/application_controller.rb, true]`
data/config/rubocop.yml CHANGED
@@ -308,7 +308,7 @@ Style/SignalException:
308
308
  Enabled: false
309
309
 
310
310
  Style/SingleLineBlockParams:
311
- Enabled: true
311
+ Enabled: false
312
312
 
313
313
  Style/SingleLineMethods:
314
314
  Enabled: true
@@ -21,6 +21,18 @@ namespace :style do
21
21
  abort 'Fix code style errors' unless ok
22
22
  end
23
23
  end
24
+
25
+ desc "Run RuboCop using the BookingSync config and concatenate custom commands"
26
+ task :custom, [:command_string, :no_fail] do |t, args|
27
+ args[:no_fail] ||= false
28
+
29
+ options = ['--rails', '--fail-level', 'refactor']
30
+ options += ['-c', BookingSync::Stylecheck::RubocopHelpers.config]
31
+ options += [args[:command_string]]
32
+ sh "bundle exec rubocop #{options.join(' ')}" do |ok, res|
33
+ abort 'Fix code style errors' if !args[:no_fail] && !ok
34
+ end
35
+ end
24
36
  end
25
37
  end
26
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync-stylecheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Marciniak
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4'
41
41
  description: Wraps rubocop for simple and consisten experience
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.4.8
74
+ rubygems_version: 2.5.1
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Automatic style check for bookingsync projects