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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46b182d653465271aaf7e6ab1c5ab4dd61146d8a
4
- data.tar.gz: b6c0583f4580f765df222dcca135378ebf6b0f46
3
+ metadata.gz: dec8135ceee4e7cf2e7fcaaf3fbba8a945da7ab0
4
+ data.tar.gz: 798b52b64e4c63e3e630ebf188f001cda2dbd9da
5
5
  SHA512:
6
- metadata.gz: 8de3c513cd91b36876c75a18e5a73d3d8f0b3f25e1df15d0cc665f59311adc67e2d6214bb98dd776f02fb8361c9a7f2b44608ce8bbd7ae27747778bc7383dba0
7
- data.tar.gz: 4edd364f8605efa8255914d6ce979e8d56836ce4bbf479e7818e9631c42e86f8c7a48266d89d0035568ce4d73b51af1e26890deff210fd8ea139cde011c63302
6
+ metadata.gz: 92eab0d16e70f71460d8345e365fb4cd3249e6ce6e981ca1192a42b4931955757a73a1bd86f3d4198bc87f161a78f94dc71ef6d90b610f039803fd5176cd60b2
7
+ data.tar.gz: 04f11372898dcc9067007a5bd8385038775b272177b5c9805d7fbc82ccd11fe1f4b215a069264f85950a66b5554f42b8faad42ebc1c65b0057d5f4cc802363e9
@@ -1,4 +1,8 @@
1
- ### 0.2 (unreleased)
1
+ ### 0.3 (unreleased)
2
+
3
+ ### 0.2 / 2013-12-02
4
+
5
+ * Remove dependency on Grit (c extension) in favor of Ruby/Git (pure Ruby)
2
6
 
3
7
  ### 0.1 / 2013-12-02
4
8
 
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 `grit` library is used to access the git config for the local repository
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
- * [grit](https://github.com/mojombo/grit)
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
 
@@ -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, git_config["user.name"]
6
- set_default :flowdock_from_address, git_config["user.email"]
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,
@@ -1,4 +1,4 @@
1
- %w(flowdock grit mina/hooks).each do |lib|
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
- Grit::Config.new(Grit::Repo.new("."))
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
@@ -1,6 +1,6 @@
1
1
  module Mina
2
2
  module Flowdock
3
3
  # mina-flowdock version
4
- VERSION = "0.1"
4
+ VERSION = "0.2"
5
5
  end
6
6
  end
@@ -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 "grit", "~> 2.5"
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.1'
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: grit
28
+ name: git
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '2.5'
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.5'
40
+ version: '1.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mina-hooks
43
43
  requirement: !ruby/object:Gem::Requirement