fanforce 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fanforce/_base.rb +1 -59
- data/lib/fanforce/domain_environments.rb +44 -0
- data/lib/fanforce/domains.rb +67 -44
- data/lib/fanforce/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjM2Y2M3NDg1OTRkNWY1NGVjODcwZjE0NDFkMTg4YjdkNDEzYTE5OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDYzNzlkYWQwNGY1Y2RkNTg4NWI1OTNhZjUxNmMwZDU2NjZmMzU5Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzVkMjIzNzQ5MjcwODU4MjhmNTc2ZjVjOTVjM2E4NzkzMmE1YjMyMjgzNWVi
|
10
|
+
ZTc0OWU5NmE2OTk2YTgzNzgwMzAyN2I1NjI5MDNkZDhhMmYwOWM3ODczMjA0
|
11
|
+
YWQ2M2M5NDYxMmU3MWFiNzVmN2UwM2VlZWYxZjU0MjFmZDQ3NmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDZmYjI1YmE5OTg0MzdmYzI4MWU4MmRmM2Y4N2U2NTVhNGYxYWFjZDkyNjVi
|
14
|
+
NTM1ZWEwOTgyYTA3MTNlMzlhMDAzYmM0YjkxYTIxMmNiNzYxNWU4MTBlZjVh
|
15
|
+
NjQ3OWE1OGE5NDdlYzIxYzJlYzlmMWVkMTA3MGNkNjU0MTlmNzY=
|
data/lib/fanforce/_base.rb
CHANGED
@@ -3,63 +3,5 @@ require_relative 'utils'
|
|
3
3
|
|
4
4
|
class Fanforce
|
5
5
|
include Fanforce::Utils
|
6
|
-
|
7
|
-
def self.base_domain
|
8
|
-
Fanforce::Domains.method(ENV['RACK_ENV'] || 'development').call[:base]
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.default_short_domain
|
12
|
-
Fanforce::Domains.method(ENV['RACK_ENV'] || 'development').call[:default_short_domain]
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.apps_base_domain
|
16
|
-
Fanforce::Domains.method(ENV['RACK_ENV'] || 'development').call[:apps_base]
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.plugins_base_domain
|
20
|
-
Fanforce::Domains.method(ENV['RACK_ENV'] || 'development').call[:plugins_base]
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.widgets_base_domain
|
24
|
-
Fanforce::Domains.method(ENV['RACK_ENV'] || 'development').call[:widgets_base]
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.api_domain
|
28
|
-
'api.' + base_domain
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.eye_domain
|
32
|
-
'i.' + base_domain
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.website_domain
|
36
|
-
'www.' + base_domain
|
37
|
-
end
|
38
|
-
|
39
|
-
def self.developers_domain
|
40
|
-
'developers.' + base_domain
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.controller_domain
|
44
|
-
'controller.' + base_domain
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.addon_management_url
|
48
|
-
controller_domain + '/db'
|
49
|
-
end
|
50
|
-
|
51
|
-
# these should be moved to edition
|
52
|
-
|
53
|
-
def self.app_domain
|
54
|
-
'app.' + base_domain
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.signup_domain
|
58
|
-
'signup.' + base_domain
|
59
|
-
end
|
60
|
-
|
61
|
-
def self.marketplace_domain
|
62
|
-
'marketplace.' + base_domain
|
63
|
-
end
|
64
|
-
|
6
|
+
include Fanforce::Domains
|
65
7
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Fanforce::DomainEnvironments
|
2
|
+
|
3
|
+
def self.development
|
4
|
+
base_domain = (ENV['FANFORCE_GEM_TOP_LEVEL_DOMAIN'] || 'gg')
|
5
|
+
{
|
6
|
+
:base => ENV['FANFORCE_GEM_BASE_DOMAIN'] || "fanforce.#{base_domain}",
|
7
|
+
:default_short_domain => ENV['FANFORCE_GEM_DEFAULT_SHORT_DOMAIN'] || "fanforc.#{base_domain}",
|
8
|
+
:apps_base => ENV['FANFORCE_GEM_APPS_BASE_DOMAIN'] || "ffapp.#{base_domain}",
|
9
|
+
:plugins_base => ENV['FANFORCE_GEM_PLUGINS_BASE_DOMAIN'] || "ffplugin.#{base_domain}",
|
10
|
+
:widgets_base => ENV['FANFORCE_GEM_WIDGETS_BASE_DOMAIN'] || "ffwidget.#{base_domain}"
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.test
|
15
|
+
{
|
16
|
+
:base => 'fanforce.gg',
|
17
|
+
:default_short_domain => 'fanforc.gg',
|
18
|
+
:apps_base => 'ffapp.gg',
|
19
|
+
:plugins_base => 'ffplugin.gg',
|
20
|
+
:widgets_base => 'ffwidget.gg'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.staging
|
25
|
+
{
|
26
|
+
:base => 'fanforce-staging.com',
|
27
|
+
:default_short_domain => 'fanforc.us',
|
28
|
+
:apps_base => 'ffapp.us',
|
29
|
+
:plugins_base => 'ffplugin.us',
|
30
|
+
:widgets_base => 'ffwidget.us'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.production
|
35
|
+
{
|
36
|
+
:base => 'fanforce.com',
|
37
|
+
:default_short_domain => 'fanforce.io',
|
38
|
+
:apps_base => 'ffapp.io',
|
39
|
+
:plugins_base => 'ffplugin.io',
|
40
|
+
:widgets_base => 'ffwidget.io'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
data/lib/fanforce/domains.rb
CHANGED
@@ -1,44 +1,67 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
1
|
+
require_relative 'domain_environments'
|
2
|
+
|
3
|
+
class Fanforce::Domains
|
4
|
+
|
5
|
+
def self.base_domain
|
6
|
+
Fanforce::DomainEnvironments.method(ENV['RACK_ENV'] || 'development').call[:base]
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.default_short_domain
|
10
|
+
Fanforce::DomainEnvironments.method(ENV['RACK_ENV'] || 'development').call[:default_short_domain]
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.apps_base_domain
|
14
|
+
Fanforce::DomainEnvironments.method(ENV['RACK_ENV'] || 'development').call[:apps_base]
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.plugins_base_domain
|
18
|
+
Fanforce::DomainEnvironments.method(ENV['RACK_ENV'] || 'development').call[:plugins_base]
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.widgets_base_domain
|
22
|
+
Fanforce::DomainEnvironments.method(ENV['RACK_ENV'] || 'development').call[:widgets_base]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.api_domain
|
26
|
+
'api.' + base_domain
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.eye_domain
|
30
|
+
'i.' + base_domain
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.assets_domain
|
34
|
+
'assets.' + base_domain
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.controller_domain
|
38
|
+
'controller.' + base_domain
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.addon_management_url
|
42
|
+
controller_domain + '/db'
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.website_domain
|
46
|
+
'www.' + base_domain
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.developers_domain
|
50
|
+
'developers.' + base_domain
|
51
|
+
end
|
52
|
+
|
53
|
+
# these should be moved to edition
|
54
|
+
|
55
|
+
def self.app_domain
|
56
|
+
'app.' + base_domain
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.signup_domain
|
60
|
+
'signup.' + base_domain
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.marketplace_domain
|
64
|
+
'marketplace.' + base_domain
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
data/lib/fanforce/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fanforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- fanforce.gemspec
|
68
68
|
- lib/fanforce.rb
|
69
69
|
- lib/fanforce/_base.rb
|
70
|
+
- lib/fanforce/domain_environments.rb
|
70
71
|
- lib/fanforce/domains.rb
|
71
72
|
- lib/fanforce/utils.rb
|
72
73
|
- lib/fanforce/version.rb
|