restpack-web 0.1.47 → 0.1.48

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.
@@ -29,6 +29,7 @@ module RestPack
29
29
  env[:restpack][:application] = domain.application
30
30
  env[:restpack][:domain] = domain
31
31
  env[:restpack][:configurations] = @core_cache.configurations
32
+ env[:restpack][:services] = @core_cache.services
32
33
 
33
34
  add_user env
34
35
 
@@ -3,7 +3,7 @@ require 'public_suffix'
3
3
  module RestPack
4
4
  module Web
5
5
  class Context
6
- attr_accessor :domain, :application, :channel, :configurations, :user, :user_id, :request
6
+ attr_accessor :domain, :application, :channel, :configurations, :services, :user, :user_id, :request
7
7
 
8
8
  def initialize(env)
9
9
  restpack = env[:restpack]
@@ -14,6 +14,7 @@ module RestPack
14
14
  @application = restpack[:application]
15
15
  @channel = restpack[:channel]
16
16
  @configurations = restpack[:configurations]
17
+ @services = restpack[:services]
17
18
  @user = restpack[:user]
18
19
  @user_id = @user[:id] if @user
19
20
  end
@@ -31,6 +32,10 @@ module RestPack
31
32
  @application.auth_domain || "auth.#{root_domain}"
32
33
  end
33
34
 
35
+ def root_domain
36
+ PublicSuffix.parse(@domain.host).domain
37
+ end
38
+
34
39
  def logout_url(next_url = nil) #TODO: GJ: whitelist the next_url
35
40
  next_url ||= "http://#{home_domain}/"
36
41
  "http://#{auth_domain}/auth/logout?next=#{next_url}"
@@ -40,10 +45,6 @@ module RestPack
40
45
  next_url ||= "http://#{home_domain}/"
41
46
  "http://#{auth_domain}/auth/#{provider}?next=#{next_url}"
42
47
  end
43
-
44
- def root_domain
45
- PublicSuffix.parse(@domain.host).domain
46
- end
47
48
  end
48
49
  end
49
50
  end
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Web
3
- VERSION = "0.1.47"
3
+ VERSION = "0.1.48"
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.1.47
4
+ version: 0.1.48
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: