sinatra-cmd 0.0.9 → 0.0.10
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.
- checksums.yaml +4 -4
- data/lib/sinatra_cmd/generator.rb +10 -10
- data/lib/sinatra_cmd/version.rb +1 -1
- data/templates/{helpers → app/helpers}/application.rb.erb +0 -0
- data/templates/{helpers → app/helpers}/error_handling.rb.erb +0 -0
- data/templates/{routes → app/routes}/demo.rb.erb +0 -0
- data/templates/config/application.rb.erb +3 -3
- data/templates/config/boot.rb.erb +3 -1
- data/templates/config/i18n/en-us.yml +0 -1
- data/templates/config/i18n/zh-cn.yml +0 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c231852d46c97028e6f7bf026e5b4c99319d5a62
|
4
|
+
data.tar.gz: 1666085b4120ff9499744fe7b356c4e1f8d87b92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dce49b03030877ead66aa770d729afa07e436721c34ccb7bd549e95d370ef91b6d1ebb60d6228cf9650dd4e8ffca51a36a4faf2e200e36a79722723808de309
|
7
|
+
data.tar.gz: da302fe1b2a431745a050997fe96c65015ff26bb66d6b1a0be3b081b39e843eac9d1851592ec9b9113dde3a4723bf4aa419ad7dccad9e02d254c09d4c09b5a47
|
@@ -10,23 +10,23 @@ module SinatraCmd
|
|
10
10
|
File.join(File.dirname(__FILE__), "../../", "templates")
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
14
|
-
keep_file "#{app_name}/
|
15
|
-
template "helpers/application.rb.erb", "#{app_name}/helpers/application.rb"
|
16
|
-
template "helpers/error_handling.rb.erb", "#{app_name}/helpers/error_handling.rb"
|
13
|
+
def setup_utils
|
14
|
+
keep_file "#{app_name}/app/utils"
|
17
15
|
end
|
18
16
|
|
19
|
-
def
|
20
|
-
keep_file "#{app_name}/
|
17
|
+
def setup_helpers
|
18
|
+
keep_file "#{app_name}/app/helpers"
|
19
|
+
template "app/helpers/application.rb.erb", "#{app_name}/app/helpers/application.rb"
|
20
|
+
template "app/helpers/error_handling.rb.erb", "#{app_name}/app/helpers/error_handling.rb"
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
24
|
-
keep_file "#{app_name}/
|
23
|
+
def setup_models
|
24
|
+
keep_file "#{app_name}/app/models"
|
25
25
|
end
|
26
26
|
|
27
27
|
def setup_routes
|
28
|
-
keep_file "#{app_name}/routes"
|
29
|
-
template "routes/demo.rb.erb", "#{app_name}/routes/demo.rb"
|
28
|
+
keep_file "#{app_name}/app/routes"
|
29
|
+
template "app/routes/demo.rb.erb", "#{app_name}/app/routes/demo.rb"
|
30
30
|
end
|
31
31
|
|
32
32
|
def setup_config
|
data/lib/sinatra_cmd/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require File.expand_path('../boot', __FILE__)
|
4
4
|
|
5
|
-
|
6
|
-
Dir[File.expand_path(
|
7
|
-
|
5
|
+
%w(utils helpers models routes).each do |folder|
|
6
|
+
Dir[File.expand_path("../../app/#{folder}/**/*.rb", __FILE__)].each {|file| require file}
|
7
|
+
end
|
8
8
|
|
9
9
|
require File.expand_path('../scheduler', __FILE__)
|
10
10
|
|
@@ -17,9 +17,11 @@ end
|
|
17
17
|
module <%= app_name.capitalize %>
|
18
18
|
API_V1 = '/1'
|
19
19
|
|
20
|
-
class App < Sinatra::
|
20
|
+
class App < Sinatra::Base
|
21
21
|
register Sinatra::Namespace
|
22
22
|
helpers Sinatra::JSON
|
23
|
+
# language automatic changed by params['locale']
|
24
|
+
register Sinatra::R18n
|
23
25
|
|
24
26
|
configure do
|
25
27
|
# Mongoid config file load
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-cmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CBluowei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,6 +76,9 @@ files:
|
|
76
76
|
- templates/Gemfile
|
77
77
|
- templates/README.md.erb
|
78
78
|
- templates/Rakefile
|
79
|
+
- templates/app/helpers/application.rb.erb
|
80
|
+
- templates/app/helpers/error_handling.rb.erb
|
81
|
+
- templates/app/routes/demo.rb.erb
|
79
82
|
- templates/config.ru.erb
|
80
83
|
- templates/config/application.rb.erb
|
81
84
|
- templates/config/boot.rb.erb
|
@@ -84,9 +87,6 @@ files:
|
|
84
87
|
- templates/config/i18n/en-us.yml
|
85
88
|
- templates/config/i18n/zh-cn.yml
|
86
89
|
- templates/config/scheduler.rb
|
87
|
-
- templates/helpers/application.rb.erb
|
88
|
-
- templates/helpers/error_handling.rb.erb
|
89
|
-
- templates/routes/demo.rb.erb
|
90
90
|
- templates/spec/spec_helper.rb
|
91
91
|
homepage: https://github.com/hilotus/sinatra-cli
|
92
92
|
licenses:
|