fluidfeatures-rails 0.2.2 → 0.2.3

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.
@@ -159,7 +159,11 @@ module FluidFeatures
159
159
  begin
160
160
  uri = URI("#{@@baseuri}/app/#{@@app_id}/user/#{user[:id]}/features")
161
161
  uri.query = URI.encode_www_form( attribute_ids )
162
- request = Net::HTTP::Get.new "#{uri.path}?#{uri.query}"
162
+ url_path = uri.path
163
+ if uri.query
164
+ url_path += "?" + uri.query
165
+ end
166
+ request = Net::HTTP::Get.new url_path
163
167
  request["Accept"] = "application/json"
164
168
  request['AUTHORIZATION'] = @@secret
165
169
  response = @@http.request request
@@ -247,7 +251,7 @@ module ActionController
247
251
  user = fluidfeature_current_user(verbose=true)
248
252
 
249
253
  if user[:id] and not user[:anonymous]
250
- # We no longer an anoymous users. Let's delete the cookie
254
+ # We are no longer an anoymous users. Delete the cookie
251
255
  if cookies.has_key? :fluidfeatures_anonymous
252
256
  cookies.delete(:fluidfeatures_anonymous)
253
257
  end
@@ -1,5 +1,5 @@
1
1
  module FluidFeatures
2
2
  module Rails
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
@@ -10,12 +10,12 @@ describe HomeController do
10
10
  before do
11
11
  FakeWeb.register_uri(
12
12
  :get,
13
- File.join(ENV["FLUIDFEATURES_BASEURI"], "/app/123/user/1/features"),
13
+ File.join(ENV["FLUIDFEATURES_BASEURI"], "/app/123/user/1/features?anonymous=?false"),
14
14
  :body => JSON.generate({}) # no features registered yet
15
15
  )
16
16
  FakeWeb.register_uri(
17
17
  :get,
18
- File.join(ENV["FLUIDFEATURES_BASEURI"], "/app/123/user/2/features"),
18
+ File.join(ENV["FLUIDFEATURES_BASEURI"], "/app/123/user/2/features?anonymous=false"),
19
19
  :body => JSON.generate({
20
20
  :apples => false,
21
21
  :oranges => true,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluidfeatures-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-19 00:00:00.000000000 Z
12
+ date: 2012-10-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: persistent_http