guard-rubybeautify 0.90.1 → 0.90.2

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: 2d62ceacb441d0b41d7794856247b838694448a0
4
- data.tar.gz: 6d482e3b5abb2e1b423a3e74d3cf45ddd3c9d7c2
3
+ metadata.gz: 62af43e75d4e3878dcfabfa121e7e956ee98db88
4
+ data.tar.gz: 4d0eaa65e82c99dac2290abb53b7e6dd561c90c9
5
5
  SHA512:
6
- metadata.gz: 2886e2ace088d8c678e32c4ba3702ff22e8b888484c000ce055f8131d8ab3284eaec01d7e79b1739c83c156a2b477c90450afa6656a2c0d175e064f3a2a34e57
7
- data.tar.gz: d9a5ca41bb48deb3d1989f6ab43ab01c9519770688bda95d49a1703d742b15a8358da2c4ace72263bd2b74b0ef27dfefdc94a21cb93c2c49b22188ef3dbfda70
6
+ metadata.gz: c0a35df6235cd00a48b059277e12d7e9cc481fb5f157ee1deb9aa101823ba589a86ecc811e2918f47c6578eaced16763535bbf0b8498e3d7b8dd7556f50983e4
7
+ data.tar.gz: 986cd6426650bc8f27c9d3232a54f58e9c97812ca00f42396448b315259d4e932df25ddbdf0f96f3b89f26163ff4f49fb7de7a27a4d8186c6291589fb7e94484
data/README.md CHANGED
@@ -47,6 +47,13 @@ This guard also comes with three options built in:
47
47
 
48
48
  To avoid this, set this to a period longer then a single modification runs. Since this has no global mode, you don't need to worry about what happens when you press `enter`. It will only impact open files that are saved.
49
49
 
50
+ An example with all the options.
51
+
52
+ ```ruby
53
+ guard :rubybeautify, count: 2, style: :spaces, grace_period: 1 do
54
+ watch(%r{lib/.+\.rb})
55
+ end
56
+ ```
50
57
  ## Development
51
58
 
52
59
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,2 +1,5 @@
1
+ # 0.90.2
2
+ - Added support for count/style, added more examples to the README.
3
+
1
4
  # 0.90.1
2
5
  - Moved towards a timer based method since guard threads and that cannot be blocked.
@@ -19,7 +19,7 @@ module Guard
19
19
  if @last_run + options[:grace_period] < Time.now.to_i
20
20
  paths.each do |file|
21
21
  Compat::UI.info "Ruby beautify executed against: #{Guard::Compat::UI.color file, :green}"
22
- `ruby-beautify #{file} --overwrite`
22
+ `ruby-beautify #{file} -c #{options[:count]} --#{options[:style].to_s}`
23
23
  end
24
24
  # make sure to set a real last run if we did a beautify.
25
25
  @last_run = Time.now.to_i
@@ -1,4 +1,13 @@
1
1
  # Add any file/pattern you want to have beautified beyond these.
2
2
  guard :rubybeautify do
3
3
  watch(%r{lib/.+\.rb})
4
+ watch('Gemfile')
5
+ watch('%r{.+.gemspec}')
4
6
  end
7
+
8
+ ### This is a more complete example including all the possible options.
9
+ # guard :rubybeautify, count: 2, style: :spaces, grace_period: 1 do
10
+ # watch(%r{lib/.+\.rb})
11
+ # watch('Gemfile')
12
+ # watch('%r{.+.gemspec}')
13
+ # end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RubybeautifyVersion
3
- VERSION = "0.90.1"
3
+ VERSION = "0.90.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rubybeautify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.90.1
4
+ version: 0.90.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Brodeur
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2015-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard-compat