hoe-markdown 1.3.0 → 1.4.0

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: abfcef683457297af7eaad6d438adcf6c2035d7a44a42f04218551344705b6a7
4
- data.tar.gz: ce73aa0a2e6354778d23169ae711498bcf37816b8dea3c3406590243f39c59f7
3
+ metadata.gz: ff7db824eae2f2f51e7245761214694782cb873e324b96c04e0b86a6f330157b
4
+ data.tar.gz: af890db8cd4fd366c91771ed6963dbfd57a8c132c502952ad66e03a1943075a1
5
5
  SHA512:
6
- metadata.gz: 9f45e91e75a7687ab261fa7ec651fb27bff58e5a3df6d1235cc256b6b1b31d79071c6178294244f753eb0d1c82abfd3be956164efc59cb577f04d55f48266b6c
7
- data.tar.gz: 50fdb38dba957a40d68e3b1b2eb6b78ca3d8bc338cb258c10ec7fcd096cab15a94b54093f6974b00f82d4a928be65bc3c2adb4f7ecc72fe982ba072e4e08bd01
6
+ metadata.gz: 65e9a5b13c8d4f32d16181c334b1a55683a1e9fce67418a412f7cc8ccf3869537d5eb599afc12ad507cf1ad72339b17506027b6edfcfe65a1a160c7bc0b1b1ae
7
+ data.tar.gz: eaa453428312cf92bf51ae8d3c6d76b75fc5611503f110cc43fc54b337e709f1c096d0de8835d1e6264f046866c52ad32e686602bd1bbc79fae2c462c4175d75
@@ -1,5 +1,12 @@
1
1
  # Hoe::Markdown CHANGELOG
2
2
 
3
+ ## v1.4.0 / 2021-01-18
4
+
5
+ Feature:
6
+
7
+ - Hoe::Markdown::Standalone allows additional non-gemspec files to be specified
8
+
9
+
3
10
  ## v1.3.0 / 2020-08-28
4
11
 
5
12
  Feature:
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
@@ -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"
@@ -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
@@ -1,5 +1,5 @@
1
1
  class Hoe
2
2
  module Markdown
3
- VERSION = "1.3.0"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
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.3.0
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: 2020-08-28 00:00:00.000000000 Z
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.2
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.