paperwork 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 151389aa8930969de29cb2e7969505d8c52f085ffc46cf43bb3168575acbb325
|
4
|
+
data.tar.gz: 8121a20fc3f36067e2273b9cf6ac92173b9ad84cf25f1579c7f20afe1e5bfaf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6ada05928138cb198175167a0b9cbb1148dcc875f9ccf3a12049eb759a60832dffd538de17c31d4138aa8d4bf6ef7f1cb9b26d23d863e8770e1044ebb572ef
|
7
|
+
data.tar.gz: ea9028ea7f182d5d98841dc6e01ebe75c6e45e6839389c4a4247219e3efd56648ac317985209cecc2c1a25fbf3f0466cf780025648ef3d1e7498ef119cf328c1
|
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ module Paperwork
|
|
9
9
|
##
|
10
10
|
# main task generator for building the document
|
11
11
|
#
|
12
|
-
class Document < Paperwork::Tasks::Base
|
12
|
+
class Document < Paperwork::Tasks::Base # rubocop:disable Metrics/ClassLength
|
13
13
|
attr_reader :dir
|
14
14
|
|
15
15
|
include Rake::DSL
|
@@ -34,13 +34,13 @@ module Paperwork
|
|
34
34
|
|
35
35
|
private
|
36
36
|
|
37
|
-
def get_destination(dst_base, src) # rubocop:disable Metrics/AbcSize
|
37
|
+
def get_destination(dst_base, src) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
38
38
|
nested_base = File.dirname(src)
|
39
|
-
if nested_base == "."
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
nested_base = if nested_base == "."
|
40
|
+
dst_base
|
41
|
+
else
|
42
|
+
File.join(dst_base, nested_base)
|
43
|
+
end
|
44
44
|
|
45
45
|
ext = File.extname(src)
|
46
46
|
case ext
|
@@ -86,9 +86,9 @@ module Paperwork
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
def tasks_nested # rubocop:disable Metrics/AbcSize
|
90
|
-
namespace :paperwork do
|
91
|
-
namespace self.name do
|
89
|
+
def tasks_nested # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
90
|
+
namespace :paperwork do # rubocop:disable Metrics/BlockLength
|
91
|
+
namespace self.name do # rubocop:disable Metrics/BlockLength
|
92
92
|
task build: ["paperwork:#{self.name}"]
|
93
93
|
|
94
94
|
desc "rebuild documentation from scratch for '#{self.name}'"
|
@@ -105,6 +105,31 @@ module Paperwork
|
|
105
105
|
task :clean do
|
106
106
|
rm_rf self.dir
|
107
107
|
end
|
108
|
+
|
109
|
+
desc "start middleman server for editing documents and get visual feedback with live reload"
|
110
|
+
task server: :build do
|
111
|
+
Dir.chdir(self.dir) do
|
112
|
+
Bundler.with_unbundled_env do
|
113
|
+
Process.spawn(
|
114
|
+
"bundle exec middleman server",
|
115
|
+
out: :out,
|
116
|
+
in: :in,
|
117
|
+
err: :err
|
118
|
+
)
|
119
|
+
end
|
120
|
+
puts
|
121
|
+
puts "+---------------------------------------------------------------+"
|
122
|
+
puts "| |"
|
123
|
+
puts "| IMPORTANT: Edit documents in #{self.dir} for live reload! |"
|
124
|
+
puts "| ---------- The documents there are hard links to your |"
|
125
|
+
puts "| source files, so the changes will be there |"
|
126
|
+
puts "| as well. |"
|
127
|
+
puts "| |"
|
128
|
+
puts "+---------------------------------------------------------------+"
|
129
|
+
puts
|
130
|
+
Process.waitall
|
131
|
+
end
|
132
|
+
end
|
108
133
|
end
|
109
134
|
end
|
110
135
|
end
|
@@ -20,7 +20,7 @@ module InfoHelpers
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def relative_link(stringifyable, current_path=current_page.path)
|
23
|
+
def relative_link(stringifyable, current_path = current_page.path)
|
24
24
|
relative = String.new
|
25
25
|
dots = current_path.split(/[\/\\]/).size - 1
|
26
26
|
dots.times{ relative += "../" }
|
data/lib/paperwork/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schmid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|