mireru 0.1.3 → 0.1.4
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/NEWS.md +7 -0
- data/README.md +2 -2
- data/lib/mireru/command/mireru.rb +5 -5
- data/lib/mireru/version.rb +1 -1
- data/test/test-mireru.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b487538b444efd4c0338a983d8c497314b4f842
|
4
|
+
data.tar.gz: 056e6e0490665009c82c0a4b345783346f50b6f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c0c370545a91cfbed851113b8bf0c39c00ea1ee3441b5d20849ffe8a05af99cb5585c17fcc6203d46f9d855c3d57aab300b9032f67faf84fb7aa64a42343d0f
|
7
|
+
data.tar.gz: a363a6d984ee976bded96de7f1ed9b456001512fe351636178558615f58465116c7b1f2d57cfcce368a28627b6557c91770a061ab0f462c5207193eb57811508
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -49,7 +49,7 @@ module Mireru
|
|
49
49
|
def files_from_arguments(arguments)
|
50
50
|
if arguments.empty?
|
51
51
|
files = Dir.glob("*")
|
52
|
-
elsif purge_option(arguments, /\A(-d|--deep)\z/)
|
52
|
+
elsif purge_option(arguments, /\A(-R|--recursive|-d|--deep)\z/)
|
53
53
|
if arguments.empty?
|
54
54
|
files = Dir.glob("**/*")
|
55
55
|
else
|
@@ -91,8 +91,8 @@ module Mireru
|
|
91
91
|
#{USAGE}
|
92
92
|
If no argument, then search current directory.
|
93
93
|
Options:
|
94
|
-
-
|
95
|
-
|
94
|
+
-R, --recursive
|
95
|
+
recursive search as "**/*"
|
96
96
|
-f, --font NAME
|
97
97
|
set font such as "Monospace 16"
|
98
98
|
Keybind:
|
@@ -135,8 +135,8 @@ Warning: file not found.
|
|
135
135
|
#{USAGE}
|
136
136
|
If no argument, then search current directory.
|
137
137
|
Options:
|
138
|
-
-
|
139
|
-
|
138
|
+
-R, --recursive
|
139
|
+
recursive search as "**/*"
|
140
140
|
-f, --font NAME
|
141
141
|
set font such as "Monospace 16"
|
142
142
|
EOM
|
data/lib/mireru/version.rb
CHANGED
data/test/test-mireru.rb
CHANGED
@@ -48,16 +48,16 @@ class MireruTest < Test::Unit::TestCase
|
|
48
48
|
assert_equal(files, expected)
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
52
|
-
arguments = %w(
|
51
|
+
def test_files_from_arguments_recursive_option_only
|
52
|
+
arguments = %w(-R)
|
53
53
|
expected = %w(dir1 file1 dir2 dir1/file1 dir1/file2 dir2/file1)
|
54
54
|
mock(Dir).glob("**/*") { expected }
|
55
55
|
files = @mireru.__send__(:files_from_arguments, arguments)
|
56
56
|
assert_equal(files, expected)
|
57
57
|
end
|
58
58
|
|
59
|
-
def
|
60
|
-
arguments = %w(
|
59
|
+
def test_files_from_arguments_recursive_option_and_dir
|
60
|
+
arguments = %w(-R dir1 file1 dir2)
|
61
61
|
expected_dir1 = %w(dir1/file1 dir1/file2)
|
62
62
|
expected_dir2 = %w(dir2/file1)
|
63
63
|
expected = [expected_dir1, "file1", expected_dir2].flatten
|
@@ -90,8 +90,8 @@ class MireruTest < Test::Unit::TestCase
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def test_purge_option
|
93
|
-
arguments = %w(
|
94
|
-
flag = @mireru.__send__(:purge_option, arguments, /\A(-
|
93
|
+
arguments = %w(-R -f ubuntu dir1 file1 dir2)
|
94
|
+
flag = @mireru.__send__(:purge_option, arguments, /\A(-R|--recursive)\z/)
|
95
95
|
assert_not_nil(flag)
|
96
96
|
assert_equal(%w(-f ubuntu dir1 file1 dir2), arguments)
|
97
97
|
value = @mireru.__send__(:purge_option, arguments, /\A-f\z/, true)
|