str2duck 1.5.0 → 1.6.0

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: b4425555775cd4480163150346432cad485303aa
4
- data.tar.gz: f5ea181be5fe5dfcc5447d9b5afb800f58a9eafc
3
+ metadata.gz: 61febf9032234a1a81c9d3c7de46c45bfea915c6
4
+ data.tar.gz: cff6f444ddc2e48300e51c575ea3f15e950d5b9f
5
5
  SHA512:
6
- metadata.gz: 49d18a74d0b21f305ebef57448d16e39eb75b6559f7967292c2cc1dc8aa8c45301d84ebfb437a1ae99ca4f3240c9f52c042def6e36dbbbbd48db56585697331e
7
- data.tar.gz: a1af2ac332daa6e88dbb2d018d847d323e33bbce9345761caa3141c9e94593417ac5a1375f23bacf2a5add2892731a61d7426f4055db7a1d4f90b009709baf96
6
+ metadata.gz: 8ab40406f77758dc561b23cb85c222e030c908f3a3b804a3bfc7b66a7533acf4c6acda46e5d6fabadff583353427a408f0664480999880f3d45c234c5c571aa5
7
+ data.tar.gz: 2627bb0404caab12f1ebea2bce38f91a795a9d92c008a884d76d51d91620a0dc99e56fb161f46e89f88ebca3ef849b7d99b850598489395eb4e1eb8a9915676c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.6.0
@@ -88,9 +88,9 @@ module Str2Duck
88
88
  # damn, this thing eats almost everything...
89
89
  def yaml obj
90
90
  if Str2Duck::Regexp.yaml?(obj)
91
- return YAML.load(obj)
91
+ return YAML.safe_load(obj)
92
92
  end
93
- nil
93
+ return nil
94
94
  end
95
95
 
96
96
  end
@@ -73,12 +73,10 @@ module Str2Duck
73
73
  end
74
74
 
75
75
  def yaml? obj
76
- begin
77
- YAML.load(obj)
78
- return true
79
- rescue ::Psych::SyntaxError,::ArgumentError
80
- return false
81
- end
76
+ YAML.safe_load(obj)
77
+ return true
78
+ rescue ::Exception
79
+ return false
82
80
  end
83
81
 
84
82
  end
data/str2duck.gemspec CHANGED
@@ -9,9 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["adamluzsi@gmail.com"]
10
10
  spec.description = %q{ Parse string into obj }
11
11
  spec.summary = %q{ String to Obj, Duck type parser }
12
- spec.homepage = "https://github.com/adamluzsi/str2duck"
13
- spec.license = "MIT"
14
12
 
13
+ spec.homepage = "https://github.com/adamluzsi/#{__FILE__.split(File::Separator).last.split('.').first}"
15
14
  spec.files = `git ls-files`.split($/)
16
15
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: str2duck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-10 00:00:00.000000000 Z
11
+ date: 2014-05-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " Parse string into obj "
14
14
  email:
@@ -36,8 +36,7 @@ files:
36
36
  - lib/str2duck/support.rb
37
37
  - str2duck.gemspec
38
38
  homepage: https://github.com/adamluzsi/str2duck
39
- licenses:
40
- - MIT
39
+ licenses: []
41
40
  metadata: {}
42
41
  post_install_message:
43
42
  rdoc_options: []