lolcommits-tranzlate 0.0.3 → 0.0.4

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: 2a7374e6b1e545f4ac2a69291b4022990a7e20e6
4
- data.tar.gz: 205cd3ad50470f1e1f527d6beddbd3139120dd32
3
+ metadata.gz: 470a5e658373f11d7831d3e98db6990ead739b0a
4
+ data.tar.gz: f643d6ae7d363b599b7dfd254e32c9dcb309f1e7
5
5
  SHA512:
6
- metadata.gz: 3cd80d6c2753de9c9dc1f8961d43f561e61deef38f226609c78d74c2a4feb036fec37d2d92660a2750d710c510a89c9a6aa047bd4fd0787d3e9cfe300507e353
7
- data.tar.gz: 689eab6a7b1ac2443d038514b0af0917dfa6d49dd3dc82f29e755d1c35bce28ecbf72ea80460d61cfa6785371401af4f776e38645ffcc189292c3454c1e69eb2
6
+ metadata.gz: d7a0cfde399b5224d58292d387c1919a664cd90605938bea9dbdd9221facda74c61620108bb1756a62ad3ad3c7580d9f1e5a59683888501506b4451b7013bb64
7
+ data.tar.gz: f80369b9b20785eee7fcbbf5813913995fd930b3db8131245a61726f8ec232407618124c81309c383301378c6e3bd26426e19e8a477f6cfe6b8dd2ff4096778c
@@ -18,10 +18,12 @@ module Lolcommits
18
18
  # Returns position(s) of when this plugin should run during the capture
19
19
  # process.
20
20
  #
21
- # @return [Array] the position(s) (:precapture and/or :postcapture)
21
+ # We want to change the commit message text before the capture happens.
22
+ #
23
+ # @return [Array] the position(s) (:pre_capture)
22
24
  #
23
25
  def self.runner_order
24
- [:precapture]
26
+ [:pre_capture]
25
27
  end
26
28
 
27
29
  ##
@@ -30,7 +32,7 @@ module Lolcommits
30
32
  #
31
33
  # Translate the commmit message with lolspeak
32
34
  #
33
- def run_precapture
35
+ def run_pre_capture
34
36
  debug "Commit message before: #{runner.message}"
35
37
  runner.message = self.class.tranzlate(runner.message)
36
38
  debug "Commit message after: #{runner.message}"
@@ -1,5 +1,5 @@
1
1
  module Lolcommits
2
2
  module Tranzlate
3
- VERSION = "0.0.3".freeze
3
+ VERSION = "0.0.4".freeze
4
4
  end
5
5
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.required_ruby_version = ">= 2.0.0"
33
33
 
34
- spec.add_development_dependency "lolcommits", ">= 0.9.3"
34
+ spec.add_development_dependency "lolcommits", ">= 0.9.5"
35
35
  spec.add_development_dependency "bundler"
36
36
  spec.add_development_dependency "rake"
37
37
  spec.add_development_dependency "minitest"
@@ -10,7 +10,7 @@ describe Lolcommits::Plugin::Tranzlate do
10
10
  end
11
11
 
12
12
  it 'should run on post capturing' do
13
- ::Lolcommits::Plugin::Tranzlate.runner_order.must_equal [:precapture]
13
+ ::Lolcommits::Plugin::Tranzlate.runner_order.must_equal [:pre_capture]
14
14
  end
15
15
 
16
16
  describe 'with a runner' do
@@ -22,7 +22,7 @@ describe Lolcommits::Plugin::Tranzlate do
22
22
  end
23
23
 
24
24
  def plugin
25
- @plugin ||= Lolcommits::Plugin::Tranzlate.new(runner)
25
+ @plugin ||= Lolcommits::Plugin::Tranzlate.new(runner: runner)
26
26
  end
27
27
 
28
28
  def valid_enabled_config
@@ -46,17 +46,17 @@ describe Lolcommits::Plugin::Tranzlate do
46
46
  end
47
47
 
48
48
  it 'should true when configured' do
49
- plugin.runner.config = valid_enabled_config
49
+ plugin.config = valid_enabled_config
50
50
  plugin.enabled?.must_equal true
51
51
  end
52
52
  end
53
53
 
54
- describe '#run_precapture' do
54
+ describe '#run_pre_capture' do
55
55
  before { commit_repo_with_message('my awesome commit') }
56
56
 
57
57
  it 'should tranzlate the commit message' do
58
- in_repo { plugin.run_precapture }
59
- runner.message.must_match /AWESUM COMMIT/
58
+ in_repo { plugin.run_pre_capture }
59
+ runner.message.must_match(/AWESUM COMMIT/)
60
60
  end
61
61
 
62
62
  after { teardown_repo }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-tranzlate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Hutchinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-29 00:00:00.000000000 Z
11
+ date: 2017-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lolcommits
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.3
19
+ version: 0.9.5
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.3
26
+ version: 0.9.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement