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