guyifeng 0.1.0 → 0.1.2
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 +45 -7
- data/guyifeng.gemspec +4 -5
- data/lib/guyifeng/command.rb +3 -2
- data/lib/guyifeng/template/.gitignore +6 -0
- data/lib/guyifeng/template/Gemfile +11 -4
- data/lib/guyifeng/template/README.md.tt +1 -0
- data/lib/guyifeng/template/Rakefile +3 -4
- data/lib/guyifeng/template/application.rb.tt +44 -0
- data/lib/guyifeng/template/assets/config.rb +25 -0
- data/lib/guyifeng/template/assets/images/.gitkeep +1 -0
- data/lib/guyifeng/template/assets/javascripts/.gitkeep +0 -0
- data/lib/guyifeng/template/assets/sass/ie.scss +5 -0
- data/lib/guyifeng/template/assets/sass/print.scss +3 -0
- data/lib/guyifeng/template/assets/sass/screen.scss +6 -0
- data/lib/guyifeng/template/assets/stylesheets/ie.css +5 -0
- data/lib/guyifeng/template/assets/stylesheets/print.css +3 -0
- data/lib/guyifeng/template/assets/stylesheets/screen.css +68 -0
- data/lib/guyifeng/template/config/application.yml +4 -0
- data/lib/guyifeng/template/config/database.yml +12 -2
- data/lib/guyifeng/template/config/{rainbows.rb → zbatery.rb.tt} +11 -19
- data/lib/guyifeng/template/config.ru.tt +3 -0
- data/lib/guyifeng/template/controllers/.gitkeep +1 -0
- data/lib/guyifeng/template/controllers/user_controller.rb +3 -0
- data/lib/guyifeng/template/lib/tasks/test.rake +6 -0
- data/lib/guyifeng/template/models/.gitkeep +1 -0
- data/lib/guyifeng/template/routes/.gitkeep +1 -0
- data/lib/guyifeng/template/routes/user_route.rb +5 -0
- data/lib/guyifeng/template/views/.gitkeep +1 -0
- data/lib/guyifeng/template/views/layout.slim +1 -1
- data/lib/guyifeng/template/views/{index.slim → users/index.slim} +0 -0
- data/lib/guyifeng/version.rb +1 -1
- data/test/eof.rb +10 -0
- metadata +45 -21
- data/lib/guyifeng/template/.DS_Store +0 -0
- data/lib/guyifeng/template/README.html +0 -417
- data/lib/guyifeng/template/README.md +0 -54
- data/lib/guyifeng/template/application.rb +0 -44
- data/lib/guyifeng/template/boot.rb +0 -13
- data/lib/guyifeng/template/config/.DS_Store +0 -0
- data/lib/guyifeng/template/config.ru +0 -3
- data/lib/guyifeng/template/controllers/common_controller.rb +0 -3
- data/lib/guyifeng/template/helpers/common_helper.rb +0 -3
- data/lib/guyifeng/template/models/.DS_Store +0 -0
- data/lib/guyifeng/template/models/user.rb +0 -3
- data/lib/guyifeng/template/routes/common_routes.rb +0 -5
- data/lib/guyifeng/template/views/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b09deb1b117354722185d045b8bdc331d5cc1f
|
4
|
+
data.tar.gz: 93f15da2df9fea4fe19c4c45f5badcb49ce7a404
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b30161600690e5d356bb70a9e24e41419a30e58fb0525eabccc44efafb4cda97da5c930a0c0c68722556ec6f7f8ab69173a4ac888e15f9c4212fde6d1831637
|
7
|
+
data.tar.gz: 01411ccd84bc2d6b5b31098c6d058d78340b6ff72f75df6116e0d35ac78dabe632ec132d7830f522031ef46e21678b8892d77b429bb315f3f7844fb2b13337ef
|
data/README.md
CHANGED
@@ -16,14 +16,52 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install guyifeng
|
18
18
|
|
19
|
+
Guyifeng is a generator for Sinatra::Base applications.
|
20
|
+
|
21
|
+
Guyifeng chooses slim + sinatra-activerecord + compass to build your awesome apps.
|
22
|
+
|
23
|
+
Guyifeng's aim is to help you to use best practices when not using ruby on rails.
|
24
|
+
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
$ gem install guyifeng
|
28
|
+
|
19
29
|
## Usage
|
20
30
|
|
21
|
-
|
31
|
+
$ guyifeng new appname
|
32
|
+
|
33
|
+
bundle install --without production
|
34
|
+
|
35
|
+
$ # development
|
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'
|
58
|
+
|
59
|
+
require "sinatra/multi_route"
|
60
|
+
register Sinatra::MultiRoute
|
22
61
|
|
23
|
-
|
62
|
+
require "sinatra/reloader"
|
63
|
+
register Sinatra::Reloader
|
64
|
+
also_reload require file
|
24
65
|
|
25
|
-
|
26
|
-
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create a new Pull Request
|
66
|
+
|
67
|
+
|
data/guyifeng.gemspec
CHANGED
@@ -2,18 +2,16 @@
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'guyifeng/version'
|
5
|
-
# require 'guyifeng/model'
|
6
|
-
# require 'guyifeng/version'
|
7
5
|
|
8
6
|
Gem::Specification.new do |spec|
|
9
7
|
spec.name = "guyifeng"
|
10
8
|
spec.version = Guyifeng::VERSION
|
11
|
-
spec.authors = ["
|
9
|
+
spec.authors = ["guyifeng"]
|
12
10
|
spec.email = ["651019063@qq.com"]
|
13
11
|
spec.summary = "aaaa"
|
14
12
|
spec.description = "base sinatra"
|
15
|
-
spec.homepage = "
|
16
|
-
spec.license = "
|
13
|
+
spec.homepage = "https://github.com/menghuanwd/guyifeng"
|
14
|
+
spec.license = "GYF"
|
17
15
|
|
18
16
|
spec.files = `git ls-files -z`.split("\x0")
|
19
17
|
# spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -23,4 +21,5 @@ Gem::Specification.new do |spec|
|
|
23
21
|
|
24
22
|
spec.add_development_dependency "bundler", "~> 1.6"
|
25
23
|
spec.add_development_dependency "rake","~> 10.3"
|
24
|
+
spec.add_development_dependency "thor", "~> 0.18"
|
26
25
|
end
|
data/lib/guyifeng/command.rb
CHANGED
@@ -17,8 +17,9 @@ module Guyifeng
|
|
17
17
|
|
18
18
|
desc "new", "create the skeleton of project"
|
19
19
|
def new(name)
|
20
|
-
@secret = SecureRandom.hex 32
|
21
|
-
@
|
20
|
+
# @secret = SecureRandom.hex 32
|
21
|
+
@app_name = name.capitalize
|
22
|
+
@name = name
|
22
23
|
directory("template", name)
|
23
24
|
end
|
24
25
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
source 'http://ruby.taobao.org'
|
2
2
|
|
3
|
+
gem 'rake'
|
4
|
+
|
3
5
|
gem 'sinatra'
|
4
6
|
|
5
7
|
gem 'sinatra-contrib'
|
6
8
|
|
7
|
-
gem 'sinatra-synchrony'
|
8
|
-
|
9
9
|
gem 'sinatra-activerecord'
|
10
10
|
|
11
11
|
gem 'mysql2'
|
@@ -16,6 +16,13 @@ gem 'sass'
|
|
16
16
|
|
17
17
|
gem 'slim'
|
18
18
|
|
19
|
-
|
20
|
-
|
19
|
+
gem 'zbatery'
|
20
|
+
|
21
|
+
group :development do
|
22
|
+
# N+1问题
|
23
|
+
gem 'bullet'
|
24
|
+
|
25
|
+
# 报错调试
|
26
|
+
gem 'better_errors'
|
27
|
+
gem 'binding_of_caller'
|
21
28
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# <%= @app_name %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Bundler.require
|
2
|
+
|
3
|
+
require "better_errors"
|
4
|
+
|
5
|
+
class <%= @app_name %> < Sinatra::Base
|
6
|
+
|
7
|
+
# use config/*.yml for settings
|
8
|
+
register Sinatra::ConfigFile
|
9
|
+
config_file 'config/application.yml'
|
10
|
+
set :environments, %w(production, development)
|
11
|
+
|
12
|
+
# enable :sessions # for use flash
|
13
|
+
|
14
|
+
set :public_folder, File.dirname(__FILE__) + '/assets'
|
15
|
+
set :views, File.dirname(__FILE__) + '/views'
|
16
|
+
set :show_exceptions, true
|
17
|
+
|
18
|
+
|
19
|
+
configure :development do
|
20
|
+
|
21
|
+
register Sinatra::Reloader
|
22
|
+
Dir[ File.expand_path('../controllers/*.rb', __FILE__) ].each{|file| also_reload file }
|
23
|
+
Dir[ File.expand_path('../routes/*.rb', __FILE__) ].each{|file| also_reload file }
|
24
|
+
Dir[ File.expand_path('../models/*.rb', __FILE__) ].each{|file| also_reload file }
|
25
|
+
|
26
|
+
require "better_errors"
|
27
|
+
use BetterErrors::Middleware
|
28
|
+
BetterErrors.application_root = __dir__
|
29
|
+
end
|
30
|
+
|
31
|
+
# 加载models
|
32
|
+
Dir[ File.expand_path('../models/*.rb', __FILE__) ].each{|file| require file }
|
33
|
+
|
34
|
+
# 加载控制器
|
35
|
+
Dir[ File.expand_path('../controllers/*.rb', __FILE__) ].each{|file| require file }
|
36
|
+
|
37
|
+
# 加载路由
|
38
|
+
Dir[ File.expand_path('../routes/*.rb', __FILE__) ].each{|file| require file }
|
39
|
+
|
40
|
+
after do
|
41
|
+
ActiveRecord::Base.clear_active_connections!
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'compass/import-once/activate'
|
2
|
+
# Require any additional compass plugins here.
|
3
|
+
|
4
|
+
# Set this to the root of your project when deployed:
|
5
|
+
http_path = "/"
|
6
|
+
css_dir = "stylesheets"
|
7
|
+
sass_dir = "sass"
|
8
|
+
images_dir = "images"
|
9
|
+
javascripts_dir = "javascripts"
|
10
|
+
|
11
|
+
# You can select your preferred output style here (can be overridden via the command line):
|
12
|
+
# output_style = :expanded or :nested or :compact or :compressed
|
13
|
+
|
14
|
+
# To enable relative paths to assets via compass helper functions. Uncomment:
|
15
|
+
# relative_assets = true
|
16
|
+
|
17
|
+
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
18
|
+
# line_comments = false
|
19
|
+
|
20
|
+
|
21
|
+
# If you prefer the indented syntax, you might want to regenerate this
|
22
|
+
# project again passing --syntax sass, or you can uncomment this:
|
23
|
+
# preferred_syntax = :sass
|
24
|
+
# and then run:
|
25
|
+
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
File without changes
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/* Welcome to Compass. Use this file to write IE specific override styles.
|
2
|
+
* Import this file using the following HTML or equivalent:
|
3
|
+
* <!--[if IE]>
|
4
|
+
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
5
|
+
* <![endif]--> */
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/* Welcome to Compass.
|
2
|
+
* In this file you should write your main styles. (or centralize your imports)
|
3
|
+
* Import this file using the following HTML or equivalent:
|
4
|
+
* <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
|
5
|
+
|
6
|
+
@import "compass/reset";
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/* Welcome to Compass. Use this file to write IE specific override styles.
|
2
|
+
* Import this file using the following HTML or equivalent:
|
3
|
+
* <!--[if IE]>
|
4
|
+
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
5
|
+
* <![endif]--> */
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/* Welcome to Compass.
|
2
|
+
* In this file you should write your main styles. (or centralize your imports)
|
3
|
+
* Import this file using the following HTML or equivalent:
|
4
|
+
* <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
|
5
|
+
/* line 5, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
6
|
+
html, body, div, span, applet, object, iframe,
|
7
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
8
|
+
a, abbr, acronym, address, big, cite, code,
|
9
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
10
|
+
small, strike, strong, sub, sup, tt, var,
|
11
|
+
b, u, i, center,
|
12
|
+
dl, dt, dd, ol, ul, li,
|
13
|
+
fieldset, form, label, legend,
|
14
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
15
|
+
article, aside, canvas, details, embed,
|
16
|
+
figure, figcaption, footer, header, hgroup,
|
17
|
+
menu, nav, output, ruby, section, summary,
|
18
|
+
time, mark, audio, video {
|
19
|
+
margin: 0;
|
20
|
+
padding: 0;
|
21
|
+
border: 0;
|
22
|
+
font: inherit;
|
23
|
+
font-size: 100%;
|
24
|
+
vertical-align: baseline;
|
25
|
+
}
|
26
|
+
|
27
|
+
/* line 22, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
28
|
+
html {
|
29
|
+
line-height: 1;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* line 24, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
33
|
+
ol, ul {
|
34
|
+
list-style: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
/* line 26, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
38
|
+
table {
|
39
|
+
border-collapse: collapse;
|
40
|
+
border-spacing: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
/* line 28, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
44
|
+
caption, th, td {
|
45
|
+
text-align: left;
|
46
|
+
font-weight: normal;
|
47
|
+
vertical-align: middle;
|
48
|
+
}
|
49
|
+
|
50
|
+
/* line 30, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
51
|
+
q, blockquote {
|
52
|
+
quotes: none;
|
53
|
+
}
|
54
|
+
/* line 103, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
55
|
+
q:before, q:after, blockquote:before, blockquote:after {
|
56
|
+
content: "";
|
57
|
+
content: none;
|
58
|
+
}
|
59
|
+
|
60
|
+
/* line 32, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
61
|
+
a img {
|
62
|
+
border: none;
|
63
|
+
}
|
64
|
+
|
65
|
+
/* line 116, ../../../../../../../../.rvm/gems/ruby-2.1.3/gems/compass-core-1.0.1/stylesheets/compass/reset/_utilities.scss */
|
66
|
+
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
|
67
|
+
display: block;
|
68
|
+
}
|
@@ -1,9 +1,19 @@
|
|
1
1
|
development:
|
2
|
-
adapter:
|
2
|
+
adapter: mysql2
|
3
3
|
encoding: utf8
|
4
4
|
reconnect: false
|
5
5
|
host: localhost
|
6
|
-
database:
|
6
|
+
database: test
|
7
|
+
pool: 5
|
8
|
+
username: root
|
9
|
+
password: password
|
10
|
+
|
11
|
+
production:
|
12
|
+
adapter: mysql2
|
13
|
+
encoding: utf8
|
14
|
+
reconnect: false
|
15
|
+
host: localhost
|
16
|
+
database: test
|
7
17
|
pool: 5
|
8
18
|
username: root
|
9
19
|
password: password
|
@@ -1,30 +1,21 @@
|
|
1
1
|
Rainbows! do
|
2
|
-
name = '
|
3
|
-
use :EventMachine
|
4
|
-
client_max_body_size nil # This is set in nginx
|
5
|
-
# keepalive_timeout 1
|
2
|
+
name = '<%= @name %>'
|
6
3
|
|
7
4
|
case ENV['RACK_ENV'].to_sym
|
8
5
|
when :development
|
9
6
|
worker_processes 1
|
10
7
|
worker_connections 32
|
11
|
-
|
12
|
-
|
8
|
+
listen 8080
|
9
|
+
stderr_path "log/development.log"
|
10
|
+
stdout_path "log/development.log"
|
13
11
|
when :production
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
# The number of simultaneous connections the server will accept.
|
18
|
-
worker_connections 1024
|
19
|
-
|
12
|
+
worker_processes 2
|
13
|
+
worker_connections 32
|
20
14
|
timeout 30
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
pid "/var/run/yourcompany/#{name}.pid"
|
26
|
-
stderr_path "/var/log/yourcompany/#{name}.log"
|
27
|
-
stdout_path "/var/log/yourcompany/#{name}.log"
|
15
|
+
listen 8080
|
16
|
+
pid "log/#{name}.pid"
|
17
|
+
stderr_path "log/production.log"
|
18
|
+
stdout_path "log/production.log"
|
28
19
|
|
29
20
|
###
|
30
21
|
# Hardcore performance tweaks, described here: https://github.com/blog/517-unicorn
|
@@ -44,6 +35,7 @@ Rainbows! do
|
|
44
35
|
# we send it a QUIT.
|
45
36
|
#
|
46
37
|
# Using this method we get 0 downtime deploys.
|
38
|
+
# kill -USR2 `log/yourappname.pid`
|
47
39
|
|
48
40
|
old_pid = "/var/run/yourcompany/#{name}.pid.oldbin"
|
49
41
|
if File.exists?(old_pid) && server.pid != old_pid
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
File without changes
|
data/lib/guyifeng/version.rb
CHANGED
data/test/eof.rb
ADDED
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.2
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.18'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.18'
|
41
55
|
description: base sinatra
|
42
56
|
email:
|
43
57
|
- 651019063@qq.com
|
@@ -55,30 +69,39 @@ files:
|
|
55
69
|
- guyifeng.gemspec
|
56
70
|
- lib/guyifeng.rb
|
57
71
|
- lib/guyifeng/command.rb
|
58
|
-
- lib/guyifeng/template/.
|
72
|
+
- lib/guyifeng/template/.gitignore
|
59
73
|
- lib/guyifeng/template/Gemfile
|
60
|
-
- lib/guyifeng/template/README.
|
61
|
-
- lib/guyifeng/template/README.md
|
74
|
+
- lib/guyifeng/template/README.md.tt
|
62
75
|
- lib/guyifeng/template/Rakefile
|
63
|
-
- lib/guyifeng/template/application.rb
|
64
|
-
- lib/guyifeng/template/
|
65
|
-
- lib/guyifeng/template/
|
66
|
-
- lib/guyifeng/template/
|
76
|
+
- lib/guyifeng/template/application.rb.tt
|
77
|
+
- lib/guyifeng/template/assets/config.rb
|
78
|
+
- lib/guyifeng/template/assets/images/.gitkeep
|
79
|
+
- lib/guyifeng/template/assets/javascripts/.gitkeep
|
80
|
+
- lib/guyifeng/template/assets/sass/ie.scss
|
81
|
+
- lib/guyifeng/template/assets/sass/print.scss
|
82
|
+
- lib/guyifeng/template/assets/sass/screen.scss
|
83
|
+
- lib/guyifeng/template/assets/stylesheets/ie.css
|
84
|
+
- lib/guyifeng/template/assets/stylesheets/print.css
|
85
|
+
- lib/guyifeng/template/assets/stylesheets/screen.css
|
86
|
+
- lib/guyifeng/template/config.ru.tt
|
87
|
+
- lib/guyifeng/template/config/application.yml
|
67
88
|
- lib/guyifeng/template/config/database.yml
|
68
|
-
- lib/guyifeng/template/config/
|
69
|
-
- lib/guyifeng/template/controllers
|
70
|
-
- lib/guyifeng/template/
|
89
|
+
- lib/guyifeng/template/config/zbatery.rb.tt
|
90
|
+
- lib/guyifeng/template/controllers/.gitkeep
|
91
|
+
- lib/guyifeng/template/controllers/user_controller.rb
|
92
|
+
- lib/guyifeng/template/lib/tasks/test.rake
|
71
93
|
- lib/guyifeng/template/log/.gitkeep
|
72
|
-
- lib/guyifeng/template/models/.
|
73
|
-
- lib/guyifeng/template/
|
74
|
-
- lib/guyifeng/template/routes/
|
75
|
-
- lib/guyifeng/template/views/.
|
76
|
-
- lib/guyifeng/template/views/index.slim
|
94
|
+
- lib/guyifeng/template/models/.gitkeep
|
95
|
+
- lib/guyifeng/template/routes/.gitkeep
|
96
|
+
- lib/guyifeng/template/routes/user_route.rb
|
97
|
+
- lib/guyifeng/template/views/.gitkeep
|
77
98
|
- lib/guyifeng/template/views/layout.slim
|
99
|
+
- lib/guyifeng/template/views/users/index.slim
|
78
100
|
- lib/guyifeng/version.rb
|
79
|
-
|
101
|
+
- test/eof.rb
|
102
|
+
homepage: https://github.com/menghuanwd/guyifeng
|
80
103
|
licenses:
|
81
|
-
-
|
104
|
+
- GYF
|
82
105
|
metadata: {}
|
83
106
|
post_install_message:
|
84
107
|
rdoc_options: []
|
@@ -100,4 +123,5 @@ rubygems_version: 2.2.2
|
|
100
123
|
signing_key:
|
101
124
|
specification_version: 4
|
102
125
|
summary: aaaa
|
103
|
-
test_files:
|
126
|
+
test_files:
|
127
|
+
- test/eof.rb
|
Binary file
|
@@ -1,417 +0,0 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><style>/* Fonts */
|
2
|
-
@font-face{
|
3
|
-
font-family: octicons-anchor;
|
4
|
-
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSk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h9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');
|
5
|
-
}
|
6
|
-
|
7
|
-
@font-face{
|
8
|
-
font-family: fontawesome-mini;
|
9
|
-
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAzUABAAAAAAFNgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABwAAAAcZMzaOEdERUYAAAGIAAAAHQAAACAAOQAET1MvMgAAAagAAAA+AAAAYHqhde9jbWFwAAAB6AAAAFIAAAFa4azkLWN2dCAAAAI8AAAAKAAAACgFgwioZnBnbQAAAmQAAAGxAAACZVO0L6dnYXNwAAAEGAAAAAgAAAAIAAAAEGdseWYAAAQgAAAFDgAACMz7eroHaGVhZAAACTAAAAAwAAAANgWEOEloaGVhAAAJYAAAAB0AAAAkDGEGa2htdHgAAAmAAAAAEwAAADBEgAAQbG9jYQAACZQAAAAaAAAAGgsICJBtYXhwAAAJsAAAACAAAAAgASgBD25hbWUAAAnQAAACZwAABOD4no+3cG9zdAAADDgAAABsAAAAmF+yXM9wcmVwAAAMpAAAAC4AAAAusPIrFAAAAAEAAAAAyYlvMQAAAADLVHQgAAAAAM/u9uZ4nGNgZGBg4ANiCQYQYGJgBEJuIGYB8xgABMMAPgAAAHicY2Bm42OcwMDKwMLSw2LMwMDQBqGZihmiwHycoKCyqJjB4YPDh4NsDP+BfNb3DIuAFCOSEgUGRgAKDgt4AAB4nGNgYGBmgGAZBkYGEAgB8hjBfBYGCyDNxcDBwMTA9MHhQ9SHrA8H//9nYACyQyFs/sP86/kX8HtB9UIBIxsDX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+cfgQr42G3CRpeLoZ53gmfe3X6rcKt5oVxnptHR9JS8ehVUd5wvvahN2uqxOOpMXapibI5k7Zwbt4xBSaTfoKBufhAnO/uqNcfK8OTs0OQ6l7JIqFjDhYj5WcjevCnI/1DDiI8j4ndWb/5YzDZWh79yomWXeXj7Nnw70/2TIeFPTrlSh89k1ObOSRVZWZfgF0r/zJQB4nG2JUQuCQBCEd07TTg36fb2IyBaLd3vWaUh/vmSJnvpgmG8YcmS8X3Shf3R7QA4OBUocUKHGER5NNbOOEvwc1txnuWkTRb/aPjimJ5vXabI+3VfOiyS15UWvyezM2xiGOPyuMohOH8O8JiO4Af+FsAGNAEuwCFBYsQEBjlmxRgYrWCGwEFlLsBRSWCGwgFkdsAYrXFhZsBQrAAA=) format('woff');
|
10
|
-
}
|
11
|
-
|
12
|
-
/* Body */
|
13
|
-
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
14
|
-
|
15
|
-
body{
|
16
|
-
color:#4d4d4c;
|
17
|
-
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
|
18
|
-
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
|
19
|
-
font-size:12px;
|
20
|
-
line-height:1.5em;
|
21
|
-
background:#fefefe;
|
22
|
-
width: 45em;
|
23
|
-
margin: 10px auto;
|
24
|
-
padding: 30px;
|
25
|
-
border: 1px solid #ddd;
|
26
|
-
outline: 1300px solid #f8f8f8;
|
27
|
-
}
|
28
|
-
|
29
|
-
/* Links */
|
30
|
-
a{ color: #06d; text-decoration:none; }
|
31
|
-
a:hover{ color: #06e; text-decoration: underline; }
|
32
|
-
a:active{ color:#faa700; }
|
33
|
-
a:focus{ outline: thin dotted; }
|
34
|
-
a:hover, a:active{ outline: 0; }
|
35
|
-
|
36
|
-
::-moz-selection { background:#a8d1ff; color:#000 }
|
37
|
-
::selection { background:#a8d1ff; color:#000 }
|
38
|
-
|
39
|
-
a::-moz-selection { background:#a8d1ff; color:#0645ad }
|
40
|
-
a::selection { background:#a8d1ff; color:#0645ad }
|
41
|
-
|
42
|
-
/* Header Anchor Links*/
|
43
|
-
.headeranchor-link {
|
44
|
-
color:#111;
|
45
|
-
border: 0;
|
46
|
-
margin-left: -20px;
|
47
|
-
padding-right: 6px;
|
48
|
-
cursor: pointer;
|
49
|
-
position: absolute;
|
50
|
-
display: block;
|
51
|
-
top: 0;
|
52
|
-
left: 0;
|
53
|
-
bottom: 0;
|
54
|
-
}
|
55
|
-
|
56
|
-
.headeranchor {
|
57
|
-
font: normal normal 16px octicons-anchor;
|
58
|
-
line-height: 1;
|
59
|
-
-moz-osx-font-smoothing: grayscale;
|
60
|
-
-webkit-user-select: none;
|
61
|
-
-moz-user-select: none;
|
62
|
-
-ms-user-select: none;
|
63
|
-
user-select: none;
|
64
|
-
}
|
65
|
-
|
66
|
-
.headeranchor-link:hover,
|
67
|
-
.headeranchor-link:visited,
|
68
|
-
.headeranchor-link:active
|
69
|
-
{ text-decoration: none; color:#4d4d4c; }
|
70
|
-
.headeranchor-link:hover .headeranchor:before,
|
71
|
-
h1:hover .headeranchor:before,
|
72
|
-
h2:hover .headeranchor:before,
|
73
|
-
h3:hover .headeranchor:before,
|
74
|
-
h4:hover .headeranchor:before,
|
75
|
-
h5:hover .headeranchor:before,
|
76
|
-
h6:hover .headeranchor:before
|
77
|
-
{ content: '\f05c'; }
|
78
|
-
|
79
|
-
abbr { cursor: pointer; }
|
80
|
-
|
81
|
-
/* Paragraphs */
|
82
|
-
p { margin:1em 0; }
|
83
|
-
|
84
|
-
/* Images */
|
85
|
-
img {
|
86
|
-
max-width:100%;
|
87
|
-
border: 0;
|
88
|
-
-ms-interpolation-mode: bicubic;
|
89
|
-
vertical-align: middle;
|
90
|
-
}
|
91
|
-
|
92
|
-
/* Headers */
|
93
|
-
h1,h2,h3,h4,h5,h6 {
|
94
|
-
font-weight:normal;
|
95
|
-
color:#111;
|
96
|
-
line-height: 1.7;
|
97
|
-
position: relative;
|
98
|
-
}
|
99
|
-
h4,h5,h6{ font-weight: bold; }
|
100
|
-
h1 { font-size:2.5em; border-bottom: 1px solid #ddd;}
|
101
|
-
h2 { font-size:2em; border-bottom:1px solid #eee; padding-bottom: 5px; }
|
102
|
-
h3 { font-size:1.5em; }
|
103
|
-
h4 { font-size:1.2em; }
|
104
|
-
h5 { font-size:1em; }
|
105
|
-
h6 { font-size:0.9em; }
|
106
|
-
|
107
|
-
/* Block Quotes */
|
108
|
-
blockquote {
|
109
|
-
color:#666666;
|
110
|
-
margin:0;
|
111
|
-
padding-left: 3em;
|
112
|
-
border-left: 0.5em #EEE solid;
|
113
|
-
}
|
114
|
-
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
|
115
|
-
|
116
|
-
/* Raw Blocks */
|
117
|
-
pre, code, kbd, samp {
|
118
|
-
color: #000;
|
119
|
-
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
120
|
-
-webkit-border-radius: 3px;
|
121
|
-
-moz-border-radius: 3px;
|
122
|
-
border-radius: 3px;
|
123
|
-
font-size: 0.88em;
|
124
|
-
background-color: #F8F8F8;
|
125
|
-
border: 1px solid #CCC;
|
126
|
-
}
|
127
|
-
|
128
|
-
pre {
|
129
|
-
padding: 10px;
|
130
|
-
overflow: auto;
|
131
|
-
}
|
132
|
-
|
133
|
-
code { padding: 0 3px 0 3px; }
|
134
|
-
pre code { border: 0; padding: 0; }
|
135
|
-
|
136
|
-
/* Admonition */
|
137
|
-
.admonition {
|
138
|
-
-webkit-border-radius: 3px;
|
139
|
-
-moz-border-radius: 3px;
|
140
|
-
border-radius: 3px;
|
141
|
-
font-size: 0.88em;
|
142
|
-
padding: 0.5em 1em 0.5em 1em;
|
143
|
-
margin: 10px auto;
|
144
|
-
color: #888888;
|
145
|
-
background-color: #F8F8F8;
|
146
|
-
border: 1px solid #888888;
|
147
|
-
}
|
148
|
-
|
149
|
-
.admonition p { padding: 0; margin: 0; }
|
150
|
-
.admonition-title { font-weight: bold; margin: 0; }
|
151
|
-
|
152
|
-
.admonition-icon {
|
153
|
-
font: normal normal 16px fontawesome-mini;
|
154
|
-
line-height: 1.5;
|
155
|
-
-moz-osx-font-smoothing: grayscale;
|
156
|
-
-webkit-user-select: none;
|
157
|
-
-moz-user-select: none;
|
158
|
-
-ms-user-select: none;
|
159
|
-
user-select: none;
|
160
|
-
float: left;
|
161
|
-
}
|
162
|
-
|
163
|
-
.admonition.attention { color: #4F8A10; background-color: #DFF2BF; border: 1px solid #4F8A10; }
|
164
|
-
.admonition.caution { color: #D63301; background-color: #FFCCBA; border: 1px solid #D63301; }
|
165
|
-
.admonition.hint { color: #00529B; background-color: #BDE5F8; border: 1px solid #00529B; }
|
166
|
-
.admonition.danger { color: #D8000C; background-color: #FFBABA; border: 1px solid #D8000C; }
|
167
|
-
.admonition.question { color: #00049b; background-color: #BDC8F8; border: 1px solid #00049b; }
|
168
|
-
.admonition.note { color: #9F6000; background-color: #FEEFB3; border: 1px solid #9F6000; }
|
169
|
-
|
170
|
-
.attention > .admonition-icon:before { content: "\f058\00a0"; }
|
171
|
-
.caution > .admonition-icon:before { content: "\f06a\00a0"; }
|
172
|
-
.hint > .admonition-icon:before { content: "\f05a\00a0"; }
|
173
|
-
.danger > .admonition-icon:before { content: "\f056\00a0"; }
|
174
|
-
.question > .admonition-icon:before { content: "\f059\00a0"; }
|
175
|
-
.note > .admonition-icon:before { content: "\f040\00a0"; }
|
176
|
-
|
177
|
-
/* progress bar*/
|
178
|
-
.progress {
|
179
|
-
display: block;
|
180
|
-
width: 300px;
|
181
|
-
margin: 10px 0;
|
182
|
-
height: 24px;
|
183
|
-
border: 1px solid #ccc;
|
184
|
-
-webkit-border-radius: 3px;
|
185
|
-
-moz-border-radius: 3px;
|
186
|
-
border-radius: 3px;
|
187
|
-
background-color: #F8F8F8;
|
188
|
-
position: relative;
|
189
|
-
box-shadow: inset -1px 1px 3px rgba(0, 0, 0, .1);
|
190
|
-
}
|
191
|
-
|
192
|
-
.progress-label {
|
193
|
-
position: absolute;
|
194
|
-
text-align: center;
|
195
|
-
font-weight: bold;
|
196
|
-
width: 100%; margin: 0;
|
197
|
-
line-height: 24px;
|
198
|
-
color: #333;
|
199
|
-
text-shadow:
|
200
|
-
1px 1px 0px #fefefe,
|
201
|
-
-1px -1px 0px #fefefe,
|
202
|
-
-1px 1px 0px #fefefe,
|
203
|
-
1px -1px 0px #fefefe,
|
204
|
-
0px 1px 0px #fefefe,
|
205
|
-
0px -1px 0px #fefefe,
|
206
|
-
1px 0px 0px #fefefe,
|
207
|
-
-1px 0px 0px #fefefe,
|
208
|
-
1px 1px 2px #000;
|
209
|
-
-webkit-font-smoothing: antialiased !important;
|
210
|
-
white-space: nowrap;
|
211
|
-
overflow: hidden;
|
212
|
-
}
|
213
|
-
|
214
|
-
.progress-bar {
|
215
|
-
height: 24px;
|
216
|
-
float: left;
|
217
|
-
border-right: 1px solid #ccc;
|
218
|
-
-webkit-border-radius: 3px;
|
219
|
-
-moz-border-radius: 3px;
|
220
|
-
border-radius: 3px;
|
221
|
-
background-color: #34c2e3;
|
222
|
-
box-shadow: inset 0 1px 0px rgba(255, 255, 255, .5);
|
223
|
-
background-size: 30px 30px;
|
224
|
-
background-image: -webkit-linear-gradient(
|
225
|
-
135deg,
|
226
|
-
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
227
|
-
transparent 53%, rgba(255, 255, 255, .4) 53%,
|
228
|
-
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
229
|
-
transparent
|
230
|
-
);
|
231
|
-
background-image: -moz-linear-gradient(
|
232
|
-
135deg,
|
233
|
-
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
234
|
-
transparent 53%, rgba(255, 255, 255, .4) 53%,
|
235
|
-
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
236
|
-
transparent
|
237
|
-
);
|
238
|
-
background-image: -ms-linear-gradient(
|
239
|
-
135deg,
|
240
|
-
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
241
|
-
transparent 53%, rgba(255, 255, 255, .4) 53%,
|
242
|
-
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
243
|
-
transparent
|
244
|
-
);
|
245
|
-
background-image: -o-linear-gradient(
|
246
|
-
135deg,
|
247
|
-
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
248
|
-
transparent 53%, rgba(255, 255, 255, .4) 53%,
|
249
|
-
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
250
|
-
transparent
|
251
|
-
);
|
252
|
-
background-image: linear-gradient(
|
253
|
-
135deg,
|
254
|
-
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
255
|
-
transparent 53%, rgba(255, 255, 255, .4) 53%,
|
256
|
-
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
257
|
-
transparent
|
258
|
-
);
|
259
|
-
}
|
260
|
-
|
261
|
-
.progress-100plus .progress-bar { background-color: #1ee038; }
|
262
|
-
.progress-80plus .progress-bar { background-color: #86e01e; }
|
263
|
-
.progress-60plus .progress-bar { background-color: #f2d31b; }
|
264
|
-
.progress-40plus .progress-bar { background-color: #f2b01e; }
|
265
|
-
.progress-20plus .progress-bar { background-color: #f27011; }
|
266
|
-
.progress-0plus .progress-bar { background-color: #f63a0f; }
|
267
|
-
|
268
|
-
.gloss .progress-bar {
|
269
|
-
box-shadow:
|
270
|
-
inset -1px 1px 0px rgba(255, 255, 255, .5),
|
271
|
-
inset 0 -4px 12px rgba(255, 255, 255, .7),
|
272
|
-
inset 0 4px 12px rgba(255, 255, 255, .7),
|
273
|
-
inset 0 -12px 0px rgba(0, 0, 0, .05),
|
274
|
-
inset 1px -1px 0px rgba(255, 255, 255, .2);
|
275
|
-
}
|
276
|
-
|
277
|
-
.candystripe-animate .progress-bar{
|
278
|
-
-webkit-animation: animate-stripes 3s linear infinite;
|
279
|
-
-moz-animation: animate-stripes 3s linear infinite;
|
280
|
-
animation: animate-stripes 3s linear infinite;
|
281
|
-
}
|
282
|
-
|
283
|
-
@-webkit-keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
|
284
|
-
@-moz-keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
|
285
|
-
@keyframes animate-stripes { 0% { background-position: 0 0; } 100% { background-position: 60px 0; } }
|
286
|
-
|
287
|
-
/* Inlines */
|
288
|
-
b, strong { font-weight: bold; }
|
289
|
-
|
290
|
-
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
|
291
|
-
|
292
|
-
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
|
293
|
-
sup { top: -0.5em; }
|
294
|
-
sub { bottom: -0.25em; }
|
295
|
-
|
296
|
-
dfn { font-style: italic; }
|
297
|
-
|
298
|
-
/* Lists */
|
299
|
-
ul, ol { padding-left: 30px; }
|
300
|
-
li p:last-child { margin:0 }
|
301
|
-
.task-list-item { list-style-type: none; }
|
302
|
-
.task-list-item input { float:left; margin-left: -20px; margin-top: 6px; }
|
303
|
-
dt { font-weight: bold; font-style: italic;}
|
304
|
-
dd { margin: 0 0 0 2em; }
|
305
|
-
|
306
|
-
/* Tables */
|
307
|
-
table { width: 100%; border-collapse: collapse; overflow-x: auto; overflow-y: hidden; display: block;}
|
308
|
-
table tr { background-color: #fefefe; }
|
309
|
-
table tr:nth-child(2n) { background-color: #f8f8f8; }
|
310
|
-
td, th { border: 1px solid #ddd; padding: 6px 13px; }
|
311
|
-
|
312
|
-
/* Codehilite Tables */
|
313
|
-
.codehilitetable { border: 0; border-spacing: 0; }
|
314
|
-
.linenos, .code, .codehilitetable td { border: 0; padding: 0; }
|
315
|
-
td:not(.linenos) .linenodiv { padding: 0 !important; }
|
316
|
-
.code { width: 100%; }
|
317
|
-
.linenos div pre, .linenodiv pre {
|
318
|
-
border: 0;
|
319
|
-
border-top: 1px solid #CCC;
|
320
|
-
border-left: 1px solid #CCC;
|
321
|
-
border-right: 1px solid #CCC;
|
322
|
-
border-bottom: 1px solid #CCC;
|
323
|
-
-webkit-border-radius: 0;
|
324
|
-
-moz-border-radius: 0;
|
325
|
-
border-radius: 0;
|
326
|
-
-webkit-border-top-left-radius: 3px;
|
327
|
-
-webkit-border-bottom-left-radius: 3px;
|
328
|
-
-moz-border-radius-topleft: 3px;
|
329
|
-
-moz-border-radius-bottomleft: 3px;
|
330
|
-
border-top-left-radius: 3px;
|
331
|
-
border-bottom-left-radius: 3px;
|
332
|
-
}
|
333
|
-
|
334
|
-
.code div pre {
|
335
|
-
border: 0;
|
336
|
-
border-top: 1px solid #CCC;
|
337
|
-
border-right: 1px solid #CCC;
|
338
|
-
border-bottom: 1px solid #CCC;
|
339
|
-
-webkit-border-radius: 0;
|
340
|
-
-moz-border-radius: 0;
|
341
|
-
border-radius: 0;
|
342
|
-
-webkit-border-top-right-radius: 3px;
|
343
|
-
-webkit-border-bottom-right-radius: 3px;
|
344
|
-
-moz-border-radius-topright: 3px;
|
345
|
-
-moz-border-radius-bottomright: 3px;
|
346
|
-
border-top-right-radius: 3px;
|
347
|
-
border-bottom-right-radius: 3px;
|
348
|
-
}
|
349
|
-
|
350
|
-
/* Media */
|
351
|
-
@media only screen and (min-width: 480px) {
|
352
|
-
body{ font-size:14px; }
|
353
|
-
}
|
354
|
-
|
355
|
-
@media only screen and (min-width: 768px) {
|
356
|
-
body{ font-size:16px; }
|
357
|
-
}
|
358
|
-
|
359
|
-
@media print {
|
360
|
-
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
|
361
|
-
body{ font-size:12pt; max-width:100%; outline:none; border: 0;}
|
362
|
-
a, a:visited { text-decoration: underline; }
|
363
|
-
.headeranchor-link { display: none; }
|
364
|
-
hr { height: 1px; border:0; border-bottom:1px solid black; }
|
365
|
-
a[href]:after { content: " (" attr(href) ")"; }
|
366
|
-
abbr[title]:after { content: " (" attr(title) ")"; }
|
367
|
-
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
|
368
|
-
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
|
369
|
-
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
|
370
|
-
.progress, .progress-bar { box-shadow: none; }
|
371
|
-
tr, img { page-break-inside: avoid; }
|
372
|
-
img { max-width: 100% !important; }
|
373
|
-
p, h2, h3 { orphans: 3; widows: 3; }
|
374
|
-
h2, h3 { page-break-after: avoid; }
|
375
|
-
}
|
376
|
-
</style><title>README</title></head><body><h1 id="guyifeng"><a name="user-content-guyifeng" href="#guyifeng" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Guyifeng</h1>
|
377
|
-
<p>Simba is a generator for Sinatra applications.</p>
|
378
|
-
<p>Simba chooses slim + sinatra-synchrony + activerecord to build your awesome apps.</p>
|
379
|
-
<p>Simba’s aim is to help you to use best practices when not using ruby on rails.</p>
|
380
|
-
<h2 id="installation"><a name="user-content-installation" href="#installation" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Installation</h2>
|
381
|
-
<pre><code>$ gem install guyifeng
|
382
|
-
</code></pre>
|
383
|
-
<h2 id="usage"><a name="user-content-usage" href="#usage" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Usage</h2>
|
384
|
-
<pre><code>$ guyifeng new appname
|
385
|
-
|
386
|
-
$ # development
|
387
|
-
$ bundle exec rackup
|
388
|
-
|
389
|
-
$ # production
|
390
|
-
$ rake asset:precompile
|
391
|
-
$ bundle exec rackup -E production
|
392
|
-
</code></pre>
|
393
|
-
<h2 id="extra"><a name="user-content-extra" href="#extra" class="headeranchor-link" aria-hidden="true"><span class="headeranchor"></span></a>Extra</h2>
|
394
|
-
<pre><code>gem ‘sinatra-flash’
|
395
|
-
require ‘sinatra/flash’
|
396
|
-
register Sinatra::Flash
|
397
|
-
|
398
|
-
gem ‘sinatra-synchrony’
|
399
|
-
require ‘sinatra/synchrony’
|
400
|
-
register Sinatra::Synchrony
|
401
|
-
|
402
|
-
gem ‘will_paginate’
|
403
|
-
require ‘will_paginate’
|
404
|
-
require ‘will_paginate/active_record’
|
405
|
-
register WillPaginate::Sinatra
|
406
|
-
|
407
|
-
require “sinatra/cookies”
|
408
|
-
helpers Sinatra::Cookies
|
409
|
-
|
410
|
-
require “sinatra/config_file”
|
411
|
-
register Sinatra::ConfigFile
|
412
|
-
|
413
|
-
require “sinatra/multi_route”
|
414
|
-
register Sinatra::MultiRoute
|
415
|
-
|
416
|
-
require “sinatra/reloader”
|
417
|
-
register Sinatra::Reloader</code></pre></body></html>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# Guyifeng
|
2
|
-
|
3
|
-
Simba is a generator for Sinatra applications.
|
4
|
-
|
5
|
-
Simba chooses slim + sinatra-synchrony + activerecord to build your awesome apps.
|
6
|
-
|
7
|
-
Simba's aim is to help you to use best practices when not using ruby on rails.
|
8
|
-
|
9
|
-
## Installation
|
10
|
-
|
11
|
-
$ gem install guyifeng
|
12
|
-
|
13
|
-
## Usage
|
14
|
-
|
15
|
-
$ guyifeng new appname
|
16
|
-
|
17
|
-
$ # development
|
18
|
-
$ bundle exec rackup
|
19
|
-
|
20
|
-
$ # production
|
21
|
-
$ rake asset:precompile
|
22
|
-
$ bundle exec rackup -E production
|
23
|
-
|
24
|
-
|
25
|
-
## Extra
|
26
|
-
gem 'sinatra-flash'
|
27
|
-
require 'sinatra/flash'
|
28
|
-
register Sinatra::Flash
|
29
|
-
|
30
|
-
gem 'sinatra-synchrony'
|
31
|
-
require 'sinatra/synchrony'
|
32
|
-
register Sinatra::Synchrony
|
33
|
-
|
34
|
-
gem 'will_paginate'
|
35
|
-
require 'will_paginate'
|
36
|
-
require 'will_paginate/active_record'
|
37
|
-
register WillPaginate::Sinatra
|
38
|
-
|
39
|
-
require "sinatra/cookies"
|
40
|
-
helpers Sinatra::Cookies
|
41
|
-
|
42
|
-
require "sinatra/config_file"
|
43
|
-
register Sinatra::ConfigFile
|
44
|
-
config_file 'config/application.yml'
|
45
|
-
|
46
|
-
require "sinatra/multi_route"
|
47
|
-
register Sinatra::MultiRoute
|
48
|
-
|
49
|
-
require "sinatra/reloader"
|
50
|
-
register Sinatra::Reloader
|
51
|
-
also_reload require file
|
52
|
-
|
53
|
-
|
54
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'sinatra/base'
|
2
|
-
require 'sinatra/synchrony'
|
3
|
-
require "sinatra/activerecord"
|
4
|
-
|
5
|
-
require 'slim'
|
6
|
-
|
7
|
-
|
8
|
-
class Crawler < Sinatra::Base
|
9
|
-
register Sinatra::Synchrony
|
10
|
-
|
11
|
-
# register Sinatra::ActiveRecordExtension
|
12
|
-
|
13
|
-
# enable :sessions # for use flash
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
# ActiveRecord::Base.default_timezone = :local
|
18
|
-
# ActiveRecord::Base.establish_connection(settings.development)
|
19
|
-
|
20
|
-
set :public_folder, File.dirname(__FILE__) + '/assets'
|
21
|
-
set :views, File.dirname(__FILE__) + '/views'
|
22
|
-
set :show_exceptions, true
|
23
|
-
|
24
|
-
# 加载models
|
25
|
-
Dir[ File.expand_path('../models/*.rb', __FILE__) ].each{|file| require file }
|
26
|
-
|
27
|
-
# 加载帮助文档
|
28
|
-
Dir[ File.expand_path('../helpers/*.rb', __FILE__) ].each{|file| require file }
|
29
|
-
# Dir[ File.expand_path('../helpers/*.rb', __FILE__) ].each{|file| also_reload file }
|
30
|
-
|
31
|
-
# 加载控制器
|
32
|
-
Dir[ File.expand_path('../controllers/*.rb', __FILE__) ].each{|file| require file }
|
33
|
-
# Dir[ File.expand_path('../controllers/*.rb', __FILE__) ].each{|file| also_reload file }
|
34
|
-
|
35
|
-
# 加载路由
|
36
|
-
Dir[ File.expand_path('../routes/*.rb', __FILE__) ].each{|file| require file }
|
37
|
-
# Dir[ File.expand_path('../routes/*.rb', __FILE__) ].each{|file| also_reload file }
|
38
|
-
|
39
|
-
|
40
|
-
# after do
|
41
|
-
# ActiveRecord::Base.clear_active_connections!
|
42
|
-
# end
|
43
|
-
|
44
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)
|
2
|
-
|
3
|
-
# require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
4
|
-
# # Bundler.require(:default, ENV['RACK_ENV'])
|
5
|
-
|
6
|
-
# Dir.mkdir('log') unless File.exist?('log')
|
7
|
-
|
8
|
-
# if ENV['RACK_ENV'] == "production"
|
9
|
-
# $stderr.reopen(File.new(File.expand_path("../log/#{ENV['RACK_ENV']}.log", __FILE__), "a+"))
|
10
|
-
# $stderr.sync = true
|
11
|
-
# end
|
12
|
-
|
13
|
-
require File.expand_path('../application', __FILE__)
|
Binary file
|
Binary file
|
Binary file
|