gitmqueue 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fef08ee9fcfc3c24da047d2c1a0aa5e760127bf47ab665e7962590c2be239744
4
- data.tar.gz: c49766c95c5d7b3848c54d1a06cacbc594abaaaab88004129602a0824a70756b
3
+ metadata.gz: d044f53b16bdbb2b19574d3b2a0132bd2232a621a298f2a4358478a6c994ca78
4
+ data.tar.gz: cfa7d054eb5b23a282a985633c7cd6bbc9a242c8ed21153f78ce95faa3f160b8
5
5
  SHA512:
6
- metadata.gz: 0b987755d7ff9dc3133c7a4ba8e67ede3fbfdd9967a44b955f60e775ba8ffeb2db4a5d6682c1296a28b233b7f9de80103cc3245476261fc04cedd6482e7334db
7
- data.tar.gz: feb8ddc0b1f77d4ad37d61ba88e46acad0791f576d05fefb7bdd1a216214211989ad4f7735ad93f2ad4de54ec30ccabf6a3482d4c036f0aaf9c2e86e1d08b564
6
+ metadata.gz: 995adc1657f10741a9bfa3ca10482008e9b7e75815dbc61c8673a379b59fabbefca6e0f13a2b78aad374e8c1a7f7602423d655ffc17dfd7d97849d8b2f20bde2
7
+ data.tar.gz: 79bbb170e2cea1cb5bfd9e31554f441d3f7bf75690eb6e8d046c1b8d3e4e44a2e6e4a17ad9a6792a0c280f3c408fce6420f83eda9992f4dd3a6ff52ae5e4f7d6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitmqueue (0.1.0)
4
+ gitmqueue (0.1.2)
5
5
  listen (~> 3.2.0)
6
6
  rugged (~> 0.28)
7
7
 
@@ -16,6 +16,7 @@ module GitMQueue
16
16
 
17
17
  def consume(&block)
18
18
  @block = block
19
+ consume_commits
19
20
  listener.start
20
21
  end
21
22
 
@@ -27,11 +28,15 @@ module GitMQueue
27
28
 
28
29
  def listener
29
30
  @listener ||= Listen.to(branch_file, only: /#{Regexp.escape(@branch)}/) do
30
- commits = @storage.commits(@branch, @name)
31
- commits.each do |commit|
32
- @block.call commit.message
33
- @storage.tag(@name, commit)
34
- end
31
+ consume_commits
32
+ end
33
+ end
34
+
35
+ def consume_commits
36
+ commits = @storage.commits(@branch, @name)
37
+ commits.each do |commit|
38
+ @block.call commit.message
39
+ @storage.tag(@name, commit)
35
40
  end
36
41
  end
37
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitMQueue
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitmqueue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emad Elsaid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-25 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged