tins 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -4,6 +4,7 @@ module Tins
4
4
  require 'tins/count_by'
5
5
  require 'tins/deep_dup'
6
6
  require 'tins/file_binary'
7
+ require 'tins/find'
7
8
  require 'tins/generator'
8
9
  require 'tins/go'
9
10
  require 'tins/hash_symbolize_keys_recursive'
@@ -18,6 +19,7 @@ module Tins
18
19
  require 'tins/p'
19
20
  require 'tins/partial_application'
20
21
  require 'tins/range_plus'
22
+ require 'tins/require_maybe'
21
23
  require 'tins/round'
22
24
  require 'tins/secure_write'
23
25
  require 'tins/shuffle'
@@ -30,6 +32,5 @@ module Tins
30
32
  require 'tins/uniq_by'
31
33
  require 'tins/version'
32
34
  require 'tins/write'
33
- require 'tins/require_maybe'
34
35
  end
35
36
  require 'tins/alias'
@@ -0,0 +1,110 @@
1
+ require 'enumerator'
2
+ require 'tins/module_group'
3
+
4
+ module Tins
5
+ module Find
6
+ EXPECTED_STANDARD_ERRORS = ModuleGroup[
7
+ Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP,
8
+ Errno::ENAMETOOLONG
9
+ ]
10
+
11
+ class Finder
12
+ def initialize(opts = {})
13
+ @show_hidden = opts.fetch(:show_hidden) { true }
14
+ @raise_errors = opts.fetch(:raise_errors) { false }
15
+ @follow_symlinks = opts.fetch(:follow_symlinks) { true }
16
+ end
17
+
18
+ attr_reader :show_hidden
19
+
20
+ attr_reader :raise_errors
21
+
22
+ attr_reader :follow_symlinks
23
+
24
+ def find(*paths)
25
+ block_given? or return enum_for(__method__, *paths)
26
+ paths.collect! { |d| d.dup }
27
+ while path = paths.shift
28
+ path = prepare_path(path)
29
+ catch(:prune) do
30
+ path.stat or next
31
+ yield path
32
+ if path.stat.directory?
33
+ begin
34
+ ps = Dir.entries(path)
35
+ rescue EXPECTED_STANDARD_ERRORS
36
+ @raise_errors ? raise : next
37
+ end
38
+ ps.sort!
39
+ ps.reverse_each do |p|
40
+ next if p == "." or p == ".."
41
+ next if !@show_hidden && p.start_with?('.')
42
+ p = File.join(path, p)
43
+ paths.unshift p.untaint
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ private
51
+
52
+ def prepare_path(path)
53
+ path = path.dup.taint
54
+ path.extend PathExtension
55
+ path.finder = self
56
+ path
57
+ end
58
+ end
59
+
60
+ module PathExtension
61
+ attr_accessor :finder
62
+
63
+ def stat
64
+ begin
65
+ @stat ||=
66
+ if finder.follow_symlinks
67
+ File.stat(self)
68
+ else
69
+ File.lstat(self)
70
+ end
71
+ rescue EXPECTED_STANDARD_ERRORS
72
+ if finder.raise_errors
73
+ raise
74
+ end
75
+ end
76
+ end
77
+
78
+ def file
79
+ if stat.file?
80
+ File.new(self)
81
+ end
82
+ end
83
+ end
84
+
85
+ #
86
+ # Calls the associated block with the name of every path and directory
87
+ # listed as arguments, then recursively on their subdirectories, and so on.
88
+ #
89
+ # See the +Find+ module documentation for an example.
90
+ #
91
+ def find(*paths, &block) # :yield: path
92
+ opts = Hash === paths.last ? paths.pop : {}
93
+ Finder.new(opts).find(*paths, &block)
94
+ end
95
+
96
+ #
97
+ # Skips the current path or directory, restarting the loop with the next
98
+ # entry. If the current path is a directory, that directory will not be
99
+ # recursively entered. Meaningful only within the block associated with
100
+ # Find::find.
101
+ #
102
+ # See the +Find+ module documentation for an example.
103
+ #
104
+ def prune
105
+ throw :prune
106
+ end
107
+
108
+ module_function :find, :prune
109
+ end
110
+ end
@@ -1,6 +1,6 @@
1
1
  module Tins
2
2
  # Tins version
3
- VERSION = '0.3.5'
3
+ VERSION = '0.3.6'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,27 +1,27 @@
1
1
  require 'tins'
2
2
 
3
3
  module Tins
4
+ require 'tins/xt/attempt'
4
5
  require 'tins/xt/blank'
5
6
  require 'tins/xt/count_by'
7
+ require 'tins/xt/deep_dup'
8
+ require 'tins/xt/file_binary'
6
9
  require 'tins/xt/full'
10
+ require 'tins/xt/hash_symbolize_keys_recursive'
7
11
  require 'tins/xt/hash_union'
8
12
  require 'tins/xt/irb'
13
+ require 'tins/xt/named'
9
14
  require 'tins/xt/null'
15
+ require 'tins/xt/p'
16
+ require 'tins/xt/partial_application'
17
+ require 'tins/xt/range_plus'
18
+ require 'tins/xt/require_maybe'
10
19
  require 'tins/xt/round'
20
+ require 'tins/xt/secure_write'
21
+ require 'tins/xt/string'
11
22
  require 'tins/xt/subhash'
23
+ require 'tins/xt/symbol_to_proc'
12
24
  require 'tins/xt/time_dummy'
13
25
  require 'tins/xt/uniq_by'
14
- require 'tins/xt/p'
15
- require 'tins/xt/symbol_to_proc'
16
26
  require 'tins/xt/write'
17
- require 'tins/xt/secure_write'
18
- require 'tins/xt/deep_dup'
19
- require 'tins/xt/attempt'
20
- require 'tins/xt/hash_symbolize_keys_recursive'
21
- require 'tins/xt/range_plus'
22
- require 'tins/xt/named'
23
- require 'tins/xt/string'
24
- require 'tins/xt/file_binary'
25
- require 'tins/xt/require_maybe'
26
- require 'tins/xt/partial_application'
27
27
  end
@@ -0,0 +1,77 @@
1
+ require 'test_helper'
2
+ require 'tins/find'
3
+ require 'fileutils'
4
+ require 'tempfile'
5
+
6
+ module Tins
7
+ class FindTest < Test::Unit::TestCase
8
+ include Tins::Find
9
+ include FileUtils
10
+
11
+ def setup
12
+ mkdir_p @work_dir = File.join(Dir.tmpdir, "test.#$$")
13
+ end
14
+
15
+ def teardown
16
+ rm_rf @work_dir
17
+ end
18
+
19
+ def test_raising_errors
20
+ assert_equal [], find(File.join(@work_dir, 'nix'), :raise_errors => false).to_a
21
+ assert_equal [], find(File.join(@work_dir, 'nix')).to_a
22
+ assert_raise(Errno::ENOENT) do
23
+ find(File.join(@work_dir, 'nix'), :raise_errors => true).to_a
24
+ end
25
+ end
26
+
27
+ def test_showing_hidden
28
+ touch file = File.join(@work_dir, '.foo')
29
+ assert_equal [ @work_dir ], find(@work_dir, :show_hidden => false).to_a
30
+ assert_equal [ @work_dir, file ], find(@work_dir).to_a
31
+ assert_equal [ @work_dir, file ], find(@work_dir, :show_hidden => true).to_a
32
+ end
33
+
34
+ if RUBY_PLATFORM !~ /java/
35
+ def test_check_directory_without_access
36
+ mkdir_p directory1 = File.join(@work_dir, 'foo')
37
+ mkdir_p directory2 = File.join(directory1, 'bar')
38
+ touch file = File.join(directory2, 'file')
39
+ chmod 0, directory2
40
+ assert_equal [ @work_dir, directory1, directory2 ], find(@work_dir, :raise_errors => false).to_a
41
+ assert_equal [ @work_dir, directory1, directory2 ], find(@work_dir).to_a
42
+ assert_raise(Errno::EACCES) do
43
+ find(@work_dir, :raise_errors => true).to_a
44
+ end
45
+ ensure
46
+ File.exist?(directory2) and chmod 0777, directory2
47
+ end
48
+ end
49
+
50
+ def test_follow_symlinks
51
+ mkdir_p directory1 = File.join(@work_dir, 'foo1')
52
+ mkdir_p directory2 = File.join(@work_dir, 'foo2')
53
+ mkdir_p directory3 = File.join(directory1, 'bar')
54
+ touch file = File.join(directory3, 'foo')
55
+ ln_s directory3, link = File.join(directory2, 'baz')
56
+ assert_equal [ directory2, link ], find(directory2, :follow_symlinks => false).to_a
57
+ assert_equal [ directory2, link, linked = File.join(link, 'foo') ], find(directory2).to_a
58
+ assert_equal [ directory2, link, linked ], find(directory2, :follow_symlinks => true).to_a
59
+ end
60
+
61
+ def test_path_file
62
+ File.open(File.join(@work_dir, 'foo'), 'w') do |f|
63
+ f.print "hello"
64
+ f.fsync
65
+ assert_equal "hello", find(@work_dir).select { |f| f.stat.file? }.first.file.read
66
+ end
67
+ end
68
+
69
+ def test_prune
70
+ mkdir_p directory1 = File.join(@work_dir, 'foo1')
71
+ mkdir_p directory2 = File.join(@work_dir, 'foo2')
72
+ result = []
73
+ find(@work_dir) { |f| f =~ /foo2\Z/ and prune; result << f }
74
+ assert_equal [ @work_dir, directory1 ], result
75
+ end
76
+ end
77
+ end
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "tins"
5
- s.version = "0.3.5"
5
+ s.version = "0.3.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2011-12-19"
9
+ s.date = "2011-12-24"
10
10
  s.description = "All the stuff that isn't good/big enough for a real library."
11
11
  s.email = "flori@ping.de"
12
- s.extra_rdoc_files = ["README.rdoc", "lib/spruz.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/string_underscore.rb", "lib/tins/hash_union.rb", "lib/tins/write.rb", "lib/tins/version.rb", "lib/tins/alias.rb", "lib/tins/round.rb", "lib/tins/go.rb", "lib/tins/generator.rb", "lib/tins/string_camelize.rb", "lib/tins/shuffle.rb", "lib/tins/deep_dup.rb", "lib/tins/memoize.rb", "lib/tins/lines_file.rb", "lib/tins/subhash.rb", "lib/tins/bijection.rb", "lib/tins/limited.rb", "lib/tins/attempt.rb", "lib/tins/to_proc.rb", "lib/tins/module_group.rb", "lib/tins/null.rb", "lib/tins/require_maybe.rb", "lib/tins/secure_write.rb", "lib/tins/xt.rb", "lib/tins/file_binary.rb", "lib/tins/string_version.rb", "lib/tins/once.rb", "lib/tins/xt/named.rb", "lib/tins/xt/hash_symbolize_keys_recursive.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/write.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/round.rb", "lib/tins/xt/string_camelize.rb", "lib/tins/xt/shuffle.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/symbol_to_proc.rb", "lib/tins/xt/subhash.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/null.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/secure_write.rb", "lib/tins/xt/file_binary.rb", "lib/tins/xt/string_version.rb", "lib/tins/xt/p.rb", "lib/tins/xt/partial_application.rb", "lib/tins/xt/time_dummy.rb", "lib/tins/xt/string.rb", "lib/tins/xt/full.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/uniq_by.rb", "lib/tins/p.rb", "lib/tins/minimize.rb", "lib/tins/partial_application.rb", "lib/tins/time_dummy.rb", "lib/tins/range_plus.rb", "lib/tins/count_by.rb", "lib/tins/uniq_by.rb", "lib/tins.rb"]
13
- s.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE", "README.rdoc", "Rakefile", "TODO", "VERSION", "lib/spruz", "lib/spruz.rb", "lib/tins.rb", "lib/tins/alias.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/count_by.rb", "lib/tins/deep_dup.rb", "lib/tins/file_binary.rb", "lib/tins/generator.rb", "lib/tins/go.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/hash_union.rb", "lib/tins/limited.rb", "lib/tins/lines_file.rb", "lib/tins/memoize.rb", "lib/tins/minimize.rb", "lib/tins/module_group.rb", "lib/tins/null.rb", "lib/tins/once.rb", "lib/tins/p.rb", "lib/tins/partial_application.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/round.rb", "lib/tins/secure_write.rb", "lib/tins/shuffle.rb", "lib/tins/string_camelize.rb", "lib/tins/string_underscore.rb", "lib/tins/string_version.rb", "lib/tins/subhash.rb", "lib/tins/time_dummy.rb", "lib/tins/to_proc.rb", "lib/tins/uniq_by.rb", "lib/tins/version.rb", "lib/tins/write.rb", "lib/tins/xt.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/file_binary.rb", "lib/tins/xt/full.rb", "lib/tins/xt/hash_symbolize_keys_recursive.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/named.rb", "lib/tins/xt/null.rb", "lib/tins/xt/p.rb", "lib/tins/xt/partial_application.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/round.rb", "lib/tins/xt/secure_write.rb", "lib/tins/xt/shuffle.rb", "lib/tins/xt/string.rb", "lib/tins/xt/string_camelize.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/string_version.rb", "lib/tins/xt/subhash.rb", "lib/tins/xt/symbol_to_proc.rb", "lib/tins/xt/time_dummy.rb", "lib/tins/xt/uniq_by.rb", "lib/tins/xt/write.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/count_by_test.rb", "tests/deep_dup_test.rb", "tests/file_binary_test.rb", "tests/generator_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/hash_union_test.rb", "tests/limited_test.rb", "tests/lines_file_test.rb", "tests/memoize_test.rb", "tests/minimize_test.rb", "tests/module_group_test.rb", "tests/named_test.rb", "tests/null_test.rb", "tests/partial_application_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/round_test.rb", "tests/secure_write_test.rb", "tests/shuffle_test.rb", "tests/string_camelize_test.rb", "tests/string_underscore_test.rb", "tests/string_version_test.rb", "tests/subhash_test.rb", "tests/test_helper.rb", "tests/time_dummy_test.rb", "tests/try_test.rb", "tests/uniq_by_test.rb", "tins.gemspec"]
12
+ s.extra_rdoc_files = ["README.rdoc", "lib/spruz.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/string_underscore.rb", "lib/tins/hash_union.rb", "lib/tins/write.rb", "lib/tins/version.rb", "lib/tins/alias.rb", "lib/tins/round.rb", "lib/tins/go.rb", "lib/tins/find.rb", "lib/tins/generator.rb", "lib/tins/string_camelize.rb", "lib/tins/shuffle.rb", "lib/tins/deep_dup.rb", "lib/tins/memoize.rb", "lib/tins/lines_file.rb", "lib/tins/subhash.rb", "lib/tins/bijection.rb", "lib/tins/limited.rb", "lib/tins/attempt.rb", "lib/tins/to_proc.rb", "lib/tins/module_group.rb", "lib/tins/null.rb", "lib/tins/require_maybe.rb", "lib/tins/secure_write.rb", "lib/tins/xt.rb", "lib/tins/file_binary.rb", "lib/tins/string_version.rb", "lib/tins/once.rb", "lib/tins/xt/named.rb", "lib/tins/xt/hash_symbolize_keys_recursive.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/write.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/round.rb", "lib/tins/xt/string_camelize.rb", "lib/tins/xt/shuffle.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/symbol_to_proc.rb", "lib/tins/xt/subhash.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/null.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/secure_write.rb", "lib/tins/xt/file_binary.rb", "lib/tins/xt/string_version.rb", "lib/tins/xt/p.rb", "lib/tins/xt/partial_application.rb", "lib/tins/xt/time_dummy.rb", "lib/tins/xt/string.rb", "lib/tins/xt/full.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/uniq_by.rb", "lib/tins/p.rb", "lib/tins/minimize.rb", "lib/tins/partial_application.rb", "lib/tins/time_dummy.rb", "lib/tins/range_plus.rb", "lib/tins/count_by.rb", "lib/tins/uniq_by.rb", "lib/tins.rb"]
13
+ s.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE", "README.rdoc", "Rakefile", "TODO", "VERSION", "lib/spruz", "lib/spruz.rb", "lib/tins.rb", "lib/tins/alias.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/count_by.rb", "lib/tins/deep_dup.rb", "lib/tins/file_binary.rb", "lib/tins/find.rb", "lib/tins/generator.rb", "lib/tins/go.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/hash_union.rb", "lib/tins/limited.rb", "lib/tins/lines_file.rb", "lib/tins/memoize.rb", "lib/tins/minimize.rb", "lib/tins/module_group.rb", "lib/tins/null.rb", "lib/tins/once.rb", "lib/tins/p.rb", "lib/tins/partial_application.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/round.rb", "lib/tins/secure_write.rb", "lib/tins/shuffle.rb", "lib/tins/string_camelize.rb", "lib/tins/string_underscore.rb", "lib/tins/string_version.rb", "lib/tins/subhash.rb", "lib/tins/time_dummy.rb", "lib/tins/to_proc.rb", "lib/tins/uniq_by.rb", "lib/tins/version.rb", "lib/tins/write.rb", "lib/tins/xt.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/file_binary.rb", "lib/tins/xt/full.rb", "lib/tins/xt/hash_symbolize_keys_recursive.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/named.rb", "lib/tins/xt/null.rb", "lib/tins/xt/p.rb", "lib/tins/xt/partial_application.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/round.rb", "lib/tins/xt/secure_write.rb", "lib/tins/xt/shuffle.rb", "lib/tins/xt/string.rb", "lib/tins/xt/string_camelize.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/string_version.rb", "lib/tins/xt/subhash.rb", "lib/tins/xt/symbol_to_proc.rb", "lib/tins/xt/time_dummy.rb", "lib/tins/xt/uniq_by.rb", "lib/tins/xt/write.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/count_by_test.rb", "tests/deep_dup_test.rb", "tests/file_binary_test.rb", "tests/find_test.rb", "tests/generator_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/hash_union_test.rb", "tests/limited_test.rb", "tests/lines_file_test.rb", "tests/memoize_test.rb", "tests/minimize_test.rb", "tests/module_group_test.rb", "tests/named_test.rb", "tests/null_test.rb", "tests/partial_application_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/round_test.rb", "tests/secure_write_test.rb", "tests/shuffle_test.rb", "tests/string_camelize_test.rb", "tests/string_underscore_test.rb", "tests/string_version_test.rb", "tests/subhash_test.rb", "tests/test_helper.rb", "tests/time_dummy_test.rb", "tests/try_test.rb", "tests/uniq_by_test.rb", "tins.gemspec"]
14
14
  s.homepage = "http://flori.github.com/tins"
15
15
  s.rdoc_options = ["--title", "Tins - Useful stuff.", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubygems_version = "1.8.11"
18
18
  s.summary = "Useful stuff."
19
- s.test_files = ["tests/generator_test.rb", "tests/null_test.rb", "tests/range_plus_test.rb", "tests/deep_dup_test.rb", "tests/bijection_test.rb", "tests/memoize_test.rb", "tests/limited_test.rb", "tests/count_by_test.rb", "tests/blank_full_test.rb", "tests/file_binary_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/require_maybe_test.rb", "tests/uniq_by_test.rb", "tests/time_dummy_test.rb", "tests/string_camelize_test.rb", "tests/lines_file_test.rb", "tests/string_underscore_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/subhash_test.rb", "tests/partial_application_test.rb", "tests/minimize_test.rb", "tests/round_test.rb", "tests/test_helper.rb", "tests/shuffle_test.rb", "tests/module_group_test.rb", "tests/generator_test.rb", "tests/null_test.rb", "tests/range_plus_test.rb", "tests/deep_dup_test.rb", "tests/bijection_test.rb", "tests/memoize_test.rb", "tests/limited_test.rb", "tests/count_by_test.rb", "tests/blank_full_test.rb", "tests/file_binary_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/require_maybe_test.rb", "tests/uniq_by_test.rb", "tests/time_dummy_test.rb", "tests/string_camelize_test.rb", "tests/lines_file_test.rb", "tests/string_underscore_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/subhash_test.rb", "tests/partial_application_test.rb", "tests/minimize_test.rb", "tests/round_test.rb", "tests/shuffle_test.rb", "tests/module_group_test.rb"]
19
+ s.test_files = ["tests/generator_test.rb", "tests/null_test.rb", "tests/find_test.rb", "tests/range_plus_test.rb", "tests/deep_dup_test.rb", "tests/bijection_test.rb", "tests/memoize_test.rb", "tests/limited_test.rb", "tests/count_by_test.rb", "tests/blank_full_test.rb", "tests/file_binary_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/require_maybe_test.rb", "tests/uniq_by_test.rb", "tests/time_dummy_test.rb", "tests/string_camelize_test.rb", "tests/lines_file_test.rb", "tests/string_underscore_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/subhash_test.rb", "tests/partial_application_test.rb", "tests/minimize_test.rb", "tests/round_test.rb", "tests/test_helper.rb", "tests/shuffle_test.rb", "tests/module_group_test.rb", "tests/generator_test.rb", "tests/null_test.rb", "tests/find_test.rb", "tests/range_plus_test.rb", "tests/deep_dup_test.rb", "tests/bijection_test.rb", "tests/memoize_test.rb", "tests/limited_test.rb", "tests/count_by_test.rb", "tests/blank_full_test.rb", "tests/file_binary_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/require_maybe_test.rb", "tests/uniq_by_test.rb", "tests/time_dummy_test.rb", "tests/string_camelize_test.rb", "tests/lines_file_test.rb", "tests/string_underscore_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/subhash_test.rb", "tests/partial_application_test.rb", "tests/minimize_test.rb", "tests/round_test.rb", "tests/shuffle_test.rb", "tests/module_group_test.rb"]
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  s.specification_version = 3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-19 00:00:00.000000000 Z
12
+ date: 2011-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
16
- requirement: &74624010 !ruby/object:Gem::Requirement
16
+ requirement: &72891070 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.1.4
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *74624010
24
+ version_requirements: *72891070
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: test-unit
27
- requirement: &74623790 !ruby/object:Gem::Requirement
27
+ requirement: &72890780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.3'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *74623790
35
+ version_requirements: *72890780
36
36
  description: All the stuff that isn't good/big enough for a real library.
37
37
  email: flori@ping.de
38
38
  executables: []
@@ -48,6 +48,7 @@ extra_rdoc_files:
48
48
  - lib/tins/alias.rb
49
49
  - lib/tins/round.rb
50
50
  - lib/tins/go.rb
51
+ - lib/tins/find.rb
51
52
  - lib/tins/generator.rb
52
53
  - lib/tins/string_camelize.rb
53
54
  - lib/tins/shuffle.rb
@@ -119,6 +120,7 @@ files:
119
120
  - lib/tins/count_by.rb
120
121
  - lib/tins/deep_dup.rb
121
122
  - lib/tins/file_binary.rb
123
+ - lib/tins/find.rb
122
124
  - lib/tins/generator.rb
123
125
  - lib/tins/go.rb
124
126
  - lib/tins/hash_symbolize_keys_recursive.rb
@@ -179,6 +181,7 @@ files:
179
181
  - tests/count_by_test.rb
180
182
  - tests/deep_dup_test.rb
181
183
  - tests/file_binary_test.rb
184
+ - tests/find_test.rb
182
185
  - tests/generator_test.rb
183
186
  - tests/hash_symbolize_keys_recursive_test.rb
184
187
  - tests/hash_union_test.rb
@@ -220,9 +223,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
223
  - - ! '>='
221
224
  - !ruby/object:Gem::Version
222
225
  version: '0'
223
- segments:
224
- - 0
225
- hash: -842976333
226
226
  required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  none: false
228
228
  requirements:
@@ -238,6 +238,7 @@ summary: Useful stuff.
238
238
  test_files:
239
239
  - tests/generator_test.rb
240
240
  - tests/null_test.rb
241
+ - tests/find_test.rb
241
242
  - tests/range_plus_test.rb
242
243
  - tests/deep_dup_test.rb
243
244
  - tests/bijection_test.rb