anchorman 0.6.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fa7a2944aa87ac44844b8227cc2c3e051cd7b8f2
4
+ data.tar.gz: 4da009463c5442576a6f9763ca72cb10b89f4014
5
+ SHA512:
6
+ metadata.gz: d53ccbef5b04c9f828b2eb59dd069d94c3aebd7d965a05f0281a286412ca9b3d7cd828fab8ac2437ea78886c546298c964a49951ea19d889135adf37e3f93cbc
7
+ data.tar.gz: 4efb402b5a36f0d25e995733ec6424a8464cf87ec52e85620db5bad19b00aeb747fd0bd9214ff80471f1009b387ec8f0f2c663ea12459cdff33a20083a92e090
data/README.md CHANGED
@@ -5,7 +5,7 @@ _When you need trusted news, you turn to an anchorman._
5
5
 
6
6
  Simply put, Anchorman scans your commit log and builds release notes for your project.
7
7
 
8
- These notes are build in [Markdown][md] and live in a `release_notes` directory off of your project root. When viewed locally they will be readable. When viewed on Github they will be rendered as nice HTML.
8
+ These notes are build in [Markdown][md] and live in a `release_notes` directory off of your project root. The expected usage is to have one file per release, named appropriately, in this directory. When viewed locally they will be readable. When viewed on Github they will be rendered as nice HTML.
9
9
 
10
10
  There is also an option to generate HTML versions of these files using [Github Flavored Markdown][gfm] for posting/hosting elsewhere.
11
11
 
@@ -29,19 +29,19 @@ Or install it yourself as:
29
29
 
30
30
  ## Usage
31
31
 
32
- Anchorman is fairly simple-minded. It generates files with a little bit of formatting, but not much. The resulting files are meant as good starting points for more human-readable release notes.
32
+ Anchorman is fairly simple-minded. It generates files with a little bit of formatting, but not much. The resulting files are meant as good starting points for more human-readable release notes.
33
33
 
34
34
  $ anchorman notes
35
35
 
36
- Generates a `release_notes/release_notes.md` off of the root of your project. Has a simple header and will have a bullet list of commit information from your entire repo.
36
+ Generates a `release_notes/release_notes.md` off of the root of your project. Has a simple header and will have a bullet list of commit information from your entire repo.
37
37
 
38
38
  $ anchorman notes --from=<ref> --to=<ref>
39
39
 
40
- Builds notes only for commits between two git refs. If not supplied, `to` defaults to `HEAD`. Can be combined with other options.
40
+ Builds notes only for commits between two git refs. If not supplied, `to` defaults to `HEAD`. Can be combined with other options.
41
41
 
42
42
  $ anchorman notes --name=<filename>
43
43
 
44
- Writes out notes to `release_notes/<filename>.md`.Can be combined with other options.
44
+ Writes out notes to `release_notes/<filename>.md`. Can be combined with other options.
45
45
 
46
46
  $ anchorman html
47
47
 
@@ -1,8 +1,8 @@
1
1
  require "thor"
2
2
  require "git"
3
3
  require "github/markdown"
4
+ require "octokit"
4
5
 
5
- require "anchorman/repo"
6
6
  require "anchorman/commit_formatter"
7
7
  require "anchorman/version"
8
8
  require "anchorman/cli"
@@ -1,6 +1,6 @@
1
1
  module Anchorman
2
2
  NOTES_HEADER = "# Release Notes\n\n## Summary\n\n## Changes\n\n"
3
- NOTES_FOOTER = "\n\n\------\n\n_Release Notes generated with [Anchorman](http://github.com/infews/anchorman)_"
3
+ NOTES_FOOTER = "\n\n------\n\n_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_"
4
4
 
5
5
  class CLI < Thor
6
6
 
@@ -13,9 +13,9 @@ module Anchorman
13
13
  git = open_repo
14
14
 
15
15
  commits = if options[:from]
16
- git.log.between options[:from], options[:to]
16
+ git.log(nil).between options[:from], options[:to]
17
17
  else
18
- git.log
18
+ git.log(nil)
19
19
  end
20
20
 
21
21
  return unless commits.size
@@ -24,7 +24,7 @@ module Anchorman
24
24
 
25
25
  empty_directory 'release_notes'
26
26
 
27
- formatter = CommitFormatter.new(Repo.new(git))
27
+ formatter = CommitFormatter.new
28
28
  notes = commits.collect { |c| formatter.format(c) }.join("\n\n")
29
29
 
30
30
  create_file "release_notes/#{options[:name]}.md" do
@@ -73,4 +73,4 @@ module Anchorman
73
73
 
74
74
  end
75
75
  end
76
- end
76
+ end
@@ -1,9 +1,9 @@
1
1
  module Anchorman
2
- class CommitFormatter < Struct.new(:repo)
2
+ class CommitFormatter
3
3
 
4
4
  def format(commit)
5
- note = "* SHA: #{repo.commit_url(commit.sha)}\n"
6
- note << " * #{format_message(commit.message)}\n"
5
+ note = "* #{format_message(commit.message)}\n"
6
+ note << " * SHA: #{commit.sha}\n"
7
7
  note << " * #{commit.author.name}, #{commit.author.email}\n"
8
8
  note
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Anchorman
2
- VERSION = "0.6.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -19,4 +19,4 @@ First Release. A real MVP.
19
19
 
20
20
  ------
21
21
 
22
- Release Notes generated with [Anchorman](http://github.com/infews/anchorman)_
22
+ Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
@@ -0,0 +1,26 @@
1
+ # Release Notes Anchorman v0.9.1
2
+
3
+ ## Summary
4
+
5
+ This is mostly a clean-up release. There was a glitch with v0.9.0. So ignore that one.
6
+
7
+ ## Breaking Changes
8
+
9
+ Anchorman is still pre-1.0, so we're in flux.
10
+
11
+ This release removes the HTML linking of SHAs back to GitHub. The code to support it was annoyingly complex and by using the right code (coming soon) at GitHub for rendering to HTML, there will be even better linking. This was part of the response to #[2](https://github.com/infews/anchorman/pull/2).
12
+
13
+ ## Other Changes, Pull Requests and Bugs
14
+
15
+ * When generating notes, the description now comes first. This will make it easier to collapse to read and edit the Markdown file as you work through the notes. See [this Tracker story](http://www.pivotaltracker.com/story/54124569)
16
+ * Thanks to #[4](https://github.com/infews/anchorman/pull/4), git repos with more than 30 commits are handled. The current code does not iterate along the commits well yet. So large repos are probably going to break without a lot of memory.
17
+ * Fixed a bug that didn't close an underscore in the footer
18
+
19
+ ## Coming Soon
20
+
21
+ * HTML rendering is up next. Good news - Anchorman will use the GitHub API for rendering Markdown to HTML, giving auto-linking and other awesome formatting. Bad news - you will need an internet connection to release.
22
+
23
+
24
+ ------
25
+
26
+ _Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
metadata CHANGED
@@ -1,126 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchorman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
5
- prerelease:
4
+ version: 0.9.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - infews
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-17 00:00:00.000000000 Z
11
+ date: 2013-07-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: git
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: github
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
28
39
  - !ruby/object:Gem::Version
29
40
  version: '0'
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: github-markdown
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ! '>='
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: octokit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
36
60
  - !ruby/object:Gem::Version
37
61
  version: '0'
38
62
  type: :runtime
39
63
  prerelease: false
40
64
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
65
  requirements:
43
- - - ! '>='
66
+ - - '>='
44
67
  - !ruby/object:Gem::Version
45
68
  version: '0'
46
69
  - !ruby/object:Gem::Dependency
47
70
  name: thor
48
71
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
72
  requirements:
51
- - - ! '>='
73
+ - - '>='
52
74
  - !ruby/object:Gem::Version
53
75
  version: '0'
54
76
  type: :runtime
55
77
  prerelease: false
56
78
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
79
  requirements:
59
- - - ! '>='
80
+ - - '>='
60
81
  - !ruby/object:Gem::Version
61
82
  version: '0'
62
83
  - !ruby/object:Gem::Dependency
63
84
  name: rake
64
85
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
86
  requirements:
67
- - - ! '>='
87
+ - - '>='
68
88
  - !ruby/object:Gem::Version
69
89
  version: '0'
70
90
  type: :development
71
91
  prerelease: false
72
92
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
93
  requirements:
75
- - - ! '>='
94
+ - - '>='
76
95
  - !ruby/object:Gem::Version
77
96
  version: '0'
78
97
  - !ruby/object:Gem::Dependency
79
98
  name: rspec
80
99
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
100
  requirements:
83
- - - ! '>='
101
+ - - '>='
84
102
  - !ruby/object:Gem::Version
85
103
  version: '0'
86
104
  type: :development
87
105
  prerelease: false
88
106
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
107
  requirements:
91
- - - ! '>='
108
+ - - '>='
92
109
  - !ruby/object:Gem::Version
93
110
  version: '0'
94
111
  - !ruby/object:Gem::Dependency
95
112
  name: cucumber
96
113
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
114
  requirements:
99
- - - ! '>='
115
+ - - '>='
100
116
  - !ruby/object:Gem::Version
101
117
  version: '0'
102
118
  type: :development
103
119
  prerelease: false
104
120
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
121
  requirements:
107
- - - ! '>='
122
+ - - '>='
108
123
  - !ruby/object:Gem::Version
109
124
  version: '0'
110
125
  - !ruby/object:Gem::Dependency
111
126
  name: aruba
112
127
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
128
  requirements:
115
- - - ! '>='
129
+ - - '>='
116
130
  - !ruby/object:Gem::Version
117
131
  version: '0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
135
  requirements:
123
- - - ! '>='
136
+ - - '>='
124
137
  - !ruby/object:Gem::Version
125
138
  version: '0'
126
139
  description: Extract release notes from your git log
@@ -134,42 +147,35 @@ files:
134
147
  - bin/anchorman
135
148
  - lib/anchorman/cli.rb
136
149
  - lib/anchorman/commit_formatter.rb
137
- - lib/anchorman/repo.rb
138
150
  - lib/anchorman/version.rb
139
151
  - lib/anchorman.rb
140
- - release_notes/release_notes.md
141
152
  - release_notes/sample.md
153
+ - release_notes/v.0.6.0.md
154
+ - release_notes/v0.9.1.md
142
155
  - LICENSE.md
143
156
  - README.md
144
157
  homepage: http://github.com/infews/anchorman
145
158
  licenses: []
159
+ metadata: {}
146
160
  post_install_message:
147
161
  rdoc_options: []
148
162
  require_paths:
149
163
  - lib
150
164
  required_ruby_version: !ruby/object:Gem::Requirement
151
- none: false
152
165
  requirements:
153
- - - ! '>='
166
+ - - '>='
154
167
  - !ruby/object:Gem::Version
155
168
  version: '0'
156
- segments:
157
- - 0
158
- hash: -802147756992914157
159
169
  required_rubygems_version: !ruby/object:Gem::Requirement
160
- none: false
161
170
  requirements:
162
- - - ! '>='
171
+ - - '>='
163
172
  - !ruby/object:Gem::Version
164
173
  version: '0'
165
- segments:
166
- - 0
167
- hash: -802147756992914157
168
174
  requirements: []
169
175
  rubyforge_project:
170
- rubygems_version: 1.8.25
176
+ rubygems_version: 2.0.6
171
177
  signing_key:
172
- specification_version: 3
178
+ specification_version: 4
173
179
  summary: Executable that scans your git log for specific release tags and builds a
174
180
  directory of nicely formatted set of Markdown files ready for detailed editing into
175
181
  release notes.
@@ -1,27 +0,0 @@
1
- module Anchorman
2
- class Repo < Struct.new(:git_repo)
3
-
4
- def remote
5
- git_repo.remote
6
- end
7
-
8
- def is_github?
9
- remote &&
10
- remote.name == "origin" &&
11
- remote.url &&
12
- remote.url.match(/github\.com/)
13
- end
14
-
15
- def commit_url(sha)
16
- return sha unless is_github?
17
-
18
- "[#{sha}](#{github_url_for 'commit', sha})"
19
- end
20
-
21
- private
22
-
23
- def github_url_for(*components)
24
- [remote.url[0..-5], *components].join('/')
25
- end
26
- end
27
- end