towsta 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/towsta +4 -3
  2. data/lib/towsta/version.rb +1 -1
  3. 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"
@@ -1,3 +1,3 @@
1
1
  module Towsta
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 3
9
- version: 2.0.3
8
+ - 4
9
+ version: 2.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mortaro