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,58 +1,60 @@
|
|
1
1
|
module Skellington
|
2
2
|
describe CLI do
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
it 'generates an app file' do
|
8
|
-
subject.generate 'dummy-app'
|
9
|
-
expect('dummy_app/lib/dummy_app.rb').to have_content (
|
10
|
-
"""
|
11
|
-
require 'sinatra/base'
|
12
|
-
require 'tilt/erubis'
|
13
|
-
require 'json'
|
14
|
-
require 'yaml'
|
15
|
-
|
16
|
-
require_relative 'dummy_app/helpers'
|
17
|
-
require_relative 'dummy_app/racks'
|
18
|
-
|
19
|
-
module DummyApp
|
20
|
-
class App < Sinatra::Base
|
21
|
-
helpers do
|
22
|
-
include DummyApp::Helpers
|
23
|
-
end
|
24
|
-
|
25
|
-
get '/' do
|
26
|
-
headers 'Vary' => 'Accept'
|
3
|
+
context 'sinatra' do
|
4
|
+
let :subject do
|
5
|
+
described_class.new
|
6
|
+
end
|
27
7
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
8
|
+
it 'generates an app file' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/lib/dummy_app.rb').to have_content (
|
11
|
+
"""
|
12
|
+
require 'sinatra/base'
|
13
|
+
require 'tilt/erubis'
|
14
|
+
require 'json'
|
15
|
+
require 'yaml'
|
16
|
+
|
17
|
+
require_relative 'dummy_app/helpers'
|
18
|
+
require_relative 'dummy_app/racks'
|
19
|
+
|
20
|
+
module DummyApp
|
21
|
+
class App < Sinatra::Base
|
22
|
+
helpers do
|
23
|
+
include DummyApp::Helpers
|
24
|
+
end
|
35
25
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
26
|
+
get '/' do
|
27
|
+
headers 'Vary' => 'Accept'
|
28
|
+
|
29
|
+
respond_to do |wants|
|
30
|
+
wants.html do
|
31
|
+
@content = '<h1>Hello from DummyApp</h1>'
|
32
|
+
@title = 'DummyApp'
|
33
|
+
@github_url = CONFIG['github_url']
|
34
|
+
erb :index
|
35
|
+
end
|
36
|
+
|
37
|
+
wants.json do
|
38
|
+
{
|
39
|
+
app: 'DummyApp'
|
40
|
+
}.to_json
|
41
|
+
end
|
40
42
|
end
|
41
43
|
end
|
42
|
-
end
|
43
44
|
|
44
|
-
|
45
|
-
|
45
|
+
# start the server if ruby file executed directly
|
46
|
+
run! if app_file == $0
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
not_found do
|
49
|
+
status 404
|
50
|
+
@title = '404'
|
51
|
+
erb :oops
|
52
|
+
end
|
51
53
|
end
|
52
54
|
end
|
55
|
+
"""
|
56
|
+
)
|
53
57
|
end
|
54
|
-
"""
|
55
|
-
)
|
56
58
|
end
|
57
59
|
end
|
58
60
|
end
|
@@ -1,17 +1,19 @@
|
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
it 'generates a config/config.yml file' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/config/config.yml').to have_content (
|
11
|
+
"""
|
12
|
+
#google-analytics-tag: UA-00000000-0
|
13
|
+
#github_url: https://github.com # also uncomment the `include` line in `styles.scss`
|
14
|
+
"""
|
15
|
+
)
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -1,24 +1,26 @@
|
|
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
|
-
|
12
|
-
|
8
|
+
it 'generates an app file' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/lib/dummy_app/helpers.rb').to have_content (
|
11
|
+
"""
|
12
|
+
module DummyApp
|
13
|
+
CONFIG = YAML.load_file('config/config.yml') || {}
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
module Helpers
|
16
|
+
def hello
|
17
|
+
'Hello'
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
21
|
+
"""
|
22
|
+
)
|
19
23
|
end
|
20
|
-
"""
|
21
|
-
)
|
22
24
|
end
|
23
25
|
end
|
24
26
|
end
|
@@ -1,14 +1,16 @@
|
|
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 placeholders for static files' do
|
9
|
+
subject.generate 'dummy-app'
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
expect(File).to exist 'dummy_app/public/js/dummy_app.js'
|
12
|
+
expect(File).to exist 'dummy_app/public/assets/favicon.ico'
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,46 +1,48 @@
|
|
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
|
-
|
12
|
-
|
8
|
+
it 'generates an app file' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect('dummy_app/lib/dummy_app/racks.rb').to have_content (
|
11
|
+
"""
|
12
|
+
require 'rack/conneg'
|
13
|
+
require 'rack/tracker'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
module DummyApp
|
16
|
+
class App < Sinatra::Base
|
17
|
+
set :public_folder, 'public'
|
18
|
+
set :views, 'views'
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
if CONFIG['google-analytics-tag']
|
21
|
+
use Rack::Tracker do
|
22
|
+
handler :google_analytics, { tracker: CONFIG['google-analytics-tag'] }
|
23
|
+
end
|
22
24
|
end
|
23
|
-
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
use Rack::Conneg do |conneg|
|
27
|
+
conneg.set :accept_all_extensions, true
|
28
|
+
conneg.set :fallback, :html
|
29
|
+
conneg.ignore_contents_of 'public'
|
30
|
+
conneg.provide [
|
31
|
+
:html,
|
32
|
+
:json
|
33
|
+
]
|
34
|
+
end
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
before do
|
37
|
+
if negotiated?
|
38
|
+
content_type negotiated_type
|
39
|
+
end
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
43
|
+
"""
|
44
|
+
)
|
41
45
|
end
|
42
|
-
"""
|
43
|
-
)
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
@@ -1,153 +1,162 @@
|
|
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
|
7
|
+
|
8
|
+
it 'installs bootstrap' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
|
11
|
+
expect(File).to exist 'dummy_app/public/sass/palettes/_default.scss'
|
12
|
+
expect('dummy_app/public/sass/_colours.scss').to have_content (
|
13
|
+
"""
|
14
|
+
@import 'palettes/default';
|
15
|
+
|
16
|
+
//$brand-primary: $rgba-primary-0;
|
17
|
+
//$brand-complement: $rgba-complement-0;
|
18
|
+
//$brand-secondary-1: $rgba-secondary-1-0;
|
19
|
+
//$brand-secondary-2: $rgba-secondary-2-0;
|
20
|
+
|
21
|
+
$grey: rgb(127, 127, 127);
|
22
|
+
$light-grey: lighten($grey, 25%);
|
23
|
+
$dark-grey: darken($grey, 25%);
|
24
|
+
|
25
|
+
$theme-colors: (
|
26
|
+
primary: $rgba-primary-0,
|
27
|
+
secondary: $rgba-secondary-1-0,
|
28
|
+
// success: $green,
|
29
|
+
// info: $cyan,
|
30
|
+
// warning: $yellow,
|
31
|
+
// danger: $red,
|
32
|
+
// light: $gray-100,
|
33
|
+
// dark: $gray-800
|
34
|
+
)
|
35
|
+
"""
|
36
|
+
)
|
37
|
+
expect('dummy_app/public/sass/_fonts.scss').to have_content (
|
38
|
+
"""
|
39
|
+
$font-primary: 'Ubuntu Mono';
|
40
|
+
"""
|
41
|
+
)
|
42
|
+
|
43
|
+
expect('dummy_app/public/sass/_footer.scss').to have_content (
|
44
|
+
"""
|
45
|
+
html {
|
46
|
+
position: relative;
|
47
|
+
min-height: 100%;
|
48
|
+
}
|
6
49
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
expect(File).to exist 'dummy_app/public/sass/palettes/_default.scss'
|
11
|
-
expect('dummy_app/public/sass/_colours.scss').to have_content (
|
12
|
-
"""
|
13
|
-
@import 'palettes/default';
|
14
|
-
|
15
|
-
$brand-primary: $rgba-primary-0;
|
16
|
-
//$brand-complement: $rgba-complement-0;
|
17
|
-
//$brand-secondary-1: $rgba-secondary-1-0;
|
18
|
-
//$brand-secondary-2: $rgba-secondary-2-0;
|
19
|
-
|
20
|
-
$grey: rgb(127, 127, 127);
|
21
|
-
$light-grey: lighten($grey, 25%);
|
22
|
-
$dark-grey: darken($grey, 25%);
|
23
|
-
"""
|
24
|
-
)
|
25
|
-
expect('dummy_app/public/sass/_fonts.scss').to have_content (
|
26
|
-
"""
|
27
|
-
$font-primary: 'Ubuntu Mono';
|
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
|
-
text-align: center;
|
48
|
-
|
49
|
-
margin-top: $padding-large-vertical;
|
50
|
-
background: $brand-primary;
|
51
|
-
color: white;
|
52
|
-
height: $footer-height;
|
53
|
-
|
54
|
-
padding: $padding-large-vertical $padding-large-horizontal;
|
55
|
-
|
56
|
-
ul {
|
57
|
-
@extend .list-inline;
|
50
|
+
body {
|
51
|
+
margin-bottom: $footer-height;
|
58
52
|
}
|
59
53
|
|
60
|
-
|
54
|
+
.footer {
|
55
|
+
position: absolute;
|
56
|
+
bottom: 0;
|
57
|
+
width: 100%;
|
58
|
+
|
59
|
+
text-align: center;
|
60
|
+
|
61
|
+
background: map-get($theme-colors, primary);
|
61
62
|
color: white;
|
63
|
+
height: $footer-height;
|
64
|
+
|
65
|
+
ul {
|
66
|
+
@extend .list-inline;
|
67
|
+
}
|
68
|
+
|
69
|
+
a {
|
70
|
+
color: white;
|
71
|
+
}
|
62
72
|
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
73
|
+
"""
|
74
|
+
)
|
75
|
+
|
76
|
+
expect('dummy_app/public/sass/_nav.scss').to have_content (
|
77
|
+
"""
|
78
|
+
.navbar-default {
|
79
|
+
.navbar-nav {
|
80
|
+
li {
|
81
|
+
a {
|
82
|
+
color: $brand-primary;
|
83
|
+
}
|
74
84
|
}
|
75
85
|
}
|
76
86
|
}
|
77
|
-
|
78
|
-
|
79
|
-
)
|
80
|
-
|
81
|
-
expect('dummy_app/public/sass/_github-corner.scss').to have_content (
|
82
|
-
"""
|
83
|
-
.octo-background {
|
84
|
-
fill: $brand-primary;
|
85
|
-
}
|
86
|
-
|
87
|
-
.octo-arm, .octo-body {
|
88
|
-
fill: white;
|
89
|
-
}
|
90
|
-
|
91
|
-
.github-corner:hover .octo-arm {
|
92
|
-
animation: octocat-wave 560ms ease-in-out
|
93
|
-
}
|
94
|
-
|
95
|
-
@keyframes octocat-wave {
|
96
|
-
0%, 100% {
|
97
|
-
transform: rotate(0)
|
98
|
-
}
|
87
|
+
"""
|
88
|
+
)
|
99
89
|
|
100
|
-
|
101
|
-
|
90
|
+
expect('dummy_app/public/sass/_github-corner.scss').to have_content (
|
91
|
+
"""
|
92
|
+
.octo-background {
|
93
|
+
fill: $brand-primary;
|
102
94
|
}
|
103
95
|
|
104
|
-
|
105
|
-
|
96
|
+
.octo-arm, .octo-body {
|
97
|
+
fill: white;
|
106
98
|
}
|
107
|
-
}
|
108
99
|
|
109
|
-
@media (max-width: 500px) {
|
110
100
|
.github-corner:hover .octo-arm {
|
111
|
-
animation:
|
101
|
+
animation: octocat-wave 560ms ease-in-out
|
112
102
|
}
|
113
103
|
|
114
|
-
|
115
|
-
|
104
|
+
@keyframes octocat-wave {
|
105
|
+
0%, 100% {
|
106
|
+
transform: rotate(0)
|
107
|
+
}
|
108
|
+
|
109
|
+
20%, 60% {
|
110
|
+
transform: rotate(-25deg)
|
111
|
+
}
|
112
|
+
|
113
|
+
40%, 80% {
|
114
|
+
transform: rotate(10deg)
|
115
|
+
}
|
116
116
|
}
|
117
|
-
}
|
118
117
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
118
|
+
@media (max-width: 500px) {
|
119
|
+
.github-corner:hover .octo-arm {
|
120
|
+
animation: none
|
121
|
+
}
|
122
|
+
|
123
|
+
.github-corner .octo-arm {
|
124
|
+
animation: octocat-wave 560ms ease-in-out
|
125
|
+
}
|
124
126
|
}
|
125
|
-
}
|
126
|
-
"""
|
127
|
-
)
|
128
|
-
end
|
129
127
|
|
130
|
-
|
131
|
-
|
128
|
+
.github-corner {
|
129
|
+
svg {
|
130
|
+
position: absolute;
|
131
|
+
top: $navbar-height;
|
132
|
+
right: 0;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
"""
|
136
|
+
)
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'sets up sass' do
|
140
|
+
subject.generate 'dummy-app'
|
132
141
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
142
|
+
expect('dummy_app/public/sass/styles.scss').to have_content (
|
143
|
+
"""
|
144
|
+
@import 'variables';
|
145
|
+
@import 'colours';
|
146
|
+
@import 'fonts';
|
138
147
|
|
139
|
-
|
148
|
+
@import '../../_sass/bootstrap';
|
140
149
|
|
141
|
-
|
142
|
-
|
143
|
-
//@import 'github-corner';
|
150
|
+
@import 'footer';
|
151
|
+
//@import 'github-corner';
|
144
152
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
153
|
+
h1 {
|
154
|
+
color: map-get($theme-colors, primary);
|
155
|
+
font-family: $font-primary;
|
156
|
+
}
|
157
|
+
"""
|
158
|
+
)
|
159
|
+
end
|
151
160
|
end
|
152
161
|
end
|
153
162
|
end
|
data/spec/sinatra/cli_spec.rb
CHANGED
@@ -1,22 +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
|
-
|
8
|
+
it 'has a version' do
|
9
|
+
expect { subject.version }.to output(/^skellington version #{VERSION}$/).to_stdout
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
it 'generates correct output' do
|
13
|
+
expect { subject.generate 'dummy-app' }.to output(/
|
13
14
|
Your new Sinatra app DummyApp has been created
|
14
15
|
|
15
16
|
\(Note that 'dummy-app' has been changed to 'dummy_app' because Ruby finds '-'s troubling\)
|
16
17
|
|
17
18
|
Now do
|
18
19
|
|
19
|
-
cd dummy_app
|
20
|
+
cd \.\/dummy_app
|
20
21
|
bundle
|
21
22
|
bundle exec rake
|
22
23
|
|
@@ -38,20 +39,21 @@ For post-install hints, try
|
|
38
39
|
|
39
40
|
skellington postinstall
|
40
41
|
/).to_stdout
|
41
|
-
|
42
|
+
end
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
44
|
+
it 'suppresses the LICENSE help when supplied with a licensor' do
|
45
|
+
subject.options = {licensor: 'Beyoncé'}
|
46
|
+
expect { subject.generate 'dummy-app' }.to_not output(/
|
46
47
|
You should also fill in your name in LICENSE.md
|
47
48
|
/).to_stdout
|
48
|
-
|
49
|
+
end
|
49
50
|
|
50
|
-
|
51
|
-
|
51
|
+
it 'gives helpful post-generate advice' do
|
52
|
+
expect { subject.postinstall }.to output(/For some other things you might find useful, see this gist:
|
52
53
|
|
53
54
|
https:\/\/gist.github.com\/pikesley\/1789cab7b10f0d8765d4
|
54
55
|
/).to_stdout
|
56
|
+
end
|
55
57
|
end
|
56
58
|
end
|
57
59
|
end
|
data/spec/sinatra/git_spec.rb
CHANGED
@@ -1,19 +1,21 @@
|
|
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
|
+
it 'initialises a git repo' do
|
9
|
+
subject.generate 'dummy-app'
|
10
|
+
expect(Dir).to exist 'dummy_app/.git'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
expect('dummy_app/.gitignore').to have_content (
|
13
|
+
"""
|
14
|
+
coverage/
|
15
|
+
.sass-cache
|
16
|
+
"""
|
17
|
+
)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|