webs 0.1.6 → 0.1.7
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.
- data/Rakefile +1 -1
- data/lib/controller/webs_controller.rb +19 -0
- data/lib/helper/params.rb +2 -3
- data/lib/webs.rb +1 -1
- data/webs.gemspec +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -11,6 +11,25 @@ module Webs
|
|
11
11
|
helper Webs::Helper::Tags
|
12
12
|
include Webs::Helper::Params
|
13
13
|
include Webs::Helper::Tags
|
14
|
+
helper_method :webs_app_name
|
15
|
+
helper_method :webs_appenv_name
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def webs_app_name
|
20
|
+
app_name = APP_NAME if defined?(APP_NAME)
|
21
|
+
app_name ||= Webs::APP_NAME if defined?(Webs::APP_NAME)
|
22
|
+
end
|
23
|
+
|
24
|
+
def webs_appenv_name
|
25
|
+
unless defined?(Webs::USE_ENV_IN_APPNAME) && Webs::USE_ENV_IN_APPNAME == false
|
26
|
+
suffix = Rails.env
|
27
|
+
suffix = {'development' => 'dev', 'beta'=>'qa' }[suffix] || suffix
|
28
|
+
suffix = nil if suffix == 'production'
|
29
|
+
|
30
|
+
"#{webs_app_name}#{'.'+suffix if !suffix.nil?}"
|
31
|
+
else
|
32
|
+
webs_app_name
|
14
33
|
end
|
15
34
|
end
|
16
35
|
|
data/lib/helper/params.rb
CHANGED
@@ -65,9 +65,8 @@ module Webs
|
|
65
65
|
# defined in a global var, usually in the respective env file, however APP_NAME should be moved to something
|
66
66
|
# more elegant in the future.
|
67
67
|
def webs_app_url
|
68
|
-
app_name =
|
69
|
-
|
70
|
-
raise "fw_app_url requires that the constant APP_NAME is defined.. for now..." if app_name.blank?
|
68
|
+
app_name = webs_appenv_name
|
69
|
+
raise "webs_app_url requires that the constant APP_NAME is defined.. for now..." if app_name.blank?
|
71
70
|
"#{fw_sig_url}apps/#{app_name}"
|
72
71
|
end
|
73
72
|
end
|
data/lib/webs.rb
CHANGED
data/webs.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chuck Olczak
|