guyifeng 0.1.2 → 0.1.4
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/README.md +5 -33
- data/guyifeng.gemspec +1 -1
- data/lib/guyifeng/command.rb +0 -1
- data/lib/guyifeng/template/Gemfile +2 -0
- data/lib/guyifeng/template/application.rb.tt +7 -3
- data/lib/guyifeng/template/controllers/user_controller.rb +1 -1
- data/lib/guyifeng/template/db/migrate/20141128021338_users.rb +8 -0
- data/lib/guyifeng/template/models/user.rb.tt +3 -0
- data/lib/guyifeng/template/routes/{user_route.rb → user_route.rb.tt} +0 -0
- data/lib/guyifeng/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83cda25becbce9e874e52f35b1754c7f443e8966
|
4
|
+
data.tar.gz: 553dd3bca0fdafb60f5e84bf84890b883687d263
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5261a9c7f05512c5c76865bd635191dfef6dfe8b6d3e584b1467811b96bc8137480cfb775597f3846e59d7b9d404987c3f0f798db39db3178abeb828bafbb474
|
7
|
+
data.tar.gz: 14741dff30cbb5336b963fb0332927bcdfe9a9e95eb1a80bf4a2db71bb64d862aecf4d06af728e109c76176d6c5e19dcc18baa81f7ec71af3fa451e303c2fb3d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Guyifeng
|
2
2
|
|
3
|
-
TODO:
|
3
|
+
TODO: make a web quickly
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,8 +20,6 @@ Guyifeng is a generator for Sinatra::Base applications.
|
|
20
20
|
|
21
21
|
Guyifeng chooses slim + sinatra-activerecord + compass to build your awesome apps.
|
22
22
|
|
23
|
-
Guyifeng's aim is to help you to use best practices when not using ruby on rails.
|
24
|
-
|
25
23
|
## Installation
|
26
24
|
|
27
25
|
$ gem install guyifeng
|
@@ -32,36 +30,10 @@ Guyifeng's aim is to help you to use best practices when not using ruby on rails
|
|
32
30
|
|
33
31
|
bundle install --without production
|
34
32
|
|
35
|
-
|
36
|
-
$ bundle exec rackup
|
37
|
-
|
38
|
-
## Extra
|
39
|
-
gem 'sinatra-flash'
|
40
|
-
require 'sinatra/flash'
|
41
|
-
register Sinatra::Flash
|
42
|
-
|
43
|
-
gem 'sinatra-synchrony'
|
44
|
-
require 'sinatra/synchrony'
|
45
|
-
register Sinatra::Synchrony
|
46
|
-
|
47
|
-
gem 'will_paginate'
|
48
|
-
require 'will_paginate'
|
49
|
-
require 'will_paginate/active_record'
|
50
|
-
register WillPaginate::Sinatra
|
51
|
-
|
52
|
-
require "sinatra/cookies"
|
53
|
-
helpers Sinatra::Cookies
|
54
|
-
|
55
|
-
require "sinatra/config_file"
|
56
|
-
register Sinatra::ConfigFile
|
57
|
-
config_file 'config/application.yml'
|
33
|
+
rake db:create
|
58
34
|
|
59
|
-
|
60
|
-
register Sinatra::MultiRoute
|
35
|
+
rake db:create_migration NAME=posts
|
61
36
|
|
62
|
-
|
63
|
-
register Sinatra::Reloader
|
64
|
-
also_reload require file
|
37
|
+
......
|
65
38
|
|
66
|
-
|
67
|
-
|
39
|
+
$ zbatery -c config/zbatery.rb
|
data/guyifeng.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Guyifeng::VERSION
|
9
9
|
spec.authors = ["guyifeng"]
|
10
10
|
spec.email = ["651019063@qq.com"]
|
11
|
-
spec.summary = "
|
11
|
+
spec.summary = "easy to write a web"
|
12
12
|
spec.description = "base sinatra"
|
13
13
|
spec.homepage = "https://github.com/menghuanwd/guyifeng"
|
14
14
|
spec.license = "GYF"
|
data/lib/guyifeng/command.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Bundler.require
|
2
2
|
|
3
|
-
require "better_errors"
|
4
|
-
|
5
3
|
class <%= @app_name %> < Sinatra::Base
|
6
4
|
|
5
|
+
register Sinatra::Cache
|
6
|
+
|
7
7
|
# use config/*.yml for settings
|
8
8
|
register Sinatra::ConfigFile
|
9
9
|
config_file 'config/application.yml'
|
@@ -15,7 +15,6 @@ class <%= @app_name %> < Sinatra::Base
|
|
15
15
|
set :views, File.dirname(__FILE__) + '/views'
|
16
16
|
set :show_exceptions, true
|
17
17
|
|
18
|
-
|
19
18
|
configure :development do
|
20
19
|
|
21
20
|
register Sinatra::Reloader
|
@@ -26,6 +25,11 @@ class <%= @app_name %> < Sinatra::Base
|
|
26
25
|
require "better_errors"
|
27
26
|
use BetterErrors::Middleware
|
28
27
|
BetterErrors.application_root = __dir__
|
28
|
+
|
29
|
+
require 'bullet'
|
30
|
+
Bullet.enable = true
|
31
|
+
Bullet.bullet_logger = true
|
32
|
+
use Bullet::Rack
|
29
33
|
end
|
30
34
|
|
31
35
|
# 加载models
|
File without changes
|
data/lib/guyifeng/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guyifeng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guyifeng
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,11 +89,13 @@ files:
|
|
89
89
|
- lib/guyifeng/template/config/zbatery.rb.tt
|
90
90
|
- lib/guyifeng/template/controllers/.gitkeep
|
91
91
|
- lib/guyifeng/template/controllers/user_controller.rb
|
92
|
+
- lib/guyifeng/template/db/migrate/20141128021338_users.rb
|
92
93
|
- lib/guyifeng/template/lib/tasks/test.rake
|
93
94
|
- lib/guyifeng/template/log/.gitkeep
|
94
95
|
- lib/guyifeng/template/models/.gitkeep
|
96
|
+
- lib/guyifeng/template/models/user.rb.tt
|
95
97
|
- lib/guyifeng/template/routes/.gitkeep
|
96
|
-
- lib/guyifeng/template/routes/user_route.rb
|
98
|
+
- lib/guyifeng/template/routes/user_route.rb.tt
|
97
99
|
- lib/guyifeng/template/views/.gitkeep
|
98
100
|
- lib/guyifeng/template/views/layout.slim
|
99
101
|
- lib/guyifeng/template/views/users/index.slim
|
@@ -122,6 +124,6 @@ rubyforge_project:
|
|
122
124
|
rubygems_version: 2.2.2
|
123
125
|
signing_key:
|
124
126
|
specification_version: 4
|
125
|
-
summary:
|
127
|
+
summary: easy to write a web
|
126
128
|
test_files:
|
127
129
|
- test/eof.rb
|