hyper_api 0.1.0 → 0.1.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: 986c73fdfe7a49afe6537e0667029ce437b76f07
4
- data.tar.gz: e4b30f076ef70dd52c935fb9ebeffcf9f6b6994b
3
+ metadata.gz: 74fbf0a0e8dab4021c83ef58451f0dd4f0e0fad0
4
+ data.tar.gz: c37be3b50fb447e62ef35539c9315153753c2f5f
5
5
  SHA512:
6
- metadata.gz: c1c2781278743784fdb2205807048e5271b6e7bb0a9c68d3b1af03d9296e224f711e929db5da9bba2a52f239573a84c7af20897b5a2593ce10ececda0ddb6528
7
- data.tar.gz: d6ab8dbe662c43eac9b79b609c3cb174f8494f44bbd486b4a2428b0e18c57ecede79464ed4e8d9c9af2438768c9c6c89bdfeaa30eda68c1e418093ae28841494
6
+ metadata.gz: 73a1e0fd328481860f68a399609064897e1449740114f59ee9906ba67c46fb3173ca4169a4ab906e95994d4f93abc72a40a965e06d95e06dcd788b36c66fbfdd
7
+ data.tar.gz: de21596453cd07e4ca4266ce0d823db314d80fbbb0cfa7046e5c27b85b6663cf92294ef3d69d075cd475005c5ec82c6fc37500a6c6396c5b1d6820ca965f77d0
data/README.md CHANGED
@@ -71,6 +71,16 @@ fringe.some_calculated_method
71
71
 
72
72
  If you've found a bug or have a question, please open an issue on the [issue tracker](https://github.com/jassa/hyper_api/issues). Or, clone the HyperAPI repository, write a failing test case, fix the bug, and submit a pull request.
73
73
 
74
+ ## Version History
75
+
76
+ **0.1.1** (Feb 17, 2014)
77
+
78
+ * Allow empty values for attributes when not found in HTML source.
79
+
80
+ **0.1.0** (Feb 16, 2014)
81
+
82
+ * Initial public release.
83
+
74
84
  ## License
75
85
 
76
86
  Copyright © 2014 Javier Saldana
@@ -39,9 +39,10 @@ module HyperAPI
39
39
  known_attributes.each do |attr, options|
40
40
  type, path, block = options
41
41
 
42
- value = html.css(path)
43
- value = block ? value.instance_eval(&block) : value.text
44
- value = value.send("to_#{type[0]}")
42
+ unless (value = html.css(path)).empty?
43
+ value = block ? value.instance_eval(&block) : value.text
44
+ value = value.send("to_#{type[0]}")
45
+ end
45
46
 
46
47
  instance_variable_set("@#{attr}", value)
47
48
 
@@ -1,3 +1,3 @@
1
1
  module HyperAPI
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Saldana
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-16 00:00:00.000000000 Z
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri