icecream 0.0.8 → 0.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1bedb97706090d4cbbf93db273ebe1b796a62f72
4
- data.tar.gz: 5a4a066a380b91ffd6fa80aae3de0372e198824b
3
+ metadata.gz: 992459f1f7e6f8d5a07c30f4863d1518e4a9d2dd
4
+ data.tar.gz: ed1ef3476a13c126ecf684468462cf1503993028
5
5
  SHA512:
6
- metadata.gz: 19024fb8c6a7c931d12de64546da34ca01842192ec3075d69a54fdaceb63d1d4a4cb8a5d6a67a851fee126075653c02d9361a061c454831afca5e609f6a575a2
7
- data.tar.gz: 53d6d91fd7946d339c5f1e2e7109b4d780fcc2e651dcb09a81e3e2bd4225fa4bd0ca6d92f75f52efb484faf059cccc99afbb65d0904b19932dcaf682226792c1
6
+ metadata.gz: 3610d29bef925ae506ceb16ce132a247633bf8a211d0ecec6a5dce59196338acc8b4318175e6ce36b7fbac1b395a2831b0d85acd77ac12c05fcb7121d5dd05e8
7
+ data.tar.gz: cc33b45a9549cd769cc8439653d794a8099f1da543106d4e1bd28109408c52e2076bf1fdc2d19f3f1db2b979045b83bbfa3aa25921b59ab2b53a1dd87b56d827
@@ -28,7 +28,7 @@ module IceCream
28
28
 
29
29
  def self.fix_value value
30
30
  if (value[0] == "[") && (value[-1, 1] == "]")
31
- final = value.gsub("[","") .gsub("]","").split(",").map {|element| fix_value element }
31
+ final = value.gsub("[","") .gsub("]","").split(",").map {|element| fix_value element.strip }
32
32
  elsif value[0] == ":"
33
33
  final = value.gsub(":","").to_sym
34
34
  elsif !value.slice("\"").nil?
@@ -1,3 +1,3 @@
1
1
  module IceCream
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -2,3 +2,4 @@ name = "chocolate"
2
2
  calories = 150
3
3
  color = :brown
4
4
  price = 15.5
5
+ resumo = ["chocolate", 150, :brown, 15.5]
@@ -12,6 +12,7 @@ describe "Icecream" do
12
12
  chocolate.color.should eq :brown
13
13
  chocolate.price.should eq 15.5
14
14
  chocolate.calories.should eq 150
15
+ chocolate.resumo.should eq ["chocolate", 150, :brown, 15.5]
15
16
 
16
17
  cream = @fridge.flavor :cream
17
18
  cream.class.should be Cream
data/spec/parser_spec.rb CHANGED
@@ -34,7 +34,7 @@ describe "Parser" do
34
34
  IceCream::Parser.fix_value("15").should == 15
35
35
 
36
36
  # array
37
- IceCream::Parser.fix_value("['mimimi',:foo,15,20.5]").should == ["mimimi",:foo,15,20.5]
37
+ IceCream::Parser.fix_value("['mimimi', :foo, 15, 20.5]").should == ["mimimi",:foo,15,20.5]
38
38
 
39
39
  # Invalid conversions
40
40
  IceCream::Parser.fix_value("15s").should == ""
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icecream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro