tins 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
data/lib/tins.rb CHANGED
@@ -38,6 +38,8 @@ module Tins
38
38
  require 'tins/deep_const_get'
39
39
  require 'tins/responding'
40
40
  require 'tins/proc_compose'
41
+ require 'tins/proc_prelude'
41
42
  require 'tins/concern'
43
+ require 'tins/rotate'
42
44
  end
43
45
  require 'tins/alias'
data/lib/tins/memoize.rb CHANGED
@@ -18,6 +18,8 @@ module Tins
18
18
  # memoized results do NOT ONLY depend on the arguments, but ALSO on the
19
19
  # object the method is called on.
20
20
  def memoize_method(*method_ids)
21
+ method_ids.extend(ExtractLastArgumentOptions)
22
+ method_ids, opts = method_ids.extract_last_argument_options
21
23
  include CacheMethods
22
24
  method_ids.each do |method_id|
23
25
  method_id = method_id.to_s.to_sym
@@ -29,6 +31,7 @@ module Tins
29
31
  else
30
32
  (mc[method_id] ||= {})[args] = result = orig_method.bind(self).call(*args)
31
33
  $DEBUG and warn "#{self.class} cached method #{method_id}(#{args.inspect unless args.empty?}) = #{result.inspect} [#{__id__}]"
34
+ opts[:freeze] and result.freeze
32
35
  end
33
36
  result
34
37
  end
@@ -41,6 +44,8 @@ module Tins
41
44
  # memoized result does ONLY depend on the arguments given to the
42
45
  # function.
43
46
  def memoize_function(*function_ids)
47
+ function_ids.extend(ExtractLastArgumentOptions)
48
+ function_ids, opts = function_ids.extract_last_argument_options
44
49
  mc = __memoize_cache__
45
50
  function_ids.each do |method_id|
46
51
  method_id = method_id.to_s.to_sym
@@ -50,6 +55,7 @@ module Tins
50
55
  result
51
56
  else
52
57
  (mc[method_id] ||= {})[args] = result = orig_method.bind(self).call(*args)
58
+ opts[:freeze] and result.freeze
53
59
  $DEBUG and warn "#{self.class} cached function #{method_id}(#{args.inspect unless args.empty?}) = #{result.inspect}"
54
60
  end
55
61
  result
@@ -0,0 +1,12 @@
1
+ require 'set'
2
+
3
+ module Tins
4
+ class NamedSet < Set
5
+ def initialize(name)
6
+ @name = name
7
+ super()
8
+ end
9
+
10
+ attr_accessor :name
11
+ end
12
+ end
@@ -1,7 +1,13 @@
1
1
  module Tins
2
2
  module ProcCompose
3
3
  def compose(other)
4
- self.class.new { |*args| call(*other.call(*args)) }
4
+ self.class.new do |*args|
5
+ if other.respond_to?(:call)
6
+ call(*other.call(*args))
7
+ else
8
+ call(*other.to_proc.call(*args))
9
+ end
10
+ end
5
11
  end
6
12
 
7
13
  alias * compose
@@ -0,0 +1,67 @@
1
+ require 'tins/xt'
2
+
3
+ module Tins
4
+ module ProcPrelude
5
+ def apply(&my_proc)
6
+ my_proc or raise ArgumentError, 'a block argument is required'
7
+ lambda { |list| my_proc.call(*list) }
8
+ end
9
+
10
+ def map_apply(my_method, *args, &my_proc)
11
+ my_proc or raise ArgumentError, 'a block argument is required'
12
+ lambda { |x, y| my_proc.call(x, y.__send__(my_method, *args)) }
13
+ end
14
+
15
+ def call(obj, &my_proc)
16
+ my_proc or raise ArgumentError, 'a block argument is required'
17
+ obj.instance_eval(&my_proc)
18
+ end
19
+
20
+ def array
21
+ lambda { |*list| list }
22
+ end
23
+ memoize_function :array, :freeze => true
24
+
25
+ def first
26
+ lambda { |*list| list.first }
27
+ end
28
+ memoize_function :first, :freeze => true
29
+
30
+ alias head first
31
+
32
+ def second
33
+ lambda { |*list| list[1] }
34
+ end
35
+ memoize_function :second, :freeze => true
36
+
37
+ def tail
38
+ lambda { |*list| list[1..-1] }
39
+ end
40
+ memoize_function :tail, :freeze => true
41
+
42
+ def last
43
+ lambda { |*list| list.last }
44
+ end
45
+ memoize_function :last, :freeze => true
46
+
47
+ def rotate(n = 1)
48
+ lambda { |*list| list.rotate(n) }
49
+ end
50
+
51
+ alias swap rotate
52
+
53
+ def id1
54
+ lambda { |obj| obj }
55
+ end
56
+ memoize_function :id1, :freeze => true
57
+
58
+ def const(konst = nil, &my_proc)
59
+ konst ||= my_proc.call
60
+ lambda { |*_| konst }
61
+ end
62
+
63
+ def nth(n)
64
+ lambda { |*list| list[n] }
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,16 @@
1
+ module Tins
2
+ module Rotate
3
+ def rotate!(n = 1)
4
+ if n >= 0
5
+ n.times { push shift }
6
+ else
7
+ (-n).times { unshift pop }
8
+ end
9
+ self
10
+ end
11
+
12
+ def rotate(n = 1)
13
+ clone.rotate!(n)
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,5 @@
1
+ require 'time'
2
+
1
3
  module Tins
2
4
  module TimeDummy
3
5
  def self.included(modul)
@@ -10,16 +12,23 @@ module Tins
10
12
 
11
13
  attr_writer :dummy
12
14
 
15
+ def dummy=(value)
16
+ if value.respond_to?(:to_str)
17
+ value = Time.parse(value.to_str)
18
+ end
19
+ @dummy = value
20
+ end
21
+
13
22
  def dummy(value = nil)
14
23
  if value.nil?
15
24
  @dummy
16
25
  else
17
26
  begin
18
27
  old_dummy = @dummy
19
- @dummy = value
28
+ self.dummy = value
20
29
  yield
21
30
  ensure
22
- @dummy = old_dummy
31
+ self.dummy = old_dummy
23
32
  end
24
33
  end
25
34
  end
data/lib/tins/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Tins
2
2
  # Tins version
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.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/lib/tins/xt.rb CHANGED
@@ -32,4 +32,6 @@ module Tins
32
32
  require 'tins/xt/deep_const_get'
33
33
  require 'tins/xt/responding'
34
34
  require 'tins/xt/proc_compose'
35
+ require 'tins/xt/proc_prelude'
36
+ require 'tins/xt/rotate'
35
37
  end
@@ -0,0 +1,7 @@
1
+ require 'tins/proc_prelude'
2
+
3
+ module Tins
4
+ class ::Proc
5
+ extend Tins::ProcPrelude
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Tins
2
+ class ::Array
3
+ unless method_defined?(:rotate)
4
+ include Tins::Rotate
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,18 @@
1
+ require 'test_helper'
2
+ require 'tins/named_set'
3
+
4
+ module Tins
5
+ class NamedSetTest < Test::Unit::TestCase
6
+ class ThingsTodo < Tins::NamedSet
7
+ end
8
+
9
+ def test_named_set
10
+ s = ThingsTodo.new('list')
11
+ assert_equal 'list', s.name
12
+ s << 'Get up'
13
+ s << 'Shower'
14
+ s << 'Shave'
15
+ assert_equal 3, s.size
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,73 @@
1
+ require 'test_helper'
2
+ require 'tins/xt/proc_prelude'
3
+
4
+ module Tins
5
+ class ProcPreludeTest < Test::Unit::TestCase
6
+ def test_apply
7
+ assert_equal 42,
8
+ Proc.apply { |x, y, z| x ** 2 + y ** 3 + z ** 5 }.call([3, 1, 2])
9
+ end
10
+
11
+ class Person
12
+ def initialize(name)
13
+ @name = name
14
+ end
15
+
16
+ attr_reader :name
17
+ end
18
+
19
+ def test_map_apply
20
+ ps = %w[anne bernd christian].map { |n| Person.new(n) }
21
+
22
+ i = 0
23
+ assert_equal %w[ anne1 bernd2 christian3 ],
24
+ ps.inject([], &Proc.map_apply(:name) { |s, n| s << "#{n}#{i += 1}" })
25
+ end
26
+
27
+ def test_call
28
+ def (o = Object.new).foo
29
+ :foo
30
+ end
31
+ assert_equal :foo, Proc.call(o) { foo }
32
+ end
33
+
34
+ def test_array
35
+ assert_equal [1,2,3], Proc.array.call(1,2,3)
36
+ end
37
+
38
+ def test_first
39
+ assert_equal 1, Proc.first.call(1,2,3)
40
+ assert_equal 1, Proc.head.call(1,2,3)
41
+ end
42
+
43
+ def test_second
44
+ assert_equal 2, Proc.second.call(1,2,3)
45
+ end
46
+
47
+ def test_tail
48
+ assert_equal [ 2, 3 ], Proc.tail.call(1,2,3)
49
+ end
50
+
51
+ def test_last
52
+ assert_equal 3, Proc.last.call(1,2,3)
53
+ end
54
+
55
+ def test_rotate
56
+ assert_equal [ 2, 3, 1 ], Proc.rotate.call(1,2,3)
57
+ assert_equal [ 2, 1 ], Proc.swap.call(1,2)
58
+ end
59
+
60
+ def test_id1
61
+ assert_equal :foo, Proc.id1.call(:foo)
62
+ end
63
+
64
+ def test_const
65
+ assert_equal :baz, Proc.const(:baz).call(:foo, :bar)
66
+ assert_equal :baz, Proc.const { :baz }.call(:foo, :bar)
67
+ end
68
+
69
+ def test_nth
70
+ assert_equal 2, Proc.nth(1).call(1,2,3)
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,65 @@
1
+ require 'test_helper'
2
+
3
+ module Tins
4
+ class RotateTest < Test::Unit::TestCase
5
+ def test_rotate_bang
6
+ a = [ 1, 2, 3 ]
7
+ assert_same a, a.rotate!
8
+ end
9
+
10
+ def test_rotate_bang_0
11
+ a = [ 1, 2, 3 ]
12
+ assert_equal [ 1, 2, 3 ], a.rotate!(0)
13
+ end
14
+
15
+ def test_rotate_bang_1
16
+ a = [ 1, 2, 3 ]
17
+ assert_equal [ 2, 3, 1 ], a.rotate!(1)
18
+ end
19
+
20
+ def test_rotate_bang_2
21
+ a = [ 1, 2, 3 ]
22
+ assert_equal [ 3, 1, 2 ], a.rotate!(2)
23
+ end
24
+
25
+ def test_rotate_bang_minus_1
26
+ a = [ 1, 2, 3 ]
27
+ assert_equal [ 3, 1, 2 ], a.rotate!(-1)
28
+ end
29
+
30
+ def test_rotate_bang_minus_2
31
+ a = [ 1, 2, 3 ]
32
+ assert_equal [ 2, 3, 1 ], a.rotate!(-2)
33
+ end
34
+
35
+ def test_rotate
36
+ a = [ 1, 2, 3 ]
37
+ assert_not_same a, a.rotate
38
+ end
39
+
40
+ def test_rotate_0
41
+ a = [ 1, 2, 3 ]
42
+ assert_equal [ 1, 2, 3 ], a.rotate(0)
43
+ end
44
+
45
+ def test_rotate_1
46
+ a = [ 1, 2, 3 ]
47
+ assert_equal [ 2, 3, 1 ], a.rotate(1)
48
+ end
49
+
50
+ def test_rotate_2
51
+ a = [ 1, 2, 3 ]
52
+ assert_equal [ 3, 1, 2 ], a.rotate(2)
53
+ end
54
+
55
+ def test_rotate_minus_1
56
+ a = [ 1, 2, 3 ]
57
+ assert_equal [ 3, 1, 2 ], a.rotate(-1)
58
+ end
59
+
60
+ def test_rotate_minus_2
61
+ a = [ 1, 2, 3 ]
62
+ assert_equal [ 2, 3, 1 ], a.rotate(-2)
63
+ end
64
+ end
65
+ 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.6.0"
5
+ s.version = "0.7.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-10-02"
9
+ s.date = "2013-02-04"
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/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/concern.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_const_get.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/proc_compose.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/responding.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_const_get.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/proc_compose.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/responding.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/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/concern.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_const_get.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/proc_compose.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/responding.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_const_get.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/proc_compose.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/responding.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/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_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/alias.rb", "lib/tins/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/concern.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_const_get.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/named_set.rb", "lib/tins/null.rb", "lib/tins/once.rb", "lib/tins/p.rb", "lib/tins/partial_application.rb", "lib/tins/proc_compose.rb", "lib/tins/proc_prelude.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/responding.rb", "lib/tins/rotate.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_const_get.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/proc_compose.rb", "lib/tins/xt/proc_prelude.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/responding.rb", "lib/tins/xt/rotate.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/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/concern.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_const_get.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/named_set.rb", "lib/tins/null.rb", "lib/tins/once.rb", "lib/tins/p.rb", "lib/tins/partial_application.rb", "lib/tins/proc_compose.rb", "lib/tins/proc_prelude.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/responding.rb", "lib/tins/rotate.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_const_get.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/proc_compose.rb", "lib/tins/xt/proc_prelude.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/responding.rb", "lib/tins/xt/rotate.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/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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_set_test.rb", "tests/named_test.rb", "tests/null_test.rb", "tests/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/proc_prelude_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_test.rb", "tests/rotate_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.24"
18
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/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_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/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_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"]
19
+ s.test_files = ["tests/ask_and_send_test.rb", "tests/bijection_test.rb", "tests/blank_full_test.rb", "tests/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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_set_test.rb", "tests/named_test.rb", "tests/null_test.rb", "tests/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/proc_prelude_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_test.rb", "tests/rotate_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/concern_test.rb", "tests/count_by_test.rb", "tests/date_dummy_test.rb", "tests/date_time_dummy_test.rb", "tests/deep_const_get_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_set_test.rb", "tests/named_test.rb", "tests/null_test.rb", "tests/p_test.rb", "tests/partial_application_test.rb", "tests/proc_compose_test.rb", "tests/proc_prelude_test.rb", "tests/range_plus_test.rb", "tests/require_maybe_test.rb", "tests/responding_test.rb", "tests/rotate_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"]
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.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2013-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
@@ -89,14 +89,17 @@ extra_rdoc_files:
89
89
  - lib/tins/memoize.rb
90
90
  - lib/tins/minimize.rb
91
91
  - lib/tins/module_group.rb
92
+ - lib/tins/named_set.rb
92
93
  - lib/tins/null.rb
93
94
  - lib/tins/once.rb
94
95
  - lib/tins/p.rb
95
96
  - lib/tins/partial_application.rb
96
97
  - lib/tins/proc_compose.rb
98
+ - lib/tins/proc_prelude.rb
97
99
  - lib/tins/range_plus.rb
98
100
  - lib/tins/require_maybe.rb
99
101
  - lib/tins/responding.rb
102
+ - lib/tins/rotate.rb
100
103
  - lib/tins/round.rb
101
104
  - lib/tins/secure_write.rb
102
105
  - lib/tins/shuffle.rb
@@ -129,9 +132,11 @@ extra_rdoc_files:
129
132
  - lib/tins/xt/p.rb
130
133
  - lib/tins/xt/partial_application.rb
131
134
  - lib/tins/xt/proc_compose.rb
135
+ - lib/tins/xt/proc_prelude.rb
132
136
  - lib/tins/xt/range_plus.rb
133
137
  - lib/tins/xt/require_maybe.rb
134
138
  - lib/tins/xt/responding.rb
139
+ - lib/tins/xt/rotate.rb
135
140
  - lib/tins/xt/round.rb
136
141
  - lib/tins/xt/secure_write.rb
137
142
  - lib/tins/xt/shuffle.rb
@@ -180,14 +185,17 @@ files:
180
185
  - lib/tins/memoize.rb
181
186
  - lib/tins/minimize.rb
182
187
  - lib/tins/module_group.rb
188
+ - lib/tins/named_set.rb
183
189
  - lib/tins/null.rb
184
190
  - lib/tins/once.rb
185
191
  - lib/tins/p.rb
186
192
  - lib/tins/partial_application.rb
187
193
  - lib/tins/proc_compose.rb
194
+ - lib/tins/proc_prelude.rb
188
195
  - lib/tins/range_plus.rb
189
196
  - lib/tins/require_maybe.rb
190
197
  - lib/tins/responding.rb
198
+ - lib/tins/rotate.rb
191
199
  - lib/tins/round.rb
192
200
  - lib/tins/secure_write.rb
193
201
  - lib/tins/shuffle.rb
@@ -221,9 +229,11 @@ files:
221
229
  - lib/tins/xt/p.rb
222
230
  - lib/tins/xt/partial_application.rb
223
231
  - lib/tins/xt/proc_compose.rb
232
+ - lib/tins/xt/proc_prelude.rb
224
233
  - lib/tins/xt/range_plus.rb
225
234
  - lib/tins/xt/require_maybe.rb
226
235
  - lib/tins/xt/responding.rb
236
+ - lib/tins/xt/rotate.rb
227
237
  - lib/tins/xt/round.rb
228
238
  - lib/tins/xt/secure_write.rb
229
239
  - lib/tins/xt/shuffle.rb
@@ -258,14 +268,17 @@ files:
258
268
  - tests/memoize_test.rb
259
269
  - tests/minimize_test.rb
260
270
  - tests/module_group_test.rb
271
+ - tests/named_set_test.rb
261
272
  - tests/named_test.rb
262
273
  - tests/null_test.rb
263
274
  - tests/p_test.rb
264
275
  - tests/partial_application_test.rb
265
276
  - tests/proc_compose_test.rb
277
+ - tests/proc_prelude_test.rb
266
278
  - tests/range_plus_test.rb
267
279
  - tests/require_maybe_test.rb
268
280
  - tests/responding_test.rb
281
+ - tests/rotate_test.rb
269
282
  - tests/round_test.rb
270
283
  - tests/secure_write_test.rb
271
284
  - tests/shuffle_test.rb
@@ -296,7 +309,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
309
  version: '0'
297
310
  segments:
298
311
  - 0
299
- hash: 4391703042856250428
312
+ hash: 1482858886315193506
300
313
  required_rubygems_version: !ruby/object:Gem::Requirement
301
314
  none: false
302
315
  requirements:
@@ -332,14 +345,17 @@ test_files:
332
345
  - tests/memoize_test.rb
333
346
  - tests/minimize_test.rb
334
347
  - tests/module_group_test.rb
348
+ - tests/named_set_test.rb
335
349
  - tests/named_test.rb
336
350
  - tests/null_test.rb
337
351
  - tests/p_test.rb
338
352
  - tests/partial_application_test.rb
339
353
  - tests/proc_compose_test.rb
354
+ - tests/proc_prelude_test.rb
340
355
  - tests/range_plus_test.rb
341
356
  - tests/require_maybe_test.rb
342
357
  - tests/responding_test.rb
358
+ - tests/rotate_test.rb
343
359
  - tests/round_test.rb
344
360
  - tests/secure_write_test.rb
345
361
  - tests/shuffle_test.rb