tins 0.3.4 → 0.3.5

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.
@@ -0,0 +1,30 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class PartialApplicationTest < Test::Unit::TestCase
6
+
7
+ def mul(x, y) x * y end
8
+
9
+ define_method(:dup) { |y| method(:mul).partial(2)[y] }
10
+
11
+ define_method(:trip) { |y| method(:mul).partial(3)[y] }
12
+
13
+
14
+ def test_proc
15
+ mul = lambda { |x, y| x * y }
16
+ klon = mul.partial
17
+ dup = mul.partial(2)
18
+ trip = mul.partial(3)
19
+ assert_equal [ 6, 9, 12 ], [ dup[3], trip[3], mul[4, 3] ]
20
+ assert_equal [ 6, 9, 12 ], [ dup[3], trip[3], klon[4, 3] ]
21
+ assert_raises(ArgumentError) do
22
+ mul.partial(1, 2, 3)
23
+ end
24
+ end
25
+
26
+ def test_method
27
+ assert_equal [ 6, 9, 12 ], [ dup(3), trip(3), mul(4, 3) ]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class RangePlustTest < Test::Unit::TestCase
6
+
7
+ def test_range_plus
8
+ assert_equal [], (0...0) + (0...0)
9
+ assert_equal [ 0 ], (0..0) + (0...0)
10
+ assert_equal [ 0, 0 ], (0..0) + (0..0)
11
+ assert_equal((1..5).to_a, (1...3) + (3..5))
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,24 @@
1
+ require 'test_helper'
2
+ require 'tins'
3
+
4
+ module Tins
5
+ require 'tins/xt/require_maybe'
6
+ class RequireMaybeTest < Test::Unit::TestCase
7
+ def test_require_maybe_failed
8
+ executed = false
9
+ require_maybe 'nix' do
10
+ executed = true
11
+ end
12
+ assert executed, 'require did not fail'
13
+ end
14
+
15
+ def test_require_maybe_succeeded
16
+ not_executed = true
17
+ result = require_maybe 'tins' do
18
+ not_executed = false
19
+ end
20
+ assert [ false, true ].include?(result)
21
+ assert not_executed, 'require failed'
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,32 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class RoundTest < Test::Unit::TestCase
6
+
7
+ def test_standard
8
+ assert_equal(1, 1.round)
9
+ assert_equal(-1, -1.round)
10
+ assert_equal(2, 1.5.round)
11
+ assert_kind_of Integer, 1.5.round
12
+ assert_equal(-1, -1.4.round)
13
+ assert_equal(-2, -1.5.round)
14
+ end
15
+
16
+ def test_inclusion
17
+ assert_equal(10, 12.round(-1))
18
+ assert_kind_of Integer, 12.round(-1)
19
+ assert_equal(-10, -12.round(-1))
20
+ assert_raises(ArgumentError) { 12.round(-2) }
21
+ assert_raises(ArgumentError) { -12.round(-2) }
22
+ assert_in_delta(1.6, 1.55.round(1), 1E-1)
23
+ assert_kind_of Float, 1.55.round(1)
24
+ assert_equal(2, 1.55.round(0))
25
+ assert_in_delta(-1.5, -1.45.round(1), 1E-1)
26
+ assert_equal(-1, -1.45.round(0))
27
+ assert_in_delta(-1.6, -1.55.round(1), 1E-1)
28
+ assert_equal(-2, -1.55.round(0))
29
+ assert_in_delta(-1.55, -1.55.round(999), 1E-2)
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,30 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ if Tins::Shuffle === Array
6
+ class ShuffleTest < Test::Unit::TestCase
7
+
8
+ def setup
9
+ @a = [ 1, 2, 3 ]
10
+ srand 666
11
+ end
12
+
13
+ def test_shuffle
14
+ assert_equal(a = [2, 3, 1], a = @a.shuffle)
15
+ assert_not_same @a, a
16
+ assert_equal(b = [3, 1, 2], b = @a.shuffle)
17
+ assert_not_same a, b
18
+ assert_not_same @a, b
19
+ end
20
+
21
+ def test_shuffle_bang
22
+ assert_equal([2, 3, 1], a = @a.shuffle!)
23
+ assert_same @a, a
24
+ assert_equal([1, 2, 3], b = @a.shuffle!)
25
+ assert_same a, b
26
+ assert_same @a, b
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class StringCamelizeTest < Test::Unit::TestCase
6
+ def test_camelize
7
+ assert_equal 'FooBar', 'foo_bar'.camelize
8
+ assert_equal 'FooBar', 'foo_bar'.camelize(:upper)
9
+ assert_equal 'FooBar', 'foo_bar'.camelize(true)
10
+ assert_equal 'fooBar', 'foo_bar'.camelize(:lower)
11
+ assert_equal 'fooBar', 'foo_bar'.camelize(false)
12
+ assert_equal 'FooBar', 'foo_bar'.camelcase
13
+ assert_equal 'Foo::Bar', 'foo/bar'.camelize
14
+ assert_equal 'Foo::Bar', 'foo/bar'.camelize(:upper)
15
+ assert_equal 'Foo::Bar', 'foo/bar'.camelize(true)
16
+ assert_equal 'foo::Bar', 'foo/bar'.camelize(:lower)
17
+ assert_equal 'foo::Bar', 'foo/bar'.camelize(false)
18
+ assert_equal 'Foo::Bar', 'foo/bar'.camelcase
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class StringUnderscoreTest < Test::Unit::TestCase
6
+ def test_underscore
7
+ assert_equal 'foo_bar', 'FooBar'.underscore
8
+ assert_equal 'foo/bar', 'Foo::Bar'.underscore
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ require 'test_helper'
2
+ require 'tins'
3
+
4
+ module Tins
5
+ class StringVersionTest < Test::Unit::TestCase
6
+ def test_comparison
7
+ assert_operator '1.2'.version, :<, '1.3'.version
8
+ assert_operator '1.3'.version, :>, '1.2'.version
9
+ assert_operator '1.2'.version, :<=, '1.2'.version
10
+ assert_operator '1.2'.version, :>=, '1.2'.version
11
+ assert_operator '1.2'.version, :==, '1.2'.version
12
+ end
13
+
14
+ def test_change
15
+ s = '1.2'
16
+ s.version.revision = 1
17
+ assert_equal '1.2.0.1', s
18
+ s.version.revision += 1
19
+ assert_equal '1.2.0.2', s
20
+ s.version.succ!
21
+ assert_equal '1.2.0.3', s
22
+ s.version.pred!
23
+ assert_equal '1.2.0.2', s
24
+ assert_raise(ArgumentError) { s.version.build -= 1 }
25
+ s.version.major = 2
26
+ assert_equal '2.2.0.2', s
27
+ s.version.minor = 1
28
+ assert_equal '2.1.0.2', s
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,29 @@
1
+ require 'test_helper'
2
+ require 'tins'
3
+
4
+ module Tins
5
+ class SubhashTest < Test::Unit::TestCase
6
+ require 'tins/xt/subhash'
7
+
8
+ def test_subhash
9
+ h = { 'foo1' => 1, 'foo2' => 2, 'bar666' => 666 }
10
+ assert_equal [ [ 'bar666', 666 ] ], h.subhash(/\Abar/).to_a
11
+ assert h.subhash(/\Abaz/).empty?
12
+ assert_equal [ [ 'foo1', 1 ], [ 'foo2', 2 ] ], h.subhash(/\Afoo\d/).to_a
13
+ assert_equal [ [ 'foo2', 2 ] ], h.subhash('foo2').to_a
14
+ end
15
+
16
+ def test_subhash_bang
17
+ h = { 'foo1' => 1, 'foo2' => 2, 'bar666' => 666 }
18
+ h.subhash!('foo2')
19
+ assert_equal [ [ 'foo2', 2 ] ], h.to_a
20
+ end
21
+
22
+ def test_subhash_with_block
23
+ h = { 'foo1' => 1, 'foo2' => 2, 'bar666' => 666 }
24
+ assert h.subhash(/\Abaz/) { :foo }.empty?
25
+ assert_equal [ [ 'foo1', 1 ], [ 'foo2', 2 ] ],
26
+ h.subhash(/\Afoo(\d)/) { |_,_,m| Integer(m[1]) }.to_a
27
+ end
28
+ end
29
+ end
data/tests/test_helper.rb CHANGED
@@ -1,3 +1,7 @@
1
- require 'gem_hadar'
2
- ENV['START_SIMPLECOV'].to_i == 1 and GemHadar.start_simplecov
1
+ if ENV['START_SIMPLECOV'].to_i == 1
2
+ require 'simplecov'
3
+ SimpleCov.start do
4
+ add_filter "#{File.basename(File.dirname(__FILE__))}/"
5
+ end
6
+ end
3
7
  require 'test/unit'
@@ -0,0 +1,18 @@
1
+ require 'test_helper'
2
+ require 'tins'
3
+
4
+ module Tins
5
+ class TimeDummyTest < Test::Unit::TestCase
6
+ require 'tins/xt/time_dummy'
7
+ require 'time'
8
+
9
+ def test_time_dummy
10
+ time = Time.parse('2009-09-09 21:09:09')
11
+ assert_not_equal time, Time.now
12
+ Time.dummy = time
13
+ assert_equal time, Time.now
14
+ Time.dummy = nil
15
+ assert_not_equal time, Time.now
16
+ end
17
+ end
18
+ end
data/tests/try_test.rb ADDED
@@ -0,0 +1,34 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class TryTest < Test::Unit::TestCase
6
+
7
+ def test_attempt_block_condition
8
+ assert attempt(:attempts => 1, :exception_class => nil) { |c| c == 1 }
9
+ assert attempt(:attempts => 3, :exception_class => nil) { |c| c == 1 }
10
+ assert_equal false, attempt(:attempts => 3, :exception_class => nil) { |c| c == 4 }
11
+ assert_nil attempt(:attempts => 0, :exception_class => nil) { |c| c == 4 }
12
+ assert_raise(Exception) { attempt(:attempts => 3, :exception_class => nil) { raise Exception } }
13
+ end
14
+
15
+ class MyError < StandardError; end
16
+ class MyException < Exception; end
17
+
18
+ def test_attempt_default_exception
19
+ assert attempt(1) { |c| c != 1 and raise MyError }
20
+ assert attempt(3) { |c| c != 1 and raise MyError }
21
+ assert_equal false, attempt(3) { |c| c != 4 and raise MyError }
22
+ assert_nil attempt(0) { |c| c != 4 and raise MyError }
23
+ assert_raise(Exception) { attempt(3) { raise Exception } }
24
+ end
25
+
26
+ def test_attempt_exception
27
+ assert attempt(:attempts => 1, :exception_class => MyException) { |c| c != 1 and raise MyException }
28
+ assert attempt(:attempts => 3, :exception_class => MyException) { |c| c != 1 and raise MyException }
29
+ assert_equal false, attempt(:attempts => 3, :exception_class => MyException) { |c| c != 4 and raise MyException }
30
+ assert_nil attempt(:attempts => 0, :exception_class => MyException) { |c| c != 4 and raise MyException }
31
+ assert_raise(Exception) { attempt(:attempts => 3, :exception_class => MyException) { raise Exception } }
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,31 @@
1
+ require 'test_helper'
2
+ require 'tins/xt'
3
+
4
+ module Tins
5
+ class UniqByTest < Test::Unit::TestCase
6
+
7
+ unless defined?(Point)
8
+ class Point < Struct.new :x, :y
9
+ end
10
+ end
11
+
12
+ def test_uniq_by
13
+ assert_equal [ 1, 2, 3 ], [ 1, 2, 2, 3 ].uniq_by.sort
14
+ a = [ 1, 2, 2, 3 ]; a.uniq_by!
15
+ assert_equal [ 1, 2, 3 ], a.sort
16
+ p1 = Point.new 1, 2
17
+ p2 = Point.new 2, 2
18
+ p3 = Point.new 2, 2
19
+ p4 = Point.new 3, 3
20
+ a = [ p1, p2, p3, p4 ]
21
+ a_uniq = a.uniq_by { |p| p.y }
22
+ assert_equal 2, a_uniq.size
23
+ assert a_uniq.include?(p4)
24
+ assert [ p1, p2, p3 ].any? { |p| a_uniq.include? p }
25
+ a.uniq_by! { |p| p.y }
26
+ assert_equal 2, a.size
27
+ assert a.include?(p4)
28
+ assert [ p1, p2, p3 ].any? { |p| a.include? p }
29
+ end
30
+ end
31
+ end
data/tins.gemspec CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "tins"
5
- s.version = "0.3.4"
5
+ s.version = "0.3.5"
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-08"
9
+ s.date = "2011-12-19"
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/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/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", "lib/tins/xt.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/test_helper.rb", "tests/tins_file_binary_test.rb", "tests/tins_lines_file_test.rb", "tests/tins_memoize_test.rb", "tests/tins_secure_write_test.rb", "tests/tins_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/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"]
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/test_helper.rb", "tests/tins_file_binary_test.rb", "tests/tins_lines_file_test.rb", "tests/tins_memoize_test.rb", "tests/tins_secure_write_test.rb", "tests/tins_test.rb", "tests/tins_file_binary_test.rb", "tests/tins_lines_file_test.rb", "tests/tins_memoize_test.rb", "tests/tins_secure_write_test.rb", "tests/tins_test.rb"]
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"]
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.4
4
+ version: 0.3.5
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-08 00:00:00.000000000 Z
12
+ date: 2011-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
16
- requirement: &2156093900 !ruby/object:Gem::Requirement
16
+ requirement: &74624010 !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: *2156093900
24
+ version_requirements: *74624010
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: test-unit
27
- requirement: &2156093380 !ruby/object:Gem::Requirement
27
+ requirement: &74623790 !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: *2156093380
35
+ version_requirements: *74623790
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: []
@@ -40,67 +40,67 @@ extensions: []
40
40
  extra_rdoc_files:
41
41
  - README.rdoc
42
42
  - lib/spruz.rb
43
- - lib/tins/alias.rb
44
- - lib/tins/attempt.rb
45
- - lib/tins/bijection.rb
46
- - lib/tins/count_by.rb
47
- - lib/tins/deep_dup.rb
48
- - lib/tins/file_binary.rb
49
- - lib/tins/generator.rb
50
- - lib/tins/go.rb
51
43
  - lib/tins/hash_symbolize_keys_recursive.rb
44
+ - lib/tins/string_underscore.rb
52
45
  - lib/tins/hash_union.rb
53
- - lib/tins/limited.rb
54
- - lib/tins/lines_file.rb
46
+ - lib/tins/write.rb
47
+ - lib/tins/version.rb
48
+ - lib/tins/alias.rb
49
+ - lib/tins/round.rb
50
+ - lib/tins/go.rb
51
+ - lib/tins/generator.rb
52
+ - lib/tins/string_camelize.rb
53
+ - lib/tins/shuffle.rb
54
+ - lib/tins/deep_dup.rb
55
55
  - lib/tins/memoize.rb
56
- - lib/tins/minimize.rb
56
+ - lib/tins/lines_file.rb
57
+ - lib/tins/subhash.rb
58
+ - lib/tins/bijection.rb
59
+ - lib/tins/limited.rb
60
+ - lib/tins/attempt.rb
61
+ - lib/tins/to_proc.rb
57
62
  - lib/tins/module_group.rb
58
63
  - lib/tins/null.rb
59
- - lib/tins/once.rb
60
- - lib/tins/p.rb
61
- - lib/tins/partial_application.rb
62
- - lib/tins/range_plus.rb
63
64
  - lib/tins/require_maybe.rb
64
- - lib/tins/round.rb
65
65
  - lib/tins/secure_write.rb
66
- - lib/tins/shuffle.rb
67
- - lib/tins/string_camelize.rb
68
- - lib/tins/string_underscore.rb
66
+ - lib/tins/xt.rb
67
+ - lib/tins/file_binary.rb
69
68
  - lib/tins/string_version.rb
70
- - lib/tins/subhash.rb
71
- - lib/tins/time_dummy.rb
72
- - lib/tins/to_proc.rb
73
- - lib/tins/uniq_by.rb
74
- - lib/tins/version.rb
75
- - lib/tins/write.rb
76
- - lib/tins/xt/attempt.rb
77
- - lib/tins/xt/blank.rb
78
- - lib/tins/xt/count_by.rb
79
- - lib/tins/xt/deep_dup.rb
80
- - lib/tins/xt/file_binary.rb
81
- - lib/tins/xt/full.rb
69
+ - lib/tins/once.rb
70
+ - lib/tins/xt/named.rb
82
71
  - lib/tins/xt/hash_symbolize_keys_recursive.rb
72
+ - lib/tins/xt/string_underscore.rb
83
73
  - lib/tins/xt/hash_union.rb
74
+ - lib/tins/xt/write.rb
84
75
  - lib/tins/xt/irb.rb
85
- - lib/tins/xt/named.rb
76
+ - lib/tins/xt/round.rb
77
+ - lib/tins/xt/string_camelize.rb
78
+ - lib/tins/xt/shuffle.rb
79
+ - lib/tins/xt/deep_dup.rb
80
+ - lib/tins/xt/symbol_to_proc.rb
81
+ - lib/tins/xt/subhash.rb
82
+ - lib/tins/xt/attempt.rb
86
83
  - lib/tins/xt/null.rb
87
- - lib/tins/xt/p.rb
88
- - lib/tins/xt/partial_application.rb
89
- - lib/tins/xt/range_plus.rb
90
84
  - lib/tins/xt/require_maybe.rb
91
- - lib/tins/xt/round.rb
92
85
  - lib/tins/xt/secure_write.rb
93
- - lib/tins/xt/shuffle.rb
94
- - lib/tins/xt/string.rb
95
- - lib/tins/xt/string_camelize.rb
96
- - lib/tins/xt/string_underscore.rb
86
+ - lib/tins/xt/file_binary.rb
97
87
  - lib/tins/xt/string_version.rb
98
- - lib/tins/xt/subhash.rb
99
- - lib/tins/xt/symbol_to_proc.rb
88
+ - lib/tins/xt/p.rb
89
+ - lib/tins/xt/partial_application.rb
100
90
  - lib/tins/xt/time_dummy.rb
91
+ - lib/tins/xt/string.rb
92
+ - lib/tins/xt/full.rb
93
+ - lib/tins/xt/range_plus.rb
94
+ - lib/tins/xt/count_by.rb
95
+ - lib/tins/xt/blank.rb
101
96
  - lib/tins/xt/uniq_by.rb
102
- - lib/tins/xt/write.rb
103
- - lib/tins/xt.rb
97
+ - lib/tins/p.rb
98
+ - lib/tins/minimize.rb
99
+ - lib/tins/partial_application.rb
100
+ - lib/tins/time_dummy.rb
101
+ - lib/tins/range_plus.rb
102
+ - lib/tins/count_by.rb
103
+ - lib/tins/uniq_by.rb
104
104
  - lib/tins.rb
105
105
  files:
106
106
  - .gitignore
@@ -174,12 +174,35 @@ files:
174
174
  - lib/tins/xt/time_dummy.rb
175
175
  - lib/tins/xt/uniq_by.rb
176
176
  - lib/tins/xt/write.rb
177
+ - tests/bijection_test.rb
178
+ - tests/blank_full_test.rb
179
+ - tests/count_by_test.rb
180
+ - tests/deep_dup_test.rb
181
+ - tests/file_binary_test.rb
182
+ - tests/generator_test.rb
183
+ - tests/hash_symbolize_keys_recursive_test.rb
184
+ - tests/hash_union_test.rb
185
+ - tests/limited_test.rb
186
+ - tests/lines_file_test.rb
187
+ - tests/memoize_test.rb
188
+ - tests/minimize_test.rb
189
+ - tests/module_group_test.rb
190
+ - tests/named_test.rb
191
+ - tests/null_test.rb
192
+ - tests/partial_application_test.rb
193
+ - tests/range_plus_test.rb
194
+ - tests/require_maybe_test.rb
195
+ - tests/round_test.rb
196
+ - tests/secure_write_test.rb
197
+ - tests/shuffle_test.rb
198
+ - tests/string_camelize_test.rb
199
+ - tests/string_underscore_test.rb
200
+ - tests/string_version_test.rb
201
+ - tests/subhash_test.rb
177
202
  - tests/test_helper.rb
178
- - tests/tins_file_binary_test.rb
179
- - tests/tins_lines_file_test.rb
180
- - tests/tins_memoize_test.rb
181
- - tests/tins_secure_write_test.rb
182
- - tests/tins_test.rb
203
+ - tests/time_dummy_test.rb
204
+ - tests/try_test.rb
205
+ - tests/uniq_by_test.rb
183
206
  - tins.gemspec
184
207
  homepage: http://flori.github.com/tins
185
208
  licenses: []
@@ -197,6 +220,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
220
  - - ! '>='
198
221
  - !ruby/object:Gem::Version
199
222
  version: '0'
223
+ segments:
224
+ - 0
225
+ hash: -842976333
200
226
  required_rubygems_version: !ruby/object:Gem::Requirement
201
227
  none: false
202
228
  requirements:
@@ -210,9 +236,32 @@ signing_key:
210
236
  specification_version: 3
211
237
  summary: Useful stuff.
212
238
  test_files:
239
+ - tests/generator_test.rb
240
+ - tests/null_test.rb
241
+ - tests/range_plus_test.rb
242
+ - tests/deep_dup_test.rb
243
+ - tests/bijection_test.rb
244
+ - tests/memoize_test.rb
245
+ - tests/limited_test.rb
246
+ - tests/count_by_test.rb
247
+ - tests/blank_full_test.rb
248
+ - tests/file_binary_test.rb
249
+ - tests/secure_write_test.rb
250
+ - tests/string_version_test.rb
251
+ - tests/try_test.rb
252
+ - tests/require_maybe_test.rb
253
+ - tests/uniq_by_test.rb
254
+ - tests/time_dummy_test.rb
255
+ - tests/string_camelize_test.rb
256
+ - tests/lines_file_test.rb
257
+ - tests/string_underscore_test.rb
258
+ - tests/hash_symbolize_keys_recursive_test.rb
259
+ - tests/named_test.rb
260
+ - tests/hash_union_test.rb
261
+ - tests/subhash_test.rb
262
+ - tests/partial_application_test.rb
263
+ - tests/minimize_test.rb
264
+ - tests/round_test.rb
213
265
  - tests/test_helper.rb
214
- - tests/tins_file_binary_test.rb
215
- - tests/tins_lines_file_test.rb
216
- - tests/tins_memoize_test.rb
217
- - tests/tins_secure_write_test.rb
218
- - tests/tins_test.rb
266
+ - tests/shuffle_test.rb
267
+ - tests/module_group_test.rb