guyifeng 0.1.7 → 0.1.9
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 +0 -2
- data/lib/guyifeng/template/Gemfile +0 -2
- data/lib/guyifeng/template/Rakefile +2 -2
- data/lib/guyifeng/template/application.rb.tt +6 -5
- data/lib/guyifeng/template/controllers/application_controller.rb.tt +6 -0
- data/lib/guyifeng/template/lib/tasks/test.rake +3 -5
- data/lib/guyifeng/template/routes/user_route.rb.tt +1 -1
- data/lib/guyifeng/version.rb +1 -1
- metadata +4 -7
- data/lib/guyifeng/template/config/zbatery.rb.tt +0 -51
- data/lib/guyifeng/template/helpers/.gitkeep +0 -1
- data/lib/guyifeng/template/helpers/application_helper.rb +0 -5
- data/lib/guyifeng/template/helpers/user_helper.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08cab3c00256b7b096205d3871e4a09e9035f829
|
4
|
+
data.tar.gz: 830825d99f58a80d5b702441a35ed5d080454d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc34765082c5a4a0e01830385159369e46aae5ae8602367dc2960ccf6405f192d0340a009c74b689b762932b8af1c9bad834dabbd6b6f5ae37c5b3d926e86b16
|
7
|
+
data.tar.gz: fad8bfd39eb0e379d924a96b6fe7043c7b0416b38d195c490c65e04c5edf59838e1e2a2c39d540f2d4601c8fb3873c65a3dae9a09f4152bbe6e4ffb529a54ccf
|
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
1
|
+
require 'sinatra/config_file'
|
2
|
+
require 'sinatra/reloader'
|
3
|
+
require 'sinatra/activerecord'
|
4
|
+
require 'slim'
|
2
5
|
|
3
6
|
class <%= @app_name %> < Sinatra::Base
|
4
7
|
|
5
|
-
register Sinatra::Cache
|
6
|
-
|
7
8
|
# use config/*.yml for settings
|
8
9
|
register Sinatra::ConfigFile
|
9
10
|
config_file 'config/application.yml'
|
@@ -18,7 +19,7 @@ class <%= @app_name %> < Sinatra::Base
|
|
18
19
|
configure :development do
|
19
20
|
|
20
21
|
register Sinatra::Reloader
|
21
|
-
%w(models
|
22
|
+
%w(models controllers routes).each do |dir|
|
22
23
|
Dir[ File.expand_path("../#{dir}/*.rb", __FILE__) ].each{|file| also_reload file }
|
23
24
|
end
|
24
25
|
|
@@ -28,7 +29,7 @@ class <%= @app_name %> < Sinatra::Base
|
|
28
29
|
|
29
30
|
end
|
30
31
|
|
31
|
-
%w(models
|
32
|
+
%w(models controllers routes).each do |dir|
|
32
33
|
Dir[ File.expand_path("../#{dir}/*.rb", __FILE__) ].each{|file| require file }
|
33
34
|
end
|
34
35
|
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guyifeng
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,11 +87,8 @@ files:
|
|
87
87
|
- lib/guyifeng/template/config/application.yml
|
88
88
|
- lib/guyifeng/template/config/database.yml
|
89
89
|
- lib/guyifeng/template/config/puma.rb
|
90
|
-
- lib/guyifeng/template/
|
90
|
+
- lib/guyifeng/template/controllers/application_controller.rb.tt
|
91
91
|
- lib/guyifeng/template/db/migrate/20141128021338_users.rb
|
92
|
-
- lib/guyifeng/template/helpers/.gitkeep
|
93
|
-
- lib/guyifeng/template/helpers/application_helper.rb
|
94
|
-
- lib/guyifeng/template/helpers/user_helper.rb
|
95
92
|
- lib/guyifeng/template/lib/tasks/test.rake
|
96
93
|
- lib/guyifeng/template/log/.gitkeep
|
97
94
|
- lib/guyifeng/template/models/.gitkeep
|
@@ -123,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
120
|
version: '0'
|
124
121
|
requirements: []
|
125
122
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.4.7
|
127
124
|
signing_key:
|
128
125
|
specification_version: 4
|
129
126
|
summary: easy to write a web
|
@@ -1,51 +0,0 @@
|
|
1
|
-
Rainbows! do
|
2
|
-
name = '<%= @name %>'
|
3
|
-
|
4
|
-
case ENV['RACK_ENV'].to_sym
|
5
|
-
when :development
|
6
|
-
worker_processes 1
|
7
|
-
worker_connections 32
|
8
|
-
listen 8080
|
9
|
-
stderr_path "log/development.log"
|
10
|
-
stdout_path "log/development.log"
|
11
|
-
when :production
|
12
|
-
worker_processes 2
|
13
|
-
worker_connections 32
|
14
|
-
timeout 30
|
15
|
-
listen 8080
|
16
|
-
pid "log/#{name}.pid"
|
17
|
-
stderr_path "log/production.log"
|
18
|
-
stdout_path "log/production.log"
|
19
|
-
|
20
|
-
###
|
21
|
-
# Hardcore performance tweaks, described here: https://github.com/blog/517-unicorn
|
22
|
-
###
|
23
|
-
|
24
|
-
# This loads the app in master, and then forks workers. Kill with USR2 and it will do a graceful restart using the block proceeding.
|
25
|
-
preload_app true
|
26
|
-
|
27
|
-
before_fork do |server, worker|
|
28
|
-
##
|
29
|
-
# When sent a USR2, Unicorn will suffix its pidfile with .oldbin and
|
30
|
-
# immediately start loading up a new version of itself (loaded with a new
|
31
|
-
# version of our app). When this new Unicorn is completely loaded
|
32
|
-
# it will begin spawning workers. The first worker spawned will check to
|
33
|
-
# see if an .oldbin pidfile exists. If so, this means we've just booted up
|
34
|
-
# a new Unicorn and need to tell the old one that it can now die. To do so
|
35
|
-
# we send it a QUIT.
|
36
|
-
#
|
37
|
-
# Using this method we get 0 downtime deploys.
|
38
|
-
# kill -USR2 `log/yourappname.pid`
|
39
|
-
|
40
|
-
old_pid = "/var/run/yourcompany/#{name}.pid.oldbin"
|
41
|
-
if File.exists?(old_pid) && server.pid != old_pid
|
42
|
-
begin
|
43
|
-
Process.kill("QUIT", File.read(old_pid).to_i)
|
44
|
-
rescue Errno::ENOENT, Errno::ESRCH
|
45
|
-
# someone else did our job for us
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
.gitkeep
|