skellington 0.8.9 → 0.9.0.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -0
- data/README.md +3 -9
- data/Rakefile +2 -32
- data/config/config.yaml +21 -7
- data/lib/skellington/cli.rb +0 -4
- data/lib/skellington/generator.rb +5 -14
- data/lib/skellington/helpers.rb +17 -0
- data/lib/skellington/version.rb +1 -1
- data/lib/skellington.rb +1 -1
- data/lib/templates/common/Gemfile +0 -6
- data/lib/templates/common/includes/footer +1 -1
- data/lib/templates/common/includes/header +1 -15
- data/lib/templates/common/includes/libs +14 -0
- data/lib/templates/common/includes/nav +11 -24
- data/lib/templates/common/sass/colours +12 -1
- data/lib/templates/common/sass/footer +2 -17
- data/lib/templates/jekyll/_data/libs.yml +1 -6
- data/lib/templates/{common/sass/styles → jekyll/css/styles.scss} +3 -4
- data/lib/templates/jekyll/post-run +1 -1
- data/lib/templates/sinatra/Rakefile +3 -2
- data/lib/templates/sinatra/post-run +1 -1
- data/lib/templates/sinatra/public/sass/styles.scss +13 -0
- data/lib/templates/sinatra/views/includes/js-libs.erb +7 -6
- data/skellington.gemspec +8 -9
- data/spec/hyphens_spec.rb +1 -1
- data/spec/jekyll/404_spec.rb +17 -15
- data/spec/jekyll/assets/static_spec.rb +9 -7
- data/spec/jekyll/bootstrap/css_spec.rb +111 -115
- data/spec/jekyll/cli_spec.rb +19 -8
- data/spec/jekyll/data/libs_spec.rb +31 -24
- data/spec/jekyll/git_spec.rb +15 -13
- data/spec/jekyll/index_md_spec.rb +15 -13
- data/spec/jekyll/js/javascript_spec.rb +9 -7
- data/spec/jekyll/layout/layout_spec.rb +108 -108
- data/spec/jekyll/root_files/code-of-conduct_spec.rb +17 -15
- data/spec/jekyll/root_files/config_yml_spec.rb +20 -18
- data/spec/jekyll/root_files/gemfile_spec.rb +16 -14
- data/spec/jekyll/root_files/license_spec.rb +61 -59
- data/spec/jekyll/root_files/rbenv_spec.rb +13 -11
- data/spec/jekyll/root_files/readme_spec.rb +13 -11
- data/spec/sinatra/app/app_spec.rb +46 -44
- data/spec/sinatra/app/config_yml_spec.rb +13 -11
- data/spec/sinatra/app/helpers_spec.rb +16 -14
- data/spec/sinatra/app/public_spec.rb +9 -7
- data/spec/sinatra/app/racks_spec.rb +33 -31
- data/spec/sinatra/bootstrap/css_spec.rb +133 -124
- data/spec/sinatra/cli_spec.rb +18 -16
- data/spec/sinatra/git_spec.rb +14 -12
- data/spec/sinatra/javascript/javascript_spec.rb +42 -40
- data/spec/sinatra/layout/includes_spec.rb +76 -58
- data/spec/sinatra/layout/layout_spec.rb +93 -104
- data/spec/sinatra/layout/views_spec.rb +22 -20
- data/spec/sinatra/root_files/code-of-conduct_spec.rb +16 -14
- data/spec/sinatra/root_files/config_ru_spec.rb +13 -11
- data/spec/sinatra/root_files/gemfile_spec.rb +30 -28
- data/spec/sinatra/root_files/guardfile_spec.rb +26 -24
- data/spec/sinatra/root_files/license_spec.rb +60 -58
- data/spec/sinatra/root_files/procfile_spec.rb +12 -10
- data/spec/sinatra/root_files/rakefile_spec.rb +30 -27
- data/spec/sinatra/root_files/rbenv_spec.rb +12 -10
- data/spec/sinatra/root_files/readme_spec.rb +12 -10
- data/spec/sinatra/spec/spec_spec.rb +71 -69
- data/spec/skellington_spec.rb +31 -2
- metadata +25 -47
- data/lib/templates/sinatra/config.rb +0 -4
- data/spec/jekyll/bootstrap_4/bootstrap_4_spec.rb +0 -54
- data/spec/sinatra/bootstrap_4/config_rb_bootstrap_4_spec.rb +0 -20
- data/spec/sinatra/bootstrap_4/gemfile_bootstrap_4_spec.rb +0 -39
- data/spec/sinatra/bootstrap_4/public_bootstrap_4_spec.rb +0 -35
- data/spec/sinatra/root_files/config_rb_spec.rb +0 -19
@@ -1,51 +1,53 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
it 'generates javascript files' do
|
9
|
+
expect{ subject.generate 'dummy-app'}.to produce_file 'dummy_app/spec/javascripts/support/jasmine_helper.rb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
11
|
+
expect('dummy_app/spec/javascripts/support/jasmine.yml').to have_content (
|
12
|
+
"""
|
13
|
+
src_files:
|
14
|
+
- public/js/**/*.js
|
15
|
+
stylesheets:
|
16
|
+
- stylesheets/**/*.css
|
17
|
+
helpers:
|
18
|
+
- helpers/**/*.js
|
19
|
+
spec_files:
|
20
|
+
- '**/*[sS]pec.js'
|
21
|
+
src_dir:
|
22
|
+
spec_dir:
|
23
|
+
spec_helper: spec/javascripts/support/jasmine_helper.rb
|
24
|
+
boot_dir:
|
25
|
+
boot_files:
|
26
|
+
server: 'puma'
|
27
|
+
random: true
|
28
|
+
"""
|
29
|
+
)
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
expect('dummy_app/spec/javascripts/support/jasmine_helper.rb').to have_content (
|
32
|
+
"""
|
33
|
+
Jasmine.configure do |config|
|
34
|
+
config.prevent_phantom_js_auto_install = true
|
35
|
+
end
|
36
|
+
"""
|
37
|
+
)
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
expect('dummy_app/spec/javascripts/dummy_app_spec.js').to have_content (
|
40
|
+
"""
|
41
|
+
describe('DummyApp', function() {
|
42
|
+
it('knows the truth', function() {
|
43
|
+
expect(true).toEqual(true)
|
44
|
+
})
|
43
45
|
})
|
44
|
-
|
45
|
-
|
46
|
-
)
|
46
|
+
"""
|
47
|
+
)
|
47
48
|
|
48
|
-
|
49
|
+
expect(File).to exist 'dummy_app/public/js/dummy_app.js'
|
50
|
+
end
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
@@ -1,71 +1,89 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
it 'includes some third-party javascript libs' do
|
9
|
+
subject.generate 'dummy-app'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
expect('dummy_app/views/includes/js-libs.erb').to have_content (
|
12
|
+
"""
|
13
|
+
<%
|
14
|
+
libs = {
|
15
|
+
jquery: {
|
16
|
+
url: '//code.jquery.com/jquery-3.2.1.slim.min.js',
|
17
|
+
hash: 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN'
|
18
|
+
},
|
19
|
+
popper: {
|
20
|
+
url: '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',
|
21
|
+
hash: 'sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q'
|
22
|
+
},
|
23
|
+
bootstrap: {
|
24
|
+
url: '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',
|
25
|
+
hash: 'sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl'
|
26
|
+
},
|
27
|
+
fontawesome: {
|
28
|
+
url: '//use.fontawesome.com/releases/v5.0.4/js/all.js',
|
29
|
+
hash: ''
|
30
|
+
}
|
31
|
+
}
|
23
32
|
|
24
|
-
|
25
|
-
|
33
|
+
libs.each do |lib| %>
|
34
|
+
<!-- <%= lib[0] %> -->
|
35
|
+
<script src='<%= lib[1][:url] %>' integrity='<%= lib[1][:hash] %>' crossorigin='anonymous'></script>
|
36
|
+
<% end %>
|
37
|
+
"""
|
38
|
+
)
|
39
|
+
end
|
26
40
|
|
27
|
-
|
28
|
-
|
29
|
-
<%
|
30
|
-
libs = {
|
31
|
-
}.each_pair do |name, url| %>
|
32
|
-
<!-- <%= name %> -->
|
33
|
-
<link rel='stylesheet' href='<%= url %>'>
|
34
|
-
<% end %>
|
35
|
-
"""
|
36
|
-
)
|
37
|
-
end
|
41
|
+
it 'includes some third-party css' do
|
42
|
+
subject.generate 'dummy-app'
|
38
43
|
|
39
|
-
|
40
|
-
|
44
|
+
expect('dummy_app/views/includes/css-libs.erb').to have_content (
|
45
|
+
"""
|
46
|
+
<%
|
47
|
+
libs = {
|
48
|
+
}.each_pair do |name, url| %>
|
49
|
+
<!-- <%= name %> -->
|
50
|
+
<link rel='stylesheet' href='<%= url %>'>
|
51
|
+
<% end %>
|
52
|
+
"""
|
53
|
+
)
|
54
|
+
end
|
41
55
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
56
|
+
it 'includes some fonts' do
|
57
|
+
subject.generate 'dummy-app'
|
58
|
+
|
59
|
+
expect('dummy_app/views/includes/fonts-libs.erb').to have_content (
|
60
|
+
"""
|
61
|
+
<%
|
62
|
+
libs = {
|
63
|
+
fontawesome: '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css',
|
64
|
+
ubuntu: '//fonts.googleapis.com/css?family=Ubuntu+Mono'
|
65
|
+
}.each_pair do |name, url| %>
|
66
|
+
<!-- <%= name %> -->
|
67
|
+
<link rel='stylesheet' href='<%= url %>'>
|
68
|
+
<% end %>
|
69
|
+
"""
|
70
|
+
)
|
71
|
+
end
|
55
72
|
|
56
|
-
|
57
|
-
|
73
|
+
it 'handles some cruft required by IE' do
|
74
|
+
subject.generate 'dummy-app'
|
58
75
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
76
|
+
expect('dummy_app/views/includes/ie-cruft.erb').to have_content (
|
77
|
+
"""
|
78
|
+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
79
|
+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
80
|
+
<!--[if lt IE 9]>
|
81
|
+
<script src='//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'></script>
|
82
|
+
<script src='//oss.maxcdn.com/respond/1.4.2/respond.min.js'></script>
|
83
|
+
<![endif]-->
|
84
|
+
"""
|
85
|
+
)
|
86
|
+
end
|
69
87
|
end
|
70
88
|
end
|
71
89
|
end
|
@@ -1,121 +1,110 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
context 'layout' do
|
9
|
+
it 'creates a header' do
|
10
|
+
subject.generate 'dummy-app'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
expect('dummy_app/views/includes/header.erb').to have_content (
|
13
|
+
"""
|
14
|
+
<head>
|
15
|
+
<meta charset='utf-8' />
|
16
|
+
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
|
17
|
+
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
<%= erb :'includes/ie-cruft' %>
|
20
|
+
<%= erb :'includes/js-libs' %>
|
21
|
+
<%= erb :'includes/css-libs' %>
|
22
|
+
<%= erb :'includes/fonts-libs' %>
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
<link rel='icon' type='image/png' href='/assets/favicon.ico' />
|
25
|
+
<link rel='stylesheet' href='/css/styles.css' />
|
26
|
+
<script src='/js/dummy_app.js'></script>
|
27
|
+
<title>
|
28
|
+
<%= @title %>
|
29
|
+
</title>
|
30
|
+
</head>
|
31
|
+
"""
|
32
|
+
)
|
33
|
+
end
|
33
34
|
|
34
|
-
|
35
|
-
|
35
|
+
it 'creates a footer' do
|
36
|
+
subject.generate 'dummy-app'
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
38
|
+
expect('dummy_app/views/includes/footer.erb').to have_content (
|
39
|
+
"""
|
40
|
+
<div class='footer p-2'>
|
41
|
+
Generated with
|
42
|
+
<a href='http://sam.pikesley.org/projects/skellington/' alt='Skellington' title='Skellington'>
|
43
|
+
Skellington
|
44
|
+
</a>
|
45
|
+
</div>
|
46
|
+
"""
|
47
|
+
)
|
48
|
+
end
|
48
49
|
|
49
|
-
|
50
|
-
|
50
|
+
it 'creates a github corner' do
|
51
|
+
subject.generate 'dummy-app'
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
53
|
+
expect('dummy_app/views/includes/github-corner.erb').to have_content (
|
54
|
+
"""
|
55
|
+
<?xml version='1.0' standalone='no'?>
|
56
|
+
<?xml-stylesheet type='text/css' href='styles.css'?>
|
57
|
+
<a href='<%= @github_url %>' class='github-corner' aria-label='Fork me on Github'>
|
58
|
+
<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 250 250'>
|
59
|
+
<path class='octo-background' d='M0 0l115 115h15l12 27 108 108V0z' fill='#fff'/>
|
60
|
+
<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'/>
|
61
|
+
<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'/>
|
62
|
+
</svg>
|
63
|
+
</a>
|
64
|
+
"""
|
65
|
+
)
|
66
|
+
end
|
66
67
|
|
67
|
-
|
68
|
-
|
68
|
+
it 'creates a nav' do
|
69
|
+
subject.generate 'dummy-app'
|
69
70
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<a class='navbar-brand' href='/'>Home</a>
|
87
|
-
</div>
|
88
|
-
<div id='navbar' class='navbar-collapse collapse'>
|
89
|
-
<ul class='nav navbar-nav'>
|
90
|
-
<li><a href='/foo/'>Foo</a></li>
|
91
|
-
<li><a href='/bar/'>Bar</a></li>
|
92
|
-
</ul>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
</nav>
|
96
|
-
"""
|
97
|
-
)
|
98
|
-
end
|
71
|
+
expect('dummy_app/views/includes/nav.erb').to have_content (
|
72
|
+
"""
|
73
|
+
<ul class='nav nav-pills nav-fill p-3'>
|
74
|
+
<li class='nav-item'>
|
75
|
+
<a class='nav-link active' href='/'>Home</a>
|
76
|
+
</li>
|
77
|
+
<li class='nav-item'>
|
78
|
+
<a class='nav-link' href='/foo/'>Foo</a>
|
79
|
+
</li>
|
80
|
+
<li class='nav-item'>
|
81
|
+
<a class='nav-link' href='/bar/'>Bar</a>
|
82
|
+
</li>
|
83
|
+
</ul>
|
84
|
+
"""
|
85
|
+
)
|
86
|
+
end
|
99
87
|
|
100
|
-
|
101
|
-
|
88
|
+
it 'creates a layout' do
|
89
|
+
subject.generate 'dummy-app'
|
102
90
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
91
|
+
expect('dummy_app/views/layout.erb').to have_content (
|
92
|
+
"""
|
93
|
+
<!DOCTYPE html>
|
94
|
+
<html lang='en'>
|
95
|
+
<%= erb :'includes/header' %>
|
96
|
+
<body>
|
97
|
+
<%= erb :'includes/github-corner' if @github_url %>
|
98
|
+
<%= erb :'includes/nav' %>
|
99
|
+
<div class='container'>
|
100
|
+
<%= yield %>
|
101
|
+
</div>
|
102
|
+
<%= erb :'includes/footer' %>
|
103
|
+
</body>
|
104
|
+
</html>
|
105
|
+
"""
|
106
|
+
)
|
107
|
+
end
|
119
108
|
end
|
120
109
|
end
|
121
110
|
end
|
@@ -1,31 +1,33 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
it 'generates a view' do
|
9
|
+
subject.generate 'dummy-app'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
expect('dummy_app/views/index.erb').to have_content (
|
12
|
+
"""
|
13
|
+
<%= @content %>
|
14
|
+
"""
|
15
|
+
)
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
it 'has a 404 page' do
|
19
|
+
subject.generate 'dummy-app'
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
expect('dummy_app/views/oops.erb').to have_content (
|
22
|
+
"""
|
23
|
+
<h1>404</h1>
|
23
24
|
|
24
|
-
|
25
|
+
<h2>Nothing to see here</h2>
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
<a href='/'>Home</a>
|
28
|
+
"""
|
29
|
+
)
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
@@ -1,21 +1,23 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
it 'generates a Code of Conduct' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/CODE_OF_CONDUCT.md').to have_content (
|
11
|
+
"""
|
12
|
+
# Contributor Code of Conduct
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
As contributors and maintainers of this project, and in the interest of
|
15
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
16
|
+
contribute through reporting issues, posting feature requests, updating
|
17
|
+
documentation, submitting pull requests or patches, and other activities.
|
18
|
+
"""
|
19
|
+
)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
@@ -1,18 +1,20 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
it 'generates a config.ru file' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/config.ru').to have_content (
|
11
|
+
"""
|
12
|
+
require File.join(File.dirname(__FILE__), 'lib/dummy_app.rb')
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
run DummyApp::App
|
15
|
+
"""
|
16
|
+
)
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|