rufo 0.8.0 → 0.8.1

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
  SHA256:
3
- metadata.gz: 3bbc374be047a3b1a07b7f73dd004aa0629b07bdf70de0342041dabbebd16166
4
- data.tar.gz: ac54fb2d1e593baa3207109d9cb40d4bef40ab9eb64db13be344fcfd64bdcfe2
3
+ metadata.gz: e8e977df730572c1448155a1bc4e3fd358a1abcdadf78c18700874e75e9c54aa
4
+ data.tar.gz: 07a074f0137daf3c957dd2d6646efb72281b062b93a7df7b1981b3fdcdd3ca79
5
5
  SHA512:
6
- metadata.gz: 0bf1ada9dcd91f5565c519a90693f7b2e35b46b4075f7cb92e57a120539df196286fce17ab42427fd3b9937f97585093487309624b59415ee42dbd87259d3178
7
- data.tar.gz: 40b9de53720d9ad2c1b09c44f4b5a88cd3bb69ad4ceef8034d78abdb940052f504fff1995df5eaada6d936ae418d96ba1a1c5c3d82745761f9a8f8cf45a8a4f0
6
+ metadata.gz: 32de1903e674e7a21f34b0e092d2fd4af9fa9db9f4570611b9e50bb7ec1ba031df7b940dbc9797855688d3a6956dfa2830a0251bf4ec7296b6f4a7b5117ad5fd
7
+ data.tar.gz: 9592effea9978267ab0dc2d641b8e033a7a4156723a68e0aaf2b1742f69b768329a6a8d4824fcd0fdaf1ed342279f59a1cb2e15c13514045d350ddbfcbce6060
@@ -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
@@ -10,9 +10,9 @@ trailing_commas false
10
10
  parens_in_def :dynamic
11
11
  ```
12
12
 
13
- ## :warning: Settings are going away! :warning:
13
+ ## Style settings are going away! :warning:
14
14
 
15
- The settings described below will be removed from future versions of rufo :skull:
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
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require "rufo"
2
+ require_relative "../lib/rufo"
3
3
 
4
4
  Rufo::Command.run(ARGV)
@@ -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 = Rake::FileList.new(*DEFAULT_PATTERNS)
65
- fl.exclude(*EXCLUDE_PATTERNS)
66
- fl.exclude(*excludes)
67
- fl.include(*includes)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rufo
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ary Borenszweig