snack 0.2.5 → 0.2.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: b3135eaeb4f95a8325c8ab394ffa68b69cf14643
4
- data.tar.gz: aaecef6430f81d88ce0a49a3b8204807ba670a82
3
+ metadata.gz: f84671459fba4d39e5438c7bde39fde4edf89952
4
+ data.tar.gz: ce5881e72e67a7b2ea4ea7aa5e20f0c2d43cfc89
5
5
  SHA512:
6
- metadata.gz: 13afa8856f46b6bb1934f02c48e2b46df9b851f0745f4948649c54bc45a36620fcf9cd5a5dcfe9a161683cff79b90b2a3f9939bf30adcc735bf7385fe3f8f780
7
- data.tar.gz: a5704620e8ec4fe8443a566e20065c69c80a8bbd2037c2c1cc6ccfb104adee235390687b65a2ecc29ce94e574d9dc6438432c6c27759b630a7d51958ac9fa58f
6
+ metadata.gz: 72047e79c532f66ac217ca8dc12026dec474e233d7386150eb4555c087f77e3df5537733d113b9e018f9c8a332ea2f80792281a2f5c4f111402edbde4520b252
7
+ data.tar.gz: 026646d49d712513413d6fcac0ddde8e355cd522cf89d33152227ff4354bf91fe7c602ff1f39f3eeee9b75a6e0256552120235fc757cfec11f61616811edf697
data/bin/snack CHANGED
@@ -13,7 +13,7 @@ when 'new'
13
13
  end
14
14
  when 'build', 'serve'
15
15
  abort "-: Snack :- Unable to locate: '#{dir}'" unless Dir.exists?(dir)
16
- @app = Snack::Application.new(:root => dir)
16
+ @app = Snack::Application.new(root: dir)
17
17
  @app.send cmd
18
18
  else
19
19
  puts "'#{cmd}' is not a valid snack command"
@@ -5,9 +5,7 @@ module Snack
5
5
  attr_accessor :settings, :builder
6
6
 
7
7
  def initialize(options = {})
8
- @settings = options
9
- @settings[:output_dir] ||= '../'
10
-
8
+ @settings = { output_dir: '../' }.merge options
11
9
  app = self
12
10
  @builder = Rack::Builder.new do
13
11
  use Rack::CommonLogger
@@ -13,7 +13,7 @@ describe Snack::Server do
13
13
  include Rack::Test::Methods
14
14
 
15
15
  def app
16
- @app = Snack::Application.new(:root => "#{File.dirname(__FILE__)}/test_app").builder
16
+ @app = Snack::Application.new(root: "#{File.dirname(__FILE__)}/test_app").builder
17
17
  end
18
18
 
19
19
  it 'should respond with 404 on bad requests' do
@@ -5,31 +5,31 @@
5
5
  %h3 Basic
6
6
  %ul
7
7
  %li
8
- %a{:href => '/foo'} should respond with 404 on bad requests
8
+ %a{href: '/foo'} should respond with 404 on bad requests
9
9
  %li
10
- %a{:href => '/public/style.css'} should serve static file directly first
10
+ %a{href: '/public/style.css'} should serve static file directly first
11
11
  %li
12
- %a{:href => '/public/sass_style.css'} should compile and serve sass files
12
+ %a{href: '/public/sass_style.css'} should compile and serve sass files
13
13
  %li
14
- %a{:href => '/public/application.js'} should serve coffeescript files compiled through tilt if request path exists with coffee extension
14
+ %a{href: '/public/application.js'} should serve coffeescript files compiled through tilt if request path exists with coffee extension
15
15
  %li
16
- %a{:href => '/'} should default to index.html if directory is requested
16
+ %a{href: '/'} should default to index.html if directory is requested
17
17
 
18
18
  %h3 Partials
19
19
  %ul
20
20
  %li
21
- %a{:href => '/pages/partial-normal.html'} should render partials if found
21
+ %a{href: '/pages/partial-normal.html'} should render partials if found
22
22
  %li
23
- %a{:href => '/pages/partial-failing.html'} should error if partial not found
23
+ %a{href: '/pages/partial-failing.html'} should error if partial not found
24
24
 
25
25
  %h3 Layouts
26
26
  %ul
27
27
  %li
28
- %a{:href => '/pages/layout-normal.html'} should render a page within a layout if layout exists
28
+ %a{href: '/pages/layout-normal.html'} should render a page within a layout if layout exists
29
29
  %li
30
- %a{:href => '/pages/layout-failing.html'} should error if user set layout and layout not found
30
+ %a{href: '/pages/layout-failing.html'} should error if user set layout and layout not found
31
31
 
32
32
  %h3 Variables
33
33
  %ul
34
34
  %li
35
- %a{:href => '/pages/variable-normal.html'} should pass variables defined in the page to the layout
35
+ %a{href: '/pages/variable-normal.html'} should pass variables defined in the page to the layout
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Law
@@ -14,126 +14,126 @@ dependencies:
14
14
  name: rack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tilt
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: coffee-script
42
+ name: sass
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: '2.2'
47
+ version: 3.2.10
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: '2.2'
54
+ version: 3.2.10
55
55
  - !ruby/object:Gem::Dependency
56
- name: haml
56
+ name: coffee-script
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '4'
62
- type: :development
61
+ version: '2.2'
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '4'
68
+ version: '2.2'
69
69
  - !ruby/object:Gem::Dependency
70
- name: sass
70
+ name: haml
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3'
75
+ version: '4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3'
82
+ version: '4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '5'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '5'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rack-test
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: coveralls
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '10'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '10'
139
139
  description: Snack is a small framework for building static websites.
@@ -145,7 +145,6 @@ extra_rdoc_files: []
145
145
  files:
146
146
  - bin/snack
147
147
  - lib/snack.rb
148
- - test/index.html
149
148
  - test/snack_test.rb
150
149
  - test/test_app/index.html.haml
151
150
  - test/test_app/pages/_layouts/capture.html.haml
@@ -170,12 +169,12 @@ require_paths:
170
169
  - lib
171
170
  required_ruby_version: !ruby/object:Gem::Requirement
172
171
  requirements:
173
- - - '>='
172
+ - - ">="
174
173
  - !ruby/object:Gem::Version
175
174
  version: 2.0.0
176
175
  required_rubygems_version: !ruby/object:Gem::Requirement
177
176
  requirements:
178
- - - '>='
177
+ - - ">="
179
178
  - !ruby/object:Gem::Version
180
179
  version: 1.3.6
181
180
  requirements: []
@@ -1,44 +0,0 @@
1
- <h1>Snack Tests</h1>
2
- <h2>Snack::Server</h2>
3
- <h3>Basic</h3>
4
- <ul>
5
- <li>
6
- <a href='/foo'>should respond with 404 on bad requests</a>
7
- </li>
8
- <li>
9
- <a href='/public/style.css'>should serve static file directly first</a>
10
- </li>
11
- <li>
12
- <a href='/public/sass_style.css'>should compile and serve sass files</a>
13
- </li>
14
- <li>
15
- <a href='/public/application.js'>should serve coffeescript files compiled through tilt if request path exists with coffee extension</a>
16
- </li>
17
- <li>
18
- <a href='/'>should default to index.html if directory is requested</a>
19
- </li>
20
- </ul>
21
- <h3>Partials</h3>
22
- <ul>
23
- <li>
24
- <a href='/pages/partial-normal.html'>should render partials if found</a>
25
- </li>
26
- <li>
27
- <a href='/pages/partial-failing.html'>should error if partial not found</a>
28
- </li>
29
- </ul>
30
- <h3>Layouts</h3>
31
- <ul>
32
- <li>
33
- <a href='/pages/layout-normal.html'>should render a page within a layout if layout exists</a>
34
- </li>
35
- <li>
36
- <a href='/pages/layout-failing.html'>should error if user set layout and layout not found</a>
37
- </li>
38
- </ul>
39
- <h3>Variables</h3>
40
- <ul>
41
- <li>
42
- <a href='/pages/variable-normal.html'>should pass variables defined in the page to the layout</a>
43
- </li>
44
- </ul>