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 +4 -4
- data/README.md +7 -0
- data/WHATSNEW.md +3 -0
- data/lib/guard/rubybeautify.rb +1 -1
- data/lib/guard/rubybeautify/templates/Guardfile +9 -0
- data/lib/guard/rubybeautify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62af43e75d4e3878dcfabfa121e7e956ee98db88
|
4
|
+
data.tar.gz: 4d0eaa65e82c99dac2290abb53b7e6dd561c90c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/WHATSNEW.md
CHANGED
data/lib/guard/rubybeautify.rb
CHANGED
@@ -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}
|
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
|
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.
|
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-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-compat
|