hoe-markdown 1.2.0 → 1.3.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/Gemfile +0 -1
- data/README.md +15 -2
- data/hoe-markdown.gemspec +2 -0
- data/lib/hoe/markdown.rb +12 -3
- data/lib/hoe/markdown/standalone.rb +13 -0
- data/lib/hoe/markdown/version.rb +1 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abfcef683457297af7eaad6d438adcf6c2035d7a44a42f04218551344705b6a7
|
4
|
+
data.tar.gz: ce73aa0a2e6354778d23169ae711498bcf37816b8dea3c3406590243f39c59f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f45e91e75a7687ab261fa7ec651fb27bff58e5a3df6d1235cc256b6b1b31d79071c6178294244f753eb0d1c82abfd3be956164efc59cb577f04d55f48266b6c
|
7
|
+
data.tar.gz: 50fdb38dba957a40d68e3b1b2eb6b78ca3d8bc338cb258c10ec7fcd096cab15a94b54093f6974b00f82d4a928be65bc3c2adb4f7ecc72fe982ba072e4e08bd01
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Hoe::Markdown is a [Hoe](https://www.zenspider.com/projects/hoe.html) plugin to help manage your project's markdown files. It's intended for gem maintainers, but the underlying library of markdown manipulation methods might be generally useful.
|
4
4
|
|
5
|
+
Hoe::Markdown::Standalone can be used without Hoe.
|
6
|
+
|
5
7
|
|
6
8
|
## Installation
|
7
9
|
|
@@ -20,7 +22,7 @@ Or install it yourself as:
|
|
20
22
|
$ gem install hoe-markdown
|
21
23
|
|
22
24
|
|
23
|
-
## Usage
|
25
|
+
## Usage with Hoe
|
24
26
|
|
25
27
|
In your Rakefile:
|
26
28
|
|
@@ -30,7 +32,6 @@ Hoe::plugin :markdown
|
|
30
32
|
|
31
33
|
Rake tasks are exposed under the `markdown` namespace.
|
32
34
|
|
33
|
-
|
34
35
|
### Choosing your markdown files correctly
|
35
36
|
|
36
37
|
Hoe makes some outdated assumptions about the location of your README and your changelog files, which you (as a maintainer) need to opt out of. Specifically, you probably have something like this in your Rakefile
|
@@ -88,6 +89,18 @@ Thanks, [@hobbes](https://github.com/hobbes)!
|
|
88
89
|
Feature: Finagle the sprocket. See [#456](https://github.com/cogswellcogs/sprocketkiller/issues/456)
|
89
90
|
```
|
90
91
|
|
92
|
+
## Usage without Hoe
|
93
|
+
|
94
|
+
In your Rakefile:
|
95
|
+
|
96
|
+
``` ruby
|
97
|
+
require "hoe/markdown"
|
98
|
+
Hoe::Markdown::Standalone.new("gemname").define_markdown_tasks
|
99
|
+
```
|
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.
|
102
|
+
|
103
|
+
|
91
104
|
## Contributing
|
92
105
|
|
93
106
|
Bug reports and pull requests are welcome on GitHub at https://github.com/flavorjones/hoe-markdown. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/flavorjones/hoe-markdown/blob/master/CODE_OF_CONDUCT.md).
|
data/hoe-markdown.gemspec
CHANGED
data/lib/hoe/markdown.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
+
require "rake"
|
2
|
+
|
1
3
|
class Hoe
|
2
4
|
module Markdown
|
5
|
+
include ::Rake::DSL
|
6
|
+
|
3
7
|
#
|
4
8
|
# Optional: used to specify which markdown files to linkify. [default: any markdown files found in `files`].
|
5
9
|
#
|
@@ -35,8 +39,7 @@ class Hoe
|
|
35
39
|
|
36
40
|
desc "hyperlink github issues and usernames in #{mdfile_name}"
|
37
41
|
task task_name do
|
38
|
-
|
39
|
-
markdown = File.read(mdfile_path)
|
42
|
+
original_markdown = markdown = File.read(mdfile_path)
|
40
43
|
|
41
44
|
markdown = Hoe::Markdown::Util.linkify_github_usernames(markdown)
|
42
45
|
if spec.metadata["bug_tracker_uri"]
|
@@ -45,7 +48,12 @@ class Hoe
|
|
45
48
|
warn "Spec metadata URI for 'bugs' is missing, skipping linkification of issues and pull requests"
|
46
49
|
end
|
47
50
|
|
48
|
-
|
51
|
+
if markdown == original_markdown
|
52
|
+
puts "markdown:linkify: no changes to #{mdfile_path}"
|
53
|
+
else
|
54
|
+
puts "markdown:linkify: updating #{mdfile_path}"
|
55
|
+
File.open(mdfile_path, "w") { |f| f.write markdown }
|
56
|
+
end
|
49
57
|
end
|
50
58
|
linkify_tasks << "#{namespace_name}:#{task_name}"
|
51
59
|
end
|
@@ -59,3 +67,4 @@ end
|
|
59
67
|
|
60
68
|
require "hoe/markdown/version"
|
61
69
|
require "hoe/markdown/util"
|
70
|
+
require "hoe/markdown/standalone"
|
data/lib/hoe/markdown/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.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: 2020-
|
12
|
-
dependencies:
|
11
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: Hoe plugin with markdown helpers, for example to hyperlink github issues
|
14
28
|
and github usernames in markdown files.
|
15
29
|
email:
|
@@ -29,6 +43,7 @@ files:
|
|
29
43
|
- Rakefile
|
30
44
|
- hoe-markdown.gemspec
|
31
45
|
- lib/hoe/markdown.rb
|
46
|
+
- lib/hoe/markdown/standalone.rb
|
32
47
|
- lib/hoe/markdown/util.rb
|
33
48
|
- lib/hoe/markdown/version.rb
|
34
49
|
homepage: https://github.com/flavorjones/hoe-markdown
|