factual 0.1 → 0.1.1

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.
data/factual.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Factual::VERSION
8
8
  s.authors = ["Justin Copeland"]
9
9
  s.email = ["justin@gootnau.com"]
10
- s.homepage = "http://github.com/jmcopeland/factual"
10
+ s.homepage = "http://github.com/jmcopeland/factual-gem"
11
11
  s.summary = %q{Factual v3 API wrapper}
12
12
  s.description = %q{Factual v3 API wrapper}
13
13
 
@@ -16,11 +16,19 @@ module Factual
16
16
  end
17
17
 
18
18
  def success?
19
- @body.status == "ok"
19
+ @body.status == "ok"
20
+ end
21
+
22
+ def error?
23
+ @body.status == "error"
20
24
  end
21
25
 
22
26
  def error_message
23
- # @body.message.text unless success?
27
+ @body.message if error?
28
+ end
29
+
30
+ def error_type
31
+ @body.error_type if error?
24
32
  end
25
33
 
26
34
  def included_rows
@@ -37,6 +45,14 @@ module Factual
37
45
  end
38
46
  end
39
47
 
48
+ def resolved?
49
+ success? && data.present? && data[0].resolved
50
+ end
51
+
52
+ def resolved_venue
53
+ data[0] if resolved?
54
+ end
55
+
40
56
  private
41
57
 
42
58
  def rash_response(response)
@@ -1,3 +1,3 @@
1
1
  module Factual
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: factual
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.1"
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Justin Copeland
@@ -72,7 +72,7 @@ files:
72
72
  - lib/factual/places_response.rb
73
73
  - lib/factual/resolve.rb
74
74
  - lib/factual/version.rb
75
- homepage: http://github.com/jmcopeland/factual
75
+ homepage: http://github.com/jmcopeland/factual-gem
76
76
  licenses: []
77
77
 
78
78
  post_install_message: