skellington 0.3.5 → 0.3.6

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: 431f88c1823aa8a4336792b45df3a1917b9ee5fb
4
- data.tar.gz: 660b612f8347415eab7c4d20010c6053555cf6e9
3
+ metadata.gz: 2eec4b248626473716b59cd7a1a4519a035a0507
4
+ data.tar.gz: 5b68a865d165a3ec4d6b3f8086b749e2f5ce8ae7
5
5
  SHA512:
6
- metadata.gz: 4c2c5687526cb04329ad4ec2094550eef2165f00a85dd384be33cf87d90e2182645136eb36c4f97cd856ec6969cff1728600f5b9895db55a9f733b2319ef6da1
7
- data.tar.gz: 42fbd99ffb5339e816e875d0dd8d055f3210d3e34d1ca6e0d8df5127f087488565e929146d0d2dcca130e6f3f9c267c32d71c72610f29a84644621ec4be31a3e
6
+ metadata.gz: b24e03550522afcb0792eee25d54d6e63ec4ed9bb82ca0eadd458f0701cee93f64c7554c34a5e4f6a6c16dcd709a244afe90719338561a12d8c8c2b9f30d7e05
7
+ data.tar.gz: 168dfdd7ce91e6b723a33b09a46f8a05cf626a8239a0a90050c9ea44db01fb6dc7d6746dcc9aa59bd0f84ee22a7f4905ac84462eed811a3d2171a043bebc416c
data/README.md CHANGED
@@ -22,6 +22,8 @@ Generate tedious [Cucumber](http://cukes.info/) and [Sinatra](http://www.sinatra
22
22
  Generating naming_things_is_hard/features/step_definitions/naming_things_is_hard_steps.rb...done
23
23
  Generating naming_things_is_hard/features/support/env.rb...done
24
24
  Generating naming_things_is_hard/lib/naming_things_is_hard.rb...done
25
+ Generating naming_things_is_hard/lib/views/default.erb...done
26
+ Generating naming_things_is_hard/lib/views/index.erb...done
25
27
 
26
28
  Your new Sinatra app NamingThingsIsHard has been created
27
29
 
data/config/config.yaml CHANGED
@@ -31,3 +31,5 @@ files:
31
31
  features/support/env.rb:
32
32
  lib/app.rb:
33
33
  outpath: app/wormname
34
+ lib/views/default.erb:
35
+ lib/views/index.erb:
data/features/app.feature CHANGED
@@ -10,7 +10,9 @@ Feature: Generate skellington
10
10
 
11
11
  class DummyApp < Sinatra::Base
12
12
  get '/' do
13
- 'Hello from DummyApp'
13
+ @content = '<h1>Hello from DummyApp</h1>'
14
+ @title = 'DummyApp'
15
+ erb :index, layout: :default
14
16
  end
15
17
 
16
18
  # start the server if ruby file executed directly
@@ -0,0 +1,48 @@
1
+ Feature: Generate skellington
2
+
3
+ Scenario: generate Bootstrap templates
4
+ When I successfully run `skellington generate dummy_app`
5
+ Then a file named "dummy_app/lib/views/default.erb" should exist
6
+ And the file "dummy_app/lib/views/default.erb" should contain:
7
+ """
8
+ <!DOCTYPE html>
9
+ <html lang='en'>
10
+ <head>
11
+ <meta charset='utf-8' />
12
+ <meta http-equiv='X-UA-Compatible' content='IE=edge' />
13
+ <meta name='viewport' content='width=device-width, initial-scale=1' />
14
+
15
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
16
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
17
+ <!--[if lt IE 9]>
18
+ <script src='https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'></script>
19
+ <script src='https://oss.maxcdn.com/respond/1.4.2/respond.min.js'></script>
20
+ <![endif]-->
21
+
22
+ <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
23
+ <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
24
+ <!-- Include all compiled plugins (below), or include individual files as needed -->
25
+ <script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script>
26
+ <link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' type='text/css' />
27
+ <link rel='icon' type='image/png' href='/assets/favicon.ico' />
28
+ <title><%= @title %></title>
29
+ </head>
30
+
31
+ <body>
32
+ <div class='container'>
33
+ <div class='row'>
34
+ <div class='col-md-2'></div>
35
+ <div class='col-md-8'>
36
+ <%= yield %>
37
+ </div>
38
+ <div class='col-md-2'></div>
39
+ </div>
40
+ </div>
41
+ </body>
42
+ </html>
43
+ """
44
+ And a file named "dummy_app/lib/views/index.erb" should exist
45
+ And the file "dummy_app/lib/views/index.erb" should contain:
46
+ """
47
+ <%= @content %>
48
+ """
@@ -10,7 +10,9 @@ Feature: Generate skellington
10
10
 
11
11
  class SomeApp < Sinatra::Base
12
12
  get '/' do
13
- 'Hello from SomeApp'
13
+ @content = '<h1>Hello from SomeApp</h1>'
14
+ @title = 'SomeApp'
15
+ erb :index, layout: :default
14
16
  end
15
17
 
16
18
  # start the server if ruby file executed directly
@@ -1,3 +1,3 @@
1
1
  module Skellington
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
@@ -2,7 +2,9 @@ require 'sinatra/base'
2
2
 
3
3
  class <%= @gen.camelname %> < Sinatra::Base
4
4
  get '/' do
5
- 'Hello from <%= @gen.camelname %>'
5
+ @content = '<h1>Hello from <%= @gen.camelname %></h1>'
6
+ @title = '<%= @gen.camelname %>'
7
+ erb :index, layout: :default
6
8
  end
7
9
 
8
10
  # start the server if ruby file executed directly
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html>
2
+ <html lang='en'>
3
+ <head>
4
+ <meta charset='utf-8' />
5
+ <meta http-equiv='X-UA-Compatible' content='IE=edge' />
6
+ <meta name='viewport' content='width=device-width, initial-scale=1' />
7
+
8
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
9
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
10
+ <!--[if lt IE 9]>
11
+ <script src='https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'></script>
12
+ <script src='https://oss.maxcdn.com/respond/1.4.2/respond.min.js'></script>
13
+ <![endif]-->
14
+
15
+ <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
16
+ <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
17
+ <!-- Include all compiled plugins (below), or include individual files as needed -->
18
+ <script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script>
19
+ <link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' type='text/css' />
20
+ <link rel='icon' type='image/png' href='/assets/favicon.ico' />
21
+ <title><%%= @title %></title>
22
+ </head>
23
+
24
+ <body>
25
+ <div class='container'>
26
+ <div class='row'>
27
+ <div class='col-md-2'></div>
28
+ <div class='col-md-8'>
29
+ <%%= yield %>
30
+ </div>
31
+ <div class='col-md-2'></div>
32
+ </div>
33
+ </div>
34
+ </body>
35
+ </html>
@@ -0,0 +1 @@
1
+ <%%= @content %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skellington
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -183,6 +183,7 @@ files:
183
183
  - bin/skellington
184
184
  - config/config.yaml
185
185
  - features/app.feature
186
+ - features/bootstrap.feature
186
187
  - features/cli.feature
187
188
  - features/config.ru.feature
188
189
  - features/cukes.feature
@@ -212,6 +213,8 @@ files:
212
213
  - lib/templates/features/step_definitions/app_steps.rb.eruby
213
214
  - lib/templates/features/support/env.rb.eruby
214
215
  - lib/templates/lib/app.rb.eruby
216
+ - lib/templates/lib/views/default.erb.eruby
217
+ - lib/templates/lib/views/index.erb.eruby
215
218
  - lib/templates/post-run.eruby
216
219
  - skellington.gemspec
217
220
  - spec/skellington_spec.rb
@@ -242,6 +245,7 @@ specification_version: 4
242
245
  summary: Opinionated boilerplate skeleton generator for a cuked Sinatra app
243
246
  test_files:
244
247
  - features/app.feature
248
+ - features/bootstrap.feature
245
249
  - features/cli.feature
246
250
  - features/config.ru.feature
247
251
  - features/cukes.feature