trevi 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trevi/version.rb +1 -1
- data/templates/app/.gitignore +2 -2
- data/templates/app/Gemfile +17 -11
- data/templates/app/Procfile +1 -1
- data/templates/app/Rakefile +11 -3
- data/templates/app/app.rb.tt +11 -2
- data/templates/app/config/puma.rb +9 -0
- data/templates/app/lib/tasks/{assets.rb.tt → assets.rake.tt} +0 -0
- data/templates/app/lib/tasks/{db.rb.tt → db.rake.tt} +0 -0
- data/templates/app/spec/models/.gitkeep +1 -0
- data/templates/app/spec/requests/.gitkeep +1 -0
- data/templates/app/spec/spec_helper.rb.tt +21 -0
- metadata +8 -5
- data/templates/app/config/unicorn.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cce4d771abf3c2665f5284a8d9aea21949dccf5b
|
4
|
+
data.tar.gz: 2751a72c8269428ccc2effbb2b29459afb807c8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3ceeeea314420cd0baebc3ee75f34965b98a584502ec107f1a4468d4c3f44c3da1b7295c8e56cbbb587d3ec8832ad847e052e5b3622db27c5294556ae11cc2
|
7
|
+
data.tar.gz: b4faa61972c6c487ca5120d9879c082f15c8478198c24e8214828eff668239ac2fb2cf84b02ab1335380b396a92e1b62e45ed31e977dd761f291f835d7c80dcf
|
data/lib/trevi/version.rb
CHANGED
data/templates/app/.gitignore
CHANGED
data/templates/app/Gemfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
ruby '2.1.
|
2
|
+
ruby '2.1.5'
|
3
3
|
|
4
|
-
gem 'sinatra', require: 'sinatra/base'
|
5
|
-
gem 'sinatra-contrib', github: 'maccman/sinatra-contrib'
|
6
|
-
gem 'rack-standards'
|
7
|
-
gem 'unicorn'
|
8
|
-
gem 'erubis'
|
9
|
-
gem 'i18n'
|
10
4
|
gem 'activesupport'
|
11
|
-
gem 'rake'
|
12
5
|
gem 'builder'
|
13
|
-
gem 'json', '~> 1.7.7'
|
14
6
|
gem 'dotenv'
|
7
|
+
gem 'erubis'
|
8
|
+
gem 'i18n'
|
9
|
+
gem 'json', '~> 1.7.7'
|
10
|
+
gem 'puma'
|
11
|
+
gem 'rack-standards'
|
12
|
+
gem 'rake'
|
13
|
+
gem 'sinatra', require: 'sinatra/base'
|
14
|
+
gem 'sinatra-contrib', github: 'maccman/sinatra-contrib'
|
15
15
|
|
16
16
|
# Assets
|
17
17
|
gem 'sprockets'
|
@@ -32,6 +32,12 @@ gem 'sinatra-sequel'
|
|
32
32
|
gem 'pg'
|
33
33
|
|
34
34
|
group :development do
|
35
|
-
gem '
|
36
|
-
|
35
|
+
gem 'foreman'
|
36
|
+
end
|
37
|
+
|
38
|
+
group :test do
|
39
|
+
gem 'pry'
|
40
|
+
gem 'rack-test'
|
41
|
+
gem 'rspec'
|
42
|
+
gem 'webmock'
|
37
43
|
end
|
data/templates/app/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
web: bundle exec
|
1
|
+
web: bundle exec puma -C config/puma.rb
|
data/templates/app/Rakefile
CHANGED
@@ -4,6 +4,14 @@ task :app do
|
|
4
4
|
require './app'
|
5
5
|
end
|
6
6
|
|
7
|
-
Dir[File.dirname(__FILE__) +
|
8
|
-
|
9
|
-
end
|
7
|
+
Dir[File.dirname(__FILE__) + '/lib/tasks/*.rake'].sort.each do |path|
|
8
|
+
load path
|
9
|
+
end
|
10
|
+
|
11
|
+
begin
|
12
|
+
require 'rspec/core/rake_task'
|
13
|
+
RSpec::Core::RakeTask.new(:spec)
|
14
|
+
task default: :spec
|
15
|
+
rescue LoadError
|
16
|
+
# no rspec available
|
17
|
+
end
|
data/templates/app/app.rb.tt
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler'
|
3
3
|
|
4
|
+
# Set default env
|
5
|
+
ENV['RACK_ENV'] ||= 'development'
|
6
|
+
|
4
7
|
# Setup load paths
|
5
8
|
Bundler.require
|
6
9
|
$: << File.expand_path('../', __FILE__)
|
7
10
|
$: << File.expand_path('../lib', __FILE__)
|
8
11
|
|
12
|
+
# Dotenv load specific vars
|
9
13
|
require 'dotenv'
|
10
|
-
Dotenv.load
|
14
|
+
Dotenv.load(
|
15
|
+
File.expand_path("../.env.#{ENV['RACK_ENV']}", __FILE__),
|
16
|
+
File.expand_path("../.env", __FILE__))
|
11
17
|
|
12
18
|
# Require base
|
13
19
|
require 'sinatra/base'
|
@@ -49,6 +55,8 @@ module <%= @name.camel_case %>
|
|
49
55
|
secret: ENV['SESSION_SECRET']
|
50
56
|
end
|
51
57
|
|
58
|
+
Dir['config/initializers/*.rb'].sort.each { |file| require file }
|
59
|
+
|
52
60
|
use Rack::Deflater
|
53
61
|
use Rack::Standards
|
54
62
|
|
@@ -63,4 +71,5 @@ module <%= @name.camel_case %>
|
|
63
71
|
end
|
64
72
|
end
|
65
73
|
|
66
|
-
include <%= @name.camel_case
|
74
|
+
include <%= @name.camel_case %>
|
75
|
+
include <%= @name.camel_case %>::Models
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
@@ -0,0 +1 @@
|
|
1
|
+
.gitkeep
|
@@ -0,0 +1,21 @@
|
|
1
|
+
ENV['RACK_ENV'] = 'test'
|
2
|
+
|
3
|
+
require File.expand_path('../../app', __FILE__)
|
4
|
+
|
5
|
+
require 'pry'
|
6
|
+
require 'rspec'
|
7
|
+
require 'rack/test'
|
8
|
+
require 'webmock/rspec'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
include Rack::Test::Methods
|
12
|
+
config.order = 'random'
|
13
|
+
|
14
|
+
def app
|
15
|
+
<%= @name.camel_case %>::App
|
16
|
+
end
|
17
|
+
|
18
|
+
config.expect_with :rspec do |c|
|
19
|
+
c.syntax = :expect
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trevi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,10 +89,13 @@ files:
|
|
89
89
|
- templates/app/app/routes/static.rb.tt
|
90
90
|
- templates/app/app/views/layouts/layout.erb.tt
|
91
91
|
- templates/app/config.ru.tt
|
92
|
-
- templates/app/config/
|
93
|
-
- templates/app/lib/tasks/assets.
|
94
|
-
- templates/app/lib/tasks/db.
|
92
|
+
- templates/app/config/puma.rb
|
93
|
+
- templates/app/lib/tasks/assets.rake.tt
|
94
|
+
- templates/app/lib/tasks/db.rake.tt
|
95
95
|
- templates/app/public/favicon.ico
|
96
|
+
- templates/app/spec/models/.gitkeep
|
97
|
+
- templates/app/spec/requests/.gitkeep
|
98
|
+
- templates/app/spec/spec_helper.rb.tt
|
96
99
|
- templates/app/vendor/assets/javascripts/.gitkeep
|
97
100
|
- templates/app/vendor/assets/stylesheets/.gitkeep
|
98
101
|
- trevi.gemspec
|
@@ -1,21 +0,0 @@
|
|
1
|
-
worker_processes Integer(ENV['UNICORN_WORKERS'] || 4)
|
2
|
-
timeout 30
|
3
|
-
preload_app true
|
4
|
-
listen(ENV['PORT'] || 3000, :backlog => Integer(ENV['UNICORN_BACKLOG'] || 200))
|
5
|
-
|
6
|
-
before_fork do |server, worker|
|
7
|
-
Signal.trap 'TERM' do
|
8
|
-
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
|
9
|
-
Process.kill 'QUIT', Process.pid
|
10
|
-
end
|
11
|
-
|
12
|
-
if defined?(Sequel::Model)
|
13
|
-
Sequel::DATABASES.each{ |db| db.disconnect }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
after_fork do |server, worker|
|
18
|
-
Signal.trap 'TERM' do
|
19
|
-
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
|
20
|
-
end
|
21
|
-
end
|