git-commit-notifier 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.0
1
+ 0.10.1
@@ -63,7 +63,11 @@ module GitCommitNotifier
63
63
  logger.debug("included branches: #{include_branches.join(', ')}") unless include_branches.nil?
64
64
 
65
65
  prefix = config["emailprefix"] || Git.repo_name
66
- branch_name = ref_name.split("/").last
66
+ branch_name = if ref_name =~ /^refs\/heads\/(.+)$/
67
+ $1
68
+ else
69
+ ref_name.split("/").last
70
+ end
67
71
 
68
72
  logger.debug("prefix: #{prefix}")
69
73
  logger.debug("branch: #{branch_name}")
@@ -74,7 +78,7 @@ module GitCommitNotifier
74
78
  end
75
79
 
76
80
  branch_name = "/#{branch_name}"
77
- branch_name = "" if !config["show_master_branch_name"] && branch_name.eql?('/master')
81
+ branch_name = "" if !config["show_master_branch_name"] && branch_name == '/master'
78
82
 
79
83
  info("Sending mail...")
80
84
 
@@ -44,7 +44,11 @@ class GitCommitNotifier::Git
44
44
  end
45
45
 
46
46
  def repo_name
47
- git_prefix = from_shell("git config hooks.emailprefix").strip
47
+ git_prefix = begin
48
+ from_shell("git config hooks.emailprefix").strip
49
+ rescue ArgumentError
50
+ ''
51
+ end
48
52
  return git_prefix unless git_prefix.empty?
49
53
  Dir.pwd.split("/").last.sub(/\.git$/, '')
50
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-commit-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,12 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-03 00:00:00.000000000 +02:00
13
+ date: 2011-09-06 00:00:00.000000000 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: diff-lcs
18
- requirement: &70356965199120 !ruby/object:Gem::Requirement
18
+ requirement: &70201197492480 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70356965199120
26
+ version_requirements: *70201197492480
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nntp
29
- requirement: &70356965198640 !ruby/object:Gem::Requirement
29
+ requirement: &70201197492000 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70356965198640
37
+ version_requirements: *70201197492000
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: premailer
40
- requirement: &70356965198160 !ruby/object:Gem::Requirement
40
+ requirement: &70201197491520 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 1.7.1
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70356965198160
48
+ version_requirements: *70201197491520
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: nokogiri
51
- requirement: &70356965197680 !ruby/object:Gem::Requirement
51
+ requirement: &70201193363020 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 1.4.4
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70356965197680
59
+ version_requirements: *70201193363020
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rake
62
- requirement: &70356965197200 !ruby/object:Gem::Requirement
62
+ requirement: &70201193362540 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '!='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 0.9.0
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *70356965197200
70
+ version_requirements: *70201193362540
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: bundler
73
- requirement: &70356965196720 !ruby/object:Gem::Requirement
73
+ requirement: &70201193362060 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 1.0.10
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *70356965196720
81
+ version_requirements: *70201193362060
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: code-cleaner
84
- requirement: &70356965196240 !ruby/object:Gem::Requirement
84
+ requirement: &70201193361580 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *70356965196240
92
+ version_requirements: *70201193361580
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: rspec-core
95
- requirement: &70356965195760 !ruby/object:Gem::Requirement
95
+ requirement: &70201193361100 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0'
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *70356965195760
103
+ version_requirements: *70201193361100
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: rspec-expectations
106
- requirement: &70356965195280 !ruby/object:Gem::Requirement
106
+ requirement: &70201193360620 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: '0'
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *70356965195280
114
+ version_requirements: *70201193360620
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rr
117
- requirement: &70356969054480 !ruby/object:Gem::Requirement
117
+ requirement: &70201193360140 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: '0'
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *70356969054480
125
+ version_requirements: *70201193360140
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: faker
128
- requirement: &70356969054000 !ruby/object:Gem::Requirement
128
+ requirement: &70201193359660 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *70356969054000
136
+ version_requirements: *70201193359660
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rcov
139
- requirement: &70356969053520 !ruby/object:Gem::Requirement
139
+ requirement: &70201193359180 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: '0'
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *70356969053520
147
+ version_requirements: *70201193359180
148
148
  description: This git commit notifier sends html mails with nice diffs for every changed
149
149
  file.
150
150
  email: bodo@bitboxer.de
@@ -215,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  segments:
217
217
  - 0
218
- hash: 1995003777923227847
218
+ hash: -1623397156377293911
219
219
  required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  none: false
221
221
  requirements: