hoe-markdown 1.3.0 → 1.5.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: 9a0bdac1445c1aa33f1da6d0f7121b17dcc46d09bd2fbe3edb98cec7326608dc
4
+ data.tar.gz: 84958c46a62b0b272e25e6f44f9fa83e3a1d1a7f2cbad019b722fc61eb0d2c5a
5
5
  SHA512:
6
- metadata.gz: 9f45e91e75a7687ab261fa7ec651fb27bff58e5a3df6d1235cc256b6b1b31d79071c6178294244f753eb0d1c82abfd3be956164efc59cb577f04d55f48266b6c
7
- data.tar.gz: 50fdb38dba957a40d68e3b1b2eb6b78ca3d8bc338cb258c10ec7fcd096cab15a94b54093f6974b00f82d4a928be65bc3c2adb4f7ecc72fe982ba072e4e08bd01
6
+ metadata.gz: 71d6a94280d257d7ae07796306f91a81aa85c0db35ff1a039a6293582c84f7a9dbe603934b64be0485e4f8fea3f088fc6e4be3bbaa742858bd43100496ea6c85
7
+ data.tar.gz: 3259e4bd5ee0297111aa62937a49fc0011a06218c8d2de9e191ce417b29f3c51b298b3bd221715376e7d6521dc6ac2194cb8bee134d46a7cc026dc8c658321f5
@@ -0,0 +1,28 @@
1
+ name: ci
2
+ concurrency:
3
+ group: "${{github.workflow}}-${{github.ref}}"
4
+ cancel-in-progress: true
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ branches:
9
+ - main
10
+ pull_request:
11
+ types: [opened, synchronize]
12
+ branches:
13
+ - '*'
14
+
15
+ jobs:
16
+ build:
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{matrix.ruby}}
27
+ bundler-cache: true
28
+ - run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Hoe::Markdown CHANGELOG
2
2
 
3
+ ## v1.5.0 / 2023-10-10
4
+
5
+ Feature:
6
+
7
+ - use `Bundler.load_gemspec` instead of `eval`, to support Ruby 3.3
8
+
9
+
10
+ ## v1.4.0 / 2021-01-18
11
+
12
+ Feature:
13
+
14
+ - Hoe::Markdown::Standalone allows additional non-gemspec files to be specified
15
+
16
+
3
17
  ## v1.3.0 / 2020-08-28
4
18
 
5
19
  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
@@ -6,7 +6,7 @@ class Hoe
6
6
  attr_reader :spec
7
7
 
8
8
  def initialize gem_name
9
- @spec = eval(File.read("./#{gem_name}.gemspec"))
9
+ @spec = Bundler.load_gemspec("#{gem_name}.gemspec")
10
10
  end
11
11
  end
12
12
  end
@@ -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.5.0"
4
4
  end
5
5
  end
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"
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.5.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: 2023-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -32,6 +32,7 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - ".github/workflows/ci.yml"
35
36
  - ".gitignore"
36
37
  - ".rspec"
37
38
  - ".travis.yml"
@@ -68,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
69
  - !ruby/object:Gem::Version
69
70
  version: '0'
70
71
  requirements: []
71
- rubygems_version: 3.1.2
72
+ rubygems_version: 3.5.0.dev
72
73
  signing_key:
73
74
  specification_version: 4
74
75
  summary: Hoe plugin with helpers for markdown documentation files.