my-simon 0.2.3 → 0.2.4
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/VERSION +1 -1
- data/lib/simon.rb +10 -10
- data/my-simon.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/simon.rb
CHANGED
@@ -92,7 +92,7 @@ class Simon
|
|
92
92
|
# controller
|
93
93
|
self.msg "#Adding section: #{@section}"
|
94
94
|
ctrl_startpoint = "./scaffolding/simon/controller.tpl"
|
95
|
-
ctrl_endpoint = "./www/
|
95
|
+
ctrl_endpoint = "./www/php/controller/#{@section}.php"
|
96
96
|
cmd = "cp #{ctrl_startpoint} #{ctrl_endpoint}"
|
97
97
|
Kernel::system(cmd);
|
98
98
|
self.replace_once(ctrl_endpoint, "%name%", @section)
|
@@ -100,7 +100,7 @@ class Simon
|
|
100
100
|
|
101
101
|
# view
|
102
102
|
view_startpoint = "./scaffolding/simon/view.tpl";
|
103
|
-
view_endpoint = "./www/
|
103
|
+
view_endpoint = "./www/php/view/#{@section}.php";
|
104
104
|
cmd = "cp #{view_startpoint} #{view_endpoint}";
|
105
105
|
Kernel::system(cmd);
|
106
106
|
self.msg "#{view_endpoint} added"
|
@@ -108,16 +108,16 @@ class Simon
|
|
108
108
|
# javascript
|
109
109
|
@js_section = name_space.gsub(/[^0-9A-Za-z]/, '')
|
110
110
|
javascript_startpoint = "./scaffolding/standards/js_template.js";
|
111
|
-
javascript_endpoint = "./www/
|
111
|
+
javascript_endpoint = "./www/js/#{@section}.js";
|
112
112
|
cmd = "cp #{javascript_startpoint} #{javascript_endpoint}"
|
113
113
|
Kernel::system( cmd );
|
114
114
|
self.replace_once(javascript_endpoint, "CLASS_NAME", @js_section);
|
115
|
-
self.replace_once("./www/
|
116
|
-
self.replace_once("./www/
|
115
|
+
self.replace_once("./www/php/template/footer.php", "<!-- END: DEV javascript -->", "<script src=\"/lib/js/#{@section}.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n\t\t<!-- END: DEV javascript -->");
|
116
|
+
self.replace_once("./www/js/master.js", "\*\/", "\* @depends #{@section}.js \n \*\/");
|
117
117
|
self.msg "#{javascript_endpoint} added"
|
118
118
|
|
119
119
|
# routes
|
120
|
-
routes = "./www/
|
120
|
+
routes = "./www/php/system/config.routes.php";
|
121
121
|
self.replace_once(routes, "?>", "Router::add('/#{@section}', DIR_CTRL.'/#{@section}.php');\n ?>");
|
122
122
|
self.msg "#{routes} route added #{@section}"
|
123
123
|
|
@@ -127,7 +127,7 @@ class Simon
|
|
127
127
|
|
128
128
|
if choice === :yes
|
129
129
|
model_startpoint = "./scaffolding/simon/model.tpl"
|
130
|
-
model_endpoint = "./www/
|
130
|
+
model_endpoint = "./www/php/model/#{@section}.php"
|
131
131
|
cmd = "cp #{model_startpoint} #{model_endpoint}"
|
132
132
|
Kernel::system( cmd );
|
133
133
|
self.replace_once(model_endpoint, "%name%", @section)
|
@@ -143,7 +143,7 @@ class Simon
|
|
143
143
|
|
144
144
|
host = ask("What is the virtual host name? : ") { |q| q.echo = true }
|
145
145
|
|
146
|
-
config = "./app/www/
|
146
|
+
config = "./app/www/php/system/Config.php"
|
147
147
|
self.replace_once(config, "%l_vhost%", host)
|
148
148
|
|
149
149
|
self.msg "#{config} modified"
|
@@ -160,7 +160,7 @@ class Simon
|
|
160
160
|
password = ask("What is the DB password? : ") { |q| q.echo = true }
|
161
161
|
dbname = ask("What is the DB name? : ") { |q| q.echo = true }
|
162
162
|
|
163
|
-
config = "./app/www/
|
163
|
+
config = "./app/www/php/system/Config.php"
|
164
164
|
self.replace_once(config, "%l_host%", host)
|
165
165
|
self.replace_once(config, "%l_user%", username)
|
166
166
|
self.replace_once(config, "%l_pass%", password)
|
@@ -172,7 +172,7 @@ class Simon
|
|
172
172
|
|
173
173
|
def setup_analytics
|
174
174
|
tracking_id = ask("What is the GA tracking ID? : ") { |q| q.echo = true }
|
175
|
-
config = "./app/www/
|
175
|
+
config = "./app/www/php/system/Config.php"
|
176
176
|
self.replace_once(config, "%google_id%", tracking_id);
|
177
177
|
self.msg "#{config} modified"
|
178
178
|
end
|
data/my-simon.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my-simon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -258,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
segments:
|
260
260
|
- 0
|
261
|
-
hash:
|
261
|
+
hash: 3952681614068715739
|
262
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
263
|
none: false
|
264
264
|
requirements:
|