mr-edward 0.7.1 → 0.8.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/src/builder.rb +15 -8
- data/src/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4899827fcc622c14f2ffdda47ce5cb229895abbf9854695c6fcbd030bb862f0c
|
|
4
|
+
data.tar.gz: 50cde10a903f2cbfb83c00cabe774df80780058372e7668051a5f93e069c94ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e0767d409930d971197cfe0d53be930e4ffea91b1e8cb40ba3c9fcc63d89f76923c8bf92f0d2556196b4dd3dd5be069e0be3ed546b6de38380cd1e6a17326ab
|
|
7
|
+
data.tar.gz: 14eec3ee76c9ea4b88856cd9a307492760c8c6ec647cd81b9a0b94598670572bf8b0f9538ebb997b9bbfac32ac91a1ee0ff8371c0235962d8c95f808b1ae977d
|
data/src/builder.rb
CHANGED
|
@@ -10,9 +10,8 @@ module Edward
|
|
|
10
10
|
|
|
11
11
|
def initialize
|
|
12
12
|
@target = "_site"
|
|
13
|
-
@
|
|
14
|
-
|
|
15
|
-
Tilt::AsciidoctorTemplate.include(AsciiDoctorUnsafeByDefault) rescue
|
|
13
|
+
@ignored = ignore_files
|
|
14
|
+
Tilt::AsciidoctorTemplate.include(AsciiDoctorUnsafeByDefault) rescue nil
|
|
16
15
|
load("./_setup.rb") if File.exist? "_setup.rb"
|
|
17
16
|
end
|
|
18
17
|
|
|
@@ -29,13 +28,21 @@ module Edward
|
|
|
29
28
|
write_pages
|
|
30
29
|
|
|
31
30
|
end
|
|
32
|
-
|
|
31
|
+
|
|
32
|
+
# generate list of ignored files
|
|
33
|
+
def ignore_files
|
|
34
|
+
(["Gemfile", "Gemfile.lock", "Rakefile"] +
|
|
35
|
+
(File.readlines(".gitignore", chomp: true) rescue []) +
|
|
36
|
+
(File.readlines(".edwardignore", chomp: true) rescue [])
|
|
37
|
+
).reject { it.strip.empty? || it.start_with?("#") }
|
|
38
|
+
.map { it.chomp("/") }
|
|
39
|
+
.flat_map { |pattern| Dir.glob(pattern.include?("/") ? pattern.delete_prefix("/") : "**/#{pattern}") }
|
|
40
|
+
end
|
|
41
|
+
|
|
33
42
|
def visit_file? path
|
|
34
43
|
File.file?(path) &&
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
!@gitignore.include?(path) &&
|
|
38
|
-
!@edwardignore.include?(path)
|
|
44
|
+
!path.start_with?("_") &&
|
|
45
|
+
@ignored.none? { path == it || path.start_with?("#{it}/") }
|
|
39
46
|
end
|
|
40
47
|
|
|
41
48
|
def visit_file path
|
data/src/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mr-edward
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rein Fernhout
|
|
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
88
88
|
requirements:
|
|
89
89
|
- - ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '0'
|
|
91
|
+
version: '4.0'
|
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - ">="
|