troy 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +32 -17
- data/lib/troy/page.rb +9 -2
- data/lib/troy/version.rb +1 -1
- data/lib/troy.rb +1 -0
- data/templates/troy.rb +3 -0
- data/troy.gemspec +1 -0
- metadata +39 -45
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3028a93f7e300f2d04a2b3ec4854909323e3dfe0
|
4
|
+
data.tar.gz: fbe1f26e93ab3f5275c89194b6c2899388172212
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f953d94415e5684f932e86b5783ea19c9435394fe3ff525a3b23c605ac23a93115e8443b8a8f5b8d24ebf495bef019931266e1558d69d22439a5cf580e37517f
|
7
|
+
data.tar.gz: 5d566cbb9199f03e163510a909ff20799b3489fe9bfdf7d22cd1e87e4f35fcf0263223116f3722855af3390556fbe6777b054cb18b259961ae1d0db0d9ef489b
|
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org/"
|
2
2
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
troy (0.0.
|
4
|
+
troy (0.0.13)
|
5
5
|
builder
|
6
|
+
html_press
|
6
7
|
i18n
|
7
8
|
rack
|
8
9
|
redcarpet
|
@@ -12,27 +13,41 @@ PATH
|
|
12
13
|
uglifier
|
13
14
|
|
14
15
|
GEM
|
15
|
-
remote:
|
16
|
+
remote: https://rubygems.org/
|
16
17
|
specs:
|
17
|
-
builder (3.
|
18
|
-
|
18
|
+
builder (3.2.0)
|
19
|
+
css_press (0.3.2)
|
20
|
+
csspool-st (= 3.1.2)
|
21
|
+
json
|
22
|
+
csspool-st (3.1.2)
|
23
|
+
diff-lcs (1.2.1)
|
19
24
|
execjs (1.4.0)
|
20
25
|
multi_json (~> 1.0)
|
21
26
|
hike (1.2.1)
|
22
|
-
|
23
|
-
|
24
|
-
|
27
|
+
html_press (0.8.1)
|
28
|
+
htmlentities
|
29
|
+
multi_css (>= 0.1.0)
|
30
|
+
multi_js
|
31
|
+
htmlentities (4.3.1)
|
32
|
+
i18n (0.6.2)
|
33
|
+
json (1.7.7)
|
34
|
+
multi_css (0.1.0)
|
35
|
+
css_press
|
36
|
+
multi_js (0.0.1)
|
37
|
+
uglifier
|
38
|
+
multi_json (1.6.1)
|
39
|
+
rack (1.5.2)
|
25
40
|
redcarpet (2.2.2)
|
26
|
-
rspec (2.
|
27
|
-
rspec-core (~> 2.
|
28
|
-
rspec-expectations (~> 2.
|
29
|
-
rspec-mocks (~> 2.
|
30
|
-
rspec-core (2.
|
31
|
-
rspec-expectations (2.
|
32
|
-
diff-lcs (
|
33
|
-
rspec-mocks (2.
|
34
|
-
sass (3.2.
|
35
|
-
sprockets (2.
|
41
|
+
rspec (2.13.0)
|
42
|
+
rspec-core (~> 2.13.0)
|
43
|
+
rspec-expectations (~> 2.13.0)
|
44
|
+
rspec-mocks (~> 2.13.0)
|
45
|
+
rspec-core (2.13.0)
|
46
|
+
rspec-expectations (2.13.0)
|
47
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
48
|
+
rspec-mocks (2.13.0)
|
49
|
+
sass (3.2.6)
|
50
|
+
sprockets (2.9.0)
|
36
51
|
hike (~> 1.2)
|
37
52
|
multi_json (~> 1.0)
|
38
53
|
rack (~> 1.0)
|
data/lib/troy/page.rb
CHANGED
@@ -60,13 +60,20 @@ module Troy
|
|
60
60
|
}
|
61
61
|
end
|
62
62
|
|
63
|
+
#
|
64
|
+
#
|
65
|
+
def compress(content)
|
66
|
+
content = HtmlPress.press(content) if Troy.configuration.compress_html
|
67
|
+
content
|
68
|
+
end
|
69
|
+
|
63
70
|
# Render the current page.
|
64
71
|
#
|
65
72
|
def render
|
66
73
|
ExtensionMatcher.new(path)
|
67
74
|
.default { content }
|
68
|
-
.on("html") { render_erb }
|
69
|
-
.on("md") { render_erb }
|
75
|
+
.on("html") { compress render_erb }
|
76
|
+
.on("md") { compress render_erb }
|
70
77
|
.on("erb") { render_erb }
|
71
78
|
.match
|
72
79
|
end
|
data/lib/troy/version.rb
CHANGED
data/lib/troy.rb
CHANGED
data/templates/troy.rb
CHANGED
data/troy.gemspec
CHANGED
metadata
CHANGED
@@ -1,158 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: troy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.13
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nando Vieira
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
11
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: i18n
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: thor
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: redcarpet
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: sass
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: sprockets
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: 2.8.0
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: 2.8.0
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: uglifier
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rack
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: builder
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: html_press
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
140
137
|
- !ruby/object:Gem::Version
|
141
138
|
version: '0'
|
142
139
|
- !ruby/object:Gem::Dependency
|
143
140
|
name: rspec
|
144
141
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
142
|
requirements:
|
147
|
-
- -
|
143
|
+
- - '>='
|
148
144
|
- !ruby/object:Gem::Version
|
149
145
|
version: '0'
|
150
146
|
type: :development
|
151
147
|
prerelease: false
|
152
148
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
149
|
requirements:
|
155
|
-
- -
|
150
|
+
- - '>='
|
156
151
|
- !ruby/object:Gem::Version
|
157
152
|
version: '0'
|
158
153
|
description: A static site generator
|
@@ -201,27 +196,26 @@ files:
|
|
201
196
|
- troy.gemspec
|
202
197
|
homepage: http://github.com/fnando/troy
|
203
198
|
licenses: []
|
199
|
+
metadata: {}
|
204
200
|
post_install_message:
|
205
201
|
rdoc_options: []
|
206
202
|
require_paths:
|
207
203
|
- lib
|
208
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
205
|
requirements:
|
211
|
-
- -
|
206
|
+
- - '>='
|
212
207
|
- !ruby/object:Gem::Version
|
213
208
|
version: '0'
|
214
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
|
-
none: false
|
216
210
|
requirements:
|
217
|
-
- -
|
211
|
+
- - '>='
|
218
212
|
- !ruby/object:Gem::Version
|
219
213
|
version: '0'
|
220
214
|
requirements: []
|
221
215
|
rubyforge_project:
|
222
|
-
rubygems_version:
|
216
|
+
rubygems_version: 2.0.0
|
223
217
|
signing_key:
|
224
|
-
specification_version:
|
218
|
+
specification_version: 4
|
225
219
|
summary: A static site generator
|
226
220
|
test_files:
|
227
221
|
- spec/spec_helper.rb
|