towsta 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/towsta +4 -3
- data/lib/towsta/version.rb +1 -1
- metadata +2 -2
data/bin/towsta
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
require 'net/http'
|
3
3
|
action = ARGV.first
|
4
4
|
if action == 'new'
|
5
|
-
puts "Generating and configuring your app, it may take a while..."
|
6
5
|
project = ARGV[1]
|
7
6
|
Dir.mkdir project
|
8
7
|
configru = "require './app'\n"
|
@@ -14,13 +13,15 @@ if action == 'new'
|
|
14
13
|
apprb = "#coding: utf-8 \n"
|
15
14
|
apprb += "require 'sinatra'\n"
|
16
15
|
apprb += "require 'towsta'\n\n"
|
17
|
-
apprb += "$towsta_secret = '#{ARGV[2]}'\n"
|
18
|
-
apprb += "# $towsta_cache = true\n\n"
|
19
16
|
apprb += "get '/' do\n"
|
20
17
|
apprb += " sync_with_towsta\n"
|
21
18
|
apprb += " haml :index\n"
|
22
19
|
apprb += "end\n"
|
23
20
|
File.open("#{project}/app.rb", 'w') {|f| f.write(apprb) }
|
21
|
+
towstarb = "Towsta.secret = '#{ARGV[2]}'\n"
|
22
|
+
towstarb += "#Towsta.author = 'default_author_email'\n"
|
23
|
+
towstarb += "#Towsta.global = {}"
|
24
|
+
File.open("#{project}/towsta.rb", 'w') {|f| f.write(towstarb) }
|
24
25
|
Dir.mkdir "#{project}/views"
|
25
26
|
layout = "!!!\n"
|
26
27
|
layout += "%html\n"
|
data/lib/towsta/version.rb
CHANGED