mint 0.8.0 → 0.10.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.
- checksums.yaml +4 -4
- data/Gemfile +1 -26
- data/README.md +138 -95
- data/bin/mint +2 -81
- data/config/templates/base/navigation.css +136 -0
- data/config/templates/base/print.css +152 -0
- data/config/templates/{reset.css → base/reset.css} +1 -1
- data/config/templates/base/style.css +117 -137
- data/config/templates/base/utilities.css +136 -0
- data/config/templates/base/variables.css +124 -0
- data/config/templates/basic/style.css +151 -0
- data/config/templates/default/layout.erb +33 -3
- data/config/templates/default/style.css +95 -164
- data/config/templates/magazine/style.css +383 -0
- data/config/templates/nord/style.css +105 -220
- data/config/templates/nord-dark/style.css +82 -263
- data/lib/mint/commandline/parse.rb +144 -0
- data/lib/mint/commandline/publish.rb +46 -0
- data/lib/mint/commandline/run.rb +30 -0
- data/lib/mint/config.rb +162 -0
- data/lib/mint/{css.rb → css_dsl.rb} +9 -9
- data/lib/mint/css_parser.rb +96 -0
- data/lib/mint/document.rb +251 -348
- data/lib/mint/document_tree.rb +163 -0
- data/lib/mint/exceptions.rb +2 -3
- data/lib/mint/helpers.rb +23 -180
- data/lib/mint/layout.rb +26 -9
- data/lib/mint/renderers/css_renderer.rb +32 -0
- data/lib/mint/renderers/erb_renderer.rb +11 -0
- data/lib/mint/renderers/markdown_renderer.rb +45 -0
- data/lib/mint/style.rb +21 -31
- data/lib/mint/template.rb +30 -0
- data/lib/mint/version.rb +1 -1
- data/lib/mint/workspace.rb +171 -0
- data/lib/mint.rb +44 -12
- data/man/mint.1 +88 -47
- data/spec/cli/README.md +13 -13
- data/spec/cli/argument_parsing_spec.rb +103 -131
- data/spec/cli/bin_integration_spec.rb +23 -243
- data/spec/cli/full_workflow_integration_spec.rb +99 -442
- data/spec/cli/original_style_integration_spec.rb +58 -0
- data/spec/cli/publish_workflow_spec.rb +72 -70
- data/spec/commandline_path_integration_spec.rb +230 -0
- data/spec/config_file_integration_spec.rb +362 -0
- data/spec/{css_spec.rb → css_dsl_spec.rb} +7 -3
- data/spec/css_parser_spec.rb +207 -0
- data/spec/document_spec.rb +37 -242
- data/spec/flattened_path_spec.rb +150 -0
- data/spec/layout_spec.rb +42 -3
- data/spec/mint_spec.rb +22 -217
- data/spec/path_handling_spec.rb +237 -0
- data/spec/run_cli_tests.rb +1 -1
- data/spec/spec_helper.rb +3 -10
- data/spec/style_spec.rb +31 -56
- data/spec/support/cli_helpers.rb +7 -10
- data/spec/support/matchers.rb +1 -1
- data/spec/template_spec.rb +31 -0
- data/spec/workspace_spec.rb +177 -0
- metadata +78 -93
- data/bin/mint-epub +0 -20
- data/config/templates/default/css/style.css +0 -205
- data/config/templates/garden/layout.erb +0 -38
- data/config/templates/garden/style.css +0 -303
- data/config/templates/newspaper/layout.erb +0 -16
- data/config/templates/nord/layout.erb +0 -11
- data/config/templates/nord-dark/layout.erb +0 -11
- data/config/templates/protocol/layout.erb +0 -9
- data/config/templates/protocol/style.css +0 -25
- data/config/templates/zen/layout.erb +0 -11
- data/config/templates/zen/style.css +0 -114
- data/lib/mint/command_line.rb +0 -360
- data/lib/mint/css_template.rb +0 -37
- data/lib/mint/markdown_template.rb +0 -47
- data/lib/mint/mint.rb +0 -313
- data/lib/mint/plugin.rb +0 -136
- data/lib/mint/plugins/epub.rb +0 -293
- data/lib/mint/resource.rb +0 -101
- data/plugins/templates/epub/layouts/container.haml +0 -5
- data/plugins/templates/epub/layouts/content.haml +0 -35
- data/plugins/templates/epub/layouts/layout.haml +0 -6
- data/plugins/templates/epub/layouts/title.haml +0 -11
- data/plugins/templates/epub/layouts/toc.haml +0 -26
- data/spec/cli/configuration_management_spec.rb +0 -363
- data/spec/cli/template_management_spec.rb +0 -300
- data/spec/helpers_spec.rb +0 -249
- data/spec/plugin_spec.rb +0 -449
- data/spec/resource_spec.rb +0 -135
data/spec/support/matchers.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec::Matchers.define :be_path do |name|
|
|
7
7
|
end
|
8
8
|
|
9
9
|
RSpec::Matchers.define :be_in_template do |name|
|
10
|
-
match {|file| file =~ /#{Mint::
|
10
|
+
match {|file| file =~ /#{Mint::PROJECT_ROOT}.*#{name}/ }
|
11
11
|
end
|
12
12
|
|
13
13
|
RSpec::Matchers.define :be_a_template do |name|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Mint::Template do
|
4
|
+
describe ".valid?" do
|
5
|
+
it "determines if a directory is a valid template directory" do
|
6
|
+
Dir.mktmpdir do |tmpdir|
|
7
|
+
template_dir = Pathname.new(tmpdir) + "test_template"
|
8
|
+
template_dir.mkdir
|
9
|
+
|
10
|
+
# Empty directory should not be valid (returns empty array)
|
11
|
+
expect(Mint::Template.valid?(template_dir)).to be_empty
|
12
|
+
|
13
|
+
# Directory with stylesheet should be valid
|
14
|
+
(template_dir + "style.css").write("body { color: black; }")
|
15
|
+
expect(Mint::Template.valid?(template_dir)).to be_truthy
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe ".find_directory_by_name" do
|
21
|
+
it "returns template directory path by name" do
|
22
|
+
# This will return nil if template doesn't exist, which is expected
|
23
|
+
result = Mint::Template.find_directory_by_name("default")
|
24
|
+
if result
|
25
|
+
expect(result).to be_a(Pathname)
|
26
|
+
else
|
27
|
+
expect(result).to be_nil
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,177 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module Mint
|
4
|
+
describe Workspace do
|
5
|
+
around(:each) do |example|
|
6
|
+
in_temp_dir do |dir|
|
7
|
+
File.write("test.md", "# Test")
|
8
|
+
@workspace = begin
|
9
|
+
config = Mint::Config.with_defaults(destination_directory: Pathname.new("output"))
|
10
|
+
Workspace.new([Pathname.new("test.md")], config)
|
11
|
+
end
|
12
|
+
example.run
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#update_path_basename" do
|
17
|
+
it "formats basic filename with new extension" do
|
18
|
+
result = @workspace.update_path_basename(Pathname.new("document.md"),
|
19
|
+
new_extension: "html", format_string: "%{name}.%{ext}")
|
20
|
+
expect(result).to eq(Pathname.new("document.html"))
|
21
|
+
end
|
22
|
+
|
23
|
+
it "uses custom format string" do
|
24
|
+
result = @workspace.update_path_basename(Pathname.new("document.md"),
|
25
|
+
new_extension: "html", format_string: "%{name}_output.%{ext}")
|
26
|
+
expect(result).to eq(Pathname.new("document_output.html"))
|
27
|
+
end
|
28
|
+
|
29
|
+
it "provides access to original extension" do
|
30
|
+
result = @workspace.update_path_basename(Pathname.new("document.md"),
|
31
|
+
new_extension: "html", format_string: "%{name}.%{original_ext}.%{ext}")
|
32
|
+
expect(result).to eq(Pathname.new("document.md.html"))
|
33
|
+
end
|
34
|
+
|
35
|
+
it "handles files without extension" do
|
36
|
+
result = @workspace.update_path_basename(Pathname.new("README"),
|
37
|
+
new_extension: "html", format_string: "%{name}.%{ext}")
|
38
|
+
expect(result).to eq(Pathname.new("README.html"))
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "autodrop functionality" do
|
43
|
+
around(:each) do |example|
|
44
|
+
in_temp_dir do |dir|
|
45
|
+
@test_dir = dir
|
46
|
+
create_template_directory("default")
|
47
|
+
example.run
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#calculate_autodrop_levels" do
|
52
|
+
it "returns 0 for single file" do
|
53
|
+
File.write("readme.md", "# README")
|
54
|
+
workspace = Workspace.new([Pathname.new("readme.md")], Config.defaults)
|
55
|
+
expect(workspace.send(:calculate_autodrop_levels_for, [Pathname.new("readme.md")])).to eq(0)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "calculates common prefix for multiple files" do
|
59
|
+
FileUtils.mkdir_p(["common/docs", "common/src"])
|
60
|
+
files = [
|
61
|
+
Pathname.new("common/docs/api.md"),
|
62
|
+
Pathname.new("common/docs/guide.md"),
|
63
|
+
Pathname.new("common/src/code.md")
|
64
|
+
]
|
65
|
+
files.each {|file| File.write(file, "# Content") }
|
66
|
+
workspace = Workspace.new(files, Config.defaults)
|
67
|
+
expect(workspace.send(:calculate_autodrop_levels_for, files)).to eq(1)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "handles deeply nested common paths" do
|
71
|
+
FileUtils.mkdir_p(["very/deeply/nested/dir1", "very/deeply/nested/dir2"])
|
72
|
+
files = [
|
73
|
+
Pathname.new("very/deeply/nested/dir1/file1.md"),
|
74
|
+
Pathname.new("very/deeply/nested/dir2/file2.md")
|
75
|
+
]
|
76
|
+
files.each {|file| File.write(file, "# Content") }
|
77
|
+
workspace = Workspace.new(files, Config.defaults)
|
78
|
+
expect(workspace.send(:calculate_autodrop_levels_for, files)).to eq(3)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "returns 0 when no common prefix exists" do
|
82
|
+
FileUtils.mkdir_p(["docs", "src"])
|
83
|
+
files = [
|
84
|
+
Pathname.new("docs/guide.md"),
|
85
|
+
Pathname.new("src/code.md")
|
86
|
+
]
|
87
|
+
files.each {|file| File.write(file, "# Content") }
|
88
|
+
workspace = Workspace.new(files, Config.defaults)
|
89
|
+
expect(workspace.send(:calculate_autodrop_levels_for, files)).to eq(0)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe "autodrop behavior in publishing" do
|
94
|
+
it "drops common levels from destination paths when autodrop is enabled" do
|
95
|
+
FileUtils.mkdir_p(["common/docs", "common/src", "output"])
|
96
|
+
create_markdown_path("common/docs/api.md", "# API Documentation")
|
97
|
+
create_markdown_path("common/docs/guide.md", "# User Guide")
|
98
|
+
create_markdown_path("common/src/code.md", "# Code Documentation")
|
99
|
+
|
100
|
+
files = [
|
101
|
+
Pathname.new("common/docs/api.md"),
|
102
|
+
Pathname.new("common/docs/guide.md"),
|
103
|
+
Pathname.new("common/src/code.md")
|
104
|
+
]
|
105
|
+
|
106
|
+
config = Config.with_defaults(
|
107
|
+
destination_directory: Pathname.new("output"),
|
108
|
+
preserve_structure: true,
|
109
|
+
autodrop: true
|
110
|
+
)
|
111
|
+
|
112
|
+
workspace = Workspace.new(files, config)
|
113
|
+
workspace.publish!
|
114
|
+
|
115
|
+
# Files should be placed without the "common" prefix
|
116
|
+
expect(File.exist?("output/docs/api.html")).to be true
|
117
|
+
expect(File.exist?("output/docs/guide.html")).to be true
|
118
|
+
expect(File.exist?("output/src/code.html")).to be true
|
119
|
+
|
120
|
+
# Files should NOT be placed with the full path
|
121
|
+
expect(File.exist?("output/common/docs/api.html")).to be false
|
122
|
+
end
|
123
|
+
|
124
|
+
it "preserves full paths when autodrop is disabled" do
|
125
|
+
FileUtils.mkdir_p(["common/docs", "common/src", "output"])
|
126
|
+
create_markdown_path("common/docs/api.md", "# API Documentation")
|
127
|
+
create_markdown_path("common/src/code.md", "# Code Documentation")
|
128
|
+
|
129
|
+
files = [
|
130
|
+
Pathname.new("common/docs/api.md"),
|
131
|
+
Pathname.new("common/src/code.md")
|
132
|
+
]
|
133
|
+
|
134
|
+
config = Config.with_defaults(
|
135
|
+
destination_directory: Pathname.new("output"),
|
136
|
+
preserve_structure: true,
|
137
|
+
autodrop: false
|
138
|
+
)
|
139
|
+
|
140
|
+
workspace = Workspace.new(files, config)
|
141
|
+
workspace.publish!
|
142
|
+
|
143
|
+
# Files should be placed with full path preserved
|
144
|
+
expect(File.exist?("output/common/docs/api.html")).to be true
|
145
|
+
expect(File.exist?("output/common/src/code.html")).to be true
|
146
|
+
|
147
|
+
# Files should NOT be placed without the common prefix
|
148
|
+
expect(File.exist?("output/docs/api.html")).to be false
|
149
|
+
end
|
150
|
+
|
151
|
+
it "doesn't affect paths when preserve_structure is false" do
|
152
|
+
FileUtils.mkdir_p(["common/docs", "output"])
|
153
|
+
create_markdown_path("common/docs/api.md", "# API Documentation")
|
154
|
+
create_markdown_path("common/docs/guide.md", "# User Guide")
|
155
|
+
|
156
|
+
files = [
|
157
|
+
Pathname.new("common/docs/api.md"),
|
158
|
+
Pathname.new("common/docs/guide.md")
|
159
|
+
]
|
160
|
+
|
161
|
+
config = Config.with_defaults(
|
162
|
+
destination_directory: Pathname.new("output"),
|
163
|
+
preserve_structure: false,
|
164
|
+
autodrop: true
|
165
|
+
)
|
166
|
+
|
167
|
+
workspace = Workspace.new(files, config)
|
168
|
+
workspace.publish!
|
169
|
+
|
170
|
+
# Files should be placed directly in destination without structure
|
171
|
+
expect(File.exist?("output/api.html")).to be true
|
172
|
+
expect(File.exist?("output/guide.html")).to be true
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Jacobs
|
@@ -9,26 +9,6 @@ bindir: bin
|
|
9
9
|
cert_chain: []
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
|
-
- !ruby/object:Gem::Dependency
|
13
|
-
name: tilt
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
15
|
-
requirements:
|
16
|
-
- - "~>"
|
17
|
-
- !ruby/object:Gem::Version
|
18
|
-
version: '2.6'
|
19
|
-
- - ">="
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 2.6.1
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - "~>"
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '2.6'
|
29
|
-
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 2.6.1
|
32
12
|
- !ruby/object:Gem::Dependency
|
33
13
|
name: redcarpet
|
34
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,20 +29,6 @@ dependencies:
|
|
49
29
|
- - ">="
|
50
30
|
- !ruby/object:Gem::Version
|
51
31
|
version: 3.6.1
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: haml
|
54
|
-
requirement: !ruby/object:Gem::Requirement
|
55
|
-
requirements:
|
56
|
-
- - "~>"
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: '6.3'
|
59
|
-
type: :runtime
|
60
|
-
prerelease: false
|
61
|
-
version_requirements: !ruby/object:Gem::Requirement
|
62
|
-
requirements:
|
63
|
-
- - "~>"
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '6.3'
|
66
32
|
- !ruby/object:Gem::Dependency
|
67
33
|
name: sass-embedded
|
68
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,19 +50,19 @@ dependencies:
|
|
84
50
|
- !ruby/object:Gem::Version
|
85
51
|
version: 1.89.2
|
86
52
|
- !ruby/object:Gem::Dependency
|
87
|
-
name:
|
53
|
+
name: toml
|
88
54
|
requirement: !ruby/object:Gem::Requirement
|
89
55
|
requirements:
|
90
56
|
- - "~>"
|
91
57
|
- !ruby/object:Gem::Version
|
92
|
-
version: '
|
58
|
+
version: '0.3'
|
93
59
|
type: :runtime
|
94
60
|
prerelease: false
|
95
61
|
version_requirements: !ruby/object:Gem::Requirement
|
96
62
|
requirements:
|
97
63
|
- - "~>"
|
98
64
|
- !ruby/object:Gem::Version
|
99
|
-
version: '
|
65
|
+
version: '0.3'
|
100
66
|
- !ruby/object:Gem::Dependency
|
101
67
|
name: activesupport
|
102
68
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,53 +84,73 @@ dependencies:
|
|
118
84
|
- !ruby/object:Gem::Version
|
119
85
|
version: 8.0.2.1
|
120
86
|
- !ruby/object:Gem::Dependency
|
121
|
-
name:
|
87
|
+
name: byebug
|
122
88
|
requirement: !ruby/object:Gem::Requirement
|
123
89
|
requirements:
|
124
90
|
- - "~>"
|
125
91
|
- !ruby/object:Gem::Version
|
126
|
-
version: 1
|
127
|
-
|
92
|
+
version: '11.1'
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 11.1.3
|
96
|
+
type: :development
|
128
97
|
prerelease: false
|
129
98
|
version_requirements: !ruby/object:Gem::Requirement
|
130
99
|
requirements:
|
131
100
|
- - "~>"
|
132
101
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1
|
102
|
+
version: '11.1'
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 11.1.3
|
134
106
|
- !ruby/object:Gem::Dependency
|
135
|
-
name:
|
107
|
+
name: rspec
|
136
108
|
requirement: !ruby/object:Gem::Requirement
|
137
109
|
requirements:
|
138
110
|
- - "~>"
|
139
111
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
141
|
-
|
112
|
+
version: '3.13'
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 3.13.1
|
116
|
+
type: :development
|
142
117
|
prerelease: false
|
143
118
|
version_requirements: !ruby/object:Gem::Requirement
|
144
119
|
requirements:
|
145
120
|
- - "~>"
|
146
121
|
- !ruby/object:Gem::Version
|
147
|
-
version: '
|
122
|
+
version: '3.13'
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 3.13.1
|
148
126
|
- !ruby/object:Gem::Dependency
|
149
|
-
name:
|
127
|
+
name: rspec-its
|
150
128
|
requirement: !ruby/object:Gem::Requirement
|
151
129
|
requirements:
|
152
130
|
- - "~>"
|
153
131
|
- !ruby/object:Gem::Version
|
154
|
-
version: '3
|
155
|
-
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: 3.0.1
|
158
|
-
type: :runtime
|
132
|
+
version: '1.3'
|
133
|
+
type: :development
|
159
134
|
prerelease: false
|
160
135
|
version_requirements: !ruby/object:Gem::Requirement
|
161
136
|
requirements:
|
162
137
|
- - "~>"
|
163
138
|
- !ruby/object:Gem::Version
|
164
|
-
version: '3
|
165
|
-
|
139
|
+
version: '1.3'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: colorize
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '1.1'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
166
152
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
153
|
+
version: '1.1'
|
168
154
|
description: Clean, simple library for maintaining and styling documents without a
|
169
155
|
word processor. Mint aims to bring the best of the Web to desktop publishing, to
|
170
156
|
be completely flexible, and to let the user decide what his workflow is like. A
|
@@ -172,7 +158,6 @@ description: Clean, simple library for maintaining and styling documents without
|
|
172
158
|
email: david@wit.io
|
173
159
|
executables:
|
174
160
|
- mint
|
175
|
-
- mint-epub
|
176
161
|
extensions: []
|
177
162
|
extra_rdoc_files: []
|
178
163
|
files:
|
@@ -180,58 +165,53 @@ files:
|
|
180
165
|
- LICENSE
|
181
166
|
- README.md
|
182
167
|
- bin/mint
|
183
|
-
-
|
168
|
+
- config/templates/base/navigation.css
|
169
|
+
- config/templates/base/print.css
|
170
|
+
- config/templates/base/reset.css
|
184
171
|
- config/templates/base/style.css
|
185
|
-
- config/templates/
|
172
|
+
- config/templates/base/utilities.css
|
173
|
+
- config/templates/base/variables.css
|
174
|
+
- config/templates/basic/style.css
|
186
175
|
- config/templates/default/layout.erb
|
187
176
|
- config/templates/default/style.css
|
188
|
-
- config/templates/
|
189
|
-
- config/templates/garden/style.css
|
190
|
-
- config/templates/newspaper/layout.erb
|
191
|
-
- config/templates/nord-dark/layout.erb
|
177
|
+
- config/templates/magazine/style.css
|
192
178
|
- config/templates/nord-dark/style.css
|
193
|
-
- config/templates/nord/layout.erb
|
194
179
|
- config/templates/nord/style.css
|
195
|
-
- config/templates/protocol/layout.erb
|
196
|
-
- config/templates/protocol/style.css
|
197
|
-
- config/templates/reset.css
|
198
|
-
- config/templates/zen/layout.erb
|
199
|
-
- config/templates/zen/style.css
|
200
180
|
- lib/mint.rb
|
201
|
-
- lib/mint/
|
202
|
-
- lib/mint/
|
203
|
-
- lib/mint/
|
181
|
+
- lib/mint/commandline/parse.rb
|
182
|
+
- lib/mint/commandline/publish.rb
|
183
|
+
- lib/mint/commandline/run.rb
|
184
|
+
- lib/mint/config.rb
|
185
|
+
- lib/mint/css_dsl.rb
|
186
|
+
- lib/mint/css_parser.rb
|
204
187
|
- lib/mint/document.rb
|
188
|
+
- lib/mint/document_tree.rb
|
205
189
|
- lib/mint/exceptions.rb
|
206
190
|
- lib/mint/helpers.rb
|
207
191
|
- lib/mint/layout.rb
|
208
|
-
- lib/mint/
|
209
|
-
- lib/mint/
|
210
|
-
- lib/mint/
|
211
|
-
- lib/mint/plugins/epub.rb
|
212
|
-
- lib/mint/resource.rb
|
192
|
+
- lib/mint/renderers/css_renderer.rb
|
193
|
+
- lib/mint/renderers/erb_renderer.rb
|
194
|
+
- lib/mint/renderers/markdown_renderer.rb
|
213
195
|
- lib/mint/style.rb
|
196
|
+
- lib/mint/template.rb
|
214
197
|
- lib/mint/version.rb
|
198
|
+
- lib/mint/workspace.rb
|
215
199
|
- man/mint.1
|
216
|
-
- plugins/templates/epub/layouts/container.haml
|
217
|
-
- plugins/templates/epub/layouts/content.haml
|
218
|
-
- plugins/templates/epub/layouts/layout.haml
|
219
|
-
- plugins/templates/epub/layouts/title.haml
|
220
|
-
- plugins/templates/epub/layouts/toc.haml
|
221
200
|
- spec/cli/README.md
|
222
201
|
- spec/cli/argument_parsing_spec.rb
|
223
202
|
- spec/cli/bin_integration_spec.rb
|
224
|
-
- spec/cli/configuration_management_spec.rb
|
225
203
|
- spec/cli/full_workflow_integration_spec.rb
|
204
|
+
- spec/cli/original_style_integration_spec.rb
|
226
205
|
- spec/cli/publish_workflow_spec.rb
|
227
|
-
- spec/
|
228
|
-
- spec/
|
206
|
+
- spec/commandline_path_integration_spec.rb
|
207
|
+
- spec/config_file_integration_spec.rb
|
208
|
+
- spec/css_dsl_spec.rb
|
209
|
+
- spec/css_parser_spec.rb
|
229
210
|
- spec/document_spec.rb
|
230
|
-
- spec/
|
211
|
+
- spec/flattened_path_spec.rb
|
231
212
|
- spec/layout_spec.rb
|
232
213
|
- spec/mint_spec.rb
|
233
|
-
- spec/
|
234
|
-
- spec/resource_spec.rb
|
214
|
+
- spec/path_handling_spec.rb
|
235
215
|
- spec/run_cli_tests.rb
|
236
216
|
- spec/spec_helper.rb
|
237
217
|
- spec/style_spec.rb
|
@@ -242,6 +222,8 @@ files:
|
|
242
222
|
- spec/support/fixtures/layout.haml
|
243
223
|
- spec/support/fixtures/static.css
|
244
224
|
- spec/support/matchers.rb
|
225
|
+
- spec/template_spec.rb
|
226
|
+
- spec/workspace_spec.rb
|
245
227
|
homepage: https://github.com/davejacobs/mint
|
246
228
|
licenses:
|
247
229
|
- MIT
|
@@ -267,17 +249,18 @@ test_files:
|
|
267
249
|
- spec/cli/README.md
|
268
250
|
- spec/cli/argument_parsing_spec.rb
|
269
251
|
- spec/cli/bin_integration_spec.rb
|
270
|
-
- spec/cli/configuration_management_spec.rb
|
271
252
|
- spec/cli/full_workflow_integration_spec.rb
|
253
|
+
- spec/cli/original_style_integration_spec.rb
|
272
254
|
- spec/cli/publish_workflow_spec.rb
|
273
|
-
- spec/
|
274
|
-
- spec/
|
255
|
+
- spec/commandline_path_integration_spec.rb
|
256
|
+
- spec/config_file_integration_spec.rb
|
257
|
+
- spec/css_dsl_spec.rb
|
258
|
+
- spec/css_parser_spec.rb
|
275
259
|
- spec/document_spec.rb
|
276
|
-
- spec/
|
260
|
+
- spec/flattened_path_spec.rb
|
277
261
|
- spec/layout_spec.rb
|
278
262
|
- spec/mint_spec.rb
|
279
|
-
- spec/
|
280
|
-
- spec/resource_spec.rb
|
263
|
+
- spec/path_handling_spec.rb
|
281
264
|
- spec/run_cli_tests.rb
|
282
265
|
- spec/spec_helper.rb
|
283
266
|
- spec/style_spec.rb
|
@@ -288,3 +271,5 @@ test_files:
|
|
288
271
|
- spec/support/fixtures/layout.haml
|
289
272
|
- spec/support/fixtures/static.css
|
290
273
|
- spec/support/matchers.rb
|
274
|
+
- spec/template_spec.rb
|
275
|
+
- spec/workspace_spec.rb
|
data/bin/mint-epub
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# A script for publishing Mint in the ePub format
|
4
|
-
# Usage: mint epub [command] [options] [files]
|
5
|
-
|
6
|
-
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
7
|
-
require "mint"
|
8
|
-
require "mint/plugins/epub"
|
9
|
-
|
10
|
-
def usage
|
11
|
-
abort "mint epub publish file"
|
12
|
-
end
|
13
|
-
|
14
|
-
case ARGV.shift.downcase.to_sym
|
15
|
-
when :publish
|
16
|
-
destination = ARGV.first.gsub(/\.[^.]*$/, "")
|
17
|
-
opts = { destination: destination, style_destination: "OPS" }
|
18
|
-
document = Mint::Document.new(ARGV.first, opts)
|
19
|
-
document.publish! :plugins => [Mint::EPub]
|
20
|
-
end
|