mireru 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 7e3e728d1894d1cd4d3f2cd20ab8d67126b5eefd
4
- data.tar.gz: bc13b2befe7e25a93bdb3037e50a5bbd05cf4d97
3
+ metadata.gz: 2b487538b444efd4c0338a983d8c497314b4f842
4
+ data.tar.gz: 056e6e0490665009c82c0a4b345783346f50b6f1
5
5
  SHA512:
6
- metadata.gz: ee30693193ae406c33776fbdae8230c2c6c8b1a43c2c918943ad2968221b27ea8f6b332bc8d892b1616d888eaeeea40393316f3bd5fbffa5af378f5f72eae554
7
- data.tar.gz: cb1becdf6fb35f496b14d9bc93044e7b112e76e93b1bc61dad4e58d20d84d9e94e824b31325ffbe9e0366033458b200285fcdc1c045fe315cdcab191aff23675
6
+ metadata.gz: 8c0c370545a91cfbed851113b8bf0c39c00ea1ee3441b5d20849ffe8a05af99cb5585c17fcc6203d46f9d855c3d57aab300b9032f67faf84fb7aa64a42343d0f
7
+ data.tar.gz: a363a6d984ee976bded96de7f1ed9b456001512fe351636178558615f58465116c7b1f2d57cfcce368a28627b6557c91770a061ab0f462c5207193eb57811508
data/NEWS.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.1.4: 2013-07-09
4
+
5
+ ### Changes
6
+
7
+ * Improvements
8
+ * Changed to "-R" or "--recursive" for recursive option.
9
+
3
10
  ## 0.1.3: 2013-07-09
4
11
 
5
12
  Supported to keybinds of expansion and reduction!
data/README.md CHANGED
@@ -18,8 +18,8 @@ If no argument, then search current directory.
18
18
 
19
19
  ### Options
20
20
 
21
- -d, --deep<br />
22
- deep search as "**/*"
21
+ -R, --recursive<br />
22
+ recursive search as "**/*"
23
23
 
24
24
  -f, --font NAME<br />
25
25
  set font such as "Monospace 16"
@@ -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
- -d, --deep
95
- deep search as "**/*"
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
- -d, --deep
139
- deep search as "**/*"
138
+ -R, --recursive
139
+ recursive search as "**/*"
140
140
  -f, --font NAME
141
141
  set font such as "Monospace 16"
142
142
  EOM
@@ -1,3 +1,3 @@
1
1
  module Mireru
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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 test_files_from_arguments_deep_option_only
52
- arguments = %w(--deep)
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 test_files_from_arguments_deep_option_and_dir
60
- arguments = %w(--deep dir1 file1 dir2)
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(--deep -f ubuntu dir1 file1 dir2)
94
- flag = @mireru.__send__(:purge_option, arguments, /\A(-d|--deep)\z/)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mireru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama