hookers 0.1.2 → 0.1.3

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.
File without changes
@@ -9,5 +9,13 @@ module Hookers
9
9
  def self.included(base)
10
10
  Hookers.commands[base.name.gsub(/^Hookers::Commands::/, "").downcase] = base
11
11
  end
12
+
13
+ def parse_options(args)
14
+ if self.class.respond_to?(:slop)
15
+ slop = self.class.slop
16
+ slop.parse(args)
17
+ slop.to_hash
18
+ end
19
+ end
12
20
  end
13
21
  end
@@ -16,8 +16,7 @@ module Hookers
16
16
  attr_accessor :options
17
17
 
18
18
  def initialize(command, args)
19
- self.class.slop.parse(args)
20
- self.options = self.class.slop.to_hash
19
+ self.options = parse_options(args)
21
20
  end
22
21
 
23
22
  def run
@@ -19,8 +19,7 @@ module Hookers
19
19
  end
20
20
 
21
21
  def initialize(command, args)
22
- self.class.slop.parse(args)
23
- self.options = self.class.slop.to_hash
22
+ self.options = parse_options(args)
24
23
  self.git = Git::Repository.new
25
24
  end
26
25
 
@@ -14,8 +14,7 @@ module Hookers
14
14
  end
15
15
 
16
16
  def initialize(command, args)
17
- self.class.slop.parse(args)
18
- self.options = self.class.slop.to_hash
17
+ self.options = parse_options(args)
19
18
  end
20
19
 
21
20
  def run
@@ -1,3 +1,3 @@
1
1
  module Hookers
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hookers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-11 00:00:00.000000000Z
13
+ date: 2012-05-12 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: slop
17
- requirement: &70341250420180 !ruby/object:Gem::Requirement
17
+ requirement: &70169856335780 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '2.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70341250420180
25
+ version_requirements: *70169856335780
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rest-client
28
- requirement: &70341250419760 !ruby/object:Gem::Requirement
28
+ requirement: &70169856335320 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,23 +33,22 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70341250419760
36
+ version_requirements: *70169856335320
37
37
  description: Contains default hooks files to integrate git with pivotal tracker and
38
38
  change log generator
39
39
  email:
40
40
  - rhruiz@gmail.com
41
41
  - flavio.henrique85@gmail.com
42
42
  executables:
43
- - CHANGELOG.md
44
43
  - hookers
45
44
  extensions: []
46
45
  extra_rdoc_files: []
47
46
  files:
48
47
  - .gitignore
48
+ - CHANGELOG.md
49
49
  - Gemfile
50
50
  - README.md
51
51
  - Rakefile
52
- - bin/CHANGELOG.md
53
52
  - bin/hookers
54
53
  - hookers.gemspec
55
54
  - lib/hookers.rb