icecream 0.0.14 → 0.0.15

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: 74b0b83ca5e429ee4328b2fe850dd66f6ba4e6ea
4
- data.tar.gz: 72a67f8571beb33164d00e171286ed6986872999
3
+ metadata.gz: 8628c13d9c63a053045f22295a0d323fd5a6bb4a
4
+ data.tar.gz: ac271a1eca3e608530d255188f2d17f9668f7930
5
5
  SHA512:
6
- metadata.gz: 9c034884e29d9259275923ba818133fc18134e9c087c07b131717c7a638c4848a9a477a8348d6c3a190147e245273322b4634b8455de39cef29c662a90b8c918
7
- data.tar.gz: 3d8d850769d722caad9848386a7f0831b2c39e92bfdae8f6842c37fb6b43d814604d1eeaf6991f3cee0ce09feec3fcd032733fa28c498f8d2fa00ba415d0fb3f
6
+ metadata.gz: 80a366b5d0d0ab5978984adac631b0a9a53ad765d71d207884c18c91543f5888322599a6b68280b4a9ef2fc2c347c8e146f19f2888b37cabcedf208651d0c42f
7
+ data.tar.gz: bfbb9fd3299a09d8e2a7f791e9eaf28ab83c4d1e54a4edb43e85a63e081ef0cbdef73cd603336dc4d322fc74f542d7b9f7d355e8f5c82d8467c0fb85a9678699
@@ -1,4 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
data/Gemfile CHANGED
@@ -1,8 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'coveralls', require: false
4
- gem 'pry'
5
- gem 'rake'
6
- gem 'rspec'
7
-
8
3
  gemspec
data/README.md CHANGED
@@ -97,7 +97,7 @@ IceCream ASCII art from: http://ascii.co.uk/art/icecream
97
97
  LICENCE
98
98
  -------------
99
99
 
100
- Copyright 2013 Camilo Ribeiro <camilo@camiloribeiro.com>
100
+ Copyright 2013 - 2015 Camilo Ribeiro <camilo@camiloribeiro.com>
101
101
 
102
102
  This file is part of IceCream.
103
103
 
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "icecream"
7
7
  s.version = IceCream::VERSION
8
8
  s.authors = ["Camilo Ribeiro"]
9
- s.email = ["cribeiro@camiloribeiro.com"]
9
+ s.email = ["camilo@camiloribeiro.com"]
10
10
  s.homepage = "http://github.com/camiloribeiro/icecream"
11
11
  s.license = "Apache 2.0"
12
12
  s.summary = %q{Simple Factory to the ones who just wanna a factory}
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency 'cucumber'
26
26
  s.add_development_dependency 'rake'
27
27
  s.add_development_dependency 'rspec'
28
+ s.add_development_dependency 'coveralls'
28
29
  end
@@ -1,3 +1,6 @@
1
+ #!/bin/env ruby
2
+ ## encoding: utf-8
3
+
1
4
  require File.join(File.dirname(__FILE__), './icecream/version')
2
5
  require 'rubygems'
3
6
  require 'bundler/setup'
@@ -31,7 +31,9 @@ module IceCream
31
31
  end
32
32
 
33
33
  def self.fix_value value
34
- if (value[0] == "[") && (value[-1, 1] == "]")
34
+ if (value[0] == "{") && (value[-1, 1] == "}")
35
+ final = value
36
+ elsif (value[0] == "[") && (value[-1, 1] == "]")
35
37
  final = value.gsub("[","") .gsub("]","").split(",").map {|element| fix_value element.strip }
36
38
  elsif value[0] == ":"
37
39
  final = value.gsub(":","").to_sym
@@ -1,3 +1,3 @@
1
1
  module IceCream
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
@@ -18,6 +18,9 @@ describe "Parser" do
18
18
  IceCream::Parser.get_flavor_name(@path).should == "chocolate"
19
19
  end
20
20
  it "Returns the right type of the value" do
21
+
22
+ # Json, should be treated as string
23
+ IceCream::Parser.fix_value('{"apiVersion":"2.0", "data":{ "updated":"2010-01-07T19:58:42.949Z", "totalItems":800, "startIndex":1, "itemsPerPage":1, "items":[ {"id":"hYB0mn5zh2c", "uploaded":"2007-06-05T22:07:03.000Z", "updated":"2010-01-07T13:26:50.000Z", "uploader":"GoogleDeveloperDay", "category":"News", "title":"Google Developers Day US - Maps API Introduction", "description":"Google Maps API Introduction ...", "tags":[ "GDD07","GDD07US","Maps" ], "thumbnail":{ "default":"http://i.ytimg.com/vi/hYB0mn5zh2c/default.jpg", "hqDefault":"http://i.ytimg.com/vi/hYB0mn5zh2c/hqdefault.jpg" }, "player":{ "default":"http://www.youtube.com/watch?vu003dhYB0mn5zh2c" }, "content":{ "1":"rtsp://v5.cache3.c.youtube.com/CiILENy.../0/0/0/video.3gp", "5":"http://www.youtube.com/v/hYB0mn5zh2c?f...", "6":"rtsp://v1.cache1.c.youtube.com/CiILENy.../0/0/0/video.3gp" }, "duration":2840, "aspectRatio":"widescreen", "rating":4.63, "ratingCount":68, "viewCount":220101, "favoriteCount":201, "commentCount":22, "status":{ "value":"restricted", "reason":"limitedSyndication" }, "accessControl":{ "syndicate":"allowed", "commentVote":"allowed", "rate":"allowed", "list":"allowed", "comment":"allowed", "embed":"allowed", "videoRespond":"moderated" } } ] } }').should == '{"apiVersion":"2.0", "data":{ "updated":"2010-01-07T19:58:42.949Z", "totalItems":800, "startIndex":1, "itemsPerPage":1, "items":[ {"id":"hYB0mn5zh2c", "uploaded":"2007-06-05T22:07:03.000Z", "updated":"2010-01-07T13:26:50.000Z", "uploader":"GoogleDeveloperDay", "category":"News", "title":"Google Developers Day US - Maps API Introduction", "description":"Google Maps API Introduction ...", "tags":[ "GDD07","GDD07US","Maps" ], "thumbnail":{ "default":"http://i.ytimg.com/vi/hYB0mn5zh2c/default.jpg", "hqDefault":"http://i.ytimg.com/vi/hYB0mn5zh2c/hqdefault.jpg" }, "player":{ "default":"http://www.youtube.com/watch?vu003dhYB0mn5zh2c" }, "content":{ "1":"rtsp://v5.cache3.c.youtube.com/CiILENy.../0/0/0/video.3gp", "5":"http://www.youtube.com/v/hYB0mn5zh2c?f...", "6":"rtsp://v1.cache1.c.youtube.com/CiILENy.../0/0/0/video.3gp" }, "duration":2840, "aspectRatio":"widescreen", "rating":4.63, "ratingCount":68, "viewCount":220101, "favoriteCount":201, "commentCount":22, "status":{ "value":"restricted", "reason":"limitedSyndication" }, "accessControl":{ "syndicate":"allowed", "commentVote":"allowed", "rate":"allowed", "list":"allowed", "comment":"allowed", "embed":"allowed", "videoRespond":"moderated" } } ] } }'
21
24
 
22
25
  # Strings
23
26
  IceCream::Parser.fix_value("\"chocolate\"").should == "chocolate"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icecream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -66,10 +66,24 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Simple factory without any active record or external library. Just gem
70
84
  install and use!
71
85
  email:
72
- - cribeiro@camiloribeiro.com
86
+ - camilo@camiloribeiro.com
73
87
  executables: []
74
88
  extensions: []
75
89
  extra_rdoc_files: []