rhyme 0.1.2 → 0.1.3

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.
@@ -30,7 +30,7 @@ module Rhyme
30
30
 
31
31
  def self.translate_array_list(array_list)
32
32
  array = Array.new
33
- array_list.each { |x| array.push x }
33
+ array_list.each { |x| array.push translate(x) }
34
34
  return array
35
35
  end
36
36
 
@@ -42,7 +42,7 @@ module Rhyme
42
42
 
43
43
  def self.translate_array(array)
44
44
  array_list = java.util.ArrayList.new
45
- array.each { |x| array_list.add x }
45
+ array.each { |x| array_list.add translate(x) }
46
46
  return array_list
47
47
  end
48
48
 
@@ -3,7 +3,7 @@ module Rhyme
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 2
6
+ TINY = 3
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
@@ -51,8 +51,18 @@ describe Rhyme do
51
51
  Rhyme.translate(java.util.ArrayList.new).class.should eql(Array.new.class)
52
52
  end
53
53
 
54
+ it "should translate an ArrayList values" do
55
+ array = java.util.ArrayList.new
56
+ array.add java.util.HashMap.new
57
+ Rhyme.translate(array)[0].class.should eql(Hash.new.class)
58
+ end
59
+
54
60
  it "should translate an Array" do
55
61
  Rhyme.translate(Array.new).class.should eql(java.util.ArrayList.new.class)
56
62
  end
57
63
 
64
+ it "should translate an Array values" do
65
+ Rhyme.translate([{}])[0].class.should eql(java.util.HashMap.new.class)
66
+ end
67
+
58
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhyme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Carrion