amanuensis 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +18 -0
- data/README.md +10 -8
- data/bin/amanuensis +0 -1
- data/lib/amanuensis.rb +3 -0
- data/lib/amanuensis/cli.rb +24 -1
- data/lib/amanuensis/generator.rb +2 -0
- data/lib/amanuensis/mail/push.rb +7 -1
- data/lib/amanuensis/version.rb +1 -1
- data/spec/integrations/mail_spec.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d4bf2058cf6a5ddeefdffaa4301dfaeb39c788
|
4
|
+
data.tar.gz: e2580010a8018e2e5635d9cf2edf04d03cf66234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a150002af3d39f88ece4750e33840071c05743f21bd8faa6953f022921e22142497b01b6afb4093f55d11cbc39a83f0357911a2368dc9b94707bf819c28075c0
|
7
|
+
data.tar.gz: 766fd67345d0c8494a47447d8bb36c3aa8fc6c8f1ac9521d001fb882ed30ac33dfb89e7225e55885b2a46ccd3ecbc35e6f25695fda4310880aa3c20f55851274
|
data/Changelog.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
## 1.0.1-03/05/2015 22:05:20
|
2
|
+
|
3
|
+
**Issues closed:**
|
4
|
+
* [#6](https://github.com/alaibe/amanuensis/issues/6) Use HashWithIndifferentAccess for pony params
|
5
|
+
* [#5](https://github.com/alaibe/amanuensis/issues/5) Create changelog without release
|
6
|
+
|
7
|
+
**Pull requests closed:**
|
8
|
+
* [#4](https://github.com/alaibe/amanuensis/pull/4) Use symbol keys for pony options
|
9
|
+
|
10
|
+
## 1.0.0-12/04/2015 21:51:19
|
11
|
+
|
12
|
+
**Issues closed:**
|
13
|
+
* [#1](https://github.com/alaibe/amanuensis/issues/1) First issue
|
14
|
+
|
15
|
+
**Pull requests closed:**
|
16
|
+
* [#3](https://github.com/alaibe/amanuensis/pull/3) Test branch
|
17
|
+
* [#2](https://github.com/alaibe/amanuensis/pull/2) Fix filter
|
18
|
+
|
data/README.md
CHANGED
@@ -114,7 +114,7 @@ The changelog will also contains all pull requests closed since the latest relea
|
|
114
114
|
|
115
115
|
Via command line:
|
116
116
|
```
|
117
|
-
amanuensis
|
117
|
+
amanuensis generate --github=oauth_token:my_token repo:alaibe/amanuensis
|
118
118
|
```
|
119
119
|
|
120
120
|
Via Ruby:
|
@@ -133,7 +133,7 @@ If github is used, the changelog will contains the closed issues since the last
|
|
133
133
|
|
134
134
|
Via command line:
|
135
135
|
```
|
136
|
-
amanuensis
|
136
|
+
amanuensis generate --github=oauth_token:my_token repo:alaibe/amanuensis
|
137
137
|
```
|
138
138
|
|
139
139
|
Via Ruby:
|
@@ -148,7 +148,7 @@ If trello is used, the changelog will contains the closed cards since the last r
|
|
148
148
|
|
149
149
|
Via command line:
|
150
150
|
```
|
151
|
-
amanuensis
|
151
|
+
amanuensis generate --trello=key:my_key token:my_token board:amanuensis list:done
|
152
152
|
```
|
153
153
|
|
154
154
|
Via Ruby:
|
@@ -165,7 +165,7 @@ If pivotal is used, the changelog will contains the accepted cards since the las
|
|
165
165
|
|
166
166
|
Via command line:
|
167
167
|
```
|
168
|
-
amanuensis
|
168
|
+
amanuensis generate --pivotal=token:my_token project:amanuensis
|
169
169
|
```
|
170
170
|
|
171
171
|
Via Ruby:
|
@@ -192,7 +192,7 @@ If you use github to push your changelog, it will be append to the file named Ch
|
|
192
192
|
|
193
193
|
Via command line:
|
194
194
|
```
|
195
|
-
amanuensis
|
195
|
+
amanuensis generate --github=oauth_token:my_token repo:alaibe/amanuensis
|
196
196
|
file_name:new_changelog.md
|
197
197
|
```
|
198
198
|
|
@@ -210,14 +210,16 @@ The option ```file_name``` is not required and is set to ```Changelog.md``` by d
|
|
210
210
|
We use the gem pony in order to send mail
|
211
211
|
See the gem readme for all the options available: https://github.com/benprew/pony
|
212
212
|
|
213
|
+
All nested hash params are flatten for the command line
|
214
|
+
|
213
215
|
Via command line:
|
214
216
|
```
|
215
|
-
amanuensis
|
217
|
+
amanuensis generate --mail=to:anthony@amanuensis.com via_options_port:25
|
216
218
|
```
|
217
219
|
|
218
220
|
Via Ruby:
|
219
221
|
```ruby
|
220
|
-
Amanuensis::Mail.pony = { to: 'anthony@amanuensis.com' }
|
222
|
+
Amanuensis::Mail.pony = { to: 'anthony@amanuensis.com', via_options: { port: 25 }}
|
221
223
|
```
|
222
224
|
|
223
225
|
##### File
|
@@ -225,7 +227,7 @@ Amanuensis::Mail.pony = { to: 'anthony@amanuensis.com' }
|
|
225
227
|
If you export push your changelog with the file option, it will create a file named ```Changelog.md``` by default
|
226
228
|
|
227
229
|
```
|
228
|
-
amanuensis
|
230
|
+
amanuensis generate --file=file_name:new_changelog.md
|
229
231
|
```
|
230
232
|
|
231
233
|
Via Ruby:
|
data/bin/amanuensis
CHANGED
data/lib/amanuensis.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'interchange'
|
2
2
|
require 'thor'
|
3
3
|
require 'active_support/core_ext/object/blank'
|
4
|
+
require 'active_support/core_ext/hash'
|
4
5
|
require 'active_support/configurable'
|
6
|
+
require 'active_support/hash_with_indifferent_access'
|
5
7
|
|
6
8
|
require_relative 'amanuensis/version'
|
7
9
|
require_relative 'amanuensis/validatable'
|
@@ -31,6 +33,7 @@ module Amanuensis
|
|
31
33
|
config_accessor(:tracker) { :github }
|
32
34
|
config_accessor(:code_manager) { :github }
|
33
35
|
config_accessor(:verbose) { false }
|
36
|
+
config_accessor(:release) { true }
|
34
37
|
config_accessor(:version) { :patch }
|
35
38
|
|
36
39
|
validate_presence_of :push, :tracker, :code_manager, :version
|
data/lib/amanuensis/cli.rb
CHANGED
@@ -6,6 +6,7 @@ module Amanuensis
|
|
6
6
|
option :tracker, type: :string, aliases: :t, default: :github
|
7
7
|
option :code_manager, type: :string, aliases: :c, default: :github
|
8
8
|
option :version, type: :string, aliases: :u, default: :patch
|
9
|
+
option :release, type: :boolean, aliases: :r, default: true
|
9
10
|
option :verbose, type: :boolean, aliases: :v, default: false
|
10
11
|
option :github, type: :hash, aliases: :g
|
11
12
|
option :trello, type: :hash, aliases: :c
|
@@ -18,6 +19,7 @@ module Amanuensis
|
|
18
19
|
Amanuensis.code_manager = options.code_manager
|
19
20
|
Amanuensis.version = options.version
|
20
21
|
Amanuensis.verbose = options.verbose
|
22
|
+
Amanuensis.release = options.release
|
21
23
|
|
22
24
|
if options.github.present?
|
23
25
|
options.github.each do |key, value|
|
@@ -43,12 +45,33 @@ module Amanuensis
|
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
46
|
-
|
48
|
+
if options.mail.present?
|
49
|
+
pony = extract_pony_options!(options.mail)
|
50
|
+
Amanuensis::Mail.pony = pony
|
51
|
+
end
|
47
52
|
|
48
53
|
Amanuensis.generate
|
49
54
|
rescue ValidationError => e
|
50
55
|
puts e.message
|
51
56
|
end
|
52
57
|
|
58
|
+
private
|
59
|
+
|
60
|
+
VIA_OPTIONS = 'via_options'
|
61
|
+
|
62
|
+
def extract_pony_options!(options = {})
|
63
|
+
via_options = options[VIA_OPTIONS] ||= {}
|
64
|
+
|
65
|
+
options.each do |key, value|
|
66
|
+
if key != VIA_OPTIONS && key.start_with?(VIA_OPTIONS)
|
67
|
+
sub_key = key.gsub("#{VIA_OPTIONS}_", '')
|
68
|
+
via_options[sub_key.to_sym] = value
|
69
|
+
options.delete(key)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
options
|
74
|
+
end
|
75
|
+
|
53
76
|
end
|
54
77
|
end
|
data/lib/amanuensis/generator.rb
CHANGED
data/lib/amanuensis/mail/push.rb
CHANGED
data/lib/amanuensis/version.rb
CHANGED
@@ -7,9 +7,9 @@ describe 'Mail Amanuensis' do
|
|
7
7
|
Amanuensis.code_manager = :fake
|
8
8
|
Amanuensis.tracker = :fake
|
9
9
|
|
10
|
-
Amanuensis::Mail.pony = { to
|
10
|
+
Amanuensis::Mail.pony = { 'to' => 'foo@bar.com' }
|
11
11
|
|
12
|
-
expect(Pony).to receive(:mail)
|
12
|
+
expect(Pony).to receive(:mail).with(to: 'foo@bar.com', body: /.*/)
|
13
13
|
Amanuensis.generate
|
14
14
|
end
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amanuensis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Laibe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- ".env.sample"
|
219
219
|
- ".gitignore"
|
220
220
|
- ".rspec"
|
221
|
+
- Changelog.md
|
221
222
|
- Gemfile
|
222
223
|
- LICENSE.txt
|
223
224
|
- README.md
|