amanuensis 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.env.sample +10 -0
  3. data/.gitignore +15 -0
  4. data/.rspec +2 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +248 -0
  8. data/Rakefile +2 -0
  9. data/amanuensis.gemspec +36 -0
  10. data/bin/amanuensis +6 -0
  11. data/lib/amanuensis.rb +41 -0
  12. data/lib/amanuensis/builder.rb +52 -0
  13. data/lib/amanuensis/cli.rb +54 -0
  14. data/lib/amanuensis/code_manager.rb +6 -0
  15. data/lib/amanuensis/fake.rb +15 -0
  16. data/lib/amanuensis/fake/code_manager.rb +18 -0
  17. data/lib/amanuensis/fake/push.rb +10 -0
  18. data/lib/amanuensis/fake/tracker.rb +11 -0
  19. data/lib/amanuensis/file.rb +14 -0
  20. data/lib/amanuensis/file/push.rb +37 -0
  21. data/lib/amanuensis/generator.rb +87 -0
  22. data/lib/amanuensis/github.rb +24 -0
  23. data/lib/amanuensis/github/code_manager.rb +42 -0
  24. data/lib/amanuensis/github/push.rb +27 -0
  25. data/lib/amanuensis/github/tracker.rb +33 -0
  26. data/lib/amanuensis/issue.rb +4 -0
  27. data/lib/amanuensis/logger.rb +26 -0
  28. data/lib/amanuensis/mail.rb +18 -0
  29. data/lib/amanuensis/mail/push.rb +12 -0
  30. data/lib/amanuensis/pivotal.rb +17 -0
  31. data/lib/amanuensis/pivotal/tracker.rb +18 -0
  32. data/lib/amanuensis/pull.rb +4 -0
  33. data/lib/amanuensis/push.rb +5 -0
  34. data/lib/amanuensis/release.rb +4 -0
  35. data/lib/amanuensis/tracker.rb +7 -0
  36. data/lib/amanuensis/trello.rb +19 -0
  37. data/lib/amanuensis/trello/tracker.rb +31 -0
  38. data/lib/amanuensis/validatable.rb +34 -0
  39. data/lib/amanuensis/version.rb +26 -0
  40. data/spec/fixtures/vcr_cassettes/github/amanuensis_generates_a_github_changelog_and_release.yml +550 -0
  41. data/spec/fixtures/vcr_cassettes/pivotal/amanuensis_generates_a_changelog_from_pivotal_tracker.yml +120 -0
  42. data/spec/fixtures/vcr_cassettes/trello/amanuensis_generates_a_changelog_from_trello_tracker.yml +359 -0
  43. data/spec/integrations/file_spec.rb +19 -0
  44. data/spec/integrations/github_spec.rb +16 -0
  45. data/spec/integrations/mail_spec.rb +16 -0
  46. data/spec/integrations/pivotal_spec.rb +16 -0
  47. data/spec/integrations/trello_spec.rb +18 -0
  48. data/spec/spec_helper.rb +37 -0
  49. data/spec/unit/fake_spec.rb +13 -0
  50. metadata +300 -0
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'File Amanuensis' do
4
+
5
+ it 'Generates a file changelog' do
6
+ Amanuensis.push = [:file]
7
+ Amanuensis.code_manager = :fake
8
+ Amanuensis.tracker = :fake
9
+
10
+ Amanuensis.generate
11
+
12
+ contents = File.read('./Changelog.md')
13
+
14
+ expect(contents).to include 'Issues closed'
15
+
16
+ File.unlink('./Changelog.md')
17
+ end
18
+
19
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Github Amanuensis' do
4
+
5
+ it 'Generates a github changelog and release' do
6
+ Amanuensis.push = [:github]
7
+ Amanuensis.code_manager = :github
8
+ Amanuensis.tracker = :github
9
+
10
+ Amanuensis::Github.oauth_token = ENV.fetch('GITHUB_OAUTH_TOKEN')
11
+ Amanuensis::Github.repo = ENV.fetch('GITHUB_REPO')
12
+
13
+ Amanuensis.generate
14
+ end
15
+
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Mail Amanuensis' do
4
+
5
+ it 'Generates a changelog and send it via mail' do
6
+ Amanuensis.push = [:mail]
7
+ Amanuensis.code_manager = :fake
8
+ Amanuensis.tracker = :fake
9
+
10
+ Amanuensis::Mail.pony = { to: 'foo@bar.com' }
11
+
12
+ expect(Pony).to receive(:mail)
13
+ Amanuensis.generate
14
+ end
15
+
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Pivotal Amanuensis' do
4
+
5
+ it 'Generates a changelog from pivotal tracker' do
6
+ Amanuensis.push = [:fake]
7
+ Amanuensis.code_manager = :fake
8
+ Amanuensis.tracker = :pivotal
9
+
10
+ Amanuensis::Pivotal.token = ENV.fetch('PIVOTAL_TOKEN')
11
+ Amanuensis::Pivotal.project = ENV.fetch('PIVOTAL_PROJECT')
12
+
13
+ Amanuensis.generate
14
+ end
15
+
16
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Trello Amanuensis' do
4
+
5
+ it 'Generates a changelog from trello tracker' do
6
+ Amanuensis.push = [:fake]
7
+ Amanuensis.code_manager = :fake
8
+ Amanuensis.tracker = :trello
9
+
10
+ Amanuensis::Trello.key = ENV.fetch('TRELLO_KEY')
11
+ Amanuensis::Trello.token = ENV.fetch('TRELLO_TOKEN')
12
+ Amanuensis::Trello.board = ENV.fetch('TRELLO_BOARD')
13
+ Amanuensis::Trello.list = ENV.fetch('TRELLO_LIST')
14
+
15
+ Amanuensis.generate
16
+ end
17
+
18
+ end
@@ -0,0 +1,37 @@
1
+ require 'pry'
2
+ require 'dotenv'
3
+ require 'vcr'
4
+ require 'active_support/inflections'
5
+
6
+ require_relative '../lib/amanuensis'
7
+
8
+ Dotenv.load
9
+
10
+ RSpec.configure do |config|
11
+ config.expect_with :rspec do |expectations|
12
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
13
+ end
14
+
15
+ config.mock_with :rspec do |mocks|
16
+ mocks.verify_partial_doubles = true
17
+ end
18
+
19
+ config.around(:each) do |example|
20
+ options = example.metadata[:vcr] || {}
21
+
22
+ if options[:record] == :skip
23
+ VCR.turned_off(&example)
24
+ else
25
+ name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_")
26
+ VCR.use_cassette(name, options, &example)
27
+ end
28
+ end
29
+ end
30
+
31
+ VCR.configure do |config|
32
+ config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
33
+ config.hook_into :webmock
34
+
35
+ config.filter_sensitive_data('GITHUB_OAUTH_TOKEN') { ENV.fetch('GITHUB_OAUTH_TOKEN') }
36
+ config.filter_sensitive_data('GITHUB_REPO') { ENV.fetch('GITHUB_REPO') }
37
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Fake Amanuensis' do
4
+
5
+ it 'Generates a fake changelog and release' do
6
+ Amanuensis.push = [:fake]
7
+ Amanuensis.code_manager = :fake
8
+ Amanuensis.tracker = :fake
9
+
10
+ Amanuensis.generate
11
+ end
12
+
13
+ end
metadata ADDED
@@ -0,0 +1,300 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amanuensis
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Anthony Laibe
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: octokit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pony
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.11'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: interchange
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.19'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.19'
83
+ - !ruby/object:Gem::Dependency
84
+ name: ruby-trello
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.2'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: tracker_api
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.2'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.9'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.9'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '10.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '10.4'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.2'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.2'
153
+ - !ruby/object:Gem::Dependency
154
+ name: vcr
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '2.9'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '2.9'
167
+ - !ruby/object:Gem::Dependency
168
+ name: webmock
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.21'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.21'
181
+ - !ruby/object:Gem::Dependency
182
+ name: dotenv
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '2.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '2.0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: pry-byebug
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '3.1'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '3.1'
209
+ description: Amanuensis is a changelog generator which integrate with all the major
210
+ code managers and trackers
211
+ email:
212
+ - anthony@laibe.cc
213
+ executables:
214
+ - amanuensis
215
+ extensions: []
216
+ extra_rdoc_files: []
217
+ files:
218
+ - ".env.sample"
219
+ - ".gitignore"
220
+ - ".rspec"
221
+ - Gemfile
222
+ - LICENSE.txt
223
+ - README.md
224
+ - Rakefile
225
+ - amanuensis.gemspec
226
+ - bin/amanuensis
227
+ - lib/amanuensis.rb
228
+ - lib/amanuensis/builder.rb
229
+ - lib/amanuensis/cli.rb
230
+ - lib/amanuensis/code_manager.rb
231
+ - lib/amanuensis/fake.rb
232
+ - lib/amanuensis/fake/code_manager.rb
233
+ - lib/amanuensis/fake/push.rb
234
+ - lib/amanuensis/fake/tracker.rb
235
+ - lib/amanuensis/file.rb
236
+ - lib/amanuensis/file/push.rb
237
+ - lib/amanuensis/generator.rb
238
+ - lib/amanuensis/github.rb
239
+ - lib/amanuensis/github/code_manager.rb
240
+ - lib/amanuensis/github/push.rb
241
+ - lib/amanuensis/github/tracker.rb
242
+ - lib/amanuensis/issue.rb
243
+ - lib/amanuensis/logger.rb
244
+ - lib/amanuensis/mail.rb
245
+ - lib/amanuensis/mail/push.rb
246
+ - lib/amanuensis/pivotal.rb
247
+ - lib/amanuensis/pivotal/tracker.rb
248
+ - lib/amanuensis/pull.rb
249
+ - lib/amanuensis/push.rb
250
+ - lib/amanuensis/release.rb
251
+ - lib/amanuensis/tracker.rb
252
+ - lib/amanuensis/trello.rb
253
+ - lib/amanuensis/trello/tracker.rb
254
+ - lib/amanuensis/validatable.rb
255
+ - lib/amanuensis/version.rb
256
+ - spec/fixtures/vcr_cassettes/github/amanuensis_generates_a_github_changelog_and_release.yml
257
+ - spec/fixtures/vcr_cassettes/pivotal/amanuensis_generates_a_changelog_from_pivotal_tracker.yml
258
+ - spec/fixtures/vcr_cassettes/trello/amanuensis_generates_a_changelog_from_trello_tracker.yml
259
+ - spec/integrations/file_spec.rb
260
+ - spec/integrations/github_spec.rb
261
+ - spec/integrations/mail_spec.rb
262
+ - spec/integrations/pivotal_spec.rb
263
+ - spec/integrations/trello_spec.rb
264
+ - spec/spec_helper.rb
265
+ - spec/unit/fake_spec.rb
266
+ homepage: http://alaibe.github.io/amanuensis
267
+ licenses:
268
+ - MIT
269
+ metadata: {}
270
+ post_install_message:
271
+ rdoc_options: []
272
+ require_paths:
273
+ - lib
274
+ required_ruby_version: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
279
+ required_rubygems_version: !ruby/object:Gem::Requirement
280
+ requirements:
281
+ - - ">="
282
+ - !ruby/object:Gem::Version
283
+ version: '0'
284
+ requirements: []
285
+ rubyforge_project:
286
+ rubygems_version: 2.4.5
287
+ signing_key:
288
+ specification_version: 4
289
+ summary: Amanuensis is a changelog generator
290
+ test_files:
291
+ - spec/fixtures/vcr_cassettes/github/amanuensis_generates_a_github_changelog_and_release.yml
292
+ - spec/fixtures/vcr_cassettes/pivotal/amanuensis_generates_a_changelog_from_pivotal_tracker.yml
293
+ - spec/fixtures/vcr_cassettes/trello/amanuensis_generates_a_changelog_from_trello_tracker.yml
294
+ - spec/integrations/file_spec.rb
295
+ - spec/integrations/github_spec.rb
296
+ - spec/integrations/mail_spec.rb
297
+ - spec/integrations/pivotal_spec.rb
298
+ - spec/integrations/trello_spec.rb
299
+ - spec/spec_helper.rb
300
+ - spec/unit/fake_spec.rb