restpack-web 0.2.1 → 0.2.2

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.
@@ -48,15 +48,17 @@ module RestPack
48
48
 
49
49
  def add_user(env)
50
50
  user_id = env['rack.session'][:user_id]
51
+ p "GJ: user_id: [#{user_id}]"
51
52
  if user_id
52
53
  url = "http://:1234@localhost:1112/api/v1/users/#{user_id}.json" #TODO: GJ: build from config
53
54
  p url
54
55
  json = RestClient.get(url)
55
56
  user = JSON.parse(json)['user']
56
57
  env[:restpack][:user] = user
58
+ env[:restpack][:user_id] = user_id
59
+ else
60
+ env[:restpack][:user_id] = nil
57
61
  end
58
-
59
- env[:restpack][:user_id] = user_id
60
62
  end
61
63
 
62
64
  end
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Web
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: