tins 0.4.3 → 0.5.0

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.
data/.travis.yml CHANGED
@@ -8,3 +8,7 @@ rvm:
8
8
  - rbx-19mode
9
9
  - jruby-18mode
10
10
  - jruby-19mode
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: rbx-18mode
14
+ - rvm: rbx-19mode
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source :rubygems
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'simplecov', '0.6.2', :platform => :mri_19
7
+ gem 'simplecov', '0.6.4', :platform => :mri_19
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ GemHadar do
14
14
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', 'coverage', '.rbx'
15
15
  readme 'README.rdoc'
16
16
 
17
- development_dependency 'test-unit', '~>2.3'
17
+ development_dependency 'test-unit', '~>2.5'
18
18
  development_dependency 'utils'
19
19
 
20
20
  install_library do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.5.0
data/lib/tins/find.rb CHANGED
@@ -9,17 +9,68 @@ module Tins
9
9
  ]
10
10
 
11
11
  class Finder
12
+ module PathExtension
13
+ attr_accessor :finder
14
+
15
+ def finder_stat
16
+ finder.protect_from_errors do
17
+ finder.follow_symlinks ? File.stat(self) : File.lstat(self)
18
+ end
19
+ end
20
+
21
+ def file
22
+ finder.protect_from_errors do
23
+ File.new(self) if file?
24
+ end
25
+ end
26
+
27
+ def file?
28
+ finder.protect_from_errors { s = finder_stat and s.file? }
29
+ end
30
+
31
+ def directory?
32
+ finder.protect_from_errors { s = finder_stat and s.directory? }
33
+ end
34
+
35
+ def exist?
36
+ finder.protect_from_errors { File.exist?(self) }
37
+ end
38
+
39
+ def stat
40
+ finder.protect_from_errors { File.stat(self) }
41
+ end
42
+
43
+ def lstat
44
+ finder.protect_from_errors { File.lstat(self) }
45
+ end
46
+
47
+ def pathname
48
+ Pathname.new(self)
49
+ end
50
+
51
+ def suffix
52
+ pathname.extname[1..-1] || ''
53
+ end
54
+ end
55
+
12
56
  def initialize(opts = {})
13
57
  @show_hidden = opts.fetch(:show_hidden) { true }
14
58
  @raise_errors = opts.fetch(:raise_errors) { false }
15
59
  @follow_symlinks = opts.fetch(:follow_symlinks) { true }
60
+ opts[:suffix].full? { |s| @suffix = [*s] }
16
61
  end
17
62
 
18
- attr_reader :show_hidden
63
+ attr_accessor :show_hidden
64
+
65
+ attr_accessor :raise_errors
19
66
 
20
- attr_reader :raise_errors
67
+ attr_accessor :follow_symlinks
21
68
 
22
- attr_reader :follow_symlinks
69
+ attr_accessor :suffix
70
+
71
+ def visit_path?(path)
72
+ @suffix.nil? || @suffix.include?(path.suffix)
73
+ end
23
74
 
24
75
  def find(*paths)
25
76
  block_given? or return enum_for(__method__, *paths)
@@ -27,14 +78,10 @@ module Tins
27
78
  while path = paths.shift
28
79
  path = prepare_path(path)
29
80
  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
81
+ stat = path.finder_stat or next
82
+ visit_path?(path) and yield path
83
+ if stat.directory?
84
+ ps = protect_from_errors { Dir.entries(path) } or next
38
85
  ps.sort!
39
86
  ps.reverse_each do |p|
40
87
  next if p == "." or p == ".."
@@ -47,38 +94,18 @@ module Tins
47
94
  end
48
95
  end
49
96
 
50
- private
51
-
52
97
  def prepare_path(path)
53
98
  path = path.dup.taint
54
99
  path.extend PathExtension
55
100
  path.finder = self
56
101
  path
57
102
  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
103
 
78
- def file
79
- if stat.file?
80
- File.new(self)
81
- end
104
+ def protect_from_errors(errors = Find::EXPECTED_STANDARD_ERRORS)
105
+ yield
106
+ rescue errors
107
+ raise_errors and raise
108
+ return
82
109
  end
83
110
  end
84
111
 
@@ -6,7 +6,7 @@ module Tins
6
6
  include Comparable
7
7
 
8
8
  def initialize(string)
9
- string =~ /\A[\.\d]+\Z/ or raise ArgumentError, "#{string.inspect} isn't a version number"
9
+ string =~ /\A[\.\d]+\z/ or raise ArgumentError, "#{string.inspect} isn't a version number"
10
10
  @version = string.frozen? ? string.dup : string
11
11
  end
12
12
 
data/lib/tins/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Tins
2
2
  # Tins version
3
- VERSION = '0.4.3'
3
+ VERSION = '0.5.0'
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:
data/tests/find_test.rb CHANGED
@@ -31,8 +31,13 @@ module Tins
31
31
  assert_equal [ @work_dir, file ], find(@work_dir, :show_hidden => true).to_a
32
32
  end
33
33
 
34
- if RUBY_PLATFORM !~ /java/
35
- def test_check_directory_without_access
34
+ def test_check_directory_without_access
35
+ # do not run this test on JRuby
36
+ omit_if(RUBY_PLATFORM =~ /java/, "Can't run the test on JRuby")
37
+ # do not run this test if we're root, as it will fail.
38
+ omit_if(Process::UID.eid == 0, "Can't run the test as root")
39
+
40
+ begin
36
41
  mkdir_p directory1 = File.join(@work_dir, 'foo')
37
42
  mkdir_p directory2 = File.join(directory1, 'bar')
38
43
  touch file = File.join(directory2, 'file')
@@ -66,11 +71,44 @@ module Tins
66
71
  end
67
72
  end
68
73
 
74
+ def test_path_extension
75
+ finder = Tins::Find::Finder.new
76
+ f = File.open(path = File.join(@work_dir, 'foo.bar'), 'w')
77
+ ln_s path, path2 = File.join(@work_dir, 'foo2.bar')
78
+ path2 = finder.prepare_path path2
79
+ path = finder.prepare_path path
80
+ assert_true path.exist?
81
+ assert_true path.file?
82
+ assert_false path.directory?
83
+ assert_true finder.prepare_path(Dir.pwd).directory?
84
+ assert_equal Pathname.new(path), path.pathname
85
+ assert_equal 'bar', path.suffix
86
+ assert_true path2.lstat.symlink?
87
+ ensure
88
+ f and rm_f f.path
89
+ end
90
+
91
+ def test_suffix
92
+ finder = Tins::Find::Finder.new(:suffix => 'bar')
93
+ f = File.open(fpath = File.join(@work_dir, 'foo.bar'), 'w')
94
+ g = File.open(gpath = File.join(@work_dir, 'foo.baz'), 'w')
95
+ fpath = finder.prepare_path fpath
96
+ gpath = finder.prepare_path gpath
97
+ assert_true finder.visit_path?(fpath)
98
+ assert_false finder.visit_path?(gpath)
99
+ finder.suffix = nil
100
+ assert_true finder.visit_path?(fpath)
101
+ assert_true finder.visit_path?(gpath)
102
+ ensure
103
+ f and rm_f f.path
104
+ g and rm_f g.path
105
+ end
106
+
69
107
  def test_prune
70
108
  mkdir_p directory1 = File.join(@work_dir, 'foo1')
71
109
  mkdir_p directory2 = File.join(@work_dir, 'foo2')
72
110
  result = []
73
- find(@work_dir) { |f| f =~ /foo2\Z/ and prune; result << f }
111
+ find(@work_dir) { |f| f =~ /foo2\z/ and prune; result << f }
74
112
  assert_equal [ @work_dir, directory1 ], result
75
113
  end
76
114
  end
data/tests/test_helper.rb CHANGED
@@ -4,4 +4,5 @@ if ENV['START_SIMPLECOV'].to_i == 1
4
4
  add_filter "#{File.basename(File.dirname(__FILE__))}/"
5
5
  end
6
6
  end
7
+ gem 'test-unit', '~> 2.4'
7
8
  require 'test/unit'
data/tins.gemspec CHANGED
@@ -1,38 +1,39 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = "tins"
5
- s.version = "0.4.3"
4
+ s.name = %q{tins}
5
+ s.version = "0.5.0"
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 = "2012-06-02"
10
- s.description = "All the stuff that isn't good/big enough for a real library."
11
- s.email = "flori@ping.de"
12
- s.extra_rdoc_files = ["README.rdoc", "lib/spruz.rb", "lib/tins/alias.rb", "lib/tins/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_dup.rb", "lib/tins/extract_last_argument_options.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/if_predicate.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/ask_and_send.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/date_dummy.rb", "lib/tins/xt/date_time_dummy.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/extract_last_argument_options.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/if_predicate.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", "lib/tins/xt.rb", "lib/tins.rb"]
9
+ s.date = %q{2012-07-12}
10
+ s.description = %q{All the stuff that isn't good/big enough for a real library.}
11
+ s.email = %q{flori@ping.de}
12
+ s.extra_rdoc_files = ["README.rdoc", "lib/spruz.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/ask_and_send.rb", "lib/tins/string_underscore.rb", "lib/tins/hash_union.rb", "lib/tins/write.rb", "lib/tins/version.rb", "lib/tins/extract_last_argument_options.rb", "lib/tins/alias.rb", "lib/tins/round.rb", "lib/tins/date_dummy.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/ask_and_send.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/write.rb", "lib/tins/xt/extract_last_argument_options.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/round.rb", "lib/tins/xt/date_dummy.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/xt/if_predicate.rb", "lib/tins/xt/date_time_dummy.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/if_predicate.rb", "lib/tins/date_time_dummy.rb", "lib/tins.rb"]
13
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/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_dup.rb", "lib/tins/extract_last_argument_options.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/if_predicate.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/ask_and_send.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/date_dummy.rb", "lib/tins/xt/date_time_dummy.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/extract_last_argument_options.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/if_predicate.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/ask_and_send_test.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_dup_test.rb", "tests/extract_last_argument_options_test.rb", "tests/file_binary_test.rb", "tests/find_test.rb", "tests/generator_test.rb", "tests/go_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/hash_union_test.rb", "tests/if_predicate_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
- s.homepage = "http://flori.github.com/tins"
14
+ s.homepage = %q{http://flori.github.com/tins}
15
15
  s.rdoc_options = ["--title", "Tins - Useful stuff.", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
- s.rubygems_version = "1.8.24"
18
- s.summary = "Useful stuff."
19
- s.test_files = ["tests/ask_and_send_test.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_dup_test.rb", "tests/extract_last_argument_options_test.rb", "tests/file_binary_test.rb", "tests/find_test.rb", "tests/generator_test.rb", "tests/go_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/hash_union_test.rb", "tests/if_predicate_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", "tests/ask_and_send_test.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_dup_test.rb", "tests/extract_last_argument_options_test.rb", "tests/file_binary_test.rb", "tests/find_test.rb", "tests/generator_test.rb", "tests/go_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/hash_union_test.rb", "tests/if_predicate_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/time_dummy_test.rb", "tests/try_test.rb", "tests/uniq_by_test.rb"]
17
+ s.rubygems_version = %q{1.3.6}
18
+ s.summary = %q{Useful stuff.}
19
+ s.test_files = ["tests/generator_test.rb", "tests/null_test.rb", "tests/find_test.rb", "tests/date_time_dummy_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/if_predicate_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/extract_last_argument_options_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/date_dummy_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/go_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/ask_and_send_test.rb", "tests/module_group_test.rb", "tests/generator_test.rb", "tests/null_test.rb", "tests/find_test.rb", "tests/date_time_dummy_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/if_predicate_test.rb", "tests/secure_write_test.rb", "tests/string_version_test.rb", "tests/try_test.rb", "tests/extract_last_argument_options_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/date_dummy_test.rb", "tests/hash_symbolize_keys_recursive_test.rb", "tests/named_test.rb", "tests/hash_union_test.rb", "tests/go_test.rb", "tests/subhash_test.rb", "tests/partial_application_test.rb", "tests/minimize_test.rb", "tests/round_test.rb", "tests/shuffle_test.rb", "tests/ask_and_send_test.rb", "tests/module_group_test.rb"]
20
20
 
21
21
  if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
22
23
  s.specification_version = 3
23
24
 
24
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
25
26
  s.add_development_dependency(%q<gem_hadar>, ["~> 0.1.8"])
26
- s.add_development_dependency(%q<test-unit>, ["~> 2.3"])
27
+ s.add_development_dependency(%q<test-unit>, ["~> 2.5"])
27
28
  s.add_development_dependency(%q<utils>, [">= 0"])
28
29
  else
29
30
  s.add_dependency(%q<gem_hadar>, ["~> 0.1.8"])
30
- s.add_dependency(%q<test-unit>, ["~> 2.3"])
31
+ s.add_dependency(%q<test-unit>, ["~> 2.5"])
31
32
  s.add_dependency(%q<utils>, [">= 0"])
32
33
  end
33
34
  else
34
35
  s.add_dependency(%q<gem_hadar>, ["~> 0.1.8"])
35
- s.add_dependency(%q<test-unit>, ["~> 2.3"])
36
+ s.add_dependency(%q<test-unit>, ["~> 2.5"])
36
37
  s.add_dependency(%q<utils>, [">= 0"])
37
38
  end
38
39
  end
metadata CHANGED
@@ -1,145 +1,144 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tins
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.3
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 0
9
+ version: 0.5.0
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Florian Frank
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-06-02 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: gem_hadar
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
16
+
17
+ date: 2012-07-12 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ type: :development
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirements:
19
24
  - - ~>
20
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ segments:
27
+ - 0
28
+ - 1
29
+ - 8
21
30
  version: 0.1.8
22
- type: :development
31
+ name: gem_hadar
32
+ requirement: *id001
23
33
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
34
+ - !ruby/object:Gem::Dependency
35
+ type: :development
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirements:
27
38
  - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 0.1.8
30
- - !ruby/object:Gem::Dependency
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 2
42
+ - 5
43
+ version: "2.5"
31
44
  name: test-unit
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '2.3'
38
- type: :development
45
+ requirement: *id002
39
46
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '2.3'
46
- - !ruby/object:Gem::Dependency
47
- name: utils
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
47
+ - !ruby/object:Gem::Dependency
54
48
  type: :development
49
+ version_requirements: &id003 !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ name: utils
57
+ requirement: *id003
55
58
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
59
  description: All the stuff that isn't good/big enough for a real library.
63
60
  email: flori@ping.de
64
61
  executables: []
62
+
65
63
  extensions: []
66
- extra_rdoc_files:
64
+
65
+ extra_rdoc_files:
67
66
  - README.rdoc
68
67
  - lib/spruz.rb
69
- - lib/tins/alias.rb
68
+ - lib/tins/hash_symbolize_keys_recursive.rb
70
69
  - lib/tins/ask_and_send.rb
71
- - lib/tins/attempt.rb
72
- - lib/tins/bijection.rb
73
- - lib/tins/count_by.rb
74
- - lib/tins/date_dummy.rb
75
- - lib/tins/date_time_dummy.rb
76
- - lib/tins/deep_dup.rb
70
+ - lib/tins/string_underscore.rb
71
+ - lib/tins/hash_union.rb
72
+ - lib/tins/write.rb
73
+ - lib/tins/version.rb
77
74
  - lib/tins/extract_last_argument_options.rb
78
- - lib/tins/file_binary.rb
75
+ - lib/tins/alias.rb
76
+ - lib/tins/round.rb
77
+ - lib/tins/date_dummy.rb
78
+ - lib/tins/go.rb
79
79
  - lib/tins/find.rb
80
80
  - lib/tins/generator.rb
81
- - lib/tins/go.rb
82
- - lib/tins/hash_symbolize_keys_recursive.rb
83
- - lib/tins/hash_union.rb
84
- - lib/tins/if_predicate.rb
85
- - lib/tins/limited.rb
86
- - lib/tins/lines_file.rb
81
+ - lib/tins/string_camelize.rb
82
+ - lib/tins/shuffle.rb
83
+ - lib/tins/deep_dup.rb
87
84
  - lib/tins/memoize.rb
88
- - lib/tins/minimize.rb
85
+ - lib/tins/lines_file.rb
86
+ - lib/tins/subhash.rb
87
+ - lib/tins/bijection.rb
88
+ - lib/tins/limited.rb
89
+ - lib/tins/attempt.rb
90
+ - lib/tins/to_proc.rb
89
91
  - lib/tins/module_group.rb
90
92
  - lib/tins/null.rb
91
- - lib/tins/once.rb
92
- - lib/tins/p.rb
93
- - lib/tins/partial_application.rb
94
- - lib/tins/range_plus.rb
95
93
  - lib/tins/require_maybe.rb
96
- - lib/tins/round.rb
97
94
  - lib/tins/secure_write.rb
98
- - lib/tins/shuffle.rb
99
- - lib/tins/string_camelize.rb
100
- - lib/tins/string_underscore.rb
95
+ - lib/tins/xt.rb
96
+ - lib/tins/file_binary.rb
101
97
  - lib/tins/string_version.rb
102
- - lib/tins/subhash.rb
103
- - lib/tins/time_dummy.rb
104
- - lib/tins/to_proc.rb
105
- - lib/tins/uniq_by.rb
106
- - lib/tins/version.rb
107
- - lib/tins/write.rb
108
- - lib/tins/xt/ask_and_send.rb
109
- - lib/tins/xt/attempt.rb
110
- - lib/tins/xt/blank.rb
111
- - lib/tins/xt/count_by.rb
112
- - lib/tins/xt/date_dummy.rb
113
- - lib/tins/xt/date_time_dummy.rb
114
- - lib/tins/xt/deep_dup.rb
115
- - lib/tins/xt/extract_last_argument_options.rb
116
- - lib/tins/xt/file_binary.rb
117
- - lib/tins/xt/full.rb
98
+ - lib/tins/once.rb
99
+ - lib/tins/xt/named.rb
118
100
  - lib/tins/xt/hash_symbolize_keys_recursive.rb
101
+ - lib/tins/xt/ask_and_send.rb
102
+ - lib/tins/xt/string_underscore.rb
119
103
  - lib/tins/xt/hash_union.rb
120
- - lib/tins/xt/if_predicate.rb
104
+ - lib/tins/xt/write.rb
105
+ - lib/tins/xt/extract_last_argument_options.rb
121
106
  - lib/tins/xt/irb.rb
122
- - lib/tins/xt/named.rb
107
+ - lib/tins/xt/round.rb
108
+ - lib/tins/xt/date_dummy.rb
109
+ - lib/tins/xt/string_camelize.rb
110
+ - lib/tins/xt/shuffle.rb
111
+ - lib/tins/xt/deep_dup.rb
112
+ - lib/tins/xt/symbol_to_proc.rb
113
+ - lib/tins/xt/subhash.rb
114
+ - lib/tins/xt/attempt.rb
123
115
  - lib/tins/xt/null.rb
124
- - lib/tins/xt/p.rb
125
- - lib/tins/xt/partial_application.rb
126
- - lib/tins/xt/range_plus.rb
127
116
  - lib/tins/xt/require_maybe.rb
128
- - lib/tins/xt/round.rb
129
117
  - lib/tins/xt/secure_write.rb
130
- - lib/tins/xt/shuffle.rb
131
- - lib/tins/xt/string.rb
132
- - lib/tins/xt/string_camelize.rb
133
- - lib/tins/xt/string_underscore.rb
118
+ - lib/tins/xt/file_binary.rb
134
119
  - lib/tins/xt/string_version.rb
135
- - lib/tins/xt/subhash.rb
136
- - lib/tins/xt/symbol_to_proc.rb
120
+ - lib/tins/xt/p.rb
121
+ - lib/tins/xt/partial_application.rb
137
122
  - lib/tins/xt/time_dummy.rb
123
+ - lib/tins/xt/string.rb
124
+ - lib/tins/xt/full.rb
125
+ - lib/tins/xt/range_plus.rb
126
+ - lib/tins/xt/count_by.rb
127
+ - lib/tins/xt/blank.rb
138
128
  - lib/tins/xt/uniq_by.rb
139
- - lib/tins/xt/write.rb
140
- - lib/tins/xt.rb
129
+ - lib/tins/xt/if_predicate.rb
130
+ - lib/tins/xt/date_time_dummy.rb
131
+ - lib/tins/p.rb
132
+ - lib/tins/minimize.rb
133
+ - lib/tins/partial_application.rb
134
+ - lib/tins/time_dummy.rb
135
+ - lib/tins/range_plus.rb
136
+ - lib/tins/count_by.rb
137
+ - lib/tins/uniq_by.rb
138
+ - lib/tins/if_predicate.rb
139
+ - lib/tins/date_time_dummy.rb
141
140
  - lib/tins.rb
142
- files:
141
+ files:
143
142
  - .gitignore
144
143
  - .travis.yml
145
144
  - Gemfile
@@ -259,71 +258,108 @@ files:
259
258
  - tests/try_test.rb
260
259
  - tests/uniq_by_test.rb
261
260
  - tins.gemspec
261
+ has_rdoc: true
262
262
  homepage: http://flori.github.com/tins
263
263
  licenses: []
264
+
264
265
  post_install_message:
265
- rdoc_options:
266
+ rdoc_options:
266
267
  - --title
267
268
  - Tins - Useful stuff.
268
269
  - --main
269
270
  - README.rdoc
270
- require_paths:
271
+ require_paths:
271
272
  - lib
272
- required_ruby_version: !ruby/object:Gem::Requirement
273
- none: false
274
- requirements:
275
- - - ! '>='
276
- - !ruby/object:Gem::Version
277
- version: '0'
278
- segments:
273
+ required_ruby_version: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ segments:
278
+ - 0
279
+ version: "0"
280
+ required_rubygems_version: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ segments:
279
285
  - 0
280
- hash: -2442091054952005424
281
- required_rubygems_version: !ruby/object:Gem::Requirement
282
- none: false
283
- requirements:
284
- - - ! '>='
285
- - !ruby/object:Gem::Version
286
- version: '0'
286
+ version: "0"
287
287
  requirements: []
288
+
288
289
  rubyforge_project:
289
- rubygems_version: 1.8.24
290
+ rubygems_version: 1.3.6
290
291
  signing_key:
291
292
  specification_version: 3
292
293
  summary: Useful stuff.
293
- test_files:
294
- - tests/ask_and_send_test.rb
295
- - tests/bijection_test.rb
296
- - tests/blank_full_test.rb
297
- - tests/count_by_test.rb
298
- - tests/date_dummy_test.rb
294
+ test_files:
295
+ - tests/generator_test.rb
296
+ - tests/null_test.rb
297
+ - tests/find_test.rb
299
298
  - tests/date_time_dummy_test.rb
299
+ - tests/range_plus_test.rb
300
300
  - tests/deep_dup_test.rb
301
- - tests/extract_last_argument_options_test.rb
301
+ - tests/bijection_test.rb
302
+ - tests/memoize_test.rb
303
+ - tests/limited_test.rb
304
+ - tests/count_by_test.rb
305
+ - tests/blank_full_test.rb
302
306
  - tests/file_binary_test.rb
303
- - tests/find_test.rb
304
- - tests/generator_test.rb
305
- - tests/go_test.rb
306
- - tests/hash_symbolize_keys_recursive_test.rb
307
- - tests/hash_union_test.rb
308
307
  - tests/if_predicate_test.rb
309
- - tests/limited_test.rb
308
+ - tests/secure_write_test.rb
309
+ - tests/string_version_test.rb
310
+ - tests/try_test.rb
311
+ - tests/extract_last_argument_options_test.rb
312
+ - tests/require_maybe_test.rb
313
+ - tests/uniq_by_test.rb
314
+ - tests/time_dummy_test.rb
315
+ - tests/string_camelize_test.rb
310
316
  - tests/lines_file_test.rb
311
- - tests/memoize_test.rb
317
+ - tests/string_underscore_test.rb
318
+ - tests/date_dummy_test.rb
319
+ - tests/hash_symbolize_keys_recursive_test.rb
320
+ - tests/named_test.rb
321
+ - tests/hash_union_test.rb
322
+ - tests/go_test.rb
323
+ - tests/subhash_test.rb
324
+ - tests/partial_application_test.rb
312
325
  - tests/minimize_test.rb
326
+ - tests/round_test.rb
327
+ - tests/test_helper.rb
328
+ - tests/shuffle_test.rb
329
+ - tests/ask_and_send_test.rb
313
330
  - tests/module_group_test.rb
314
- - tests/named_test.rb
331
+ - tests/generator_test.rb
315
332
  - tests/null_test.rb
316
- - tests/partial_application_test.rb
333
+ - tests/find_test.rb
334
+ - tests/date_time_dummy_test.rb
317
335
  - tests/range_plus_test.rb
318
- - tests/require_maybe_test.rb
319
- - tests/round_test.rb
336
+ - tests/deep_dup_test.rb
337
+ - tests/bijection_test.rb
338
+ - tests/memoize_test.rb
339
+ - tests/limited_test.rb
340
+ - tests/count_by_test.rb
341
+ - tests/blank_full_test.rb
342
+ - tests/file_binary_test.rb
343
+ - tests/if_predicate_test.rb
320
344
  - tests/secure_write_test.rb
321
- - tests/shuffle_test.rb
322
- - tests/string_camelize_test.rb
323
- - tests/string_underscore_test.rb
324
345
  - tests/string_version_test.rb
325
- - tests/subhash_test.rb
326
- - tests/test_helper.rb
327
- - tests/time_dummy_test.rb
328
346
  - tests/try_test.rb
347
+ - tests/extract_last_argument_options_test.rb
348
+ - tests/require_maybe_test.rb
329
349
  - tests/uniq_by_test.rb
350
+ - tests/time_dummy_test.rb
351
+ - tests/string_camelize_test.rb
352
+ - tests/lines_file_test.rb
353
+ - tests/string_underscore_test.rb
354
+ - tests/date_dummy_test.rb
355
+ - tests/hash_symbolize_keys_recursive_test.rb
356
+ - tests/named_test.rb
357
+ - tests/hash_union_test.rb
358
+ - tests/go_test.rb
359
+ - tests/subhash_test.rb
360
+ - tests/partial_application_test.rb
361
+ - tests/minimize_test.rb
362
+ - tests/round_test.rb
363
+ - tests/shuffle_test.rb
364
+ - tests/ask_and_send_test.rb
365
+ - tests/module_group_test.rb