sportweb 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sportweb/application.rb +25 -10
- data/lib/sportweb/environment.rb +4 -2
- data/lib/sportweb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c0a529599af0d0168efb349d241c89de9599a3
|
4
|
+
data.tar.gz: '080cad53cbe1a06540adb7b78dae4e2fe764f03f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7997ed96f8a20d8d6a2016f8d7499b3359a0981b9905f812c4e7286c5023dbf0bfb7b4d85bd785bd5d66377faf83b3a7e87ee1142a4778da61b128ed75a5823e
|
7
|
+
data.tar.gz: c2f5c866fcf962601da9743691ce8484efd38c55cd0fbcd0d12fc20bf20651724bbf5f00d2a6875c8d2fd5d54ca3e4734a420b1f34a85f60f6bd0057747f78fa
|
data/lib/sportweb/application.rb
CHANGED
@@ -50,6 +50,18 @@ end # module SportDbAdmin
|
|
50
50
|
# see https://gist.github.com/josevalim/1942658
|
51
51
|
# and others
|
52
52
|
|
53
|
+
|
54
|
+
def mkrootwindowsfix( root )
|
55
|
+
puts "root: #{root}"
|
56
|
+
if root.start_with?( "C:\\" )
|
57
|
+
puts " use: #{root[2..-1]}"
|
58
|
+
root[2..-1] ## cut-of "C:\\"
|
59
|
+
else
|
60
|
+
root
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
|
53
65
|
### host app - no module - keep it simple
|
54
66
|
class SportWebHost < Rails::Application
|
55
67
|
|
@@ -92,7 +104,6 @@ class SportWebHost < Rails::Application
|
|
92
104
|
config.secret_key_base = "49837489qkuweoiuoqwehisuakshdjksadhaisdy78o34y138974xyqp9rmye8yrpiokeuioqwzyoiuxftoyqiuxrhm3iou1hrzmjk"
|
93
105
|
|
94
106
|
|
95
|
-
|
96
107
|
#################################################
|
97
108
|
# Enable the asset pipeline !!!!!!!!!!!!!!!!
|
98
109
|
## config.assets.enabled = true
|
@@ -124,17 +135,21 @@ class SportWebHost < Rails::Application
|
|
124
135
|
config.public_file_server.enabled = true
|
125
136
|
|
126
137
|
|
127
|
-
|
128
|
-
|
129
|
-
|
138
|
+
## set public path to built-in public
|
139
|
+
puts "root (app): #{SportWebHost.root}"
|
140
|
+
puts "root (gem): #{SportWeb.root}"
|
141
|
+
puts "current: #{Dir.pwd}"
|
142
|
+
|
143
|
+
paths['public'] = "#{SportWeb.root}/public"
|
144
|
+
## note: gets overwritten!? try again (later) after initialize - why? why not?
|
130
145
|
|
131
|
-
|
132
|
-
|
146
|
+
## test hello path
|
147
|
+
paths['hello'] = "#{SportWeb.root}/hello"
|
133
148
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
149
|
+
paths['log'] = File.expand_path( "./log/#{Rails.env}.log", mkrootwindowsfix(Dir.pwd) ) ## use working folder for logs
|
150
|
+
## log - check? is folder/dir or log file itself?
|
151
|
+
## >log<:
|
152
|
+
## expanded: ["C:/Sites/sportdb/sport.db.web/log/production.log"]
|
138
153
|
end
|
139
154
|
|
140
155
|
|
data/lib/sportweb/environment.rb
CHANGED
@@ -100,5 +100,7 @@ Rails.application.paths.keys.each do |k|
|
|
100
100
|
puts "---"
|
101
101
|
end
|
102
102
|
|
103
|
-
|
104
|
-
|
103
|
+
|
104
|
+
##
|
105
|
+
## Rails.application.paths['public'] = "#{mkrootwindowsfix(SportWeb.root)}/public"
|
106
|
+
## puts "public: #{Rails.application.paths['public'].expanded}"
|
data/lib/sportweb/version.rb
CHANGED