hoe-markdown 1.3.0 → 1.4.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/CHANGELOG.md +7 -0
- data/README.md +6 -1
- data/lib/hoe/markdown.rb +2 -1
- data/lib/hoe/markdown/util.rb +6 -0
- data/lib/hoe/markdown/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7db824eae2f2f51e7245761214694782cb873e324b96c04e0b86a6f330157b
|
4
|
+
data.tar.gz: af890db8cd4fd366c91771ed6963dbfd57a8c132c502952ad66e03a1943075a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65e9a5b13c8d4f32d16181c334b1a55683a1e9fce67418a412f7cc8ccf3869537d5eb599afc12ad507cf1ad72339b17506027b6edfcfe65a1a160c7bc0b1b1ae
|
7
|
+
data.tar.gz: eaa453428312cf92bf51ae8d3c6d76b75fc5611503f110cc43fc54b337e709f1c096d0de8835d1e6264f046866c52ad32e686602bd1bbc79fae2c462c4175d75
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -98,7 +98,12 @@ require "hoe/markdown"
|
|
98
98
|
Hoe::Markdown::Standalone.new("gemname").define_markdown_tasks
|
99
99
|
```
|
100
100
|
|
101
|
-
This will attempt to read your gemspec from `#{gemname}.gemspec`, and then the same rake tasks described above are created and behave the same way.
|
101
|
+
This will attempt to read your gemspec from `#{gemname}.gemspec`, and then the same rake tasks described above are created and behave the same way. If you have additional files (beyond the files declared in the gemspec), you may pass them into this method:
|
102
|
+
|
103
|
+
``` ruby
|
104
|
+
require "hoe/markdown"
|
105
|
+
Hoe::Markdown::Standalone.new("gemname").define_markdown_tasks("CHANGELOG.md", "CONTRIBUTORS.md")
|
106
|
+
```
|
102
107
|
|
103
108
|
|
104
109
|
## Contributing
|
data/lib/hoe/markdown.rb
CHANGED
@@ -25,8 +25,9 @@ class Hoe
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def define_markdown_tasks
|
28
|
+
def define_markdown_tasks(*additional_files)
|
29
29
|
@markdown_linkify_files ||= default_markdown_linkify_files
|
30
|
+
@markdown_linkify_files = @markdown_linkify_files.append(*additional_files).uniq
|
30
31
|
return if markdown_linkify_files.empty?
|
31
32
|
|
32
33
|
namespace_name = "markdown:linkify"
|
data/lib/hoe/markdown/util.rb
CHANGED
@@ -27,6 +27,8 @@ class Hoe
|
|
27
27
|
(?![[[:alnum:]]-])
|
28
28
|
}x
|
29
29
|
|
30
|
+
GIT_SHA1_REGEX = %{\b[0-9a-f]{5,40}\b}
|
31
|
+
|
30
32
|
def self.linkify_github_issues(markdown, issues_uri)
|
31
33
|
if issues_uri.nil? || issues_uri.empty?
|
32
34
|
raise "#{__FILE__}:#{__method__}: URI for bugs cannot be empty\n"
|
@@ -62,6 +64,10 @@ class Hoe
|
|
62
64
|
def self.linkify_github_usernames(markdown)
|
63
65
|
markdown.gsub(GITHUB_USER_REGEX, "[@\\1](https://github.com/\\1)")
|
64
66
|
end
|
67
|
+
|
68
|
+
def self.linkify_git_commits(markdown)
|
69
|
+
markdown.gsub(GITHUB_SHA1_REGEX, "[`\\1`](https://)") # TODO YOU WERE HERE
|
70
|
+
end
|
65
71
|
end
|
66
72
|
end
|
67
73
|
end
|
data/lib/hoe/markdown/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.1.
|
71
|
+
rubygems_version: 3.1.4
|
72
72
|
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Hoe plugin with helpers for markdown documentation files.
|