nanoc-toolbox 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +62 -53
- data/README.md +1 -1
- data/lib/nanoc/toolbox/helpers/github_gist.rb +1 -1
- data/lib/nanoc/toolbox/version.rb +1 -1
- data/nanoc-toolbox.gemspec +2 -2
- data/spec/helpers/blogging_extra_spec.rb +1 -1
- data/spec/helpers/github_gist_spec.rb +8 -7
- data/spec/helpers/navigation_spec.rb +1 -1
- data/spec/helpers/tagging_extra_spec.rb +3 -3
- metadata +25 -11
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,77 +1,86 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nanoc-toolbox (0.2.
|
4
|
+
nanoc-toolbox (0.2.1)
|
5
5
|
jsmin (~> 1.0)
|
6
|
-
nanoc (~> 3.
|
6
|
+
nanoc (~> 3.7)
|
7
7
|
nokogiri (~> 1.6)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
|
12
|
+
celluloid (0.16.0)
|
13
|
+
timers (~> 4.0.0)
|
14
|
+
coderay (1.1.0)
|
13
15
|
colored (1.2)
|
14
|
-
|
15
|
-
coveralls (0.6.7)
|
16
|
-
colorize
|
16
|
+
coveralls (0.7.1)
|
17
17
|
multi_json (~> 1.3)
|
18
18
|
rest-client
|
19
19
|
simplecov (>= 0.7)
|
20
|
+
term-ansicolor
|
20
21
|
thor
|
21
|
-
cri (2.
|
22
|
-
colored (
|
23
|
-
diff-lcs (1.2.
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
cri (2.6.1)
|
23
|
+
colored (~> 1.2)
|
24
|
+
diff-lcs (1.2.5)
|
25
|
+
docile (1.1.5)
|
26
|
+
ffi (1.9.3)
|
27
|
+
formatador (0.2.5)
|
28
|
+
guard (2.6.1)
|
27
29
|
formatador (>= 0.2.4)
|
28
|
-
listen (
|
29
|
-
lumberjack (
|
30
|
-
pry (>= 0.9.
|
31
|
-
thor (>= 0.
|
32
|
-
guard-rspec (3.
|
33
|
-
guard (
|
34
|
-
rspec (
|
30
|
+
listen (~> 2.7)
|
31
|
+
lumberjack (~> 1.0)
|
32
|
+
pry (>= 0.9.12)
|
33
|
+
thor (>= 0.18.1)
|
34
|
+
guard-rspec (4.3.1)
|
35
|
+
guard (~> 2.1)
|
36
|
+
rspec (>= 2.14, < 4.0)
|
37
|
+
hitimes (1.2.2)
|
35
38
|
jsmin (1.0.1)
|
36
|
-
listen (
|
39
|
+
listen (2.7.9)
|
40
|
+
celluloid (>= 0.15.2)
|
37
41
|
rb-fsevent (>= 0.9.3)
|
38
42
|
rb-inotify (>= 0.9)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
nanoc (3.6.6)
|
43
|
+
lumberjack (1.0.9)
|
44
|
+
method_source (0.8.2)
|
45
|
+
mime-types (2.3)
|
46
|
+
mini_portile (0.6.0)
|
47
|
+
multi_json (1.10.1)
|
48
|
+
nanoc (3.7.3)
|
46
49
|
cri (~> 2.3)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
netrc (0.7.7)
|
51
|
+
nokogiri (1.6.3.1)
|
52
|
+
mini_portile (= 0.6.0)
|
53
|
+
pry (0.10.1)
|
54
|
+
coderay (~> 1.1.0)
|
55
|
+
method_source (~> 0.8.1)
|
52
56
|
slop (~> 3.4)
|
53
|
-
rake (10.
|
54
|
-
rb-fsevent (0.9.
|
55
|
-
rb-inotify (0.9.
|
57
|
+
rake (10.3.2)
|
58
|
+
rb-fsevent (0.9.4)
|
59
|
+
rb-inotify (0.9.5)
|
56
60
|
ffi (>= 0.5.0)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
rspec-
|
63
|
-
rspec-
|
64
|
-
|
65
|
-
rspec-
|
66
|
-
rspec-expectations (2.13.0)
|
61
|
+
rest-client (1.7.2)
|
62
|
+
mime-types (>= 1.16, < 3.0)
|
63
|
+
netrc (~> 0.7)
|
64
|
+
rspec (2.99.0)
|
65
|
+
rspec-core (~> 2.99.0)
|
66
|
+
rspec-expectations (~> 2.99.0)
|
67
|
+
rspec-mocks (~> 2.99.0)
|
68
|
+
rspec-core (2.99.2)
|
69
|
+
rspec-expectations (2.99.2)
|
67
70
|
diff-lcs (>= 1.1.3, < 2.0)
|
68
|
-
rspec-mocks (2.
|
69
|
-
simplecov (0.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
rspec-mocks (2.99.2)
|
72
|
+
simplecov (0.9.0)
|
73
|
+
docile (~> 1.1.0)
|
74
|
+
multi_json
|
75
|
+
simplecov-html (~> 0.8.0)
|
76
|
+
simplecov-html (0.8.0)
|
77
|
+
slop (3.6.0)
|
78
|
+
term-ansicolor (1.3.0)
|
79
|
+
tins (~> 1.0)
|
80
|
+
thor (0.19.1)
|
81
|
+
timers (4.0.1)
|
82
|
+
hitimes
|
83
|
+
tins (1.3.2)
|
75
84
|
|
76
85
|
PLATFORMS
|
77
86
|
ruby
|
@@ -81,6 +90,6 @@ DEPENDENCIES
|
|
81
90
|
coveralls
|
82
91
|
guard-rspec
|
83
92
|
nanoc-toolbox!
|
84
|
-
rake (~> 10.
|
93
|
+
rake (~> 10.3)
|
85
94
|
rspec (~> 2.13)
|
86
95
|
simplecov
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
## Presentation
|
10
10
|
|
11
11
|
The nanoc-toolbox is a collection of filters and helpers for the static site generator tool nanoc.
|
12
|
-
I have created this gem for my personal need on [my blog/resume website]( http://anouar.
|
12
|
+
I have created this gem for my personal need on [my blog/resume website]( http://anouar.adlani.com ).
|
13
13
|
If you feel something's missing, feel free to contribute.
|
14
14
|
|
15
15
|
## Features
|
@@ -26,7 +26,7 @@ module Nanoc::Toolbox::Helpers
|
|
26
26
|
# @param [Integer] gist_id - the ID of the Gist
|
27
27
|
# @param [String] filename - the optional filename to display
|
28
28
|
def gist(gist_id, filename=nil)
|
29
|
-
raise ArgumentError, "Gist ID should be a
|
29
|
+
raise ArgumentError, "Gist ID should be a hex number" unless (gist_id.to_s).match(/^\h+$/)
|
30
30
|
url = "#{GIST_HOST}/#{gist_id}.#{GIST_EXT}"
|
31
31
|
|
32
32
|
if filename
|
data/nanoc-toolbox.gemspec
CHANGED
@@ -15,13 +15,13 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
16
16
|
s.required_rubygems_version = ">= 1.3.6"
|
17
17
|
|
18
|
-
s.add_dependency "nanoc", "~> 3.
|
18
|
+
s.add_dependency "nanoc", "~> 3.7"
|
19
19
|
s.add_dependency "nokogiri", "~> 1.6"
|
20
20
|
s.add_dependency "jsmin", "~> 1.0"
|
21
21
|
|
22
22
|
s.add_development_dependency "bundler", "~> 1.3"
|
23
23
|
s.add_development_dependency "rspec", "~> 2.13"
|
24
|
-
s.add_development_dependency "rake", "~> 10.
|
24
|
+
s.add_development_dependency "rake", "~> 10.3"
|
25
25
|
|
26
26
|
s.files = `git ls-files`.split("\n")
|
27
27
|
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
@@ -11,13 +11,14 @@ describe Nanoc::Toolbox::Helpers::GithubGist do
|
|
11
11
|
describe "#gist" do
|
12
12
|
context "without a filename" do
|
13
13
|
it "takes at list a Gist ID as parameter" do
|
14
|
-
lambda{ subject.gist }.should raise_error
|
14
|
+
lambda{ subject.gist }.should raise_error
|
15
15
|
end
|
16
16
|
|
17
|
-
it "ensures that Gist ID is an Integer" do
|
18
|
-
lambda{ subject.gist('
|
19
|
-
lambda{ subject.gist(
|
20
|
-
lambda{ subject.gist(
|
17
|
+
it "ensures that Gist ID is an Integer or a hex number" do
|
18
|
+
lambda{ subject.gist('123') }.should_not raise_error
|
19
|
+
lambda{ subject.gist(12345) }.should_not raise_error
|
20
|
+
lambda{ subject.gist('decafbad123') }.should_not raise_error
|
21
|
+
lambda{ subject.gist('+supercool+xxx') }.should raise_error
|
21
22
|
end
|
22
23
|
|
23
24
|
it "returns the script tag for a gist" do
|
@@ -28,8 +29,8 @@ describe Nanoc::Toolbox::Helpers::GithubGist do
|
|
28
29
|
|
29
30
|
context "with a filename" do
|
30
31
|
it "ensures that the file name is an String" do
|
31
|
-
lambda{ subject.gist(12345, 12345) }.should raise_error
|
32
|
-
lambda{ subject.gist(12345, 'index.html') }.should_not raise_error
|
32
|
+
lambda{ subject.gist(12345, 12345) }.should raise_error
|
33
|
+
lambda{ subject.gist(12345, 'index.html') }.should_not raise_error
|
33
34
|
end
|
34
35
|
|
35
36
|
it "returns the script tag for a specific file if specified" do
|
@@ -131,7 +131,7 @@ describe Nanoc::Toolbox::Helpers::Navigation do
|
|
131
131
|
end
|
132
132
|
|
133
133
|
describe ".breadcrumb_for" do
|
134
|
-
before(:
|
134
|
+
before(:each) do
|
135
135
|
@items = {
|
136
136
|
"/" => Nanoc::Item.new("", {:title => "Home"}, "/"),
|
137
137
|
"/yetAnotherItem/" => Nanoc::Item.new("", {:title => "Sub1"}, "/yetAnotherItem/"),
|
@@ -35,15 +35,15 @@ describe Nanoc::Toolbox::Helpers::TaggingExtra do
|
|
35
35
|
describe ".has_tag?" do
|
36
36
|
it "returns true when the item contains the desired tag" do
|
37
37
|
item = { :tags => ['a', 'b', 'c'] }
|
38
|
-
subject.has_tag?(item, 'a').should
|
38
|
+
subject.has_tag?(item, 'a').should be true
|
39
39
|
end
|
40
40
|
it "returns false when the item contains the desired tag" do
|
41
41
|
item = { :tags => ['a', 'b', 'c'] }
|
42
|
-
subject.has_tag?(item, 'd').should
|
42
|
+
subject.has_tag?(item, 'd').should be false
|
43
43
|
end
|
44
44
|
it "returns fals when the item do not have tag" do
|
45
45
|
item = { }
|
46
|
-
subject.has_tag?(item, 'd').should
|
46
|
+
subject.has_tag?(item, 'd').should be false
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,32 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Anouar ADLANI
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: nanoc
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
21
|
+
version: '3.7'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
29
|
+
version: '3.7'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: nokogiri
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: jsmin
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: bundler
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: rspec
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,17 +94,19 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: rake
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
89
|
-
version: '10.
|
101
|
+
version: '10.3'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
96
|
-
version: '10.
|
109
|
+
version: '10.3'
|
97
110
|
description: The nanoc-toolbox is a collection of filters and helpers for the static
|
98
111
|
site generator tool nanoc
|
99
112
|
email:
|
@@ -146,7 +159,6 @@ files:
|
|
146
159
|
- spec/spec_helper.rb
|
147
160
|
homepage: http://aadlani.github.com/nanoc-toolbox/
|
148
161
|
licenses: []
|
149
|
-
metadata: {}
|
150
162
|
post_install_message:
|
151
163
|
rdoc_options:
|
152
164
|
- --main
|
@@ -154,19 +166,21 @@ rdoc_options:
|
|
154
166
|
require_paths:
|
155
167
|
- lib
|
156
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
157
170
|
requirements:
|
158
|
-
- - '>='
|
171
|
+
- - ! '>='
|
159
172
|
- !ruby/object:Gem::Version
|
160
173
|
version: 1.8.7
|
161
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
none: false
|
162
176
|
requirements:
|
163
|
-
- - '>='
|
177
|
+
- - ! '>='
|
164
178
|
- !ruby/object:Gem::Version
|
165
179
|
version: 1.3.6
|
166
180
|
requirements: []
|
167
181
|
rubyforge_project:
|
168
|
-
rubygems_version:
|
182
|
+
rubygems_version: 1.8.23.2
|
169
183
|
signing_key:
|
170
|
-
specification_version:
|
184
|
+
specification_version: 3
|
171
185
|
summary: A collection of helper and filters for nanoc
|
172
186
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 02fecbe3e2894355f71266654a94f9e2bff7b11c
|
4
|
-
data.tar.gz: 0eaf5eee8df6c5a23e429ac5526749340983c287
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 0194d9fdf70f76de1e55fa5a50a926fc17dc44d0323c02b651e653b0c8f32a3455a953025117ad9af24a9336ba571db43f44ed5bb5e435812873ae4128e494fb
|
7
|
-
data.tar.gz: 75921bf08dda8347d58e19114d88afdbff62701cf35e080bf3bbac907dec0b6f370502f8284e47d94dae5213a0fd262ba03207bd2d81edb8064837c4472537d5
|