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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 50b127a00258af2f899764047c927e6f81f878e8
4
- data.tar.gz: 827930856592777a9edc3329bc577dd17251b3e8
2
+ SHA256:
3
+ metadata.gz: b93cba8c6741eb8256132fda075be09b20636f7ff8c7e30c70a9d1e139e2e981
4
+ data.tar.gz: f43be91e030d031caadb5b3543e5a937580e87a8381799cf006ca5a981eb0c7e
5
5
  SHA512:
6
- metadata.gz: 75597f17117a80f7519b2ff167aff6fa34aa793c53e97fb67bfa54c40bf7833a9b2e70efc974d266e2589268adb703c60a7f835603d44270f2896b76f33d8811
7
- data.tar.gz: e55fd9cebdad14a5c8e98d74b1ecbd17f9212e464cac506d330535d96f035d254c96031e95e09ee8ca2b243eee6c8a32e826edfad0c9f2f710f5ff24d90e89ef
6
+ metadata.gz: 3be4edae0dcfadab80e5fffcc018d93697b3e9df23776cbfcff2bf9f7023ac59773c154ce2af4f0013a02f6affc8ea198a022c9d00d7588420bd59bc3c5ed228
7
+ data.tar.gz: 390e53231a4722844e2c2e4aa2ac71d253cd8f44244458c12881bd55bc026303b764ff9b4309aa0eb74d6e904cc049c6723b82d5f85c8a4b5ab7d899fb1521c0
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.0
data/README.md CHANGED
@@ -13,14 +13,14 @@ Extremely opinionated generator for your [Sinatra](http://www.sinatrarb.com/) a
13
13
  * Sinatra
14
14
  * [Rspec](http://rspec.info/)
15
15
  * [Jasmine](http://jasmine.github.io/2.0/introduction.html)
16
- * [Bootstrap](http://getbootstrap.com/)
17
- * [Compass](http://compass-style.org/)
16
+ * [Bootstrap 4](http://getbootstrap.com/)
17
+ * [Sass](https://sass-lang.com/)
18
18
  * An MIT License file
19
19
  * A Code-of-Conduct file
20
20
 
21
21
  * Jekyll
22
22
  * [Jekyll](https://jekyllrb.com/)
23
- * [Bootstrap](http://getbootstrap.com/)
23
+ * [Bootstrap 4](http://getbootstrap.com/)
24
24
  * Reasonable default things
25
25
  * An MIT License file
26
26
  * A Code-of-Conduct file
@@ -104,12 +104,6 @@ or just
104
104
  * Default: sinatra
105
105
  * Possible values: sinatra, jekyll
106
106
 
107
- * --bootstrap
108
- * Bootstrap major version to include
109
- * Default: 3
110
- * Possible values: 3, 4
111
- * VERY EXPERIMENTAL
112
-
113
107
  * --licensor
114
108
  * Name to include in the license file
115
109
 
data/Rakefile CHANGED
@@ -3,36 +3,6 @@ require 'rspec/core/rake_task'
3
3
  require 'coveralls/rake/task'
4
4
 
5
5
  Coveralls::RakeTask.new
6
+ RSpec::Core::RakeTask.new
6
7
 
7
- namespace :specs do
8
- desc 'run the trustworthy specs'
9
- task :safe do
10
- RSpec::Core::RakeTask.new(:spec) do |t|
11
- t.rspec_opts = "--tag ~troublesome"
12
- end
13
- Rake::Task['spec'].execute
14
- end
15
-
16
- desc 'run the shonky specs'
17
- task :shaky do
18
- RSpec::Core::RakeTask.new(:spec) do |t|
19
- t.rspec_opts = "--tag troublesome"
20
- end
21
- Rake::Task['spec'].execute
22
- end
23
-
24
- desc 'run all the specs'
25
- task :all do
26
- RSpec::Core::RakeTask.new(:spec) do |t|
27
- t.rspec_opts = "--tag troublesome"
28
- end
29
-
30
- RSpec::Core::RakeTask.new(:spec) do |t|
31
- t.rspec_opts = "--tag ~troublesome"
32
- end
33
-
34
- Rake::Task['spec'].execute
35
- end
36
- end
37
-
38
- task :default => ['specs:all', 'coveralls:push']
8
+ task :default => [:spec, 'coveralls:push']
data/config/config.yaml CHANGED
@@ -15,7 +15,7 @@ sinatra:
15
15
  rack-tracker:
16
16
  rake:
17
17
  compass:
18
- bootstrap-sass:
18
+ bootstrap:
19
19
  erubis:
20
20
  puma:
21
21
  test:
@@ -41,7 +41,6 @@ sinatra:
41
41
  Procfile:
42
42
  .rspec:
43
43
  config.ru:
44
- config.rb:
45
44
  config/config.yml:
46
45
  # the template has this name
47
46
  lib/app.rb:
@@ -98,12 +97,10 @@ sinatra:
98
97
  public/sass/_colours.scss:
99
98
  common: sass/colours
100
99
  public/sass/styles.scss:
101
- common: sass/styles
102
100
 
103
101
  jekyll:
104
102
  gems:
105
103
  github-pages:
106
- # bootstrap: '4.0.0.alpha4'
107
104
  rake:
108
105
 
109
106
  files:
@@ -118,16 +115,15 @@ jekyll:
118
115
  common: includes/nav
119
116
  _includes/footer.html:
120
117
  common: includes/footer
118
+ _includes/libs.html:
119
+ common: includes/libs
121
120
  _includes/ie-cruft.html:
122
121
  common: includes/ie-cruft
123
122
  css/styles.scss:
124
- common: sass/styles
125
123
  _sass/variables.scss:
126
124
  common: sass/variables
127
125
  _sass/colours.scss:
128
126
  common: sass/colours
129
- _sass/nav.scss:
130
- common: sass/nav
131
127
  _sass/palettes/default.scss:
132
128
  common: sass/palettes/default
133
129
  _sass/fonts.scss:
@@ -139,3 +135,21 @@ jekyll:
139
135
  js/app.js:
140
136
  outpath: app/wormname
141
137
  common: js/app.js
138
+
139
+ bootstrap:
140
+ js:
141
+ - name: jquery
142
+ url: //code.jquery.com/jquery-VERSION.slim.min.js
143
+ version: 3.2.1
144
+ hash: sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN
145
+ - name: popper
146
+ url: //cdnjs.cloudflare.com/ajax/libs/popper.js/VERSION/umd/popper.min.js
147
+ version: 1.12.9
148
+ hash: sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q
149
+ - name: bootstrap
150
+ url: //maxcdn.bootstrapcdn.com/bootstrap/VERSION/js/bootstrap.min.js
151
+ version: 4.0.0
152
+ hash: sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl
153
+ - name: fontawesome
154
+ url: //use.fontawesome.com/releases/vVERSION/js/all.js
155
+ version: 5.0.4
@@ -11,10 +11,6 @@ module Skellington
11
11
  default: 'sinatra',
12
12
  description: 'Framework to generate for',
13
13
  enum: ['sinatra', 'jekyll']
14
- method_option :bootstrap,
15
- default: '3',
16
- description: 'Bootstrap major version to use *VERY EXPERIMENTAL*',
17
- enum: ['3', '4']
18
14
  method_option :licensor,
19
15
  aliases: '-l',
20
16
  description: 'Name to insert into the license file'
@@ -6,13 +6,11 @@ module Skellington
6
6
  :camelname,
7
7
  :files,
8
8
  :gems,
9
- :framework,
10
- :bootstrap
9
+ :framework
11
10
  attr_accessor :licensor
12
11
 
13
12
  def initialize path, options = {}
14
13
  @framework = options.fetch('framework', 'sinatra')
15
- @bootstrap = options.fetch('bootstrap', 3).to_s
16
14
  @full_path = path
17
15
  @path = File.dirname @full_path
18
16
  @filename = File.basename(@full_path)
@@ -46,18 +44,11 @@ module Skellington
46
44
  end
47
45
 
48
46
  def strap_boots
49
- if @framework == 'jekyll'
50
- if @bootstrap == '4'
51
- Object.send(:remove_const, :Bootstrap)
52
- require 'bootstrap'
53
- end
47
+ root = "#{self.path}/#{self.wormname}"
54
48
 
55
- root = "#{self.path}/#{self.wormname}"
56
-
57
- FileUtils.mkdir_p "#{root}/_sass"
58
- FileUtils.cp_r "#{Bootstrap.assets_path}/stylesheets/bootstrap", "#{root}/_sass"
59
- FileUtils.cp "#{Bootstrap.assets_path}/stylesheets/_bootstrap.scss", "#{root}/_sass/bootstrap.scss"
60
- end
49
+ FileUtils.mkdir_p "#{root}/_sass"
50
+ FileUtils.cp_r "#{Bootstrap.assets_path}/stylesheets/bootstrap", "#{root}/_sass"
51
+ FileUtils.cp "#{Bootstrap.assets_path}/stylesheets/_bootstrap.scss", "#{root}/_sass/bootstrap.scss"
61
52
  end
62
53
 
63
54
  def wormname
@@ -7,4 +7,21 @@ module Skellington
7
7
  return word[2..-1] if word[0..1] == './'
8
8
  word
9
9
  end
10
+
11
+ def self.js_for_sinatra data
12
+ s = [' %s: {' % data['name']]
13
+ s.push " url: '%s'," % (data['url'].sub 'VERSION', data['version'])
14
+ s.push " hash: '%s'" % data['hash']
15
+ s.push ' }'
16
+
17
+ s.join "\n"
18
+ end
19
+
20
+ def self.js_for_jekyll data
21
+ s = [' - name: %s' % data['name']]
22
+ s.push " url: %s" % (data['url'].sub 'VERSION', data['version'])
23
+ s.push " hash: %s" % data['hash'] if data['hash']
24
+
25
+ s.join "\n"
26
+ end
10
27
  end
@@ -1,3 +1,3 @@
1
1
  module Skellington
2
- VERSION = '0.8.9'
2
+ VERSION = '0.9.0-rc1'
3
3
  end
data/lib/skellington.rb CHANGED
@@ -3,7 +3,7 @@ require 'yaml'
3
3
  require 'fileutils'
4
4
  require 'erubis'
5
5
  require 'git'
6
- require 'bootstrap-sass'
6
+ require 'bootstrap'
7
7
 
8
8
  require 'skellington/version'
9
9
  require 'skellington/generator'
@@ -1,9 +1,3 @@
1
- <% if @gen.framework == 'sinatra' %>
2
- <% if @gen.bootstrap == '4' %>
3
- <% @gen.gems['production'].delete 'bootstrap-sass' %>
4
- <% @gen.gems['production']['bootstrap'] = '4.0.0.alpha5' %>
5
- <% end %>
6
- <% end %>
7
1
  source 'https://rubygems.org'
8
2
 
9
3
  ruby '<%= RUBY_VERSION %>'
@@ -1,4 +1,4 @@
1
- <div class='footer'>
1
+ <div class='footer p-2'>
2
2
  Generated with
3
3
  <a href='http://sam.pikesley.org/projects/skellington/' alt='Skellington' title='Skellington'>
4
4
  Skellington
@@ -12,21 +12,7 @@
12
12
  <% when 'jekyll' %>
13
13
  {% include ie-cruft.html %}
14
14
 
15
- {% for lib in site.data.libs.js %}
16
- <!-- {{ lib.name }} -->
17
- <script src='{{ lib.url }}'></script>
18
- {% endfor %}
19
-
20
- {% for lib in site.data.libs.css %}
21
- <!-- {{ lib.name }} -->
22
- <link rel='stylesheet' href='{{ lib.url }}'>
23
- {% endfor %}
24
-
25
- {% for font in site.data.libs.fonts %}
26
- <!-- {{ font.name }} -->
27
- <link rel='stylesheet' href='{{ font.url }}'>
28
- {% endfor %}
29
- <% end %>
15
+ {% include libs.html %}<% end %>
30
16
  <% prefix = '{{ site.baseurl }}' if @gen.framework == 'jekyll' %>
31
17
 
32
18
  <link rel='icon' type='image/png' href='<%= prefix %>/assets/favicon.ico' />
@@ -0,0 +1,14 @@
1
+ {% for lib in site.data.libs.js %}
2
+ <!-- {{ lib.name }} -->
3
+ <script src='{{ lib.url }}' integrity='{{ lib.hash }}' crossorigin='anonymous'></script>
4
+ {% endfor %}
5
+
6
+ {% for lib in site.data.libs.css %}
7
+ <!-- {{ lib.name }} -->
8
+ <link rel='stylesheet' href='{{ lib.url }}'>
9
+ {% endfor %}
10
+
11
+ {% for font in site.data.libs.fonts %}
12
+ <!-- {{ font.name }} -->
13
+ <link rel='stylesheet' href='{{ font.url }}'>
14
+ {% endfor %}
@@ -1,27 +1,14 @@
1
1
  <% if @gen.framework == 'jekyll' %>
2
2
  <% prefix = '{{ site.baseurl }}' %>
3
3
  <% end %>
4
- <nav class='navbar navbar-default navbar-static-top'>
5
- <div class='container-fluid'>
6
- <div class='navbar-header'>
7
- <button type='button'
8
- class='navbar-toggle collapsed'
9
- data-toggle='collapse'
10
- data-target='#navbar'
11
- aria-expanded='false'
12
- aria-controls='navbar'>
13
- <span class='sr-only'>Toggle navigation</span>
14
- <span class='icon-bar'></span>
15
- <span class='icon-bar'></span>
16
- <span class='icon-bar'></span>
17
- </button>
18
- <a class='navbar-brand' href='<%= prefix %>/'>Home</a>
19
- </div>
20
- <div id='navbar' class='navbar-collapse collapse'>
21
- <ul class='nav navbar-nav'>
22
- <li><a href='<%= prefix %>/foo/'>Foo</a></li>
23
- <li><a href='<%= prefix %>/bar/'>Bar</a></li>
24
- </ul>
25
- </div>
26
- </div>
27
- </nav>
4
+ <ul class='nav nav-pills nav-fill p-3'>
5
+ <li class='nav-item'>
6
+ <a class='nav-link active' href='<%= prefix %>/'>Home</a>
7
+ </li>
8
+ <li class='nav-item'>
9
+ <a class='nav-link' href='<%= prefix %>/foo/'>Foo</a>
10
+ </li>
11
+ <li class='nav-item'>
12
+ <a class='nav-link' href='<%= prefix %>/bar/'>Bar</a>
13
+ </li>
14
+ </ul>
@@ -1,6 +1,6 @@
1
1
  @import 'palettes/default';
2
2
 
3
- $brand-primary: $rgba-primary-0;
3
+ //$brand-primary: $rgba-primary-0;
4
4
  //$brand-complement: $rgba-complement-0;
5
5
  //$brand-secondary-1: $rgba-secondary-1-0;
6
6
  //$brand-secondary-2: $rgba-secondary-2-0;
@@ -8,3 +8,14 @@ $brand-primary: $rgba-primary-0;
8
8
  $grey: rgb(127, 127, 127);
9
9
  $light-grey: lighten($grey, 25%);
10
10
  $dark-grey: darken($grey, 25%);
11
+
12
+ $theme-colors: (
13
+ primary: $rgba-primary-0,
14
+ secondary: $rgba-secondary-1-0,
15
+ // success: $green,
16
+ // info: $cyan,
17
+ // warning: $yellow,
18
+ // danger: $red,
19
+ // light: $gray-100,
20
+ // dark: $gray-800
21
+ )
@@ -7,17 +7,6 @@ body {
7
7
  margin-bottom: $footer-height;
8
8
  }
9
9
 
10
- <% if @gen.bootstrap == '4' %>
11
- .footer {
12
- position: absolute;
13
- bottom: 0;
14
- width: 100%;
15
- height: $footer-height;
16
- line-height: $footer-height;
17
- text-align: center;
18
- background: $brand-primary;
19
- }
20
- <% else %>
21
10
  .footer {
22
11
  position: absolute;
23
12
  bottom: 0;
@@ -25,19 +14,15 @@ body {
25
14
 
26
15
  text-align: center;
27
16
 
28
- margin-top: $padding-large-vertical;
29
- background: $brand-primary;
17
+ background: map-get($theme-colors, primary);
30
18
  color: white;
31
19
  height: $footer-height;
32
20
 
33
- padding: $padding-large-vertical $padding-large-horizontal;
34
-
35
21
  ul {
36
22
  @extend .list-inline;
37
23
  }
38
-
24
+
39
25
  a {
40
26
  color: white;
41
27
  }
42
28
  }
43
- <% end %>
@@ -1,15 +1,10 @@
1
1
  js:
2
- - name: jquery
3
- url: //ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
4
- - name: bootstrap
5
- url: //maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
2
+ <%= @gen.config['bootstrap']['js'].map { |js| Skellington.js_for_jekyll js }.join "\n" %>
6
3
 
7
4
  css:
8
5
  - name: foo
9
6
  bar: //bar.com/baz.css
10
7
 
11
8
  fonts:
12
- - name: fontawesome
13
- url: //maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css
14
9
  - name: ubuntu
15
10
  url: //fonts.googleapis.com/css?family=Ubuntu+Mono
@@ -1,5 +1,5 @@
1
- <% if @gen.framework == 'jekyll' %>---
2
- ---<% end %>
1
+ ---
2
+ ---
3
3
  @import 'variables';
4
4
  @import 'colours';
5
5
  @import 'fonts';
@@ -7,10 +7,9 @@
7
7
  @import 'bootstrap';
8
8
 
9
9
  @import 'footer';
10
- @import 'nav';
11
10
  //@import 'github-corner';
12
11
 
13
12
  h1 {
14
- color: $brand-primary;
13
+ color: map-get($theme-colors, primary);
15
14
  font-family: $font-primary;
16
15
  }
@@ -7,7 +7,7 @@ Your new Jekyll site <%= @gen.camelname %> has been created
7
7
  <% end %>
8
8
  Now do
9
9
 
10
- cd <%= @gen.wormname %>
10
+ cd <%= File.join @gen.path, @gen.wormname %>
11
11
  bundle
12
12
  bundle exec jekyll serve
13
13
 
@@ -18,8 +18,9 @@ namespace :run do
18
18
  sh 'rackup -o 0.0.0.0'
19
19
  end
20
20
 
21
- desc 'clean-up and run compass'
21
+ desc 'watch and compile sass'
22
22
  task :sass do
23
- sh 'compass clean && compass watch'
23
+ sh 'sass --update --force public/sass:public/css'
24
+ sh 'sass --watch public/sass:public/css'
24
25
  end
25
26
  end
@@ -7,7 +7,7 @@ Your new Sinatra app <%= @gen.camelname %> has been created
7
7
  <% end %>
8
8
  Now do
9
9
 
10
- cd <%= @gen.wormname %>
10
+ cd <%= File.join @gen.path, @gen.wormname %>
11
11
  bundle
12
12
  bundle exec rake
13
13
 
@@ -0,0 +1,13 @@
1
+ @import 'variables';
2
+ @import 'colours';
3
+ @import 'fonts';
4
+
5
+ @import '../../_sass/bootstrap';
6
+
7
+ @import 'footer';
8
+ //@import 'github-corner';
9
+
10
+ h1 {
11
+ color: map-get($theme-colors, primary);
12
+ font-family: $font-primary;
13
+ }
@@ -1,8 +1,9 @@
1
- <%%
1
+ <%= "<%" %>
2
2
  libs = {
3
- jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js',
4
- bootstrap: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'
5
- }.each_pair do |name, url| %>
6
- <!-- <%%= name %> -->
7
- <script src='<%%= url %>'></script>
3
+ <%= @gen.config['bootstrap']['js'].map { |js| Skellington.js_for_sinatra js }.join ",\n" %>
4
+ }
5
+
6
+ libs.each do |lib| %>
7
+ <!-- <%%= lib[0] %> -->
8
+ <script src='<%%= lib[1][:url] %>' integrity='<%%= lib[1][:hash] %>' crossorigin='anonymous'></script>
8
9
  <%% end %>
data/skellington.gemspec CHANGED
@@ -20,15 +20,14 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'thor', '~> 0.19'
22
22
  spec.add_dependency 'erubis', '~> 2.7'
23
- spec.add_dependency 'git', '~> 1.2'
24
- spec.add_dependency 'bootstrap-sass'
25
- spec.add_dependency 'bootstrap', '~> 4.0.0.alpha4'
23
+ spec.add_dependency 'git', '~> 1.3'
24
+ spec.add_dependency 'bootstrap', '~> 4.0'
26
25
 
27
- spec.add_development_dependency 'coveralls', '~> 0.7'
28
- spec.add_development_dependency 'bundler', '~> 1.7'
29
- spec.add_development_dependency 'rake', '~> 10.0'
30
- spec.add_development_dependency 'rspec', '~> 3.1'
31
- spec.add_development_dependency 'guard-rspec', '~> 4.5'
26
+ spec.add_development_dependency 'coveralls', '~> 0.8'
27
+ spec.add_development_dependency 'bundler', '~> 1.14'
28
+ spec.add_development_dependency 'rake', '~> 12.3'
29
+ spec.add_development_dependency 'rspec', '~> 3.7'
30
+ spec.add_development_dependency 'guard-rspec', '~> 4.7'
32
31
  spec.add_development_dependency 'curacao', '~> 0.1'
33
- spec.add_development_dependency 'timecop', '~> 0.8'
32
+ spec.add_development_dependency 'timecop', '~> 0.9'
34
33
  end
data/spec/hyphens_spec.rb CHANGED
@@ -16,7 +16,7 @@ Your new Sinatra app HyphenatedName has been created
16
16
 
17
17
  Now do
18
18
 
19
- cd hyphenated_name
19
+ cd \.\/hyphenated_name
20
20
  bundle
21
21
  bundle exec rake
22
22
 
@@ -1,23 +1,25 @@
1
1
  module Skellington
2
2
  describe CLI do
3
- let :subject do
4
- described_class.new
5
- end
3
+ context 'jekyll' do
4
+ let :subject do
5
+ described_class.new
6
+ end
6
7
 
7
- it 'has a 404 page' do
8
- subject.options = { 'framework' => 'jekyll' }
9
- subject.generate 'dummy-app'
8
+ it 'has a 404 page' do
9
+ subject.options = { 'framework' => 'jekyll' }
10
+ subject.generate 'dummy-app'
10
11
 
11
- expect('dummy_app/404.md').to have_content (
12
- """
13
- ---
14
- title: 404
15
- permalink: /404.html
16
- ---
12
+ expect('dummy_app/404.md').to have_content (
13
+ """
14
+ ---
15
+ title: 404
16
+ permalink: /404.html
17
+ ---
17
18
 
18
- # Nothing to see here
19
- """
20
- )
19
+ # Nothing to see here
20
+ """
21
+ )
22
+ end
21
23
  end
22
24
  end
23
25
  end
@@ -1,14 +1,16 @@
1
1
  module Skellington
2
2
  describe CLI do
3
- let :subject do
4
- described_class.new
5
- end
3
+ context 'jekyll' do
4
+ let :subject do
5
+ described_class.new
6
+ end
6
7
 
7
- it 'creates a favicon' do
8
- subject.options = { 'framework' => 'jekyll' }
9
- subject.generate 'dummy-app'
8
+ it 'creates a favicon' do
9
+ subject.options = { 'framework' => 'jekyll' }
10
+ subject.generate 'dummy-app'
10
11
 
11
- expect(File).to exist 'dummy_app/assets/favicon.ico'
12
+ expect(File).to exist 'dummy_app/assets/favicon.ico'
13
+ end
12
14
  end
13
15
  end
14
16
  end