skellington 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +1 -1
- data/config/config.yaml +9 -2
- data/lib/skellington/version.rb +1 -1
- data/lib/templates/config/config.yml.eruby +2 -0
- data/lib/templates/lib/app.rb.eruby +3 -1
- data/lib/templates/lib/app/helpers.rb.eruby +2 -0
- data/lib/templates/lib/app/racks.rb.eruby +7 -0
- data/lib/templates/public/sass/_footer.scss.eruby +25 -0
- data/lib/templates/public/sass/_github-corner.scss.eruby +7 -0
- data/lib/templates/public/sass/_variables.scss.eruby +2 -0
- data/lib/templates/public/sass/styles.scss.eruby +7 -0
- data/lib/templates/spec/app/helpers_spec.rb.eruby +4 -0
- data/lib/templates/views/default.erb.eruby +2 -0
- data/lib/templates/views/includes/footer.erb.eruby +10 -0
- data/lib/templates/views/includes/github-corner.erb.eruby +9 -0
- data/spec/cli/app_spec.rb +3 -42
- data/spec/cli/config_yml_spec.rb +17 -0
- data/spec/cli/gemfile_spec.rb +3 -2
- data/spec/cli/helpers_spec.rb +24 -0
- data/spec/cli/{bootstrap_spec.rb → includes_spec.rb} +30 -20
- data/spec/cli/layout_spec.rb +32 -0
- data/spec/cli/non_local_path_spec.rb +3 -1
- data/spec/cli/public_spec.rb +56 -0
- data/spec/cli/racks_spec.rb +46 -0
- data/spec/cli/spec_spec.rb +4 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a7028bcf25ec372455d53550889c479e3f617cd
|
4
|
+
data.tar.gz: 3636e5fc091105437222fd201a3c74098a8570ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82d7b50817d06e14f8407508ba45a5c44f5f73070f9c9620e0787d25fa056c78cfdc306592be9bdaec7373b66ed74d0022ace363465adcf3a40d7c3c81a8777
|
7
|
+
data.tar.gz: 4b521d0ae78e5f1472dab29f869ae7f5609f3bd9c16447b7ccc1340a7944f75fbac632157690dd324cf1e9b3439549123a6b8dc29ac76577655f850ec2ff59b0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
[![Build Status](http://img.shields.io/travis/pikesley/skellington.svg?style=flat-square)](https://travis-ci.org/pikesley/skellington)
|
2
2
|
[![Dependency Status](http://img.shields.io/gemnasium/pikesley/skellington.svg?style=flat-square)](https://gemnasium.com/pikesley/skellington)
|
3
|
+
[![Dependency CI](http://dependencyci.com/github/pikesley/skellington/badge?style=flat-square)](http://dependencyci.com/github/pikesley/skellington)
|
3
4
|
[![Coverage Status](http://img.shields.io/coveralls/pikesley/skellington.svg?style=flat-square)](https://coveralls.io/r/pikesley/skellington)
|
4
5
|
[![Code Climate](http://img.shields.io/codeclimate/github/pikesley/skellington.svg?style=flat-square)](https://codeclimate.com/github/pikesley/skellington)
|
5
6
|
[![Gem Version](http://img.shields.io/gem/v/skellington.svg?style=flat-square)](https://rubygems.org/gems/skellington)
|
6
7
|
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://pikesley.mit-license.org)
|
7
|
-
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
|
8
8
|
|
9
9
|
# Skellington
|
10
10
|
|
data/config/config.yaml
CHANGED
@@ -2,11 +2,12 @@ gems:
|
|
2
2
|
production:
|
3
3
|
sinatra: 1.4
|
4
4
|
rack-conneg:
|
5
|
-
rack-
|
5
|
+
rack-tracker:
|
6
6
|
rake:
|
7
|
-
puma:
|
8
7
|
compass:
|
9
8
|
bootstrap-sass:
|
9
|
+
erubis:
|
10
|
+
puma:
|
10
11
|
test:
|
11
12
|
rspec:
|
12
13
|
guard:
|
@@ -29,6 +30,7 @@ files:
|
|
29
30
|
.gitignore:
|
30
31
|
config.ru:
|
31
32
|
config.rb:
|
33
|
+
config/config.yml:
|
32
34
|
# the template has this name
|
33
35
|
lib/app.rb:
|
34
36
|
# but the output file substitutes it like this, where wormname is an attribute
|
@@ -41,6 +43,8 @@ files:
|
|
41
43
|
views/default.erb:
|
42
44
|
views/index.erb:
|
43
45
|
views/includes/header.erb:
|
46
|
+
views/includes/footer.erb:
|
47
|
+
views/includes/github-corner.erb:
|
44
48
|
spec/spec_helper.rb:
|
45
49
|
spec/app/helpers_spec.rb:
|
46
50
|
outpath: app/wormname
|
@@ -54,4 +58,7 @@ files:
|
|
54
58
|
public/css/styles.css:
|
55
59
|
public/js/app.js:
|
56
60
|
outpath: app/wormname
|
61
|
+
public/sass/_footer.scss:
|
62
|
+
public/sass/_github-corner.scss:
|
63
|
+
public/sass/_variables.scss:
|
57
64
|
public/sass/styles.scss:
|
data/lib/skellington/version.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'sinatra/base'
|
2
2
|
require 'tilt/erubis'
|
3
3
|
require 'json'
|
4
|
+
require 'yaml'
|
4
5
|
|
5
|
-
require_relative '<%= @gen.wormname %>/racks'
|
6
6
|
require_relative '<%= @gen.wormname %>/helpers'
|
7
|
+
require_relative '<%= @gen.wormname %>/racks'
|
7
8
|
|
8
9
|
module <%= @gen.camelname %>
|
9
10
|
class App < Sinatra::Base
|
@@ -18,6 +19,7 @@ module <%= @gen.camelname %>
|
|
18
19
|
wants.html do
|
19
20
|
@content = '<h1>Hello from <%= @gen.camelname %></h1>'
|
20
21
|
@title = '<%= @gen.camelname %>'
|
22
|
+
@github_url = CONFIG['github_url'] || 'https://github.com'
|
21
23
|
erb :index, layout: :default
|
22
24
|
end
|
23
25
|
|
@@ -1,10 +1,17 @@
|
|
1
1
|
require 'rack/conneg'
|
2
|
+
require 'rack/tracker'
|
2
3
|
|
3
4
|
module <%= @gen.camelname %>
|
4
5
|
class App < Sinatra::Base
|
5
6
|
set :public_folder, 'public'
|
6
7
|
set :views, 'views'
|
7
8
|
|
9
|
+
if CONFIG['google-analytics-tag']
|
10
|
+
use Rack::Tracker do
|
11
|
+
handler :google_analytics, { tracker: CONFIG['google-analytics-tag'] }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
use Rack::Conneg do |conneg|
|
9
16
|
conneg.set :accept_all_extensions, true
|
10
17
|
conneg.set :fallback, :html
|
@@ -0,0 +1,25 @@
|
|
1
|
+
html {
|
2
|
+
position: relative;
|
3
|
+
min-height: 100%;
|
4
|
+
}
|
5
|
+
|
6
|
+
body {
|
7
|
+
margin-bottom: $footer-height;
|
8
|
+
}
|
9
|
+
|
10
|
+
.footer {
|
11
|
+
position: absolute;
|
12
|
+
bottom: 0;
|
13
|
+
width: 100%;
|
14
|
+
|
15
|
+
margin-top: $padding-large-vertical;
|
16
|
+
background: $brand-primary;
|
17
|
+
color: white;
|
18
|
+
height: $footer-height;
|
19
|
+
|
20
|
+
padding: $padding-large-vertical $padding-large-horizontal;
|
21
|
+
|
22
|
+
a {
|
23
|
+
color: white;
|
24
|
+
}
|
25
|
+
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
<html lang='en'>
|
3
3
|
<%%= erb :'includes/header' %>
|
4
4
|
<body>
|
5
|
+
<%%= erb :'includes/github-corner' %>
|
5
6
|
<div class='container'>
|
6
7
|
<div class='row'>
|
7
8
|
<div class='col-md-2'></div>
|
@@ -11,5 +12,6 @@
|
|
11
12
|
<div class='col-md-2'></div>
|
12
13
|
</div>
|
13
14
|
</div>
|
15
|
+
<%%= erb :'includes/footer' %>
|
14
16
|
</body>
|
15
17
|
</html>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version='1.0' standalone='no'?>
|
2
|
+
<?xml-stylesheet type='text/css' href='styles.css'?>
|
3
|
+
<a href='<%%= @github_url %>' class='github-corner' aria-label='Fork me on Github'>
|
4
|
+
<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 250 250' fill='#151513' style='position: absolute; top: 0; right: 0'>
|
5
|
+
<path class='octo-background' d='M0 0l115 115h15l12 27 108 108V0z' fill='#fff'/>
|
6
|
+
<path class='octo-arm' d='M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16' style='-webkit-transform-origin: 130px 106px; transform-origin: 130px 106px'/>
|
7
|
+
<path class='octo-body' d='M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z'/>
|
8
|
+
</svg>
|
9
|
+
</a>
|
data/spec/cli/app_spec.rb
CHANGED
@@ -11,9 +11,10 @@ module Skellington
|
|
11
11
|
require 'sinatra/base'
|
12
12
|
require 'tilt/erubis'
|
13
13
|
require 'json'
|
14
|
+
require 'yaml'
|
14
15
|
|
15
|
-
require_relative 'dummy_app/racks'
|
16
16
|
require_relative 'dummy_app/helpers'
|
17
|
+
require_relative 'dummy_app/racks'
|
17
18
|
|
18
19
|
module DummyApp
|
19
20
|
class App < Sinatra::Base
|
@@ -28,6 +29,7 @@ module Skellington
|
|
28
29
|
wants.html do
|
29
30
|
@content = '<h1>Hello from DummyApp</h1>'
|
30
31
|
@title = 'DummyApp'
|
32
|
+
@github_url = CONFIG['github_url'] || 'https://github.com'
|
31
33
|
erb :index, layout: :default
|
32
34
|
end
|
33
35
|
|
@@ -45,47 +47,6 @@ module Skellington
|
|
45
47
|
end
|
46
48
|
"""
|
47
49
|
)
|
48
|
-
|
49
|
-
expect('dummy_app/lib/dummy_app/racks.rb').to have_content (
|
50
|
-
"""
|
51
|
-
require 'rack/conneg'
|
52
|
-
|
53
|
-
module DummyApp
|
54
|
-
class App < Sinatra::Base
|
55
|
-
set :public_folder, 'public'
|
56
|
-
set :views, 'views'
|
57
|
-
|
58
|
-
use Rack::Conneg do |conneg|
|
59
|
-
conneg.set :accept_all_extensions, true
|
60
|
-
conneg.set :fallback, :html
|
61
|
-
conneg.ignore_contents_of 'public'
|
62
|
-
conneg.provide [
|
63
|
-
:html,
|
64
|
-
:json
|
65
|
-
]
|
66
|
-
end
|
67
|
-
|
68
|
-
before do
|
69
|
-
if negotiated?
|
70
|
-
content_type negotiated_type
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
"""
|
76
|
-
)
|
77
|
-
|
78
|
-
expect('dummy_app/lib/dummy_app/helpers.rb').to have_content (
|
79
|
-
"""
|
80
|
-
module DummyApp
|
81
|
-
module Helpers
|
82
|
-
def hello
|
83
|
-
'Hello'
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
"""
|
88
|
-
)
|
89
50
|
end
|
90
51
|
end
|
91
52
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Skellington
|
2
|
+
describe CLI do
|
3
|
+
let :subject do
|
4
|
+
described_class.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'generates a config/config.yml file' do
|
8
|
+
subject.generate 'dummy_app'
|
9
|
+
expect('dummy_app/config/config.yml').to have_content (
|
10
|
+
"""
|
11
|
+
#google-analytics-tag: UA-00000000-0
|
12
|
+
#github_url: https://github.com
|
13
|
+
"""
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/spec/cli/gemfile_spec.rb
CHANGED
@@ -14,11 +14,12 @@ module Skellington
|
|
14
14
|
|
15
15
|
gem 'sinatra', '~> 1.4'
|
16
16
|
gem 'rack-conneg'
|
17
|
-
gem 'rack-
|
17
|
+
gem 'rack-tracker'
|
18
18
|
gem 'rake'
|
19
|
-
gem 'puma'
|
20
19
|
gem 'compass'
|
21
20
|
gem 'bootstrap-sass'
|
21
|
+
gem 'erubis'
|
22
|
+
gem 'puma'
|
22
23
|
|
23
24
|
group :test do
|
24
25
|
gem 'rspec'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Skellington
|
2
|
+
describe CLI do
|
3
|
+
let :subject do
|
4
|
+
described_class.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'generates an app file' do
|
8
|
+
subject.generate 'dummy_app'
|
9
|
+
expect('dummy_app/lib/dummy_app/helpers.rb').to have_content (
|
10
|
+
"""
|
11
|
+
module DummyApp
|
12
|
+
CONFIG = YAML.load_file('config/config.yml') || {}
|
13
|
+
|
14
|
+
module Helpers
|
15
|
+
def hello
|
16
|
+
'Hello'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
"""
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -4,27 +4,8 @@ module Skellington
|
|
4
4
|
described_class.new
|
5
5
|
end
|
6
6
|
|
7
|
-
it 'generates
|
7
|
+
it 'generates some includes' do
|
8
8
|
subject.generate 'dummy_app'
|
9
|
-
expect('dummy_app/views/default.erb').to have_content (
|
10
|
-
"""
|
11
|
-
<!DOCTYPE html>
|
12
|
-
<html lang='en'>
|
13
|
-
/erb.*'includes/header'/
|
14
|
-
<body>
|
15
|
-
<div class='container'>
|
16
|
-
<div class='row'>
|
17
|
-
<div class='col-md-2'></div>
|
18
|
-
<div class='col-md-8'>
|
19
|
-
<%= yield %>
|
20
|
-
</div>
|
21
|
-
<div class='col-md-2'></div>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
</body>
|
25
|
-
</html>
|
26
|
-
"""
|
27
|
-
)
|
28
9
|
|
29
10
|
expect('dummy_app/views/includes/header.erb').to have_content (
|
30
11
|
"""
|
@@ -57,6 +38,35 @@ module Skellington
|
|
57
38
|
<%= @content %>
|
58
39
|
"""
|
59
40
|
)
|
41
|
+
|
42
|
+
expect('dummy_app/views/includes/footer.erb').to have_content (
|
43
|
+
"""
|
44
|
+
<div class='footer'>
|
45
|
+
<div class='row'>
|
46
|
+
<div class='col-md-12 text-center bottom'>
|
47
|
+
Generated with
|
48
|
+
<a href='http://sam.pikesley.org/projects/skellington/' alt='Skellington' title='Skellington'>
|
49
|
+
Skellington
|
50
|
+
</a>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
"""
|
55
|
+
)
|
56
|
+
|
57
|
+
expect('dummy_app/views/includes/github-corner.erb').to have_content (
|
58
|
+
"""
|
59
|
+
<?xml version='1.0' standalone='no'?>
|
60
|
+
<?xml-stylesheet type='text/css' href='styles.css'?>
|
61
|
+
<a href='<%= @github_url %>' class='github-corner' aria-label='Fork me on Github'>
|
62
|
+
<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 250 250' fill='#151513' style='position: absolute; top: 0; right: 0'>
|
63
|
+
<path class='octo-background' d='M0 0l115 115h15l12 27 108 108V0z' fill='#fff'/>
|
64
|
+
<path class='octo-arm' d='M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16' style='-webkit-transform-origin: 130px 106px; transform-origin: 130px 106px'/>
|
65
|
+
<path class='octo-body' d='M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z'/>
|
66
|
+
</svg>
|
67
|
+
</a>
|
68
|
+
"""
|
69
|
+
)
|
60
70
|
end
|
61
71
|
end
|
62
72
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Skellington
|
2
|
+
describe CLI do
|
3
|
+
let :subject do
|
4
|
+
described_class.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'generates a default layout' do
|
8
|
+
subject.generate 'dummy_app'
|
9
|
+
expect('dummy_app/views/default.erb').to have_content (
|
10
|
+
"""
|
11
|
+
<!DOCTYPE html>
|
12
|
+
<html lang='en'>
|
13
|
+
/erb.*'includes/header'/
|
14
|
+
<body>
|
15
|
+
/erb.*'includes/github-corner'/
|
16
|
+
<div class='container'>
|
17
|
+
<div class='row'>
|
18
|
+
<div class='col-md-2'></div>
|
19
|
+
<div class='col-md-8'>
|
20
|
+
<%= yield %>
|
21
|
+
</div>
|
22
|
+
<div class='col-md-2'></div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
/erb.*:'includes/footer'/
|
26
|
+
</body>
|
27
|
+
</html>
|
28
|
+
"""
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -11,9 +11,10 @@ module Skellington
|
|
11
11
|
require 'sinatra/base'
|
12
12
|
require 'tilt/erubis'
|
13
13
|
require 'json'
|
14
|
+
require 'yaml'
|
14
15
|
|
15
|
-
require_relative 'some_app/racks'
|
16
16
|
require_relative 'some_app/helpers'
|
17
|
+
require_relative 'some_app/racks'
|
17
18
|
|
18
19
|
module SomeApp
|
19
20
|
class App < Sinatra::Base
|
@@ -28,6 +29,7 @@ module Skellington
|
|
28
29
|
wants.html do
|
29
30
|
@content = '<h1>Hello from SomeApp</h1>'
|
30
31
|
@title = 'SomeApp'
|
32
|
+
@github_url = CONFIG['github_url'] || 'https://github.com'
|
31
33
|
erb :index, layout: :default
|
32
34
|
end
|
33
35
|
|
data/spec/cli/public_spec.rb
CHANGED
@@ -11,6 +11,62 @@ module Skellington
|
|
11
11
|
expect('dummy_app/public/sass/styles.scss').to have_content (
|
12
12
|
"""
|
13
13
|
@import 'bootstrap';
|
14
|
+
@import 'variables';
|
15
|
+
@import 'footer';
|
16
|
+
@import 'github-corner';
|
17
|
+
|
18
|
+
h1 {
|
19
|
+
color: $brand-primary;
|
20
|
+
}
|
21
|
+
"""
|
22
|
+
)
|
23
|
+
|
24
|
+
expect('dummy_app/public/sass/_variables.scss').to have_content (
|
25
|
+
"""
|
26
|
+
$footer-height: 40px;
|
27
|
+
$brand-primary: #fa8100;
|
28
|
+
"""
|
29
|
+
)
|
30
|
+
|
31
|
+
expect('dummy_app/public/sass/_footer.scss').to have_content (
|
32
|
+
"""
|
33
|
+
html {
|
34
|
+
position: relative;
|
35
|
+
min-height: 100%;
|
36
|
+
}
|
37
|
+
|
38
|
+
body {
|
39
|
+
margin-bottom: $footer-height;
|
40
|
+
}
|
41
|
+
|
42
|
+
.footer {
|
43
|
+
position: absolute;
|
44
|
+
bottom: 0;
|
45
|
+
width: 100%;
|
46
|
+
|
47
|
+
margin-top: $padding-large-vertical;
|
48
|
+
background: $brand-primary;
|
49
|
+
color: white;
|
50
|
+
height: $footer-height;
|
51
|
+
|
52
|
+
padding: $padding-large-vertical $padding-large-horizontal;
|
53
|
+
|
54
|
+
a {
|
55
|
+
color: white;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
"""
|
59
|
+
)
|
60
|
+
|
61
|
+
expect('dummy_app/public/sass/_github-corner.scss').to have_content (
|
62
|
+
"""
|
63
|
+
.octo-background {
|
64
|
+
fill: $brand-primary;
|
65
|
+
}
|
66
|
+
|
67
|
+
.octo-arm, .octo-body {
|
68
|
+
fill: white;
|
69
|
+
}
|
14
70
|
"""
|
15
71
|
)
|
16
72
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Skellington
|
2
|
+
describe CLI do
|
3
|
+
let :subject do
|
4
|
+
described_class.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'generates an app file' do
|
8
|
+
subject.generate 'dummy_app'
|
9
|
+
expect('dummy_app/lib/dummy_app/racks.rb').to have_content (
|
10
|
+
"""
|
11
|
+
require 'rack/conneg'
|
12
|
+
require 'rack/tracker'
|
13
|
+
|
14
|
+
module DummyApp
|
15
|
+
class App < Sinatra::Base
|
16
|
+
set :public_folder, 'public'
|
17
|
+
set :views, 'views'
|
18
|
+
|
19
|
+
if CONFIG['google-analytics-tag']
|
20
|
+
use Rack::Tracker do
|
21
|
+
handler :google_analytics, { tracker: CONFIG['google-analytics-tag'] }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
use Rack::Conneg do |conneg|
|
26
|
+
conneg.set :accept_all_extensions, true
|
27
|
+
conneg.set :fallback, :html
|
28
|
+
conneg.ignore_contents_of 'public'
|
29
|
+
conneg.provide [
|
30
|
+
:html,
|
31
|
+
:json
|
32
|
+
]
|
33
|
+
end
|
34
|
+
|
35
|
+
before do
|
36
|
+
if negotiated?
|
37
|
+
content_type negotiated_type
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
"""
|
43
|
+
)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/spec/cli/spec_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skellington
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- lib/templates/Rakefile.eruby
|
185
185
|
- lib/templates/config.rb.eruby
|
186
186
|
- lib/templates/config.ru.eruby
|
187
|
+
- lib/templates/config/config.yml.eruby
|
187
188
|
- lib/templates/lib/app.rb.eruby
|
188
189
|
- lib/templates/lib/app/helpers.rb.eruby
|
189
190
|
- lib/templates/lib/app/racks.rb.eruby
|
@@ -191,6 +192,9 @@ files:
|
|
191
192
|
- lib/templates/public/assets/favicon.ico.eruby
|
192
193
|
- lib/templates/public/css/styles.css.eruby
|
193
194
|
- lib/templates/public/js/app.js.eruby
|
195
|
+
- lib/templates/public/sass/_footer.scss.eruby
|
196
|
+
- lib/templates/public/sass/_github-corner.scss.eruby
|
197
|
+
- lib/templates/public/sass/_variables.scss.eruby
|
194
198
|
- lib/templates/public/sass/styles.scss.eruby
|
195
199
|
- lib/templates/spec/app/app_spec.rb.eruby
|
196
200
|
- lib/templates/spec/app/helpers_spec.rb.eruby
|
@@ -199,21 +203,27 @@ files:
|
|
199
203
|
- lib/templates/spec/javascripts/support/jasmine_helper.rb.eruby
|
200
204
|
- lib/templates/spec/spec_helper.rb.eruby
|
201
205
|
- lib/templates/views/default.erb.eruby
|
206
|
+
- lib/templates/views/includes/footer.erb.eruby
|
207
|
+
- lib/templates/views/includes/github-corner.erb.eruby
|
202
208
|
- lib/templates/views/includes/header.erb.eruby
|
203
209
|
- lib/templates/views/index.erb.eruby
|
204
210
|
- skellington.gemspec
|
205
211
|
- spec/cli/app_spec.rb
|
206
|
-
- spec/cli/bootstrap_spec.rb
|
207
212
|
- spec/cli/config_rb_spec.rb
|
208
213
|
- spec/cli/config_ru_spec.rb
|
214
|
+
- spec/cli/config_yml_spec.rb
|
209
215
|
- spec/cli/gemfile_spec.rb
|
210
216
|
- spec/cli/git_spec.rb
|
211
217
|
- spec/cli/guardfile_spec.rb
|
218
|
+
- spec/cli/helpers_spec.rb
|
219
|
+
- spec/cli/includes_spec.rb
|
212
220
|
- spec/cli/javascript_spec.rb
|
221
|
+
- spec/cli/layout_spec.rb
|
213
222
|
- spec/cli/license_spec.rb
|
214
223
|
- spec/cli/non_local_path_spec.rb
|
215
224
|
- spec/cli/procfile_spec.rb
|
216
225
|
- spec/cli/public_spec.rb
|
226
|
+
- spec/cli/racks_spec.rb
|
217
227
|
- spec/cli/rakefile_spec.rb
|
218
228
|
- spec/cli/rbenv_spec.rb
|
219
229
|
- spec/cli/spec_spec.rb
|
@@ -247,17 +257,21 @@ specification_version: 4
|
|
247
257
|
summary: Opinionated boilerplate skeleton generator for a Sinatra app
|
248
258
|
test_files:
|
249
259
|
- spec/cli/app_spec.rb
|
250
|
-
- spec/cli/bootstrap_spec.rb
|
251
260
|
- spec/cli/config_rb_spec.rb
|
252
261
|
- spec/cli/config_ru_spec.rb
|
262
|
+
- spec/cli/config_yml_spec.rb
|
253
263
|
- spec/cli/gemfile_spec.rb
|
254
264
|
- spec/cli/git_spec.rb
|
255
265
|
- spec/cli/guardfile_spec.rb
|
266
|
+
- spec/cli/helpers_spec.rb
|
267
|
+
- spec/cli/includes_spec.rb
|
256
268
|
- spec/cli/javascript_spec.rb
|
269
|
+
- spec/cli/layout_spec.rb
|
257
270
|
- spec/cli/license_spec.rb
|
258
271
|
- spec/cli/non_local_path_spec.rb
|
259
272
|
- spec/cli/procfile_spec.rb
|
260
273
|
- spec/cli/public_spec.rb
|
274
|
+
- spec/cli/racks_spec.rb
|
261
275
|
- spec/cli/rakefile_spec.rb
|
262
276
|
- spec/cli/rbenv_spec.rb
|
263
277
|
- spec/cli/spec_spec.rb
|