factual-api 1.3.17 → 1.3.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTM5OGExOTFmOGU0MzEwMTBkMGQyOGNiNmE3NWY1OTQ5ZDQ2MWUzMw==
5
- data.tar.gz: !binary |-
6
- NTNlNDNhNGU1M2JlMGY4M2UxNGVkZjM1YjE2YjI2NmJmYjRkMTBmMA==
2
+ SHA1:
3
+ metadata.gz: dc221c6f29c99ac6f095bfa64e9923d562a676a1
4
+ data.tar.gz: 5f3058b1534bae72d0d92844416b6b12e16b49bd
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NzFlZDE1YzkxNzcxYWQwMjQyM2ZkYzhiMzM0ODJjZDZjOTM5ZTM4NDhhOWUx
10
- YjU1ZjI3M2NhOWJkZmY2NjhkZjQzZDBmODllNjIxMDYwMWQ0YTk0N2I1ZDJh
11
- MmFmM2E4NTAwYjM3MmZkMjM3YTQ0OTM5NzdiYzgwYzcxNTEwM2U=
12
- data.tar.gz: !binary |-
13
- MzVkYTcyMWZmNmM3ZjlmNGRiNWIxODNlYzU1OWE1Y2Y1YWNlMTQ2YjEwNWFm
14
- NmEwMzQ2YmEyM2U5ZDhkODkwMjA1OTNmYTRjZTg1YjY4NWQ2MGMxMzNiZTI2
15
- NTYwNTA0YWY4MDFmMDlmNzU4ODNkN2MzMDQ4YTFlZTM5NTBhNGI=
6
+ metadata.gz: 34a9af25fa649b47723903de2f6e7b46f2cfd6a5d62b95b96535e14bb98842ffbd4df4e8322da58b0211e0ae22e72005cb506a7fdd6528ffb2611e7fbe8b33eb
7
+ data.tar.gz: 241c0f4cd1630a1e5a3024ed910fb30a028e462b21e5d144fc214d193f1b587aca906e02e55ec8f91a891e07220be1e725511962d779b5d171a09be5ae7e9787
@@ -1,3 +1,11 @@
1
+ ## v1.3.19
2
+ * re-enabled flag data parameter
3
+ * let flag.problem be checked by api, i/o in driver
4
+ * removed deprecated geocode
5
+
6
+ ## v1.3.18
7
+ * added 'resolve-absolute' support
8
+
1
9
  ## v1.3.17
2
10
  * threshold support in facets
3
11
 
@@ -13,7 +13,6 @@ require File.expand_path('../factual/query/table', __FILE__)
13
13
  require File.expand_path('../factual/query/facets', __FILE__)
14
14
  require File.expand_path('../factual/query/match', __FILE__)
15
15
  require File.expand_path('../factual/query/resolve', __FILE__)
16
- require File.expand_path('../factual/query/geocode', __FILE__)
17
16
  require File.expand_path('../factual/write/base', __FILE__)
18
17
  require File.expand_path('../factual/write/flag', __FILE__)
19
18
  require File.expand_path('../factual/write/boost', __FILE__)
@@ -60,8 +59,13 @@ class Factual
60
59
  Query::Resolve.new(@api, table, :values => values)
61
60
  end
62
61
 
63
- def geocode(lat, lng)
64
- Query::Geocode.new(@api, lat, lng)
62
+ def resolve_absolute(*args)
63
+ table = 'places'
64
+ values = args[-1]
65
+ if args.first.is_a?(String)
66
+ table = args[0]
67
+ end
68
+ Query::ResolveAbsolute.new(@api, table, :values => values)
65
69
  end
66
70
 
67
71
  def get(path, query={})
@@ -1,6 +1,6 @@
1
1
  class Factual
2
2
  class API
3
- VERSION = "1.3.17"
3
+ VERSION = "1.3.19"
4
4
  API_V3_HOST = "api.v3.factual.com"
5
5
  DRIVER_VERSION_TAG = "factual-ruby-driver-v" + VERSION
6
6
  PARAM_ALIASES = { :search => :q, :sort_asc => :sort }
@@ -14,5 +14,12 @@ class Factual
14
14
  end
15
15
  end
16
16
  end
17
+
18
+ class ResolveAbsolute < Resolve
19
+ def initialize(api, table, params = {})
20
+ super(api, table, params)
21
+ @path = "t/#{@table}/resolve-absolute"
22
+ end
23
+ end
17
24
  end
18
25
  end
@@ -1,9 +1,7 @@
1
1
  class Factual
2
2
  module Write
3
3
  class Flag < Base
4
- PROBLEMS = [:closed, :duplicate, :nonexistent, :inaccurate, :inappropriate, :spam, :relocated, :other]
5
- VALID_KEYS = [:table, :factual_id, :problem, :user, :comment, :debug, :reference, :fields, :preferred]
6
- DEPRECATED_KEYS = [:data]
4
+ VALID_KEYS = [:table, :factual_id, :data, :problem, :user, :comment, :debug, :reference, :fields, :preferred]
7
5
 
8
6
  def initialize(api, params)
9
7
  validate_params(params)
@@ -24,13 +22,8 @@ class Factual
24
22
 
25
23
  def validate_params(params)
26
24
  params.keys.each do |key|
27
- raise "Deprecated flag option: #{key}" if DEPRECATED_KEYS.include?(key)
28
25
  raise "Invalid flag option: #{key}" unless VALID_KEYS.include?(key)
29
26
  end
30
-
31
- unless PROBLEMS.include?(params[:problem])
32
- raise "Flag problem should be one of the following: #{PROBLEMS.join(", ")}"
33
- end
34
27
  end
35
28
  end
36
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factual-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.17
4
+ version: 1.3.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rudiger Lippert
@@ -9,60 +9,60 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-06 00:00:00.000000000 Z
12
+ date: 2016-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.4.4
21
- - - ! '>='
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: 0.4.4
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ~>
28
+ - - "~>"
29
29
  - !ruby/object:Gem::Version
30
30
  version: 0.4.4
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.4.4
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: json
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.2'
41
- - - ! '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: 1.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ~>
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: '1.2'
51
- - - ! '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.2.0
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: rspec
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  description: Factual's official Ruby driver for the Factual public API.
@@ -80,7 +80,6 @@ files:
80
80
  - lib/factual/multi.rb
81
81
  - lib/factual/query/base.rb
82
82
  - lib/factual/query/facets.rb
83
- - lib/factual/query/geocode.rb
84
83
  - lib/factual/query/match.rb
85
84
  - lib/factual/query/resolve.rb
86
85
  - lib/factual/query/table.rb
@@ -100,17 +99,17 @@ require_paths:
100
99
  - lib
101
100
  required_ruby_version: !ruby/object:Gem::Requirement
102
101
  requirements:
103
- - - ! '>='
102
+ - - ">="
104
103
  - !ruby/object:Gem::Version
105
104
  version: 1.8.6
106
105
  required_rubygems_version: !ruby/object:Gem::Requirement
107
106
  requirements:
108
- - - ! '>='
107
+ - - ">="
109
108
  - !ruby/object:Gem::Version
110
109
  version: 1.3.6
111
110
  requirements: []
112
111
  rubyforge_project:
113
- rubygems_version: 2.2.1
112
+ rubygems_version: 2.5.1
114
113
  signing_key:
115
114
  specification_version: 4
116
115
  summary: Ruby driver for Factual
@@ -1,13 +0,0 @@
1
- class Factual
2
- module Query
3
- class Geocode < Base
4
- def initialize(api, lat, lng)
5
- @path = "places/geocode"
6
- @action = :read
7
- @params = {:geo => {"$point" => [lat, lng]}}
8
-
9
- super(api, @params)
10
- end
11
- end
12
- end
13
- end