brutal 1.6.0.beta2 → 1.6.0.beta3
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/README.md +1 -1
- data/lib/brutal/command_line_arguments_parser.rb +2 -3
- data/lib/brutal/manifest/file.rb +3 -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: e5f2da67e5897977c5661ebd110bf1d3e0a3a035fbccf189d134050c1658ac02
|
4
|
+
data.tar.gz: 9f5a8c72b6907ff587a27a2c33d53f8bf0b5964b48559ed70f4ceb102639e815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae6d7e2f950c2b201d7b5bec76c079ffbfe949a8d0a9e9119190501031efdb597cacacef8d9874e9b40d84849d45d2ce620340cb6b12b318f0a3d4a55a18954a
|
7
|
+
data.tar.gz: bfd031e10fc2798ac51765bc03728286fa44e3379ad0f09c2abd138376ac3f5b5bbcea8c05178d9854c1e470728de2f21113d8b1634a2096aef99e55f722de23
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ It is therefore the responsibility of the developer to analyze the generated beh
|
|
38
38
|
Add this line to your application's Gemfile:
|
39
39
|
|
40
40
|
```ruby
|
41
|
-
gem "brutal", ">= 1.6.0.
|
41
|
+
gem "brutal", ">= 1.6.0.beta3", require: false
|
42
42
|
```
|
43
43
|
|
44
44
|
And then execute:
|
@@ -7,8 +7,7 @@ require "pathname"
|
|
7
7
|
class Brutal
|
8
8
|
# Accept an arbitrary number of arguments passed from the command-line.
|
9
9
|
class CommandLineArgumentsParser
|
10
|
-
|
11
|
-
MANIFEST_FILENAME_PATTERN = ::File.join("**", "*#{MANIFEST_FILENAME_SUFFIX}")
|
10
|
+
MANIFEST_FILENAME_PATTERN = ::File.join("**", Manifest::File::Name::SUFFIX_PATTERN)
|
12
11
|
CURRENT_DIRECTORY_CONTEXT = "."
|
13
12
|
GEM_NAME = "brutal"
|
14
13
|
HELP_OPTION = "--help"
|
@@ -83,7 +82,7 @@ class Brutal
|
|
83
82
|
end
|
84
83
|
|
85
84
|
def load_file!(pathname)
|
86
|
-
if pathname.fnmatch?(MANIFEST_FILENAME_PATTERN)
|
85
|
+
if pathname.fnmatch?(MANIFEST_FILENAME_PATTERN, ::File::FNM_PATHNAME | ::File::FNM_DOTMATCH)
|
87
86
|
@pathnames << pathname
|
88
87
|
else
|
89
88
|
warn "Skipping #{pathname} because not matched against #{MANIFEST_FILENAME_PATTERN}."
|
data/lib/brutal/manifest/file.rb
CHANGED
@@ -11,7 +11,9 @@ class Brutal
|
|
11
11
|
attr_reader :yaml
|
12
12
|
|
13
13
|
def initialize(pathname)
|
14
|
-
|
14
|
+
unless pathname.fnmatch?(Name::SUFFIX_PATTERN, ::File::FNM_PATHNAME | ::File::FNM_DOTMATCH)
|
15
|
+
raise ::ArgumentError
|
16
|
+
end
|
15
17
|
|
16
18
|
@yaml = pathname.read
|
17
19
|
end
|