sitespec 0.0.2 → 0.0.3

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: 32b4903979b3477ec52f3f5abafc65755a78d50b
4
- data.tar.gz: 814a01e8f3cb237f06d285b357ea08a7a446f732
3
+ metadata.gz: 0b724c8b5175fa2d1552088f064c7936820bf1a0
4
+ data.tar.gz: d6f04afaf94ffd0bf711a0eb55fc6b4fe7df1bc6
5
5
  SHA512:
6
- metadata.gz: 74587c38c538d935cdb6659aaa41f5b629ee4ef56b673f4d23e9c0e34ac98cd8693194fa330531b4abbcf2a94c00d0e556fc94cfa400614c26f1cb4b0b37e94e
7
- data.tar.gz: 15caf3f35597c5b504edc3fa67e7f891f7acd04c922ee9abc45b1e044385fc2428e9ba46a296861841ef8c3283303df58564bc12420e45c42272dd7ea4f0a301
6
+ metadata.gz: 8d75d4192364e2d9a22a6863564f1d648c69d904892745105402bac88f3f033772688fc5732418a1eb739e8871206dbef3e8aaef29e8d5aad875e1a10f82f8cc
7
+ data.tar.gz: fc746c9fe32d2da74677cd0dd3b796c1a0259aa03426e7ae7804cd11327f4817cf11df218fd6f173d66bd02c79e4c8f838a3c53e0c1003d7652ab58a9421325a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.3
2
+ * Fix rspec gem dependency
3
+
1
4
  ## 0.0.2
2
5
  * Pretty RSpec formatter
3
6
 
@@ -1,3 +1,3 @@
1
1
  module Sitespec
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/sitespec.gemspec CHANGED
@@ -16,11 +16,12 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
+ spec.add_dependency "rspec"
19
20
  spec.add_development_dependency "bundler", ">= 1.4"
20
21
  spec.add_development_dependency "padrino"
21
22
  spec.add_development_dependency "pry"
22
23
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rspec", ">= 2.14.1"
24
+ spec.add_development_dependency "redcarpet"
24
25
  spec.add_development_dependency "sass"
25
26
  spec.add_development_dependency "slim"
26
27
  end
@@ -4,6 +4,6 @@ describe Sitespec do
4
4
  it "generates static files from rack application" do
5
5
  get "/stylesheets/all.css"
6
6
  get "/index.html"
7
- get "/2001-01-01-title.html"
7
+ get "/2000-01-01-hello.html"
8
8
  end
9
9
  end
@@ -0,0 +1,9 @@
1
+ # Hello
2
+ Lorem ipsum dolor sit amet,
3
+ consectetur adipisicing elit,
4
+ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
5
+ Ut enim ad minim veniam,
6
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
7
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
8
+ Excepteur sint occaecat cupidatat non proident,
9
+ sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -1,2 +1,2 @@
1
1
  require File.expand_path("../example_application", __FILE__)
2
- run Sitespec::ExampleApplication.new
2
+ run Sitespec::ExampleApplication
@@ -1,4 +1,5 @@
1
1
  require "padrino"
2
+ require "redcarpet"
2
3
  require "sass"
3
4
  require "slim"
4
5
 
@@ -13,10 +14,6 @@ module Sitespec
13
14
 
14
15
  disable :logging
15
16
 
16
- error do |exception|
17
- raise exception
18
- end
19
-
20
17
  get "/stylesheets/all.css" do
21
18
  scss :all
22
19
  end
@@ -26,7 +23,25 @@ module Sitespec
26
23
  end
27
24
 
28
25
  get "/:year-:month-:day-:title.html" do
29
- slim :show
26
+ slim :show, locals: { body: article }
27
+ end
28
+
29
+ helpers do
30
+ def article
31
+ markdown(article_path.to_sym, views: articles_path)
32
+ end
33
+
34
+ def articles_path
35
+ "#{settings.root}/articles"
36
+ end
37
+
38
+ def article_path
39
+ "#{params[:year]}-#{params[:month]}-#{params[:day]}-#{params[:title]}"
40
+ end
41
+ end
42
+
43
+ error do |exception|
44
+ raise exception
30
45
  end
31
46
  end
32
47
  end
@@ -0,0 +1 @@
1
+ == body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitespec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2013-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -67,19 +81,19 @@ dependencies:
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
- name: rspec
84
+ name: redcarpet
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - '>='
74
88
  - !ruby/object:Gem::Version
75
- version: 2.14.1
89
+ version: '0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - '>='
81
95
  - !ruby/object:Gem::Version
82
- version: 2.14.1
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: sass
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -134,12 +148,13 @@ files:
134
148
  - sitespec.gemspec
135
149
  - spec/sitespec_spec.rb
136
150
  - spec/spec_helper.rb
137
- - spec/support/sitespec/config.ru
138
- - spec/support/sitespec/example_application.rb
139
- - spec/support/sitespec/stylesheets/all.scss
140
- - spec/support/sitespec/views/index.slim
141
- - spec/support/sitespec/views/layouts/application.slim
142
- - spec/support/sitespec/views/show.slim
151
+ - spec/support/application/articles/2000-01-01-hello.markdown
152
+ - spec/support/application/config.ru
153
+ - spec/support/application/example_application.rb
154
+ - spec/support/application/stylesheets/all.scss
155
+ - spec/support/application/views/index.slim
156
+ - spec/support/application/views/layouts/application.slim
157
+ - spec/support/application/views/show.slim
143
158
  homepage: https://github.com/r7kamura/sitespec
144
159
  licenses:
145
160
  - MIT
@@ -167,10 +182,11 @@ summary: Generate static site from your rack application & spec definition
167
182
  test_files:
168
183
  - spec/sitespec_spec.rb
169
184
  - spec/spec_helper.rb
170
- - spec/support/sitespec/config.ru
171
- - spec/support/sitespec/example_application.rb
172
- - spec/support/sitespec/stylesheets/all.scss
173
- - spec/support/sitespec/views/index.slim
174
- - spec/support/sitespec/views/layouts/application.slim
175
- - spec/support/sitespec/views/show.slim
185
+ - spec/support/application/articles/2000-01-01-hello.markdown
186
+ - spec/support/application/config.ru
187
+ - spec/support/application/example_application.rb
188
+ - spec/support/application/stylesheets/all.scss
189
+ - spec/support/application/views/index.slim
190
+ - spec/support/application/views/layouts/application.slim
191
+ - spec/support/application/views/show.slim
176
192
  has_rdoc:
@@ -1 +0,0 @@
1
- = "show"