guard-standardrb 0.1.1 → 0.2.0b

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03ab395c9a951dbb9ef428667cdc0464bd46565688422d6d4068acd8664da705
4
- data.tar.gz: 91fc5b06daabf12f370687611fafe5b5918173c9637a417d3749ea762a07f8b7
3
+ metadata.gz: d093365f48f1ffdca857ed25348dc652a4603b02f94ebc651fc800d62d9284ea
4
+ data.tar.gz: 75eee534aeed90234a9698efd40ec9c12a0a85e6e1a9ef58ee8fdc535e8336a9
5
5
  SHA512:
6
- metadata.gz: d24e1f6e15fc5d6e8472e90e14862ad4b164dcf0d36b2eb9c3512c87255489aa1a2c6c788aad763e58635b80c261244ddeb834fd7b1606442a720fc5e71948ce
7
- data.tar.gz: 8a9d9b13968634f7894afa9bda2f65daae632b6bea4aa350d1e1d1a2b6c066c85466ce3ebc43becb62b669ee78b90e04d12804a8332451627c248a7b2e929843
6
+ metadata.gz: 9b9a885f459b0e49a039d087bc05133af98dc8ca63ad07edd8ea789c3fd4b8da61948725cf308d919abffa1a8e01e1917801d701c279dfc68d23fbf189a13fae
7
+ data.tar.gz: 8cfbbce71a7891f200c44b866f6958c1732de718546240bc12b4eb4866e72e8f9d1aa6bfb21f8e2b49eb5819786bd50e7f4a0c5ebfabf9713dec700a6e464e25
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- guard-standardrb (0.1.0)
4
+ guard-standardrb (0.2.0)
5
5
  guard (>= 2.0.0)
6
6
  guard-compat (~> 1.0)
7
7
  standardrb
@@ -10,6 +10,7 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ast (2.4.1)
13
+ byebug (11.1.3)
13
14
  coderay (1.1.3)
14
15
  diff-lcs (1.3)
15
16
  ffi (1.13.1)
@@ -27,18 +28,21 @@ GEM
27
28
  listen (3.2.1)
28
29
  rb-fsevent (~> 0.10, >= 0.10.3)
29
30
  rb-inotify (~> 0.9, >= 0.9.10)
30
- lumberjack (1.2.5)
31
+ lumberjack (1.2.8)
31
32
  method_source (1.0.0)
32
33
  nenv (0.3.0)
33
34
  notiffany (0.1.3)
34
35
  nenv (~> 0.1)
35
36
  shellany (~> 0.0)
36
37
  parallel (1.19.2)
37
- parser (2.7.1.3)
38
- ast (~> 2.4.0)
38
+ parser (2.7.1.4)
39
+ ast (~> 2.4.1)
39
40
  pry (0.13.1)
40
41
  coderay (~> 1.1)
41
42
  method_source (~> 1.0)
43
+ pry-byebug (3.9.0)
44
+ byebug (~> 11.0)
45
+ pry (~> 0.13.0)
42
46
  rainbow (3.0.0)
43
47
  rake (13.0.1)
44
48
  rb-fsevent (0.10.4)
@@ -59,24 +63,25 @@ GEM
59
63
  diff-lcs (>= 1.2.0, < 2.0)
60
64
  rspec-support (~> 3.9.0)
61
65
  rspec-support (3.9.2)
62
- rubocop (0.85.1)
66
+ rubocop (0.91.0)
63
67
  parallel (~> 1.10)
64
- parser (>= 2.7.0.1)
68
+ parser (>= 2.7.1.1)
65
69
  rainbow (>= 2.2.2, < 4.0)
66
70
  regexp_parser (>= 1.7)
67
71
  rexml
68
- rubocop-ast (>= 0.0.3)
72
+ rubocop-ast (>= 0.4.0, < 1.0)
69
73
  ruby-progressbar (~> 1.7)
70
74
  unicode-display_width (>= 1.4.0, < 2.0)
71
- rubocop-ast (0.0.3)
72
- parser (>= 2.7.0.1)
73
- rubocop-performance (1.6.1)
74
- rubocop (>= 0.71.0)
75
+ rubocop-ast (0.4.2)
76
+ parser (>= 2.7.1.4)
77
+ rubocop-performance (1.8.1)
78
+ rubocop (>= 0.87.0)
79
+ rubocop-ast (>= 0.4.0)
75
80
  ruby-progressbar (1.10.1)
76
81
  shellany (0.0.1)
77
- standard (0.4.7)
78
- rubocop (~> 0.85.0)
79
- rubocop-performance (~> 1.6.0)
82
+ standard (0.6.1)
83
+ rubocop (~> 0.90)
84
+ rubocop-performance (~> 1.8.0)
80
85
  standardrb (1.0.0)
81
86
  standard
82
87
  thor (1.0.1)
@@ -87,6 +92,7 @@ PLATFORMS
87
92
 
88
93
  DEPENDENCIES
89
94
  guard-standardrb!
95
+ pry-byebug
90
96
  rake
91
97
  rspec (~> 3.1)
92
98
 
data/README.md CHANGED
@@ -4,7 +4,7 @@ Welcome to the new guard plugin `guard-standardrb`!
4
4
  This guard is bases on the gem `standardrb`, you can find more information about it https://github.com/testdouble/standard
5
5
 
6
6
  StandardRB is essentially a wrapper on top of RuboCop, but enforce code convention without much configuration possible.
7
- This plugin will run with your guard while you modify your code and output any code conventions erros
7
+ This plugin will run with your guard while you modify your code and output any code conventions errors in the terminal.
8
8
 
9
9
  More Information about StandardRb:
10
10
  The beauty of Ruby Standard Style is that it's simple. No one wants to maintain multiple hundred-line style configuration files for every module/project they work on. Enough of this madness!
@@ -42,6 +42,21 @@ Once you installed the gem on your repo and initialized it to be added to your G
42
42
  just run `bundle exec guard` and you should see a line `Standardrb initialized`.
43
43
  This means that the guard will run on all files that will be modified by that point in time and output the erros.
44
44
 
45
+ Please read [Guard usage doc](https://github.com/guard/guard#readme).
46
+
47
+ ## Add the argument fix
48
+
49
+ with the release of the version `0.2.0` the gem gets the possibility to auto fix standardrb errors that could be easily fixed.
50
+ you can choose to activate or disable it.
51
+
52
+ After the initilisation of the guard, jump into the GuardFile and you can modify the argument fix to be `true` or `false`
53
+
54
+ ```
55
+ guard :standardrb fix: false do
56
+ ...
57
+ end
58
+ ```
59
+
45
60
  ## Development
46
61
 
47
62
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -60,3 +75,11 @@ The gem is available as open source under the terms of the [MIT License](https:/
60
75
  ## Code of Conduct
61
76
 
62
77
  Everyone interacting in the Guard::Standardrb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/guard-standardrb/blob/master/CODE_OF_CONDUCT.md).
78
+
79
+ ### Author
80
+
81
+ [Jody Vandenschrick](https://github.com/JodyVanden) ([@jodyvanden](https://twitter.com/jodyvanden))
82
+
83
+ ### Contributors
84
+
85
+ [https://github.com/JodyVanden/guard-standardrb/graphs/contributors](https://github.com/JodyVanden/guard-standardrb/graphs/contributors)
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'guard', '>= 2.0.0'
22
22
  spec.add_dependency 'guard-compat', '~> 1.0'
23
23
  spec.add_dependency 'standardrb'
24
-
24
+
25
25
  spec.add_development_dependency 'rake'
26
26
  spec.add_development_dependency 'rspec', '~> 3.1'
27
-
27
+ spec.add_development_dependency 'pry-byebug'
28
28
 
29
29
  # Specify which files should be added to the gem when it is released.
30
30
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -4,13 +4,16 @@ require "guard/standardrb/version"
4
4
 
5
5
  module Guard
6
6
  class Standardrb < Plugin
7
- def initialize(options = {})
7
+ attr_reader :fix
8
+
9
+ def initialize(opts = {})
8
10
  super
9
- @options = options
11
+ @fix = opts[:fix]
10
12
  end
11
13
 
12
14
  def start
13
15
  Guard::Compat::UI.info "Inspecting Ruby code style of all files with standardrb"
16
+ Guard::Compat::UI.info "Standardrb --fix = #{fix}"
14
17
  end
15
18
 
16
19
  def run_on_modifications(res)
@@ -21,9 +24,11 @@ module Guard
21
24
  end
22
25
 
23
26
  def inspect_with_standardrb(paths = [])
24
- paths.each do |path|
25
- system("bundle exec standardrb #{path}")
26
- end
27
+ args = ["bundle", "exec", "standardrb"]
28
+ args << "--fix" if fix
29
+
30
+ args += paths
31
+ system(*args)
27
32
  end
28
33
  end
29
34
  end
@@ -1,7 +1,12 @@
1
- # Add files and commands to this file, like the example:
2
- # watch(%r{file/path}) { `command(s)` }
3
- #
4
- guard :standardrb do
1
+ # You can choose to pass an option to the guard-standardrb plugin
2
+ # to fix easy issues
3
+
4
+ # guard :standardrb fix: true do
5
+ # UI.info 'StandardRb is initialized'
6
+ # watch(/.+\.rb$/)
7
+ # end
8
+
9
+ guard :standardrb fix: false do
5
10
  UI.info 'StandardRb is initialized'
6
11
  watch(/.+\.rb$/)
7
12
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module StandardrbVersion
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.2.0b".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-standardrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0b
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jody Vandenschrick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-05 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description:
84
98
  email:
85
99
  - jody.vanden@gmail.com
@@ -121,9 +135,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
135
  version: '0'
122
136
  required_rubygems_version: !ruby/object:Gem::Requirement
123
137
  requirements:
124
- - - ">="
138
+ - - ">"
125
139
  - !ruby/object:Gem::Version
126
- version: '0'
140
+ version: 1.3.1
127
141
  requirements: []
128
142
  rubygems_version: 3.0.3
129
143
  signing_key: