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 CHANGED
@@ -12,7 +12,7 @@ simba aim to set up ruby off rails's best practice.
12
12
 
13
13
  ## Usage
14
14
 
15
- $ simba appname
15
+ $ simba appname [--skip-bundle]
16
16
 
17
17
  ## Contributing
18
18
 
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 Sinatra applications."
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, :default => false, :type => :boolean
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
 
@@ -6,10 +6,10 @@ gem "sqlite3"
6
6
  gem "sequel"
7
7
  gem "sinatra"
8
8
  gem "coffee-script"
9
- gem "sinatra-contrib", :require => "sinatra/contrib/all"
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,3 @@
1
+ get '/' do
2
+ slim :'home/index'
3
+ end
@@ -0,0 +1,3 @@
1
+ helpers do
2
+ #dummy
3
+ end
@@ -0,0 +1 @@
1
+ h3 <%= @class_name %> Homepage
@@ -1,8 +1,8 @@
1
1
  doctype html
2
2
  html
3
3
  head
4
- title Simba
5
- meta name="keywords" content="simba"
4
+ title <%= @class_name %>
5
+ meta name="keywords" content="website"
6
6
  == js :application
7
7
  == css :application
8
8
  body
@@ -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
- js :application, [
22
- "/js/*.js"
23
- ]
23
+ css_compression :sass
24
+ js_compression :uglify
24
25
 
25
- css :application, [
26
- "/css/*.css"
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
@@ -1,3 +1,3 @@
1
1
  module Simba
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-21 00:00:00.000000000 Z
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: &70341398889740 !ruby/object:Gem::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: *70341398889740
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/app.rb
47
- - lib/simba/base_app/app/helpers/.gitkeep
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
@@ -1,3 +0,0 @@
1
- get '/' do
2
- slim :index
3
- end
File without changes
File without changes
@@ -1 +0,0 @@
1
- h1 Hello
File without changes