staticpress 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/skeleton/config.yml +1 -1
- data/lib/staticpress/configuration.rb +1 -0
- data/lib/staticpress/theme.rb +5 -1
- data/lib/staticpress/version.rb +1 -1
- data/lib/themes/{classic → basic}/assets/scripts/application.js +0 -0
- data/lib/themes/{classic → basic}/assets/styles/all.sass +0 -0
- data/lib/themes/{classic → basic}/includes/list_posts.haml +0 -0
- data/lib/themes/{classic → basic}/layouts/archive.haml +0 -0
- data/lib/themes/{classic → basic}/layouts/atom.haml +0 -0
- data/lib/themes/{classic → basic}/layouts/default.haml +0 -0
- data/lib/themes/{classic → basic}/layouts/index.haml +0 -0
- data/lib/themes/{classic → basic}/layouts/post_index.haml +0 -0
- data/lib/themes/{classic → basic}/views/default.haml +0 -0
- data/staticpress.gemspec +2 -2
- data/tests/lib/staticpress/content/theme_test.rb +7 -7
- data/tests/lib/staticpress/theme_test.rb +18 -1
- data/tests/lib/staticpress_test.rb +10 -3
- data/tests/sample_sites/test_blog/config.yml +1 -0
- data/tests/sample_sites/test_blog/themes/test_theme/assets/scripts/application.js +4 -0
- data/tests/sample_sites/test_blog/themes/test_theme/assets/styles/all.sass +0 -0
- data/tests/sample_sites/test_blog/themes/test_theme/includes/list_posts.haml +3 -0
- data/tests/sample_sites/test_blog/themes/test_theme/layouts/archive.haml +0 -0
- data/tests/sample_sites/test_blog/themes/test_theme/layouts/atom.haml +0 -0
- data/tests/sample_sites/test_blog/themes/test_theme/layouts/default.haml +5 -0
- data/tests/sample_sites/test_blog/themes/test_theme/layouts/index.haml +0 -0
- data/tests/sample_sites/test_blog/themes/test_theme/layouts/post_index.haml +5 -0
- data/tests/sample_sites/test_blog/themes/test_theme/views/default.haml +5 -0
- data.tar.gz.sig +0 -0
- metadata +32 -23
- metadata.gz.sig +0 -0
data/lib/skeleton/config.yml
CHANGED
data/lib/staticpress/theme.rb
CHANGED
@@ -14,6 +14,10 @@ module Staticpress
|
|
14
14
|
@root = custom.directory? ? custom : Staticpress.root + 'themes' + @name.to_s
|
15
15
|
end
|
16
16
|
|
17
|
+
def ==(other)
|
18
|
+
other.respond_to?(:root) ? (root == other.root) : super
|
19
|
+
end
|
20
|
+
|
17
21
|
[
|
18
22
|
:include,
|
19
23
|
:layout,
|
@@ -37,7 +41,7 @@ module Staticpress
|
|
37
41
|
end
|
38
42
|
|
39
43
|
def self.theme
|
40
|
-
|
44
|
+
new config.theme
|
41
45
|
end
|
42
46
|
end
|
43
47
|
end
|
data/lib/staticpress/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/staticpress.gemspec
CHANGED
@@ -7,13 +7,13 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Staticpress::Version.to_s
|
8
8
|
s.authors = ['Raving Genius']
|
9
9
|
s.email = ['rg+code@ravinggenius.com']
|
10
|
-
s.summary =
|
10
|
+
s.summary = 'Blog-centric static site builder'
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
13
13
|
s.rubyforge_project = 'staticpress'
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
|
-
s.test_files = `git ls-files -- {test,spec,
|
16
|
+
s.test_files = `git ls-files -- {test,spec,feature}{,s}/*`.split("\n")
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
@@ -10,14 +10,14 @@ class ContentThemeTest < ContentBaseTest
|
|
10
10
|
def setup
|
11
11
|
super
|
12
12
|
|
13
|
-
|
13
|
+
config.theme = :test_theme
|
14
14
|
|
15
15
|
@theme_dir = Staticpress::Theme.theme.root
|
16
16
|
|
17
|
-
@asset_style_route = Staticpress::Route.from_url_path '/assets/
|
17
|
+
@asset_style_route = Staticpress::Route.from_url_path '/assets/test_theme/styles/all'
|
18
18
|
@asset_style = Staticpress::Content::Theme.new @asset_style_route, @theme_dir + 'assets' + 'styles' + 'all.sass'
|
19
19
|
|
20
|
-
@asset_script_route = Staticpress::Route.from_url_path '/assets/
|
20
|
+
@asset_script_route = Staticpress::Route.from_url_path '/assets/test_theme/scripts/application.js'
|
21
21
|
@asset_script = Staticpress::Content::Theme.new @asset_script_route, @theme_dir + 'assets' + 'scripts' + 'application.js'
|
22
22
|
end
|
23
23
|
|
@@ -50,12 +50,12 @@ class ContentThemeTest < ContentBaseTest
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_inspect
|
53
|
-
assert_equal '#<Staticpress::Content::Theme url_path=/assets/
|
53
|
+
assert_equal '#<Staticpress::Content::Theme url_path=/assets/test_theme/styles/all>', @asset_style.inspect
|
54
54
|
end
|
55
55
|
|
56
56
|
def test_output_path
|
57
|
-
assert_equal (Staticpress.blog_path + 'public' + 'assets' + '
|
58
|
-
assert_equal (Staticpress.blog_path + 'public' + 'assets' + '
|
57
|
+
assert_equal (Staticpress.blog_path + 'public' + 'assets' + 'test_theme' + 'styles' + 'all'), @asset_style.output_path
|
58
|
+
assert_equal (Staticpress.blog_path + 'public' + 'assets' + 'test_theme' + 'scripts' + 'application.js'), @asset_script.output_path
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_raw
|
@@ -98,6 +98,6 @@ class ContentThemeTest < ContentBaseTest
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def test_route
|
101
|
-
assert_equal '/assets/
|
101
|
+
assert_equal '/assets/test_theme/styles/all', @asset_style.route.url_path
|
102
102
|
end
|
103
103
|
end
|
@@ -1,10 +1,27 @@
|
|
1
1
|
require_relative '../../test_helper'
|
2
2
|
|
3
|
+
require 'staticpress/helpers'
|
3
4
|
require 'staticpress/theme'
|
4
5
|
|
5
6
|
class ThemeTest < TestHelper
|
7
|
+
include Staticpress::Helpers
|
8
|
+
|
6
9
|
def setup
|
7
|
-
|
10
|
+
Staticpress.blog_path = TEST_BLOG
|
11
|
+
config.theme = :test_theme
|
12
|
+
@theme = Staticpress::Theme.new :test_theme
|
13
|
+
end
|
14
|
+
|
15
|
+
def test__equalsequals
|
16
|
+
assert_operator @theme, :==, Staticpress::Theme.new(:test_theme)
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_root
|
20
|
+
assert_equal @theme.root, (Staticpress.blog_path + 'themes' + 'test_theme')
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_theme
|
24
|
+
assert_equal @theme, Staticpress::Theme.theme
|
8
25
|
end
|
9
26
|
|
10
27
|
|
@@ -3,10 +3,17 @@ require_relative '../test_helper'
|
|
3
3
|
require 'pathname'
|
4
4
|
|
5
5
|
class StaticpressTest < TestHelper
|
6
|
+
def setup
|
7
|
+
Staticpress.blog_path = TEST_BLOG
|
8
|
+
end
|
9
|
+
|
6
10
|
def test_blog_path
|
7
|
-
assert_equal Pathname.new('
|
8
|
-
|
9
|
-
|
11
|
+
assert_equal Pathname.new('tests/sample_sites/test_blog').expand_path, Staticpress.blog_path
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_blog_path=
|
15
|
+
Staticpress.blog_path = 'some/other/directory'
|
16
|
+
assert_equal Pathname.new('some/other/directory').expand_path, Staticpress.blog_path
|
10
17
|
end
|
11
18
|
|
12
19
|
def test_root
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staticpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -54,7 +54,7 @@ date: 2011-10-23 00:00:00.000000000Z
|
|
54
54
|
dependencies:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
|
-
requirement: &
|
57
|
+
requirement: &22843760 !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
60
|
- - ! '>='
|
@@ -62,10 +62,10 @@ dependencies:
|
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
|
-
version_requirements: *
|
65
|
+
version_requirements: *22843760
|
66
66
|
- !ruby/object:Gem::Dependency
|
67
67
|
name: ruby-debug19
|
68
|
-
requirement: &
|
68
|
+
requirement: &22843340 !ruby/object:Gem::Requirement
|
69
69
|
none: false
|
70
70
|
requirements:
|
71
71
|
- - ! '>='
|
@@ -73,10 +73,10 @@ dependencies:
|
|
73
73
|
version: '0'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
|
-
version_requirements: *
|
76
|
+
version_requirements: *22843340
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: bundler
|
79
|
-
requirement: &
|
79
|
+
requirement: &22842920 !ruby/object:Gem::Requirement
|
80
80
|
none: false
|
81
81
|
requirements:
|
82
82
|
- - ! '>='
|
@@ -84,10 +84,10 @@ dependencies:
|
|
84
84
|
version: '0'
|
85
85
|
type: :runtime
|
86
86
|
prerelease: false
|
87
|
-
version_requirements: *
|
87
|
+
version_requirements: *22842920
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: rack
|
90
|
-
requirement: &
|
90
|
+
requirement: &22842500 !ruby/object:Gem::Requirement
|
91
91
|
none: false
|
92
92
|
requirements:
|
93
93
|
- - ! '>='
|
@@ -95,10 +95,10 @@ dependencies:
|
|
95
95
|
version: '0'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
|
-
version_requirements: *
|
98
|
+
version_requirements: *22842500
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: thor
|
101
|
-
requirement: &
|
101
|
+
requirement: &22842080 !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
103
103
|
requirements:
|
104
104
|
- - ! '>='
|
@@ -106,10 +106,10 @@ dependencies:
|
|
106
106
|
version: '0'
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
|
-
version_requirements: *
|
109
|
+
version_requirements: *22842080
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: tilt
|
112
|
-
requirement: &
|
112
|
+
requirement: &22841660 !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
|
-
version_requirements: *
|
120
|
+
version_requirements: *22841660
|
121
121
|
description:
|
122
122
|
email:
|
123
123
|
- rg+code@ravinggenius.com
|
@@ -166,15 +166,15 @@ files:
|
|
166
166
|
- lib/staticpress/theme.rb
|
167
167
|
- lib/staticpress/version.rb
|
168
168
|
- lib/staticpress/view_helpers.rb
|
169
|
-
- lib/themes/
|
170
|
-
- lib/themes/
|
171
|
-
- lib/themes/
|
172
|
-
- lib/themes/
|
173
|
-
- lib/themes/
|
174
|
-
- lib/themes/
|
175
|
-
- lib/themes/
|
176
|
-
- lib/themes/
|
177
|
-
- lib/themes/
|
169
|
+
- lib/themes/basic/assets/scripts/application.js
|
170
|
+
- lib/themes/basic/assets/styles/all.sass
|
171
|
+
- lib/themes/basic/includes/list_posts.haml
|
172
|
+
- lib/themes/basic/layouts/archive.haml
|
173
|
+
- lib/themes/basic/layouts/atom.haml
|
174
|
+
- lib/themes/basic/layouts/default.haml
|
175
|
+
- lib/themes/basic/layouts/index.haml
|
176
|
+
- lib/themes/basic/layouts/post_index.haml
|
177
|
+
- lib/themes/basic/views/default.haml
|
178
178
|
- staticpress.gemspec
|
179
179
|
- tests/lib/staticpress/cli_test.rb
|
180
180
|
- tests/lib/staticpress/configuration_test.rb
|
@@ -215,6 +215,15 @@ files:
|
|
215
215
|
- tests/sample_sites/test_blog/content/style1.css
|
216
216
|
- tests/sample_sites/test_blog/content/style2.css.sass
|
217
217
|
- tests/sample_sites/test_blog/content/style3.sass
|
218
|
+
- tests/sample_sites/test_blog/themes/test_theme/assets/scripts/application.js
|
219
|
+
- tests/sample_sites/test_blog/themes/test_theme/assets/styles/all.sass
|
220
|
+
- tests/sample_sites/test_blog/themes/test_theme/includes/list_posts.haml
|
221
|
+
- tests/sample_sites/test_blog/themes/test_theme/layouts/archive.haml
|
222
|
+
- tests/sample_sites/test_blog/themes/test_theme/layouts/atom.haml
|
223
|
+
- tests/sample_sites/test_blog/themes/test_theme/layouts/default.haml
|
224
|
+
- tests/sample_sites/test_blog/themes/test_theme/layouts/index.haml
|
225
|
+
- tests/sample_sites/test_blog/themes/test_theme/layouts/post_index.haml
|
226
|
+
- tests/sample_sites/test_blog/themes/test_theme/views/default.haml
|
218
227
|
- tests/test_helper.rb
|
219
228
|
homepage:
|
220
229
|
licenses:
|
@@ -240,5 +249,5 @@ rubyforge_project: staticpress
|
|
240
249
|
rubygems_version: 1.8.11
|
241
250
|
signing_key:
|
242
251
|
specification_version: 3
|
243
|
-
summary:
|
252
|
+
summary: Blog-centric static site builder
|
244
253
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|