capistrano-committed 0.0.5 → 0.0.6

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: 7956dea8cdd9916c12ac47738e178f967aa6dd60
4
- data.tar.gz: 72532339dbed78fc5472bc25ee2001680779ce71
3
+ metadata.gz: e0a4cbd5d40c614432cafb96c384335df53c9a32
4
+ data.tar.gz: cacda04b507f455bcf753ee2f8c2f91b578d417b
5
5
  SHA512:
6
- metadata.gz: 98f1eba991743031cd02660ad898f8c9b31bba89e1f4fee25aac3b45c55522779b815b8a01a35ea8d4b6af7ad371ad646110709d09e25d855c321719f4eaf518
7
- data.tar.gz: 96a7a7717a3d734127af0b45c547605b96bfff79909b1567f40f66c753aaedd9074ec6a371a5d447605a5983cc8ec8e75df6cf42a5a98d08318d94087b2a378d
6
+ metadata.gz: b3b0241825e0bb3ad169e2560dc39a80e4d6505f00304c0db8361d06107772e1c32e52e1f5a1f1f06ede442765a0ef2f32ddda3bcc5b3921493a4f79aebec635
7
+ data.tar.gz: a337d0a2b55eee5fb85adffebd8f21d6ee865d3f2bb8efdaaa6817175d2c6a9a5ea89bd0938f8cff5496e5ed126d9107802492cd3052b81502e3435f92efb169
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Sam Bauers
3
+ Capistrano Committed - copyright © 2016 Sam Bauers
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "capistrano", '~> 3.4'
23
- spec.add_dependency "github_api", "~> 0.12"
23
+ spec.add_dependency "github_api", "~> 0.13.0"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.10"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Committed
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  end
@@ -6,33 +6,19 @@ module Capistrano
6
6
  module Committed
7
7
  class << self
8
8
  def get_issue_urls(issue_pattern, postprocess, url_pattern, message)
9
- fail TypeError, t('committed.error.helpers.valid_param',
10
- method: __callee__,
11
- param: 'issue_pattern') unless
12
- issue_pattern.is_a?(String) ||
13
- issue_pattern.is_a?(Regexp)
14
-
15
- fail TypeError, t('committed.error.helpers.valid_param',
16
- method: __callee__,
17
- param: 'postprocess') unless
18
- postprocess.is_a?(Array)
9
+ check_type __callee__,
10
+ 'issue_pattern',
11
+ (issue_pattern.is_a?(String) || issue_pattern.is_a?(Regexp))
19
12
 
13
+ check_type __callee__, 'postprocess', postprocess.is_a?(Array)
20
14
  postprocess.each { |method|
21
- fail TypeError, t('committed.error.helpers.valid_param',
22
- method: __callee__,
23
- param: format('postprocess[:%s]', method.to_s)) unless
24
- method.is_a?(Symbol)
15
+ check_type __callee__,
16
+ format('postprocess[:%s]', method.to_s),
17
+ method.is_a?(Symbol)
25
18
  }
26
19
 
27
- fail TypeError, t('committed.error.helpers.valid_param',
28
- method: __callee__,
29
- param: 'url_pattern') unless
30
- url_pattern.is_a?(String)
31
-
32
- fail TypeError, t('committed.error.helpers.valid_param',
33
- method: __callee__,
34
- param: 'message') unless
35
- message.is_a?(String)
20
+ check_type __callee__, 'url_pattern', url_pattern.is_a?(String)
21
+ check_type __callee__, 'message', message.is_a?(String)
36
22
 
37
23
  matches = message.scan(Regexp.new(issue_pattern))
38
24
  return [] unless matches
@@ -54,6 +40,13 @@ module Capistrano
54
40
  end
55
41
  output << format('%s', pad)
56
42
  end
43
+
44
+ private
45
+ def check_type(method, param, condition)
46
+ fail TypeError, t('committed.error.helpers.valid_param',
47
+ method: method,
48
+ param: param) unless condition
49
+ end
57
50
  end
58
51
  end
59
52
  end
@@ -104,6 +104,7 @@ namespace :committed do
104
104
  revisions = {}
105
105
  lines.each do |line|
106
106
  matches = search.match(line)
107
+ next if matches.nil?
107
108
  next unless matches[:branch].to_s == fetch(:branch).to_s
108
109
  revisions[matches[:sha]] = {
109
110
  branch: matches[:branch],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-committed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Bauers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-12 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.12'
33
+ version: 0.13.0
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: '0.12'
40
+ version: 0.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ files:
94
94
  - ".rubocop.yml"
95
95
  - ".travis.yml"
96
96
  - Gemfile
97
- - LICENSE
97
+ - LICENSE.md
98
98
  - README.md
99
99
  - Rakefile
100
100
  - bin/console