motion-yaml 1.5 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3edda00f9eb55537a0f5cf71a03c7556372995ba
4
- data.tar.gz: f58d2501ae71cd243148cccca72340621fb6bbf4
3
+ metadata.gz: c82e597938f1f2a457efdeb88073b11928729a57
4
+ data.tar.gz: eb9d45b754596ba5f3b44baa216350a6f4abb0e7
5
5
  SHA512:
6
- metadata.gz: a51f7fd60f44e9b9de393fca9ce74456e1875002c3ab6a0efe039a7058e6e78e80bdcc3ab04023b6d9e2ae70218621db6b011bc62e4b3649bd6739c6a0bf13f3
7
- data.tar.gz: f280cff468f089dd803c118ffe53903f3be82a43eb7882d859da744648d8ca7686b3918c0ae024ad2d87cc0e3cab45e56d7cbeb5d0761ccfe7521df06951eecf
6
+ metadata.gz: b6d0978c4704a4d4422eb9d6e978e98991f395bf846404a9a8e2e557509e59afba64c20e32b0afd429ea6f77fecd9712468cf13982b6045553d369ba38ea2a85
7
+ data.tar.gz: 9000183b5778e36d4d052a268e4b0efe73aa225736df9e0b589a19125844a294a019a95952a95c9c1718be40a33c2371f4a8607825681e1a47539c6f0dc85218
Binary file
Binary file
@@ -42,8 +42,6 @@ class YAMLKitScanner
42
42
  # Tokenize string returning the Ruby object
43
43
  # NOTE: This method will be called from Objective-C.
44
44
  def self.tokenize(string)
45
- return nil if string.empty?
46
-
47
45
  case string
48
46
  when /^\+?\.inf$/i
49
47
  Float::INFINITY
@@ -63,12 +61,20 @@ class YAMLKitScanner
63
61
  Float(string.gsub(/_/, ''))
64
62
  when TIME
65
63
  self.parse_time(string)
64
+ when /^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+$/
65
+ i = 0
66
+ string.split(':').each_with_index do |n,e|
67
+ i += (n.to_i * 60 ** (e - 2).abs)
68
+ end
69
+ i
66
70
  when /^(yes|y|true|on)$/i
67
71
  true
68
72
  when /^(no|n|false|off)$/i
69
73
  false
70
- else
74
+ when '~'
71
75
  nil
76
+ else
77
+ string
72
78
  end
73
79
  end
74
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Sansonetti
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-09 00:00:00.000000000 Z
12
+ date: 2015-07-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: motion-yaml provides methods to access "YAML Ain't Markup Language" for
15
15
  RubyMotion projects.