skellington 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6aad5990c93118d8b43591b5ebc788a0e747f71e
4
- data.tar.gz: ec85c14f2c888ddf9e2d7fc78adcb7eeb4532e3b
3
+ metadata.gz: ee4712adedc8736bfba376a1f80aab969353ff82
4
+ data.tar.gz: 41e735dab5131a6956db02202ea40383187e7eb2
5
5
  SHA512:
6
- metadata.gz: 00b595a0fc9a5af1e5366cb5da30909ad2a3750c608cafdc005caa16ec493df87b9b4fc3d3e6c78153ba090730b98619d109bf1169462d0fa2c2614173032630
7
- data.tar.gz: 0ebb4702c17878374a9fcb6bf9ca18d856621f19c9f735b751c413bd4286fe9a6c4af9353dc2dea466f57743bc0cbcadbc580cef7f0061abfa2858d2b8f2f270
6
+ metadata.gz: c7d4d13d72332f7caa734a7a71e3e08412645fc91a835d943214143c6721d9e39c437a3cc805984399cc795f614f5c2773bc240a50e2d7cb65c455de5e5bd56a
7
+ data.tar.gz: 9b5a52d59127303d8f2bf9404fc585dda13097fb377131eda31174733121ba14331cdfa62f7677a7138d8941a4021861a9780f40bc478975075ecf054642c53e
data/config/config.yaml CHANGED
@@ -51,6 +51,8 @@ sinatra:
51
51
  common: views/layout
52
52
  views/index.erb:
53
53
  views/oops.erb:
54
+ views/includes/nav.erb:
55
+ common: includes/nav
54
56
  views/includes/header.erb:
55
57
  common: includes/header
56
58
  views/includes/footer.erb:
@@ -84,6 +86,8 @@ sinatra:
84
86
  common: sass/github-corner
85
87
  public/sass/_variables.scss:
86
88
  common: sass/variables
89
+ public/sass/_nav.scss:
90
+ common: sass/nav
87
91
  public/sass/palettes/_default.scss:
88
92
  common: sass/palettes/default
89
93
  public/sass/_colours.scss:
@@ -107,6 +111,8 @@ jekyll:
107
111
  common: views/layout
108
112
  _includes/header.html:
109
113
  common: includes/header
114
+ _includes/nav.html:
115
+ common: includes/nav
110
116
  _includes/footer.html:
111
117
  common: includes/footer
112
118
  _includes/ie-cruft.html:
@@ -117,6 +123,8 @@ jekyll:
117
123
  common: sass/variables
118
124
  _sass/colours.scss:
119
125
  common: sass/colours
126
+ _sass/nav.scss:
127
+ common: sass/nav
120
128
  _sass/palettes/default.scss:
121
129
  common: sass/palettes/default
122
130
  _sass/fonts.scss:
@@ -0,0 +1,24 @@
1
+ <nav class='navbar navbar-default navbar-static-top'>
2
+ <div class='container-fluid'>
3
+ <div class='navbar-header'>
4
+ <button type='button'
5
+ class='navbar-toggle collapsed'
6
+ data-toggle='collapse'
7
+ data-target='#navbar'
8
+ aria-expanded='false'
9
+ aria-controls='navbar'>
10
+ <span class='sr-only'>Toggle navigation</span>
11
+ <span class='icon-bar'></span>
12
+ <span class='icon-bar'></span>
13
+ <span class='icon-bar'></span>
14
+ </button>
15
+ <a class='navbar-brand' href='/'>Home</a>
16
+ </div>
17
+ <div id='navbar' class='navbar-collapse collapse'>
18
+ <ul class='nav navbar-nav'>
19
+ <li><a href='/foo'>Foo</a></li>
20
+ <li><a href='/bar'>Bar</a></li>
21
+ </ul>
22
+ </div>
23
+ </div>
24
+ </nav>
@@ -0,0 +1,9 @@
1
+ .navbar-default {
2
+ .navbar-nav {
3
+ li {
4
+ a {
5
+ color: $brand-primary;
6
+ }
7
+ }
8
+ }
9
+ }
@@ -5,6 +5,7 @@
5
5
  @import 'fonts';
6
6
  @import 'colours';
7
7
  @import 'footer';
8
+ @import 'nav';
8
9
  //@import 'github-corner';
9
10
 
10
11
  h1 {
@@ -10,6 +10,12 @@
10
10
  <% if @gen.framework == 'sinatra' %>
11
11
  <%%= erb :'includes/github-corner' if @github_url %>
12
12
  <% end %>
13
+ <% case @gen.framework %>
14
+ <% when 'sinatra' %>
15
+ <%%= erb :'includes/nav' %>
16
+ <% when 'jekyll' %>
17
+ {% include nav.html %}
18
+ <% end %>
13
19
  <div class='container'>
14
20
  <% case @gen.framework %>
15
21
  <% when 'sinatra' %>
@@ -13,7 +13,7 @@ module Skellington
13
13
  enum: ['sinatra', 'jekyll']
14
14
  method_option :bootstrap,
15
15
  default: '3',
16
- description: 'Bootstrap major version to use',
16
+ description: 'Bootstrap major version to use *VERY EXPERIMENTAL*',
17
17
  enum: ['3', '4']
18
18
  method_option :licensor,
19
19
  aliases: '-l',
@@ -1,3 +1,3 @@
1
1
  module Skellington
2
- VERSION = '0.8.4'
2
+ VERSION = '0.8.5'
3
3
  end
@@ -75,6 +75,20 @@ module Skellington
75
75
  }
76
76
  """
77
77
  )
78
+
79
+ expect('dummy_app/_sass/nav.scss').to have_content (
80
+ """
81
+ .navbar-default {
82
+ .navbar-nav {
83
+ li {
84
+ a {
85
+ color: $brand-primary;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ """
91
+ )
78
92
  end
79
93
 
80
94
  it 'sets up sass' do
@@ -90,6 +104,7 @@ module Skellington
90
104
  @import 'fonts';
91
105
  @import 'colours';
92
106
  @import 'footer';
107
+ @import 'nav';
93
108
  //@import 'github-corner';
94
109
 
95
110
  h1 {
@@ -64,6 +64,40 @@ module Skellington
64
64
  )
65
65
  end
66
66
 
67
+ it 'creates a nav' do
68
+ subject.options = { 'framework' => 'jekyll' }
69
+ subject.generate 'dummy-app'
70
+
71
+ expect('dummy_app/_includes/nav.html').to have_content (
72
+ """
73
+ <nav class='navbar navbar-default navbar-static-top'>
74
+ <div class='container-fluid'>
75
+ <div class='navbar-header'>
76
+ <button type='button'
77
+ class='navbar-toggle collapsed'
78
+ data-toggle='collapse'
79
+ data-target='#navbar'
80
+ aria-expanded='false'
81
+ aria-controls='navbar'>
82
+ <span class='sr-only'>Toggle navigation</span>
83
+ <span class='icon-bar'></span>
84
+ <span class='icon-bar'></span>
85
+ <span class='icon-bar'></span>
86
+ </button>
87
+ <a class='navbar-brand' href='/'>Home</a>
88
+ </div>
89
+ <div id='navbar' class='navbar-collapse collapse'>
90
+ <ul class='nav navbar-nav'>
91
+ <li><a href='/foo'>Foo</a></li>
92
+ <li><a href='/bar'>Bar</a></li>
93
+ </ul>
94
+ </div>
95
+ </div>
96
+ </nav>
97
+ """
98
+ )
99
+ end
100
+
67
101
  it 'creates a layout' do
68
102
  subject.options = { 'framework' => 'jekyll' }
69
103
  subject.generate 'dummy-app'
@@ -74,6 +108,7 @@ module Skellington
74
108
  <html lang='en'>
75
109
  {% include header.html %}
76
110
  <body>
111
+ {% include nav.html %}
77
112
  <div class='container'>
78
113
  {{ content }}
79
114
  </div>
@@ -27,6 +27,20 @@ module Skellington
27
27
  $font-primary: 'Ubuntu Mono';
28
28
  """
29
29
  )
30
+
31
+ expect('dummy_app/public/sass/_nav.scss').to have_content (
32
+ """
33
+ .navbar-default {
34
+ .navbar-nav {
35
+ li {
36
+ a {
37
+ color: $brand-primary;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ """
43
+ )
30
44
  end
31
45
 
32
46
  it 'sets up sass' do
@@ -39,6 +53,7 @@ module Skellington
39
53
  @import 'fonts';
40
54
  @import 'colours';
41
55
  @import 'footer';
56
+ @import 'nav';
42
57
  //@import 'github-corner';
43
58
 
44
59
  h1 {
@@ -68,6 +68,39 @@ module Skellington
68
68
  )
69
69
  end
70
70
 
71
+ it 'creates a nav' do
72
+ subject.generate 'dummy-app'
73
+
74
+ expect('dummy_app/views/includes/nav.erb').to have_content (
75
+ """
76
+ <nav class='navbar navbar-default navbar-static-top'>
77
+ <div class='container-fluid'>
78
+ <div class='navbar-header'>
79
+ <button type='button'
80
+ class='navbar-toggle collapsed'
81
+ data-toggle='collapse'
82
+ data-target='#navbar'
83
+ aria-expanded='false'
84
+ aria-controls='navbar'>
85
+ <span class='sr-only'>Toggle navigation</span>
86
+ <span class='icon-bar'></span>
87
+ <span class='icon-bar'></span>
88
+ <span class='icon-bar'></span>
89
+ </button>
90
+ <a class='navbar-brand' href='/'>Home</a>
91
+ </div>
92
+ <div id='navbar' class='navbar-collapse collapse'>
93
+ <ul class='nav navbar-nav'>
94
+ <li><a href='/foo'>Foo</a></li>
95
+ <li><a href='/bar'>Bar</a></li>
96
+ </ul>
97
+ </div>
98
+ </div>
99
+ </nav>
100
+ """
101
+ )
102
+ end
103
+
71
104
  it 'creates a layout' do
72
105
  subject.generate 'dummy-app'
73
106
 
@@ -78,6 +111,7 @@ module Skellington
78
111
  <%= erb :'includes/header' %>
79
112
  <body>
80
113
  <%= erb :'includes/github-corner' if @github_url %>
114
+ <%= erb :'includes/nav' %>
81
115
  <div class='container'>
82
116
  <%= yield %>
83
117
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skellington
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
@@ -203,10 +203,12 @@ files:
203
203
  - lib/common/templates/includes/footer
204
204
  - lib/common/templates/includes/header
205
205
  - lib/common/templates/includes/ie-cruft
206
+ - lib/common/templates/includes/nav
206
207
  - lib/common/templates/sass/colours
207
208
  - lib/common/templates/sass/fonts
208
209
  - lib/common/templates/sass/footer
209
210
  - lib/common/templates/sass/github-corner
211
+ - lib/common/templates/sass/nav
210
212
  - lib/common/templates/sass/palettes/default
211
213
  - lib/common/templates/sass/styles
212
214
  - lib/common/templates/sass/variables