github_changelog_generator 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_changelog_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,11 @@ files:
94
94
  - lib/CHANGELOG.md
95
95
  - lib/github_changelog_generator.rb
96
96
  - lib/github_changelog_generator/fetcher.rb
97
- - lib/github_changelog_generator/generator.rb
97
+ - lib/github_changelog_generator/generator/generator.rb
98
+ - lib/github_changelog_generator/generator/generator_fetcher.rb
99
+ - lib/github_changelog_generator/generator/generator_generation.rb
100
+ - lib/github_changelog_generator/generator/generator_processor.rb
101
+ - lib/github_changelog_generator/generator/generator_tags.rb
98
102
  - lib/github_changelog_generator/parser.rb
99
103
  - lib/github_changelog_generator/reader.rb
100
104
  - lib/github_changelog_generator/version.rb
@@ -103,6 +107,8 @@ files:
103
107
  - spec/files/github-changelog-generator.md
104
108
  - spec/spec_helper.rb
105
109
  - spec/unit/fetcher_spec.rb
110
+ - spec/unit/generator/generator_tags_spec.rb
111
+ - spec/unit/parser_spec.rb
106
112
  - spec/unit/reader_spec.rb
107
113
  homepage: https://github.com/skywinder/Github-Changelog-Generator
108
114
  licenses:
@@ -135,5 +141,7 @@ test_files:
135
141
  - spec/files/github-changelog-generator.md
136
142
  - spec/spec_helper.rb
137
143
  - spec/unit/fetcher_spec.rb
144
+ - spec/unit/generator/generator_tags_spec.rb
145
+ - spec/unit/parser_spec.rb
138
146
  - spec/unit/reader_spec.rb
139
147
  has_rdoc:
@@ -1,42 +0,0 @@
1
- module GitHubChangelogGenerator
2
- class Generator
3
- def initialize(options = nil)
4
- @options = options
5
- end
6
-
7
- # Parse issue and generate single line formatted issue line.
8
- #
9
- # Example output:
10
- # - Add coveralls integration [\#223](https://github.com/skywinder/github-changelog-generator/pull/223) ([skywinder](https://github.com/skywinder))
11
- #
12
- # @param [Hash] issue Fetched issue from GitHub
13
- # @return [String] Markdown-formatted single issue
14
- def get_string_for_issue(issue)
15
- encapsulated_title = encapsulate_string issue[:title]
16
-
17
- title_with_number = "#{encapsulated_title} [\\##{issue[:number]}](#{issue.html_url})"
18
-
19
- unless issue.pull_request.nil?
20
- if @options[:author]
21
- if issue.user.nil?
22
- title_with_number += " ({Null user})"
23
- else
24
- title_with_number += " ([#{issue.user.login}](#{issue.user.html_url}))"
25
- end
26
- end
27
- end
28
- title_with_number
29
- end
30
-
31
- def encapsulate_string(string)
32
- string.gsub! '\\', '\\\\'
33
-
34
- encpas_chars = %w(> * _ \( \) [ ] #)
35
- encpas_chars.each do |char|
36
- string.gsub! char, "\\#{char}"
37
- end
38
-
39
- string
40
- end
41
- end
42
- end