rufo 0.8.0 → 0.8.1
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/CHANGELOG.md +10 -0
- data/docs/settings.md +14 -4
- data/exe/rufo +1 -1
- data/lib/rufo/file_finder.rb +12 -5
- data/lib/rufo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8e977df730572c1448155a1bc4e3fd358a1abcdadf78c18700874e75e9c54aa
|
4
|
+
data.tar.gz: 07a074f0137daf3c957dd2d6646efb72281b062b93a7df7b1981b3fdcdd3ca79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32de1903e674e7a21f34b0e092d2fd4af9fa9db9f4570611b9e50bb7ec1ba031df7b940dbc9797855688d3a6956dfa2830a0251bf4ec7296b6f4a7b5117ad5fd
|
7
|
+
data.tar.gz: 9592effea9978267ab0dc2d641b8e033a7a4156723a68e0aaf2b1742f69b768329a6a8d4824fcd0fdaf1ed342279f59a1cb2e15c13514045d350ddbfcbce6060
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
12
12
|
|
13
13
|
### Added
|
14
14
|
|
15
|
+
## [0.8.1] - 2020-01-02
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
- Formatting a folder. For example `rufo lib` was not working.
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
### Added
|
23
|
+
- Documentation for `includes` and `excludes` configuration options.
|
24
|
+
|
15
25
|
## [0.8.0] - 2020-01-02
|
16
26
|
|
17
27
|
### Fixed
|
data/docs/settings.md
CHANGED
@@ -10,9 +10,9 @@ trailing_commas false
|
|
10
10
|
parens_in_def :dynamic
|
11
11
|
```
|
12
12
|
|
13
|
-
##
|
13
|
+
## Style settings are going away! :warning:
|
14
14
|
|
15
|
-
|
15
|
+
Style related settings described below may/will be removed from future versions of rufo :skull:
|
16
16
|
|
17
17
|
See https://github.com/ruby-formatter/rufo/issues/2 for more context!
|
18
18
|
|
@@ -23,6 +23,7 @@ See https://github.com/ruby-formatter/rufo/issues/2 for more context!
|
|
23
23
|
- [parens_in_def](#parens_in_def)
|
24
24
|
- [trailing_commas](#trailing_commas)
|
25
25
|
- [quote_style](#quote_style)
|
26
|
+
- [includes and excludes](#includes%20and%20excludes)
|
26
27
|
|
27
28
|
### align_case_when
|
28
29
|
|
@@ -222,7 +223,7 @@ foo(
|
|
222
223
|
|
223
224
|
### quote_style
|
224
225
|
|
225
|
-
Use the specified quotation marks.
|
226
|
+
Use the specified quotation marks.
|
226
227
|
|
227
228
|
- `:double`: (default) use doublequotations unless one or more escaped double-quotations are included
|
228
229
|
- `:single`: use single quotations unless one or more interpolations `#{}` or escaped single quotations are included
|
@@ -275,4 +276,13 @@ code = <<CODE
|
|
275
276
|
"double"
|
276
277
|
'single'
|
277
278
|
CODE
|
278
|
-
```
|
279
|
+
```
|
280
|
+
|
281
|
+
### Includes and excludes
|
282
|
+
Files can be excluded or included in formatting with rufo by specifying glob patterns for the `includes` or `excludes` configuration options. Multiple patterns are separated by a comma.
|
283
|
+
|
284
|
+
For example:
|
285
|
+
```
|
286
|
+
includes [*.txt,*.text]
|
287
|
+
excludes [*.rb]
|
288
|
+
```
|
data/exe/rufo
CHANGED
data/lib/rufo/file_finder.rb
CHANGED
@@ -61,11 +61,18 @@ class Rufo::FileFinder
|
|
61
61
|
|
62
62
|
def all_rb_files(file_or_dir)
|
63
63
|
Dir.chdir(file_or_dir) do
|
64
|
-
fl =
|
65
|
-
fl.
|
66
|
-
|
67
|
-
|
68
|
-
fl.to_a
|
64
|
+
fl = build_file_list
|
65
|
+
fl.to_a.map do |path|
|
66
|
+
File.join(file_or_dir, path)
|
67
|
+
end
|
69
68
|
end
|
70
69
|
end
|
70
|
+
|
71
|
+
def build_file_list
|
72
|
+
fl = Rake::FileList.new(*DEFAULT_PATTERNS)
|
73
|
+
fl.exclude(*EXCLUDE_PATTERNS)
|
74
|
+
fl.exclude(*excludes)
|
75
|
+
fl.include(*includes)
|
76
|
+
fl
|
77
|
+
end
|
71
78
|
end
|
data/lib/rufo/version.rb
CHANGED