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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2e6e820a3b861213d0e3d140027431a2a1f8ae7
4
- data.tar.gz: c8eca910ad67585c5cab9c002d7d68908d30d3fd
3
+ metadata.gz: 08cab3c00256b7b096205d3871e4a09e9035f829
4
+ data.tar.gz: 830825d99f58a80d5b702441a35ed5d080454d01
5
5
  SHA512:
6
- metadata.gz: 0acfa1aefed4febcef0889858a7f3e0b65b0b37176b5991e867fbfcb548a68be5278b5dab2b8edf7fce48c48f2c08caab8f08305676bd31f0d179f3d35600bee
7
- data.tar.gz: 4e448f89c5dad138cd533e9852b21e31b16da0a5579def9a84808b23d03cbc3489fb46783494dd937a66cea4d83de8e2e7687a504dde1df124134de0249020d1
6
+ metadata.gz: dc34765082c5a4a0e01830385159369e46aae5ae8602367dc2960ccf6405f192d0340a009c74b689b762932b8af1c9bad834dabbd6b6f5ae37c5b3d926e86b16
7
+ data.tar.gz: fad8bfd39eb0e379d924a96b6fe7043c7b0416b38d195c490c65e04c5edf59838e1e2a2c39d540f2d4601c8fb3873c65a3dae9a09f4152bbe6e4ffb529a54ccf
data/README.md CHANGED
@@ -35,5 +35,3 @@ Guyifeng chooses slim + sinatra-activerecord + compass to build your awesome app
35
35
  rake db:create_migration NAME=posts
36
36
 
37
37
  ......
38
-
39
- $ zbatery -c config/zbatery.rb
@@ -16,8 +16,6 @@ gem 'sass'
16
16
 
17
17
  gem 'slim'
18
18
 
19
- gem 'zbatery'
20
-
21
19
  gem 'puma'
22
20
 
23
21
  gem 'redis-sinatra'
@@ -1,4 +1,4 @@
1
- require "sinatra/activerecord"
2
- require "sinatra/activerecord/rake"
1
+ require File.expand_path('../application', __FILE__)
2
+ require 'sinatra/activerecord/rake'
3
3
 
4
4
  Dir["./lib/tasks/*.rake"].sort.each { |ext| load ext }
@@ -1,9 +1,10 @@
1
- Bundler.require
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 helpers routes).each do |dir|
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 helpers routes).each do |dir|
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
 
@@ -0,0 +1,6 @@
1
+ class <%= @app_name %>
2
+ def get_index
3
+
4
+ end
5
+
6
+ end
@@ -1,6 +1,4 @@
1
- namespace :test do
2
- desc "It is a test."
3
- task :puts do
4
- puts "It is a test"
5
- end
1
+ desc "It is a test."
2
+ task :puts do
3
+ puts "It is a test"
6
4
  end
@@ -3,7 +3,7 @@ class <%= @app_name %>
3
3
  get_index
4
4
  end
5
5
 
6
- The route matches "/show" and "/show/".
6
+ # The route matches "/show" and "/show/".
7
7
  get '/show/?' do
8
8
  slim 'show'
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Guyifeng
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.9"
3
3
  end
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.7
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: 2014-12-19 00:00:00.000000000 Z
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/config/zbatery.rb.tt
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.2.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
@@ -1,5 +0,0 @@
1
- helpers do
2
- def h(text)
3
- Rack::Utils.escape_html(text)
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- helpers do
2
- def get_index
3
- slim :'users/index'
4
- end
5
- end