lolcommits-slack 0.2.0 → 0.3.0

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: 01a504d19a8aa4f36a0c308d4e53a68b66a3900e81f57812dbf13e19f954f730
4
- data.tar.gz: 8494e0ebec829edd8875dad35b8095d72f8a30e7344ec47e32312b7e4e225ab6
3
+ metadata.gz: 501972cd06cd9b4b5b88f495cd9a1b3355aa1e045110a48ae52fcfa4615f9fd8
4
+ data.tar.gz: bc4e8410ecdcc362e76b684ea084f68dbcf0f67196a0f0d486a5901244e565fe
5
5
  SHA512:
6
- metadata.gz: 33af42759f126b0593933888d5af9cc5bab396dda41f35bd352dcecdd04638eec90dbce30b6446824f7958bf2e1b171de0dbe057f5bdea126fb87def168f3354
7
- data.tar.gz: 3589a9238a4c8069f2305be45cca7551db8b685179607343179334e75ecfbcbfe119576cbeb95a16eb52cf94458a26e0242ea908d087ff0b81d916992457518a
6
+ metadata.gz: 1c7eea71f2b47b34ce287cde7ada5201e041c73e21682a3d5341eeb4825e9e3c0c3a141e1592f24bb5837f7a4283f4ba14f65f8c12d104a13f83b146a13f2341
7
+ data.tar.gz: a1fefed74d05160fcfa6770e0d1654314e9f448761fb81eb2c34b6dacbbc197a45911d994f1f242a6760621fa82a2a84f78017ab466600c7b82f12d3ddbb05a2
data/CHANGELOG.md CHANGED
@@ -2,13 +2,23 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- The format is based on [Keep a Changelog][KeepAChangelog] and this project
6
- adheres to [Semantic Versioning][Semver].
5
+ The format is based on [Keep a Changelog][KeepAChangelog] and this
6
+ project adheres to [Semantic Versioning][Semver].
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
10
  - Your contribution here!
11
11
 
12
+ ## [0.3.0] - 2019-05-30
13
+ ### Changed
14
+ - lolcommits gem is a runtime dependency
15
+ - Use `lolcommit_path` (instead of `main_image`)
16
+ - Requires at least lolcommits >= `0.14.2`
17
+ - Update README and gemspec
18
+
19
+ ### Removed
20
+ - Support for lolcommits < `0.14.2`
21
+
12
22
  ## [0.2.0] - 2019-04-24
13
23
  ### Removed
14
24
  - Support for Ruby < 2.3 (older rubies no longer supported)
@@ -45,7 +55,8 @@ adheres to [Semantic Versioning][Semver].
45
55
  ### Changed
46
56
  - Initial release
47
57
 
48
- [Unreleased]: https://github.com/lolcommits/lolcommits-slack/compare/v0.2.0...HEAD
58
+ [Unreleased]: https://github.com/lolcommits/lolcommits-slack/compare/v0.3.0...HEAD
59
+ [0.3.0]: https://github.com/lolcommits/lolcommits-slack/compare/v0.2.0...v0.3.0
49
60
  [0.2.0]: https://github.com/lolcommits/lolcommits-slack/compare/v0.1.1...v0.2.0
50
61
  [0.1.1]: https://github.com/lolcommits/lolcommits-slack/compare/v0.1.0...v0.1.1
51
62
  [0.1.0]: https://github.com/lolcommits/lolcommits-slack/compare/v0.0.4...v0.1.0
data/README.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # Lolcommits Slack
2
2
 
3
3
  [![Gem](https://img.shields.io/gem/v/lolcommits-slack.svg?style=flat)](http://rubygems.org/gems/lolcommits-slack)
4
- [![Travis](https://travis-ci.org/lolcommits/lolcommits-slack.svg?branch=master)](https://travis-ci.org/lolcommits/lolcommits-slack)
4
+ [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-slack/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-slack)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-slack.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-slack)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/a866b41555abbda9dec0/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-slack/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/a866b41555abbda9dec0/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-slack/test_coverage)
8
8
 
9
- [lolcommits](https://lolcommits.github.io/) takes a snapshot with your webcam
10
- every time you git commit code, and archives a lolcat style image with it. Git
11
- blame has never been so much fun!
9
+ [lolcommits](https://lolcommits.github.io/) takes a snapshot with your
10
+ webcam every time you git commit code, and archives a lolcat style image
11
+ with it. Git blame has never been so much fun!
12
12
 
13
13
  This plugin automatically posts your lolcommits to one (or more)
14
14
  [Slack](https://slack.com) channels.
15
15
 
16
- The Slack post will contain the git commit message and repo name. The SHA is
17
- used as the uploaded image file name. Posting will be retried (once) should any
18
- error occur.
16
+ The Slack post will contain the git commit message and repo name. The
17
+ SHA is used as the uploaded file name. Posting will be retried (once)
18
+ should any error occur.
19
19
 
20
20
  ## Requirements
21
21
 
@@ -26,7 +26,8 @@ error occur.
26
26
 
27
27
  ## Installation
28
28
 
29
- Follow the [install guide](https://github.com/mroth/lolcommits#installation) for
29
+ Follow the [install
30
+ guide](https://github.com/lolcommits/lolcommits#installation) for
30
31
  lolcommits first. Then run the following:
31
32
 
32
33
  $ gem install lolcommits-slack
@@ -39,8 +40,8 @@ Next configure and enable with:
39
40
  # set enabled to `true`
40
41
  # enter your access token and Slack channel ID list (see below)
41
42
 
42
- That's it! Every lolcommit will now be posted to these Slack channels. To
43
- disable simply reconfigure with `enabled: false`.
43
+ That's it! Every lolcommit will now be posted to these Slack channels.
44
+ To disable simply reconfigure with `enabled: false`.
44
45
 
45
46
  ### Access Token
46
47
 
@@ -52,18 +53,18 @@ authentication. Create (or grab) them
52
53
  ### Channel List
53
54
 
54
55
  You must supply one or more Slack channel *IDs*. You can use Slack's own
55
- [API testing tool](https://api.slack.com/methods/channels.list/test)
56
- to list all Slack channels in your account, and grab the IDs from the JSON
56
+ [API testing tool](https://api.slack.com/methods/channels.list/test) to
57
+ list all Slack channels in your account, and grab the IDs from the JSON
57
58
  response presented.
58
59
 
59
60
  ## Development
60
61
 
61
- Check out this repo and run `bin/setup`, this will install dependencies and
62
- generate docs. Run `bundle exec rake` to run all tests and generate a coverage
63
- report.
62
+ Check out this repo and run `bin/setup`, this will install dependencies
63
+ and generate docs. Run `bundle exec rake` to run all tests and generate
64
+ a coverage report.
64
65
 
65
- You can also run `bin/console` for an interactive prompt that will allow you to
66
- experiment with the gem code.
66
+ You can also run `bin/console` for an interactive prompt that will allow
67
+ you to experiment with the gem code.
67
68
 
68
69
  ## Tests
69
70
 
@@ -80,8 +81,8 @@ Generate docs for this gem with:
80
81
  ## Troubles?
81
82
 
82
83
  If you think something is broken or missing, please raise a new
83
- [issue](https://github.com/lolcommits/lolcommits-slack/issues). Take
84
- a moment to check it hasn't been raised in the past (and possibly closed).
84
+ [issue](https://github.com/lolcommits/lolcommits-slack/issues). Take a
85
+ moment to check it hasn't been raised in the past (and possibly closed).
85
86
 
86
87
  ## TODO
87
88
 
@@ -90,20 +91,21 @@ a moment to check it hasn't been raised in the past (and possibly closed).
90
91
 
91
92
  ## Contributing
92
93
 
93
- Bug [reports](https://github.com/lolcommits/lolcommits-slack/issues) and [pull
94
- requests](https://github.com/lolcommits/lolcommits-slack/pulls) are welcome on
95
- GitHub.
94
+ Bug [reports](https://github.com/lolcommits/lolcommits-slack/issues) and
95
+ [pull requests](https://github.com/lolcommits/lolcommits-slack/pulls)
96
+ are welcome on GitHub.
96
97
 
97
- When submitting pull requests, remember to add tests covering any new behaviour,
98
- and ensure all tests are passing on [Travis
99
- CI](https://travis-ci.org/lolcommits/lolcommits-slack). Read the
98
+ When submitting pull requests, remember to add tests covering any new
99
+ behaviour, and ensure all tests are passing on [Travis
100
+ CI](https://travis-ci.com/lolcommits/lolcommits-slack). Read the
100
101
  [contributing
101
102
  guidelines](https://github.com/lolcommits/lolcommits-slack/blob/master/CONTRIBUTING.md)
102
103
  for more details.
103
104
 
104
- This project is intended to be a safe, welcoming space for collaboration, and
105
- contributors are expected to adhere to the [Contributor
106
- Covenant](http://contributor-covenant.org) code of conduct. See
105
+ This project is intended to be a safe, welcoming space for
106
+ collaboration, and contributors are expected to adhere to the
107
+ [Contributor Covenant](http://contributor-covenant.org) code of conduct.
108
+ See
107
109
  [here](https://github.com/lolcommits/lolcommits-slack/blob/master/CODE_OF_CONDUCT.md)
108
110
  for more details.
109
111
 
@@ -114,7 +116,7 @@ The gem is available as open source under the terms of
114
116
 
115
117
  ## Links
116
118
 
117
- * [Travis CI](https://travis-ci.org/lolcommits/lolcommits-slack)
119
+ * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-slack)
118
120
  * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-slack/test_coverage)
119
121
  * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-slack)
120
122
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-slack)
@@ -15,13 +15,13 @@ module Lolcommits
15
15
  ##
16
16
  # Capture ready hook, runs after lolcommits captures a snapshot.
17
17
  #
18
- # Uses `RestClient` to post the lolcommit image to (one or more) Slack
19
- # channels. Posting will be retried (`RETRY_COUNT`) times if any error
20
- # occurs.
18
+ # Uses `RestClient` to post the lolcommit to (one or more) Slack
19
+ # channels. Posting will be retried (`RETRY_COUNT`) times if any
20
+ # error occurs.
21
21
  #
22
- # The post contains the git commit message, repo name and the SHA is used
23
- # for the image filename. The response from the POST request is sent to
24
- # the debug log.
22
+ # The post contains the git commit message, repo name and the SHA
23
+ # is used for the filename. The response from the POST
24
+ # request is sent to the debug log.
25
25
  #
26
26
  def run_capture_ready
27
27
  retries = RETRY_COUNT
@@ -29,7 +29,7 @@ module Lolcommits
29
29
  print "Posting to Slack ... "
30
30
  response = RestClient.post(
31
31
  ENDPOINT_URL,
32
- file: File.new(runner.main_image),
32
+ file: File.new(runner.lolcommit_path),
33
33
  token: configuration[:access_token],
34
34
  filetype: 'jpg',
35
35
  filename: runner.sha,
@@ -56,8 +56,8 @@ module Lolcommits
56
56
  ##
57
57
  # Prompts the user to configure integration with Slack
58
58
  #
59
- # Prompts user for a Slack `access_token` and a comma seperated list of
60
- # valid Slack channel IDs.
59
+ # Prompts user for a Slack `access_token` and a comma seperated
60
+ # list of valid Slack channel IDs.
61
61
  #
62
62
  # @return [Hash] a hash of configured plugin options
63
63
  #
@@ -70,7 +70,7 @@ module Lolcommits
70
70
  print "enter the generated token below, then press enter: (e.g. xxxx-xxxxxxxxx-xxxx) \n"
71
71
  code = parse_user_input(gets.strip)
72
72
 
73
- print "enter a comma-seperated list of channel ids to post images in, then press enter: (e.g. c1234567890,c1234567890)\n"
73
+ print "enter a comma-seperated list of channel ids to post lolcommits in, then press enter: (e.g. c1234567890,c1234567890)\n"
74
74
  print "note: you must use channel ids (not channel names). grab them from here; https://api.slack.com/methods/channels.list/test\n"
75
75
  channels = parse_user_input(gets.strip)
76
76
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Slack
5
- VERSION = "0.2.0".freeze
5
+ VERSION = "0.3.0".freeze
6
6
  end
7
7
  end
@@ -9,25 +9,17 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["matt@hiddenloop.com"]
10
10
  spec.summary = %q{Sends lolcommits to one (or more) Slack channels}
11
11
  spec.homepage = "https://github.com/lolcommits/lolcommits-slack"
12
- spec.license = "LGPL-3"
12
+ spec.license = "LGPL-3.0"
13
13
  spec.description = %q{Automatically post your lolcommits to Slack}
14
14
 
15
15
  spec.metadata = {
16
- "homepage_uri" => "https://github.com/lolcommits/lolcommits-slack",
17
- "changelog_uri" => "https://github.com/lolcommits/lolcommits-slack/blob/master/CHANGELOG.md",
18
- "source_code_uri" => "https://github.com/lolcommits/lolcommits-slack",
19
- "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-slack/issues",
16
+ "homepage_uri" => "https://github.com/lolcommits/lolcommits-slack",
17
+ "changelog_uri" => "https://github.com/lolcommits/lolcommits-slack/blob/master/CHANGELOG.md",
18
+ "source_code_uri" => "https://github.com/lolcommits/lolcommits-slack",
19
+ "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-slack/issues",
20
+ "allowed_push_host" => "https://rubygems.org"
20
21
  }
21
22
 
22
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
23
- # to allow pushing to a single host or delete this section to allow pushing to any host.
24
- if spec.respond_to?(:metadata)
25
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
26
- else
27
- raise "RubyGems 2.0 or newer is required to protect against " \
28
- "public gem pushes."
29
- end
30
-
31
23
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|features)/}) }
32
24
  spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
33
25
  spec.bindir = "bin"
@@ -37,8 +29,8 @@ Gem::Specification.new do |spec|
37
29
  spec.required_ruby_version = ">= 2.3"
38
30
 
39
31
  spec.add_runtime_dependency "rest-client"
32
+ spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
40
33
 
41
- spec.add_development_dependency "lolcommits", ">= 0.12.0"
42
34
  spec.add_development_dependency "webmock"
43
35
  spec.add_development_dependency "bundler"
44
36
  spec.add_development_dependency "rake"
@@ -12,7 +12,7 @@ describe Lolcommits::Plugin::Slack do
12
12
  def runner
13
13
  # a simple lolcommits runner
14
14
  @_runner ||= Lolcommits::Runner.new(
15
- main_image: Tempfile.new('test_image')
15
+ lolcommit_path: Tempfile.new('lolcommit.jpg')
16
16
  )
17
17
  end
18
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Hutchinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-24 00:00:00.000000000 Z
11
+ date: 2019-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.0
34
- type: :development
33
+ version: 0.14.2
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.0
40
+ version: 0.14.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ files:
136
136
  - test/test_helper.rb
137
137
  homepage: https://github.com/lolcommits/lolcommits-slack
138
138
  licenses:
139
- - LGPL-3
139
+ - LGPL-3.0
140
140
  metadata:
141
141
  homepage_uri: https://github.com/lolcommits/lolcommits-slack
142
142
  changelog_uri: https://github.com/lolcommits/lolcommits-slack/blob/master/CHANGELOG.md