gh-events 0.3.4 → 0.3.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
  SHA256:
3
- metadata.gz: 464abae2e54d70c64c7873429ff3fabd87abc179ea5bc172f315a862510ccfcb
4
- data.tar.gz: b3ce2ec83e1d8b384c891d55743c41167a3713060c16bf1a924bb0f6b31f1bd3
3
+ metadata.gz: 116f89041743fea15d36e826e99dc1c798049ac2617ec4fa6630a1d706ed61da
4
+ data.tar.gz: 1a67414449a61032a8b92913a0bc8f4ab35a833fa11eb5c5e983c0d25c17fe09
5
5
  SHA512:
6
- metadata.gz: a8c4af219e0dd25481d8b709a5e29f94eb504429076b281608b235cd03ca927e406d1f3a7a03e061317267db1e2b7780901243b89bc7036c87a760ba0bad88aa
7
- data.tar.gz: d496f53c61635f641e9e024426026b7d50c7067c7786b29ff90be14eb0c1f28d695558265495c2a3be5b5c0f8ebabd199137afbec1b87a18bb1d537b86ca2330
6
+ metadata.gz: 2ec384eb80b17e6adadcfd34f0c81802a2d97335a3c3f1a5cdd59502c989e22171a8672d27569839e54d55f49a573a8a80acafdca2f2ded7b03fd79e3b256653
7
+ data.tar.gz: 95d4384f0ed161cddc9fb4f3c706b12609bbbe22845599eca5d252aa6eb470ec69347d20bd888bee40b1efa54ac228360527434470daf589f9625d3ec1b4ef78
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gh-events (0.3.4)
4
+ gh-events (0.3.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 2.0.1
35
+ 2.0.2
@@ -12,9 +12,9 @@ module GH::Events::Slack
12
12
  type = GH::Events.typeof(event).to_s
13
13
 
14
14
  # unify
15
- event.ref_type = 'branch' if event.ref.match(/^refs\/heads\//)
16
- event.ref_type = 'tag' if event.ref.match(/^refs\/tags\//)
17
- event.ref = event.ref.split('/').last
15
+ event.ref_type = 'branch' if event.ref&.match(/^refs\/heads\//)
16
+ event.ref_type = 'tag' if event.ref&.match(/^refs\/tags\//)
17
+ event.ref = event.ref&.split('/')&.last
18
18
 
19
19
  template = (templates[type] || "No template for type: #{type}.")
20
20
  render(template, event)
@@ -1,5 +1,5 @@
1
1
  module GH
2
2
  module Events
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.6"
4
4
  end
5
5
  end
data/res/slack.yml CHANGED
@@ -5,8 +5,8 @@ unknown: >-
5
5
 
6
6
  push: >-
7
7
  _<%= pusher.name %>_ <%= forced ? 'force-' : '' %>pushed
8
- <%= size || commits.count %> commit<%= (size || commits.count > 1) ? 's' : '' %>
9
- to <%= ref_type %> `<%= ref %>`
8
+ <% if ref_type == 'branch' %><%= num = size || commits.count %> commit<%= num > 1 ? 's' : '' %> to<% end %>
9
+ <%= ref_type %> `<%= ref %>`
10
10
  on <<%= repository.html_url %>|<%= repository.full_name %>>
11
11
  :star: <%= repository.stargazers_count %>
12
12
  :eye: <%= repository.watchers_count %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gh-events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Hofmann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-03 00:00:00.000000000 Z
11
+ date: 2019-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -62,6 +62,7 @@ extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
64
  - ".rspec"
65
+ - ".ruby-version"
65
66
  - Gemfile
66
67
  - Gemfile.lock
67
68
  - README.md
@@ -97,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  - !ruby/object:Gem::Version
98
99
  version: '0'
99
100
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.7.3
101
+ rubygems_version: 3.0.3
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Determine Github event types by their payload.