md_splitter 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'uuidtools'
|
3
|
-
require 'active_support/inflector'
|
3
|
+
require 'active_support/inflector'
|
4
|
+
require 'base64'
|
4
5
|
|
5
6
|
module MdSplitter
|
6
7
|
class ElfManifestBuilder
|
@@ -54,7 +55,7 @@ module MdSplitter
|
|
54
55
|
|
55
56
|
def build_manifest_object items, id = nil
|
56
57
|
pages = Array.new
|
57
|
-
id
|
58
|
+
id = encode_string id
|
58
59
|
items.each do |item|
|
59
60
|
pages << get_page_object(item)
|
60
61
|
end
|
@@ -71,5 +72,9 @@ module MdSplitter
|
|
71
72
|
:url => File.basename(item)
|
72
73
|
}
|
73
74
|
end
|
75
|
+
|
76
|
+
def encode_string str
|
77
|
+
Base64.urlsafe_encode64 str
|
78
|
+
end
|
74
79
|
end
|
75
80
|
end
|
data/lib/md_splitter/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'md_splitter/elf_manifest_builder'
|
2
|
+
require 'base64'
|
2
3
|
|
3
4
|
describe "ELF manifest builder." do
|
4
5
|
before(:each) do
|
@@ -25,8 +26,10 @@ describe "ELF manifest builder." do
|
|
25
26
|
@result.should be_a(Hash)
|
26
27
|
end
|
27
28
|
|
28
|
-
it "should
|
29
|
-
|
29
|
+
it "should properly encode the id provided" do
|
30
|
+
encoded_id = @result[:id]
|
31
|
+
decoded_id = Base64.urlsafe_decode64 encoded_id
|
32
|
+
decoded_id.should eq @manifest_id
|
30
33
|
end
|
31
34
|
|
32
35
|
it "should have a pages array" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md_splitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-03 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70311673374340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70311673374340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70311673373060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.21
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70311673373060
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70311673371980 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.7.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70311673371980
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard-rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70311673371340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70311673371340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: growl
|
60
|
-
requirement: &
|
60
|
+
requirement: &70311673370480 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70311673370480
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rb-fsevent
|
71
|
-
requirement: &
|
71
|
+
requirement: &70311673369600 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70311673369600
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: kramdown
|
82
|
-
requirement: &
|
82
|
+
requirement: &70311673368520 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.13.3
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70311673368520
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: commander
|
93
|
-
requirement: &
|
93
|
+
requirement: &70311673367460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 4.0.6
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70311673367460
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: json
|
104
|
-
requirement: &
|
104
|
+
requirement: &70311673361960 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 1.6.1
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70311673361960
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: uuidtools
|
115
|
-
requirement: &
|
115
|
+
requirement: &70311673361120 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: 2.1.2
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70311673361120
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: active_support
|
126
|
-
requirement: &
|
126
|
+
requirement: &70311673359880 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: 3.0.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70311673359880
|
135
135
|
description: Parses md docs for split markers and produces multiple html files and
|
136
136
|
a json manifest
|
137
137
|
email:
|
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
segments:
|
183
183
|
- 0
|
184
|
-
hash: -
|
184
|
+
hash: -1265141025115172998
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
none: false
|
187
187
|
requirements:
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
segments:
|
192
192
|
- 0
|
193
|
-
hash: -
|
193
|
+
hash: -1265141025115172998
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project: md_splitter
|
196
196
|
rubygems_version: 1.8.10
|