flying-sphinx 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,7 @@
1
+ 0.6.5 - 3rd May 2012
2
+ * Relaxing the multi_json dependency to allow for higher versions.
3
+ * Support for staging.flying-sphinx.com.
4
+
1
5
  0.6.4 - 3rd March 2012
2
6
  * Fix for Rails 2 with API verbose logging.
3
7
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency 'thinking-sphinx', ['>= 0']
22
22
  s.add_runtime_dependency 'riddle', ['>= 1.5.0']
23
23
  s.add_runtime_dependency 'net-ssh', ['>= 2.0.23']
24
- s.add_runtime_dependency 'multi_json', ['~> 1.0.1']
24
+ s.add_runtime_dependency 'multi_json', ['>= 1.0.1']
25
25
  s.add_runtime_dependency 'faraday_middleware', ['~> 0.7.0']
26
26
  s.add_runtime_dependency 'rash', ['~> 0.3.0']
27
27
 
@@ -3,9 +3,10 @@ require 'faraday_middleware'
3
3
 
4
4
  class FlyingSphinx::API
5
5
 
6
- APIServer = 'https://flying-sphinx.com'
7
- APIPath = "/api/my/app"
8
- APIVersion = 2
6
+ APIServer = 'https://flying-sphinx.com'
7
+ APIStagingServer = 'https://staging.flying-sphinx.com'
8
+ APIPath = "/api/my/app"
9
+ APIVersion = 2
9
10
 
10
11
  attr_reader :api_key, :identifier, :adapter
11
12
 
@@ -52,7 +53,7 @@ class FlyingSphinx::API
52
53
  def connection(connection_options = {})
53
54
  options = {
54
55
  :ssl => {:verify => false},
55
- :url => APIServer,
56
+ :url => (ENV['STAGED_SPHINX_API_KEY'] ? APIStagingServer : APIServer),
56
57
  :headers => api_headers
57
58
  }
58
59
 
@@ -169,18 +169,18 @@ class FlyingSphinx::Configuration
169
169
  end
170
170
 
171
171
  def identifier_from_env
172
- ENV['FLYING_SPHINX_IDENTIFIER']
172
+ ENV['STAGED_SPHINX_IDENTIFIER'] || ENV['FLYING_SPHINX_IDENTIFIER']
173
173
  end
174
174
 
175
175
  def api_key_from_env
176
- ENV['FLYING_SPHINX_API_KEY']
176
+ ENV['STAGED_SPHINX_API_KEY'] || ENV['FLYING_SPHINX_API_KEY']
177
177
  end
178
178
 
179
179
  def host_from_env
180
- ENV['FLYING_SPHINX_HOST'].dup
180
+ (ENV['STAGED_SPHINX_HOST'] || ENV['FLYING_SPHINX_HOST']).dup
181
181
  end
182
182
 
183
183
  def port_from_env
184
- ENV['FLYING_SPHINX_PORT'].dup
184
+ (ENV['STAGED_SPHINX_PORT'] || ENV['FLYING_SPHINX_PORT']).dup
185
185
  end
186
186
  end
@@ -1,6 +1,6 @@
1
1
  require 'action_controller/dispatcher'
2
2
 
3
- if ENV['FLYING_SPHINX_IDENTIFIER']
3
+ if ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER']
4
4
  ActionController::Dispatcher.to_prepare :flying_sphinx do
5
5
  config = FlyingSphinx::Configuration.new
6
6
 
@@ -14,5 +14,5 @@ class FlyingSphinx::Railtie < Rails::Railtie
14
14
  if ENV['DATABASE_URL'] && ENV['DATABASE_URL'][/^mysql/].nil?
15
15
  ThinkingSphinx.database_adapter = FlyingSphinx::HerokuSharedAdapter
16
16
  end
17
- end if ENV['FLYING_SPHINX_IDENTIFIER']
17
+ end if ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER']
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module FlyingSphinx
2
- Version = '0.6.4'
2
+ Version = '0.6.5'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flying-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 4
10
- version: 0.6.4
9
+ - 5
10
+ version: 0.6.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan
@@ -15,10 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-03 00:00:00 Z
18
+ date: 2012-05-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- type: :runtime
21
+ name: thinking-sphinx
22
+ prerelease: false
22
23
  requirement: &id001 !ruby/object:Gem::Requirement
23
24
  none: false
24
25
  requirements:
@@ -28,11 +29,11 @@ dependencies:
28
29
  segments:
29
30
  - 0
30
31
  version: "0"
32
+ type: :runtime
31
33
  version_requirements: *id001
32
- prerelease: false
33
- name: thinking-sphinx
34
34
  - !ruby/object:Gem::Dependency
35
- type: :runtime
35
+ name: riddle
36
+ prerelease: false
36
37
  requirement: &id002 !ruby/object:Gem::Requirement
37
38
  none: false
38
39
  requirements:
@@ -44,11 +45,11 @@ dependencies:
44
45
  - 5
45
46
  - 0
46
47
  version: 1.5.0
48
+ type: :runtime
47
49
  version_requirements: *id002
48
- prerelease: false
49
- name: riddle
50
50
  - !ruby/object:Gem::Dependency
51
- type: :runtime
51
+ name: net-ssh
52
+ prerelease: false
52
53
  requirement: &id003 !ruby/object:Gem::Requirement
53
54
  none: false
54
55
  requirements:
@@ -60,15 +61,15 @@ dependencies:
60
61
  - 0
61
62
  - 23
62
63
  version: 2.0.23
64
+ type: :runtime
63
65
  version_requirements: *id003
64
- prerelease: false
65
- name: net-ssh
66
66
  - !ruby/object:Gem::Dependency
67
- type: :runtime
67
+ name: multi_json
68
+ prerelease: false
68
69
  requirement: &id004 !ruby/object:Gem::Requirement
69
70
  none: false
70
71
  requirements:
71
- - - ~>
72
+ - - ">="
72
73
  - !ruby/object:Gem::Version
73
74
  hash: 21
74
75
  segments:
@@ -76,11 +77,11 @@ dependencies:
76
77
  - 0
77
78
  - 1
78
79
  version: 1.0.1
80
+ type: :runtime
79
81
  version_requirements: *id004
80
- prerelease: false
81
- name: multi_json
82
82
  - !ruby/object:Gem::Dependency
83
- type: :runtime
83
+ name: faraday_middleware
84
+ prerelease: false
84
85
  requirement: &id005 !ruby/object:Gem::Requirement
85
86
  none: false
86
87
  requirements:
@@ -92,11 +93,11 @@ dependencies:
92
93
  - 7
93
94
  - 0
94
95
  version: 0.7.0
96
+ type: :runtime
95
97
  version_requirements: *id005
96
- prerelease: false
97
- name: faraday_middleware
98
98
  - !ruby/object:Gem::Dependency
99
- type: :runtime
99
+ name: rash
100
+ prerelease: false
100
101
  requirement: &id006 !ruby/object:Gem::Requirement
101
102
  none: false
102
103
  requirements:
@@ -108,11 +109,11 @@ dependencies:
108
109
  - 3
109
110
  - 0
110
111
  version: 0.3.0
112
+ type: :runtime
111
113
  version_requirements: *id006
112
- prerelease: false
113
- name: rash
114
114
  - !ruby/object:Gem::Dependency
115
- type: :development
115
+ name: rake
116
+ prerelease: false
116
117
  requirement: &id007 !ruby/object:Gem::Requirement
117
118
  none: false
118
119
  requirements:
@@ -124,11 +125,11 @@ dependencies:
124
125
  - 8
125
126
  - 7
126
127
  version: 0.8.7
128
+ type: :development
127
129
  version_requirements: *id007
128
- prerelease: false
129
- name: rake
130
130
  - !ruby/object:Gem::Dependency
131
- type: :development
131
+ name: yajl-ruby
132
+ prerelease: false
132
133
  requirement: &id008 !ruby/object:Gem::Requirement
133
134
  none: false
134
135
  requirements:
@@ -140,11 +141,11 @@ dependencies:
140
141
  - 8
141
142
  - 2
142
143
  version: 0.8.2
144
+ type: :development
143
145
  version_requirements: *id008
144
- prerelease: false
145
- name: yajl-ruby
146
146
  - !ruby/object:Gem::Dependency
147
- type: :development
147
+ name: rspec
148
+ prerelease: false
148
149
  requirement: &id009 !ruby/object:Gem::Requirement
149
150
  none: false
150
151
  requirements:
@@ -156,11 +157,11 @@ dependencies:
156
157
  - 5
157
158
  - 0
158
159
  version: 2.5.0
160
+ type: :development
159
161
  version_requirements: *id009
160
- prerelease: false
161
- name: rspec
162
162
  - !ruby/object:Gem::Dependency
163
- type: :development
163
+ name: rcov
164
+ prerelease: false
164
165
  requirement: &id010 !ruby/object:Gem::Requirement
165
166
  none: false
166
167
  requirements:
@@ -172,11 +173,11 @@ dependencies:
172
173
  - 9
173
174
  - 9
174
175
  version: 0.9.9
176
+ type: :development
175
177
  version_requirements: *id010
176
- prerelease: false
177
- name: rcov
178
178
  - !ruby/object:Gem::Dependency
179
- type: :development
179
+ name: fakeweb
180
+ prerelease: false
180
181
  requirement: &id011 !ruby/object:Gem::Requirement
181
182
  none: false
182
183
  requirements:
@@ -188,11 +189,11 @@ dependencies:
188
189
  - 3
189
190
  - 0
190
191
  version: 1.3.0
192
+ type: :development
191
193
  version_requirements: *id011
192
- prerelease: false
193
- name: fakeweb
194
194
  - !ruby/object:Gem::Dependency
195
- type: :development
195
+ name: fakeweb-matcher
196
+ prerelease: false
196
197
  requirement: &id012 !ruby/object:Gem::Requirement
197
198
  none: false
198
199
  requirements:
@@ -204,11 +205,11 @@ dependencies:
204
205
  - 2
205
206
  - 2
206
207
  version: 1.2.2
208
+ type: :development
207
209
  version_requirements: *id012
208
- prerelease: false
209
- name: fakeweb-matcher
210
210
  - !ruby/object:Gem::Dependency
211
- type: :development
211
+ name: delayed_job
212
+ prerelease: false
212
213
  requirement: &id013 !ruby/object:Gem::Requirement
213
214
  none: false
214
215
  requirements:
@@ -220,9 +221,8 @@ dependencies:
220
221
  - 1
221
222
  - 4
222
223
  version: 2.1.4
224
+ type: :development
223
225
  version_requirements: *id013
224
- prerelease: false
225
- name: delayed_job
226
226
  description: Hooks Thinking Sphinx into the Flying Sphinx service
227
227
  email: pat@freelancing-gods.com
228
228
  executables: []
@@ -303,3 +303,4 @@ test_files:
303
303
  - spec/specs/delayed_delta_spec.rb
304
304
  - spec/specs/flag_as_deleted_job_spec.rb
305
305
  - spec/specs/index_request_spec.rb
306
+ has_rdoc: