mina-flowdock 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -1
- data/README.md +3 -3
- data/lib/mina/flowdock/notify.rb +2 -2
- data/lib/mina/flowdock/plugin.rb +12 -3
- data/lib/mina/flowdock/version.rb +1 -1
- data/mina-flowdock.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec8135ceee4e7cf2e7fcaaf3fbba8a945da7ab0
|
4
|
+
data.tar.gz: 798b52b64e4c63e3e630ebf188f001cda2dbd9da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92eab0d16e70f71460d8345e365fb4cd3249e6ce6e981ca1192a42b4931955757a73a1bd86f3d4198bc87f161a78f94dc71ef6d90b610f039803fd5176cd60b2
|
7
|
+
data.tar.gz: 04f11372898dcc9067007a5bd8385038775b272177b5c9805d7fbc82ccd11fe1f4b215a069264f85950a66b5554f42b8faad42ebc1c65b0057d5f4cc802363e9
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -40,7 +40,7 @@ The notifications are not sent if mina is run with the `--simulate` option.
|
|
40
40
|
|
41
41
|
### Uses git for user name and email
|
42
42
|
|
43
|
-
The `
|
43
|
+
The `Ruby/Git` library is used to access the git config for the local repository
|
44
44
|
and send the notification from the user configured there.
|
45
45
|
|
46
46
|
### Configurable settings
|
@@ -72,7 +72,7 @@ set :flowdock_api_token, ["firstflowapitoken", "secondflowapitoken"]
|
|
72
72
|
set :flowdock_deploy_env, stage
|
73
73
|
|
74
74
|
# optional settings
|
75
|
-
set :flowdock_deploy_tags, ["my_tag1", "my_tag2]
|
75
|
+
set :flowdock_deploy_tags, ["my_tag1", "my_tag2"]
|
76
76
|
```
|
77
77
|
|
78
78
|
Then run `mina deploy ...` as usual. Requiring `mina/flowdock` extends the
|
@@ -175,7 +175,7 @@ The git sha retrieved from the server after deployment. Uses the
|
|
175
175
|
## Requirements
|
176
176
|
|
177
177
|
* [flowdock](https://github.com/flowdock/flowdock-api/)
|
178
|
-
* [
|
178
|
+
* [git](https://github.com/schacon/ruby-git)
|
179
179
|
* [mina](https://github.com/nadarei/mina)
|
180
180
|
* [mina-hooks](https://github.com/elskwid/mina-hooks)
|
181
181
|
|
data/lib/mina/flowdock/notify.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
set_default :flowdock_deploy_tags, []
|
4
4
|
set_default :flowdock_source, "Mina deployment"
|
5
|
-
set_default :flowdock_from_name,
|
6
|
-
set_default :flowdock_from_address,
|
5
|
+
set_default :flowdock_from_name, git_user_name
|
6
|
+
set_default :flowdock_from_address, git_user_email
|
7
7
|
|
8
8
|
|
9
9
|
set_default :flowdock_message_subject,
|
data/lib/mina/flowdock/plugin.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
%w(flowdock
|
1
|
+
%w(flowdock git mina/hooks).each do |lib|
|
2
2
|
begin
|
3
3
|
require lib
|
4
4
|
rescue LoadError => e
|
@@ -19,8 +19,16 @@ module Mina
|
|
19
19
|
erb_string(settings.send :flowdock_message)
|
20
20
|
end
|
21
21
|
|
22
|
+
def git_user_name
|
23
|
+
git_config["user.name"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def git_user_email
|
27
|
+
git_config["user.email"]
|
28
|
+
end
|
29
|
+
|
22
30
|
def git_config
|
23
|
-
|
31
|
+
Git.open(".").config
|
24
32
|
end
|
25
33
|
|
26
34
|
def erb_string(string, b = binding)
|
@@ -33,8 +41,9 @@ module Mina
|
|
33
41
|
flow = "flow: #{flow.api_token} [#{flow.project}]"
|
34
42
|
subj = "subject: #{flowdock_message_subject}"
|
35
43
|
msg = "message: #{flowdock_message}"
|
44
|
+
from = "from: #{git_user_name} <#{git_user_email}>"
|
36
45
|
|
37
|
-
[flow, subj, msg].each do |debug|
|
46
|
+
[flow, subj, msg, from].each do |debug|
|
38
47
|
print_local_debug(debug)
|
39
48
|
end
|
40
49
|
end
|
data/mina-flowdock.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
20
|
gem.add_dependency "flowdock", "~> 0.3"
|
21
|
-
gem.add_dependency "
|
21
|
+
gem.add_dependency "git", "~> 1.2"
|
22
22
|
gem.add_dependency "mina-hooks", "~> 0.2"
|
23
23
|
|
24
24
|
gem.add_development_dependency "bundler", "~> 1.2"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina-flowdock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Morrison
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: git
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2
|
33
|
+
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2
|
40
|
+
version: '1.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mina-hooks
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|