simba 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/simba.rb +6 -2
- data/lib/simba/base_app/Gemfile +2 -2
- data/lib/simba/base_app/app/controllers/application_controller.rb +3 -0
- data/lib/simba/base_app/app/helpers/application_helper.rb +3 -0
- data/lib/simba/base_app/app/views/home/index.slim.tt +1 -0
- data/lib/simba/base_app/app/views/{layout.slim → layout.slim.tt} +2 -2
- data/lib/simba/base_app/config/boot.rb +9 -9
- data/lib/simba/version.rb +1 -1
- metadata +8 -10
- data/lib/simba/base_app/app/controllers/app.rb +0 -3
- data/lib/simba/base_app/app/helpers/.gitkeep +0 -0
- data/lib/simba/base_app/app/mailers/.gitkeep +0 -0
- data/lib/simba/base_app/app/views/index.slim +0 -1
- data/lib/simba/base_app/lib/.gitkeep +0 -0
data/README.md
CHANGED
data/lib/simba.rb
CHANGED
@@ -14,13 +14,17 @@ module Simba
|
|
14
14
|
"simba [app_name]"
|
15
15
|
end
|
16
16
|
|
17
|
-
desc "Description:\n\n\tsimba is a generator for
|
17
|
+
desc "Description:\n\n\tsimba is a generator for sinatra applications."
|
18
18
|
|
19
19
|
argument :name, :desc => "The name of your sinatra app"
|
20
|
-
class_option :skip_bundle,
|
20
|
+
class_option :skip_bundle,
|
21
|
+
:default => false,
|
22
|
+
:type => :boolean,
|
23
|
+
:desc => "Skip bundle install when creating app skeleton"
|
21
24
|
|
22
25
|
def setup_skeleton
|
23
26
|
self.destination_root = name
|
27
|
+
@class_name = name
|
24
28
|
directory("simba/base_app/", self.destination_root)
|
25
29
|
end
|
26
30
|
|
data/lib/simba/base_app/Gemfile
CHANGED
@@ -6,10 +6,10 @@ gem "sqlite3"
|
|
6
6
|
gem "sequel"
|
7
7
|
gem "sinatra"
|
8
8
|
gem "coffee-script"
|
9
|
-
gem "sinatra-contrib"
|
9
|
+
gem "sinatra-contrib"
|
10
10
|
gem "sinatra-assetpack", :require => "sinatra/assetpack"
|
11
11
|
|
12
|
-
group :development do
|
12
|
+
group :development, :test do
|
13
13
|
gem "pry"
|
14
14
|
end
|
15
15
|
|
@@ -0,0 +1 @@
|
|
1
|
+
h3 <%= @class_name %> Homepage
|
@@ -9,22 +9,22 @@ DB = Sequel.sqlite("./db/#{ENV["RACK_ENV"]}.db")
|
|
9
9
|
set :sessions, true
|
10
10
|
set :root, File.expand_path(".")
|
11
11
|
set :views, settings.root + "/app/views"
|
12
|
+
# sinatra reloader
|
13
|
+
if development?
|
14
|
+
require "sinatra/reloader"
|
15
|
+
also_reload "lib/**/*.rb", "app/{models,helpers}/**/*.rb"
|
16
|
+
end
|
12
17
|
# assetpack support
|
13
18
|
assets do
|
14
|
-
css_compression :sass
|
15
|
-
js_compression :uglify
|
16
|
-
|
17
19
|
serve "/js", :from => "app/assets/js"
|
18
20
|
serve "/css", :from => "app/assets/css"
|
19
21
|
serve "/img", :from => "app/assets/img"
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
-
]
|
23
|
+
css_compression :sass
|
24
|
+
js_compression :uglify
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
]
|
26
|
+
js :application, ["/js/*.js"]
|
27
|
+
css :application, ["/css/*.css"]
|
28
28
|
end
|
29
29
|
# require sinatra files
|
30
30
|
Dir.glob "./{lib,app/models,app/helpers,app/controllers}/**/*.rb" do |f|
|
data/lib/simba/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70296540820220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.14.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70296540820220
|
25
25
|
description: simba is a generator for sinatra applications.
|
26
26
|
email:
|
27
27
|
- saitowu@gmail.com
|
@@ -43,16 +43,14 @@ files:
|
|
43
43
|
- lib/simba/base_app/app/assets/css/application.scss
|
44
44
|
- lib/simba/base_app/app/assets/img/.gitkeep
|
45
45
|
- lib/simba/base_app/app/assets/js/application.coffee
|
46
|
-
- lib/simba/base_app/app/controllers/
|
47
|
-
- lib/simba/base_app/app/helpers
|
48
|
-
- lib/simba/base_app/app/mailers/.gitkeep
|
46
|
+
- lib/simba/base_app/app/controllers/application_controller.rb
|
47
|
+
- lib/simba/base_app/app/helpers/application_helper.rb
|
49
48
|
- lib/simba/base_app/app/models/user.rb
|
50
|
-
- lib/simba/base_app/app/views/index.slim
|
51
|
-
- lib/simba/base_app/app/views/layout.slim
|
49
|
+
- lib/simba/base_app/app/views/home/index.slim.tt
|
50
|
+
- lib/simba/base_app/app/views/layout.slim.tt
|
52
51
|
- lib/simba/base_app/config.ru
|
53
52
|
- lib/simba/base_app/config/boot.rb
|
54
53
|
- lib/simba/base_app/db/migrations/1_create_users.rb
|
55
|
-
- lib/simba/base_app/lib/.gitkeep
|
56
54
|
- lib/simba/base_app/lib/tasks/db.rake
|
57
55
|
- lib/simba/base_app/lib/tasks/stat.rake
|
58
56
|
- lib/simba/base_app/lib/tasks/test.rake
|
File without changes
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
h1 Hello
|
File without changes
|