anchorman 0.9.1 → 0.9.5

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
  SHA1:
3
- metadata.gz: fa7a2944aa87ac44844b8227cc2c3e051cd7b8f2
4
- data.tar.gz: 4da009463c5442576a6f9763ca72cb10b89f4014
3
+ metadata.gz: 0596758f4e522704b6188a3ed192b9dd8609c908
4
+ data.tar.gz: 29435267ad7d950f4c5dd64dcd866e39e027a18d
5
5
  SHA512:
6
- metadata.gz: d53ccbef5b04c9f828b2eb59dd069d94c3aebd7d965a05f0281a286412ca9b3d7cd828fab8ac2437ea78886c546298c964a49951ea19d889135adf37e3f93cbc
7
- data.tar.gz: 4efb402b5a36f0d25e995733ec6424a8464cf87ec52e85620db5bad19b00aeb747fd0bd9214ff80471f1009b387ec8f0f2c663ea12459cdff33a20083a92e090
6
+ metadata.gz: 3db0ae5f7460b47c9575842b13dd7400ae22dfa43732748981162adc01336250c0abec4cd8333f602578da16b1a57955ad271e23d708263fba5e858b52d62cd1
7
+ data.tar.gz: 9c28392e2d7ee1f24718f4979b55183c80fed3695de069dc3479ed3f82ffeeeacd5d5833990654873ee0e1af0d4b8d3a18c5874b923878c79a6797b8799b5407
@@ -1,8 +1,9 @@
1
1
  require "thor"
2
2
  require "git"
3
- require "github/markdown"
4
3
  require "octokit"
5
4
 
5
+ require "anchorman/cli"
6
6
  require "anchorman/commit_formatter"
7
+ require "anchorman/html_converter"
8
+ require "anchorman/git_hub_repo"
7
9
  require "anchorman/version"
8
- require "anchorman/cli"
@@ -42,10 +42,12 @@ module Anchorman
42
42
 
43
43
  empty_directory File.join('release_notes', 'html')
44
44
 
45
+ url = Git.open('.').remote.url
46
+
45
47
  notes.each do |n|
46
- html_file_name = "#{File.basename(n)[0..-4]}.html"
47
- create_file(File.join 'release_notes', 'html', html_file_name) do
48
- GitHub::Markdown.render_gfm(File.read(n))
48
+ converter = HtmlConverter.new(path: n, converter: Octokit, repo: GitHubRepo.new(url))
49
+ create_file(File.join 'release_notes', 'html', converter.filename) do
50
+ converter.html
49
51
  end
50
52
  end
51
53
  end
@@ -2,7 +2,7 @@ module Anchorman
2
2
  class CommitFormatter
3
3
 
4
4
  def format(commit)
5
- note = "* #{format_message(commit.message)}\n"
5
+ note = "* #{format_message(commit.message)}\n"
6
6
  note << " * SHA: #{commit.sha}\n"
7
7
  note << " * #{commit.author.name}, #{commit.author.email}\n"
8
8
  note
@@ -0,0 +1,17 @@
1
+ module Anchorman
2
+ class GitHubRepo
3
+
4
+ attr_reader :username
5
+ attr_reader :name
6
+
7
+ def initialize(url)
8
+ md = url.match(/github\.com\/(.*)\/(.*)\.git/)
9
+ @username = md[1] || ''
10
+ @name = md[2] || ''
11
+ end
12
+
13
+ def gfm_context
14
+ "#{username}/#{name}"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ module Anchorman
2
+ class HtmlConverter
3
+ def initialize(options)
4
+ @path = options[:path]
5
+ @converter = options[:converter]
6
+ @repo = options[:repo]
7
+ end
8
+
9
+ def filename
10
+ "#{File.basename(@path)[0..-4]}.html"
11
+ end
12
+
13
+ def html
14
+ @converter.markdown(File.read(@path),
15
+ mode: 'gfm',
16
+ context: @repo.gfm_context)
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Anchorman
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.5"
3
3
  end
@@ -0,0 +1,14 @@
1
+ # Release Notes Anchorman v0.9.5
2
+
3
+ ## Summary
4
+
5
+ Removes dependency on Github markdown gem which had some old dependencies that didn't play well with Travis. Replaced with
6
+ API call to Github to convert markdown to HTML.
7
+
8
+ ## Changes
9
+
10
+ * Remove the GitHub markdown gem, which is a native gem, and instead use Octokit to convert the markdown. Note that Octokit takes the context for converting SHA links, and so there's a lot more work in this commit.
11
+
12
+ ------
13
+
14
+ _Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchorman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - infews
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-29 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: github-markdown
42
+ name: octokit
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: octokit
56
+ name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '>='
@@ -67,13 +67,13 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: thor
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
- type: :runtime
76
+ type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake
84
+ name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '>='
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec
98
+ name: cucumber
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: cucumber
112
+ name: aruba
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '>='
@@ -123,7 +123,21 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: aruba
126
+ name: vcr
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - '>='
@@ -147,11 +161,14 @@ files:
147
161
  - bin/anchorman
148
162
  - lib/anchorman/cli.rb
149
163
  - lib/anchorman/commit_formatter.rb
164
+ - lib/anchorman/git_hub_repo.rb
165
+ - lib/anchorman/html_converter.rb
150
166
  - lib/anchorman/version.rb
151
167
  - lib/anchorman.rb
152
168
  - release_notes/sample.md
153
169
  - release_notes/v.0.6.0.md
154
170
  - release_notes/v0.9.1.md
171
+ - release_notes/v0.9.5.md
155
172
  - LICENSE.md
156
173
  - README.md
157
174
  homepage: http://github.com/infews/anchorman
@@ -173,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
190
  version: '0'
174
191
  requirements: []
175
192
  rubyforge_project:
176
- rubygems_version: 2.0.6
193
+ rubygems_version: 2.0.3
177
194
  signing_key:
178
195
  specification_version: 4
179
196
  summary: Executable that scans your git log for specific release tags and builds a