staticpress 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rbenv-version +1 -1
- data/Gemfile +7 -0
- data/README.markdown +0 -14
- data/Rakefile +3 -16
- data/bin/staticpress +1 -2
- data/docs/config.ru +1 -2
- data/docs/content/docs.haml +15 -0
- data/docs/content/docs/build.markdown +3 -0
- data/docs/content/docs/content-types.markdown +1 -1
- data/docs/content/docs/deploy.markdown +1 -0
- data/docs/content/docs/help.markdown +1 -0
- data/docs/content/docs/plugins.markdown +1 -0
- data/docs/content/docs/setup.markdown +4 -0
- data/docs/content/docs/themes.markdown +1 -0
- data/docs/content/features.haml +6 -0
- data/docs/content/index.haml +6 -0
- data/features/editing_blog.feature +24 -0
- data/features/editing_blog_contents.feature +40 -0
- data/features/getting_started.feature +19 -0
- data/features/step_definitions/editing_blog_contents_steps.rb +128 -0
- data/features/step_definitions/editing_blog_steps.rb +52 -0
- data/features/step_definitions/getting_started_steps.rb +51 -0
- data/features/support/env.rb +26 -2
- data/lib/skeleton/config.ru +1 -2
- data/lib/staticpress.rb +39 -0
- data/lib/staticpress/cli.rb +0 -9
- data/lib/staticpress/configuration.rb +4 -19
- data/lib/staticpress/content/base.rb +2 -6
- data/lib/staticpress/content/category.rb +0 -5
- data/lib/staticpress/content/collection_content.rb +0 -3
- data/lib/staticpress/content/index.rb +0 -5
- data/lib/staticpress/content/page.rb +0 -6
- data/lib/staticpress/content/post.rb +0 -5
- data/lib/staticpress/content/resource_content.rb +0 -3
- data/lib/staticpress/content/static_content.rb +0 -2
- data/lib/staticpress/content/tag.rb +0 -5
- data/lib/staticpress/content/theme.rb +1 -6
- data/lib/staticpress/helpers.rb +0 -4
- data/lib/staticpress/integrations.rb +14 -0
- data/lib/staticpress/js_object.rb +0 -2
- data/lib/staticpress/metadata.rb +0 -3
- data/lib/staticpress/plugin.rb +0 -4
- data/lib/staticpress/plugins.rb +0 -2
- data/lib/staticpress/pusher.rb +0 -4
- data/lib/staticpress/route.rb +0 -3
- data/lib/staticpress/server.rb +0 -4
- data/lib/staticpress/settings.rb +0 -3
- data/lib/staticpress/site.rb +0 -10
- data/lib/staticpress/theme.rb +0 -3
- data/lib/staticpress/version.rb +1 -1
- data/lib/staticpress/view_helpers.rb +0 -5
- data/lib/themes/basic/assets/styles/_normalize.scss +520 -0
- data/lib/themes/basic/assets/styles/all.css.sass +65 -0
- data/staticpress.gemspec +12 -13
- data/tests/staticpress/content/base_test.rb +2 -10
- data/tests/staticpress/content/category_test.rb +0 -4
- data/tests/staticpress/content/index_test.rb +0 -4
- data/tests/staticpress/content/page_test.rb +0 -3
- data/tests/staticpress/content/post_test.rb +0 -3
- data/tests/staticpress/content/resource_content_test.rb +0 -3
- data/tests/staticpress/content/tag_test.rb +0 -3
- data/tests/staticpress/content/theme_test.rb +0 -3
- data/tests/staticpress/helpers_test.rb +0 -2
- data/tests/staticpress/js_object_test.rb +0 -2
- data/tests/staticpress/metadata_test.rb +0 -2
- data/tests/staticpress/route_test.rb +0 -2
- data/tests/staticpress/server_test.rb +0 -2
- data/tests/staticpress/site_test.rb +0 -5
- data/tests/staticpress/theme_test.rb +0 -3
- data/tests/staticpress/view_helpers_test.rb +0 -3
- data/tests/test_blog/config.ru +1 -2
- data/tests/test_case.rb +4 -4
- metadata +180 -84
- data.tar.gz.sig +0 -2
- data/docs/content/docs/deploying.markdown +0 -0
- data/docs/content/docs/diving-deeper.markdown +0 -3
- data/docs/content/docs/theme.markdown +0 -0
- data/docs/content/index.markdown +0 -1
- data/features/happy_path.feature +0 -202
- data/features/step_definitions/staticpress_steps.rb +0 -33
- data/lib/staticpress/booter.rb +0 -7
- metadata.gz.sig +0 -0
data.tar.gz.sig
DELETED
File without changes
|
File without changes
|
data/docs/content/index.markdown
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
[Read the documentation](/docs/setup).
|
data/features/happy_path.feature
DELETED
@@ -1,202 +0,0 @@
|
|
1
|
-
Feature: The happy path
|
2
|
-
|
3
|
-
Scenario: Some basic commands
|
4
|
-
Given I run `staticpress`
|
5
|
-
Then the exit status should be 0
|
6
|
-
And the output should contain "Usage"
|
7
|
-
|
8
|
-
Given I run `staticpress help`
|
9
|
-
Then the exit status should be 0
|
10
|
-
And the output should contain "Usage"
|
11
|
-
|
12
|
-
Given I run `staticpress -h`
|
13
|
-
Then the exit status should be 0
|
14
|
-
And the output should contain "Usage"
|
15
|
-
|
16
|
-
Given I run `staticpress --help`
|
17
|
-
Then the exit status should be 0
|
18
|
-
And the output should contain "Usage"
|
19
|
-
|
20
|
-
Given I run `staticpress version`
|
21
|
-
Then the exit status should be 0
|
22
|
-
And the output should contain "Staticpress"
|
23
|
-
|
24
|
-
Given I run `staticpress -v`
|
25
|
-
Then the exit status should be 0
|
26
|
-
And the output should contain "Staticpress"
|
27
|
-
|
28
|
-
Given I run `staticpress --version`
|
29
|
-
Then the exit status should be 0
|
30
|
-
And the output should contain "Staticpress"
|
31
|
-
|
32
|
-
Scenario: Creating a new blog
|
33
|
-
When I run `staticpress new my_new_blog`
|
34
|
-
Then the following files should exist:
|
35
|
-
| my_new_blog/config.ru |
|
36
|
-
| my_new_blog/config.yml |
|
37
|
-
| my_new_blog/Gemfile |
|
38
|
-
| my_new_blog/README.markdown |
|
39
|
-
|
40
|
-
Scenario: Creating a new blog with a custum title
|
41
|
-
When I run `staticpress new my_new_blog 'This is my blog'`
|
42
|
-
Then the file "my_new_blog/config.yml" should contain exactly:
|
43
|
-
"""
|
44
|
-
---
|
45
|
-
:title: This is my blog
|
46
|
-
|
47
|
-
"""
|
48
|
-
|
49
|
-
Scenario: Creating a new blog post
|
50
|
-
Given a blog exists
|
51
|
-
When I run `staticpress create 'Hello World'`
|
52
|
-
Then a directory named "content/_posts" should exist
|
53
|
-
And a post named "hello-world" should exist
|
54
|
-
|
55
|
-
Scenario: Creating a static page
|
56
|
-
Given a blog exists
|
57
|
-
When I run `staticpress create_page about`
|
58
|
-
Then a directory named "content" should exist
|
59
|
-
And a file named "content/about.markdown" should exist
|
60
|
-
|
61
|
-
Scenario: Creating a static page with multiple formats
|
62
|
-
Given a blog with content exists
|
63
|
-
When I write to "content/formats.markdown.erb" with:
|
64
|
-
"""
|
65
|
-
hello world
|
66
|
-
"""
|
67
|
-
And I run `staticpress build`
|
68
|
-
Then the file "public/index.html" should not contain "partial :list_posts"
|
69
|
-
And the file "public/formats/index.html" should contain exactly:
|
70
|
-
"""
|
71
|
-
<!DOCTYPE html>
|
72
|
-
<html>
|
73
|
-
<head>
|
74
|
-
<title>Formats | Transient Thoughts</title>
|
75
|
-
<link href='/assets/basic/styles/all.css' rel='stylesheet' type='text/css' />
|
76
|
-
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js'></script>
|
77
|
-
<script src='/assets/basic/scripts/application.js'></script>
|
78
|
-
</head>
|
79
|
-
<body>
|
80
|
-
<header>
|
81
|
-
<span class='site-title'>Transient Thoughts</span>
|
82
|
-
<span class='site-subtitle'>A blogging framework for hackers</span>
|
83
|
-
</header>
|
84
|
-
<section>
|
85
|
-
<p>hello world</p>
|
86
|
-
</section>
|
87
|
-
<section></section>
|
88
|
-
</body>
|
89
|
-
</html>
|
90
|
-
|
91
|
-
"""
|
92
|
-
|
93
|
-
Scenario: Copying a built-in plugin
|
94
|
-
Given a blog exists
|
95
|
-
When I run `staticpress fork_plugin blockquote`
|
96
|
-
Then a directory named "plugins" should exist
|
97
|
-
And a file named "plugins/blockquote.rb" should exist
|
98
|
-
|
99
|
-
Scenario: Copying and renaming a built-in plugin
|
100
|
-
Given a blog exists
|
101
|
-
When I run `staticpress fork_plugin blockquote pullquote`
|
102
|
-
Then a directory named "plugins" should exist
|
103
|
-
And a file named "plugins/pullquote.rb" should exist
|
104
|
-
And a file named "plugins/blockquote.rb" should not exist
|
105
|
-
|
106
|
-
Scenario: Copying the default theme
|
107
|
-
Given a blog exists
|
108
|
-
When I run `staticpress fork_theme`
|
109
|
-
Then a directory named "themes" should exist
|
110
|
-
And a directory named "themes/basic" should exist
|
111
|
-
|
112
|
-
Scenario: Listing all routes
|
113
|
-
Given a blog with content exists
|
114
|
-
When I run `staticpress list url_path`
|
115
|
-
Then the output should contain "/"
|
116
|
-
And the output should contain "/about"
|
117
|
-
And the output should contain "/hello-goodbye"
|
118
|
-
|
119
|
-
Scenario: Building a site
|
120
|
-
Given a blog with content exists
|
121
|
-
Then a directory named "public" should not exist
|
122
|
-
When I run `staticpress build`
|
123
|
-
Then a directory named "public" should exist
|
124
|
-
And the following files should exist:
|
125
|
-
| public/index.html |
|
126
|
-
| public/about/index.html |
|
127
|
-
|
128
|
-
Scenario: Building a site (verbose)
|
129
|
-
Given a blog with content exists
|
130
|
-
When I run `staticpress build --verbose`
|
131
|
-
Then the output should contain " page public/about/index.html"
|
132
|
-
|
133
|
-
Scenario: Building a site with a custom homepage
|
134
|
-
Given a blog with content exists
|
135
|
-
And I write to "content/index.markdown" with:
|
136
|
-
"""
|
137
|
-
---
|
138
|
-
title: Custom Home Page
|
139
|
-
---
|
140
|
-
in custom page
|
141
|
-
"""
|
142
|
-
# FIXME hacky-hack to keep Tilt happy
|
143
|
-
# NOTE this does not seem to be an issue when running this command for real
|
144
|
-
And I require "haml"
|
145
|
-
And I require "redcarpet"
|
146
|
-
And I require "sass"
|
147
|
-
When I run `staticpress build`
|
148
|
-
Then the file "public/index.html" should contain exactly:
|
149
|
-
"""
|
150
|
-
<!DOCTYPE html>
|
151
|
-
<html>
|
152
|
-
<head>
|
153
|
-
<title>Custom Home Page | Transient Thoughts</title>
|
154
|
-
<link href='/assets/basic/styles/all.css' rel='stylesheet' type='text/css' />
|
155
|
-
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js'></script>
|
156
|
-
<script src='/assets/basic/scripts/application.js'></script>
|
157
|
-
</head>
|
158
|
-
<body>
|
159
|
-
<header>
|
160
|
-
<span class='site-title'>Transient Thoughts</span>
|
161
|
-
<span class='site-subtitle'>A blogging framework for hackers</span>
|
162
|
-
</header>
|
163
|
-
<section>
|
164
|
-
<p>in custom page</p>
|
165
|
-
</section>
|
166
|
-
<section></section>
|
167
|
-
</body>
|
168
|
-
</html>
|
169
|
-
|
170
|
-
"""
|
171
|
-
|
172
|
-
Scenario: Pushing a compiled site to a remote location
|
173
|
-
Given a blog with content exists
|
174
|
-
And the blog has been previously built
|
175
|
-
And I append to "config.yml" with:
|
176
|
-
"""
|
177
|
-
:deployment_strategies:
|
178
|
-
:custom: 'cp -R public ../deployed'
|
179
|
-
"""
|
180
|
-
When I run `staticpress push`
|
181
|
-
Then the following files should exist:
|
182
|
-
| ../deployed/index.html |
|
183
|
-
| ../deployed/about/index.html |
|
184
|
-
|
185
|
-
Scenario: Deploying site (build and push in one step)
|
186
|
-
Given a blog with content exists
|
187
|
-
And I append to "config.yml" with:
|
188
|
-
"""
|
189
|
-
:deployment_strategies:
|
190
|
-
:custom: 'cp -R public ../deployed'
|
191
|
-
"""
|
192
|
-
Then the following files should not exist:
|
193
|
-
| public/index.html |
|
194
|
-
| public/about/index.html |
|
195
|
-
| ../deployed/index.html |
|
196
|
-
| ../deployed/about/index.html |
|
197
|
-
When I run `staticpress deploy`
|
198
|
-
Then the following files should exist:
|
199
|
-
| public/index.html |
|
200
|
-
| public/about/index.html |
|
201
|
-
| ../deployed/index.html |
|
202
|
-
| ../deployed/about/index.html |
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'staticpress/cli'
|
2
|
-
|
3
|
-
|
4
|
-
Given /^a blog exists$/ do
|
5
|
-
Staticpress::CLI.new.new('tmp/aruba/temporary_blog', 'Transient Thoughts')
|
6
|
-
cd('temporary_blog')
|
7
|
-
end
|
8
|
-
|
9
|
-
Given /^a blog with content exists$/ do
|
10
|
-
step('a blog exists')
|
11
|
-
Staticpress::CLI.new.create_page('about')
|
12
|
-
Staticpress::CLI.new.create('hello-goodbye')
|
13
|
-
end
|
14
|
-
|
15
|
-
Given /^the blog has been previously built$/ do
|
16
|
-
Staticpress::CLI.new.build
|
17
|
-
end
|
18
|
-
|
19
|
-
Given /^I require "([^"]*)"$/ do |library|
|
20
|
-
require library
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
Then /^a post named "([^"]*)" should exist$/ do |post_title|
|
25
|
-
now = Time.now.utc
|
26
|
-
filename = [
|
27
|
-
now.year,
|
28
|
-
('%02d' % now.month),
|
29
|
-
('%02d' % now.day),
|
30
|
-
"#{post_title}.markdown"
|
31
|
-
].join('-')
|
32
|
-
step("a file named \"content/_posts/#{filename}\" should exist")
|
33
|
-
end
|
data/lib/staticpress/booter.rb
DELETED
metadata.gz.sig
DELETED
Binary file
|