factual-api 1.3.14 → 1.3.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjE1NGQ3OGYwYThmMzMxOWE4OTJmNWU4NDliN2IwNjQ2NTM1OTViNg==
4
+ OTRhODE5MDg4ZjZkZTllMTIxODQ5ZjQ2MGNlNmU5ZjM3NmRhOTlkYQ==
5
5
  data.tar.gz: !binary |-
6
- MTcyYjY2NzJhNjdkN2EzZDg3OTJmN2Y5ZmU4ZjMxNjVkYWI4YzQ1ZQ==
6
+ OWUwYmNmYzE3ZGQ0ODhmYjYyMGRlY2JiMGNlYWM4NmViYmVjMGU5MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGIzNTM3MDk0YTJhZTk1YjZkZDhkYWRhZDQ3OTU1MWNhYWEyMzYxNTZiM2Zm
10
- MDI0ZTU3ZGVkMjYyNDUwOWU5NzJiOWU2ODU3YTkwNDdkMzViNTNhNDkwNTAz
11
- M2MxYmFiNWJhMjNmOGQzOTA0OTIxOWEzYWQ4YjNjMTdjOWM1YTc=
9
+ YTYxYzkzMzhmZGZhMDMwNTg0NzJkNzY5YjhmODBmYjAxMDJkZTQyODc0Yzkz
10
+ NzU3MDE4Nzc0MjVlOWEyNDUwNjI3NDBjMTIzNTdjMzc3MTMxMzM5YjRmYjU3
11
+ YWI2ZmZhMjViYThkY2ZiNmVhYTdiZjk2YzY5NDA3ZWM4NDM4MTc=
12
12
  data.tar.gz: !binary |-
13
- M2U5YjlmNWRmOTU5MTc1NDk5MjI3YTliOTEyNzA0ODFmYzg3NTVmM2M0NjFk
14
- ODM0ZjA2NTg2YzljZWIzNjc3ZDljNWJhZTE2MjVlZTYzNDdjMGQ1YzdlMzkw
15
- NWM1OTNiNWJmZTg0ZTEyMmJmNjg0YTZkZjUwYjhjZDVmNTcwMGM=
13
+ MGNlMzMxODIyM2U4MDdmZTU4NDJhZWE1ZGRmYTUwNWQ3ZWU3OTA4ZTg4MjU3
14
+ ZGY3NjNkMDJiZWQzMTU0ZWEzNjkwN2ExMDZjNjQ2NWE0MjIyMDcyZjMwZTEy
15
+ MzhmMjg1ZDVmNzhlYWQxMjY0ZWRlYjE1MGUxNDY2MWY1NTYxMzI=
@@ -1,3 +1,9 @@
1
+ ## v1.3.15
2
+ * changed flag parameters, +preferred, -data, +relocated as a problem
3
+ * sunset geopulse
4
+ * added 'threshold' to read parameters
5
+ * test cases cleanup
6
+
1
7
  ## v1.3.14
2
8
  * configurable table name in resolve/match requests
3
9
 
@@ -14,7 +14,6 @@ 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
16
  require File.expand_path('../factual/query/geocode', __FILE__)
17
- require File.expand_path('../factual/query/geopulse', __FILE__)
18
17
  require File.expand_path('../factual/write/base', __FILE__)
19
18
  require File.expand_path('../factual/write/flag', __FILE__)
20
19
  require File.expand_path('../factual/write/boost', __FILE__)
@@ -65,10 +64,6 @@ class Factual
65
64
  Query::Geocode.new(@api, lat, lng)
66
65
  end
67
66
 
68
- def geopulse(lat, lng)
69
- Query::Geopulse.new(@api, lat, lng)
70
- end
71
-
72
67
  def get(path, query={})
73
68
  @api.raw_get(path, query)
74
69
  end
@@ -1,6 +1,6 @@
1
1
  class Factual
2
2
  class API
3
- VERSION = "1.3.14"
3
+ VERSION = "1.3.15"
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 }
@@ -6,6 +6,7 @@ class Factual
6
6
  :filters, :search, :geo,
7
7
  :sort, :select,
8
8
  :limit, :offset,
9
+ :threshold,
9
10
  :include_count, :user
10
11
  ]
11
12
 
@@ -1,8 +1,9 @@
1
1
  class Factual
2
2
  module Write
3
3
  class Flag < Base
4
- PROBLEMS = [:duplicate, :nonexistent, :inaccurate, :inappropriate, :spam, :other]
5
- VALID_KEYS = [:table, :factual_id, :problem, :user, :comment, :debug, :reference, :fields, :data]
4
+ PROBLEMS = [:duplicate, :nonexistent, :inaccurate, :inappropriate, :spam, :relocated, :other]
5
+ VALID_KEYS = [:table, :factual_id, :problem, :user, :comment, :debug, :reference, :fields, :preferred]
6
+ DEPRECATED_KEYS = [:data]
6
7
 
7
8
  def initialize(api, params)
8
9
  validate_params(params)
@@ -23,6 +24,7 @@ class Factual
23
24
 
24
25
  def validate_params(params)
25
26
  params.keys.each do |key|
27
+ raise "Deprecated flag option: #{key}" if DEPRECATED_KEYS.include?(key)
26
28
  raise "Invalid flag option: #{key}" unless VALID_KEYS.include?(key)
27
29
  end
28
30
 
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.14
4
+ version: 1.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rudiger Lippert
@@ -9,12 +9,15 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-10 00:00:00.000000000 Z
12
+ date: 2014-05-30 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
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: 0.4.4
18
21
  - - ! '>='
19
22
  - !ruby/object:Gem::Version
20
23
  version: 0.4.4
@@ -22,6 +25,9 @@ dependencies:
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 0.4.4
25
31
  - - ! '>='
26
32
  - !ruby/object:Gem::Version
27
33
  version: 0.4.4
@@ -29,6 +35,9 @@ dependencies:
29
35
  name: json
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2'
32
41
  - - ! '>='
33
42
  - !ruby/object:Gem::Version
34
43
  version: 1.2.0
@@ -36,6 +45,9 @@ dependencies:
36
45
  prerelease: false
37
46
  version_requirements: !ruby/object:Gem::Requirement
38
47
  requirements:
48
+ - - ~>
49
+ - !ruby/object:Gem::Version
50
+ version: '1.2'
39
51
  - - ! '>='
40
52
  - !ruby/object:Gem::Version
41
53
  version: 1.2.0
@@ -43,14 +55,14 @@ dependencies:
43
55
  name: rspec
44
56
  requirement: !ruby/object:Gem::Requirement
45
57
  requirements:
46
- - - ! '>='
58
+ - - ~>
47
59
  - !ruby/object:Gem::Version
48
60
  version: '0'
49
61
  type: :development
50
62
  prerelease: false
51
63
  version_requirements: !ruby/object:Gem::Requirement
52
64
  requirements:
53
- - - ! '>='
65
+ - - ~>
54
66
  - !ruby/object:Gem::Version
55
67
  version: '0'
56
68
  description: Factual's official Ruby driver for the Factual public API.
@@ -69,7 +81,6 @@ files:
69
81
  - lib/factual/query/base.rb
70
82
  - lib/factual/query/facets.rb
71
83
  - lib/factual/query/geocode.rb
72
- - lib/factual/query/geopulse.rb
73
84
  - lib/factual/query/match.rb
74
85
  - lib/factual/query/resolve.rb
75
86
  - lib/factual/query/table.rb
@@ -80,7 +91,8 @@ files:
80
91
  - lib/factual/write/insert.rb
81
92
  - lib/factual/write/submit.rb
82
93
  homepage: http://github.com/Factual/factual-ruby-driver
83
- licenses: []
94
+ licenses:
95
+ - Apache-2.0
84
96
  metadata: {}
85
97
  post_install_message:
86
98
  rdoc_options: []
@@ -1,19 +0,0 @@
1
- class Factual
2
- module Query
3
- class Geopulse < Base
4
- def initialize(api, lat, lng, params={})
5
- @path = "geopulse/context"
6
- @action = :read
7
- @lat = lat
8
- @lng = lng
9
-
10
- @params = {:geo => {"$point" => [lat, lng]}}.merge(params)
11
- super(api, @params)
12
- end
13
-
14
- def select(*args)
15
- self.class.new(@api, @lat, @lng, :select => form_value(args))
16
- end
17
- end
18
- end
19
- end