lolcommits-yammer 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: bafadfd0745e6642037dd647ab87132c7ba06c25efff4865364206ad6278e28b
4
- data.tar.gz: 26af76534e704485c368eae091d5b515dba768fa0c7b9b96666effbcda2d78e7
3
+ metadata.gz: 72fdb8e4a5a65c78f054de1d11e772334725ac3ee8b6f267299cf7d61925a8f2
4
+ data.tar.gz: 5ce975d58bae5a4ca47e54dfd230b4e44261aad9128beff832fb030220220472
5
5
  SHA512:
6
- metadata.gz: 4697b857e65a59034761890e3ef96650080d5bda1c21aee9afc6ec1fe58a45dbb1c2f4d6eff34b47fa2ff09b1ce20a35e617dc2ce06147a85a0cc8a584c45d97
7
- data.tar.gz: 00b4e0887af685d11798493f74449601ad5e7c29835125b76ae9fcc52a176163b714b454a3dbf9aed7b13c493685f4e7c3f3a3a654417006c9b9fc6a2f9cfba2
6
+ metadata.gz: 02a5d0da383d1487157ccaa2c89e13091df9a69ddd14f600e281204e32f20ef51f84ae79bf1fae97a1bf064c2ec5fc19aa8ab07ee06f6f55a53232da78a82b37
7
+ data.tar.gz: 69d2fd4d380ff1be5f3b24dafc941b3d249132515997969a8b6e3f1076f1f965df4fdc036765d1d44a10919fa622a949783ed683800f459da3852367b3e881a5
@@ -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-20
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
+ - Updated 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)
@@ -51,7 +61,8 @@ adheres to [Semantic Versioning][Semver].
51
61
  ### Changed
52
62
  - Initial release
53
63
 
54
- [Unreleased]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.2.0...HEAD
64
+ [Unreleased]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.3.0...HEAD
65
+ [0.3.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.2.0...v0.3.0
55
66
  [0.2.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.1.1...v0.2.0
56
67
  [0.1.1]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.1.0...v0.1.1
57
68
  [0.1.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.0.6...v0.1.0
data/README.md CHANGED
@@ -1,23 +1,22 @@
1
1
  # Lolcommits Yammer
2
2
 
3
3
  [![Gem](https://img.shields.io/gem/v/lolcommits-yammer.svg?style=flat)](http://rubygems.org/gems/lolcommits-yammer)
4
- [![Travis](https://travis-ci.org/lolcommits/lolcommits-yammer.svg?branch=master)](https://travis-ci.org/lolcommits/lolcommits-yammer)
4
+ [![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-yammer/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-yammer)
5
5
  [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-yammer.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-yammer)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/dc8b0801920bffbecf9f/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-yammer/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/dc8b0801920bffbecf9f/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-yammer/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
- This plugin automatically posts a new message to your Yammer account with the
14
- captured lolcommit image, your commit message and a 'Lolcommits' topic tag.
15
- Something like this:
13
+ This plugin automatically posts a new message to your Yammer account
14
+ with the captured lolcommit, your commit message and a 'Lolcommits'
15
+ topic tag. Something like this:
16
16
 
17
17
  ![example
18
18
  commit](https://github.com/lolcommits/lolcommits-yammer/raw/master/assets/images/example-commit.png)
19
19
 
20
-
21
20
  ## Requirements
22
21
 
23
22
  * Ruby >= 2.3
@@ -38,23 +37,24 @@ Then configure to enable with:
38
37
  # set enabled to `true`
39
38
  # confirm access for this plugin at yammer.com (link opens automatically)
40
39
 
41
- That's it! Your next lolcommit will be posted to Yammer. To disable uninstall
42
- this gem or use:
40
+ That's it! Your next lolcommit will be posted to Yammer. To disable
41
+ uninstall this gem or use:
43
42
 
44
43
  $ lolcommits --config -p yammer
45
44
  # and set enabled to `false`
46
45
 
47
46
  To revoke plugin permissions at Yammer, visit 'Edit Settings' -> 'My
48
- Applications' and select 'Revoke Access' for the 'Lolcommits Yammer' app.
47
+ Applications' and select 'Revoke Access' for the 'Lolcommits Yammer'
48
+ app.
49
49
 
50
50
  ## Development
51
51
 
52
- Check out this repo and run `bin/setup`, this will install all dependencies and
53
- generate docs. Use `bundle exec rake` to run all tests and generate a coverage
54
- report.
52
+ Check out this repo and run `bin/setup`, this will install all
53
+ dependencies and generate docs. Use `bundle exec rake` to run all tests
54
+ and generate a coverage report.
55
55
 
56
- You can also run `bin/console` for an interactive prompt, allowing you to
57
- experiment with the gem code.
56
+ You can also run `bin/console` for an interactive prompt, allowing you
57
+ to experiment with the gem code.
58
58
 
59
59
  ## Tests
60
60
 
@@ -71,25 +71,27 @@ Generate docs for this gem with:
71
71
  ## Troubles?
72
72
 
73
73
  If you think something is broken or missing, please raise a new
74
- [issue](https://github.com/lolcommits/lolcommits-yammer/issues). Take
75
- a moment to check it hasn't been raised in the past (and possibly closed).
74
+ [issue](https://github.com/lolcommits/lolcommits-yammer/issues). Take a
75
+ moment to check it hasn't been raised in the past (and possibly closed).
76
76
 
77
77
  ## Contributing
78
78
 
79
- Bug [reports](https://github.com/lolcommits/lolcommits-yammer/issues) and [pull
80
- requests](https://github.com/lolcommits/lolcommits-yammer/pulls) are welcome on
81
- GitHub.
79
+ Bug [reports](https://github.com/lolcommits/lolcommits-yammer/issues)
80
+ and [pull
81
+ requests](https://github.com/lolcommits/lolcommits-yammer/pulls) are
82
+ welcome on GitHub.
82
83
 
83
- When submitting pull requests, remember to add tests covering any new behaviour,
84
- and ensure all tests are passing on [Travis
85
- CI](https://travis-ci.org/lolcommits/lolcommits-yammer). Read the
84
+ When submitting pull requests, remember to add tests covering any new
85
+ behaviour, and ensure all tests are passing on [Travis
86
+ CI](https://travis-ci.com/lolcommits/lolcommits-yammer). Read the
86
87
  [contributing
87
88
  guidelines](https://github.com/lolcommits/lolcommits-yammer/blob/master/CONTRIBUTING.md)
88
89
  for more details.
89
90
 
90
- This project is intended to be a safe, welcoming space for collaboration, and
91
- contributors are expected to adhere to the [Contributor
92
- Covenant](http://contributor-covenant.org) code of conduct. See
91
+ This project is intended to be a safe, welcoming space for
92
+ collaboration, and contributors are expected to adhere to the
93
+ [Contributor Covenant](http://contributor-covenant.org) code of conduct.
94
+ See
93
95
  [here](https://github.com/lolcommits/lolcommits-yammer/blob/master/CODE_OF_CONDUCT.md)
94
96
  for more details.
95
97
 
@@ -100,7 +102,7 @@ The gem is available as open source under the terms of
100
102
 
101
103
  ## Links
102
104
 
103
- * [Travis CI](https://travis-ci.org/lolcommits/lolcommits-yammer)
105
+ * [Travis CI](https://travis-ci.com/lolcommits/lolcommits-yammer)
104
106
  * [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-yammer)
105
107
  * [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-yammer/coverage)
106
108
  * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-yammer)
@@ -30,8 +30,8 @@ module Lolcommits
30
30
  ##
31
31
  # Prompts the user to configure the plugin.
32
32
  #
33
- # If the enabled option is set we attempt to fetch an Oauth token via
34
- # Yammers' Oauth 2 Server Side flow.
33
+ # If the enabled option is set we attempt to fetch an Oauth token
34
+ # via Yammers' Oauth 2 Server Side flow.
35
35
  #
36
36
  # https://developer.yammer.com/docs/oauth-2#server-side-flow
37
37
  #
@@ -52,9 +52,9 @@ module Lolcommits
52
52
  end
53
53
 
54
54
  ##
55
- # Post-capture hook, runs after lolcommits captures a snapshot. Posts the
56
- # lolcommit image file to Yammer with a commit message postfixed by a
57
- # #lolcommits topic/hashtag.
55
+ # Post-capture hook, runs after lolcommits captures a snapshot.
56
+ # Posts the lolcommit file to Yammer with a commit message
57
+ # postfixed by a #lolcommits topic/hashtag.
58
58
  #
59
59
  # @return [Boolean] true/false indicating posting was successful
60
60
  #
@@ -62,7 +62,7 @@ module Lolcommits
62
62
  print "Posting to Yammer ... "
63
63
  response = RestClient.post(
64
64
  "https://www.yammer.com/api/v1/messages",
65
- { body: yammer_message, attachment1: File.new(runner.main_image) },
65
+ { body: yammer_message, attachment1: File.new(runner.lolcommit_path) },
66
66
  { 'Authorization' => "Bearer #{configuration[:access_token]}" }
67
67
  )
68
68
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lolcommits
4
4
  module Yammer
5
- VERSION = "0.2.0".freeze
5
+ VERSION = "0.3.0".freeze
6
6
  end
7
7
  end
@@ -9,29 +9,21 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["matt@hiddenloop.com"]
10
10
  spec.summary = %q{Uploads lolcommits to Yammer}
11
11
  spec.homepage = "https://github.com/lolcommits/lolcommits-yammer"
12
- spec.license = "LGPL-3"
12
+ spec.license = "LGPL-3.0"
13
13
 
14
14
  spec.description = <<-DESC
15
- Automatically posts a new message to your Yammer account with the captured
16
- lolcommit image, your commit message and a 'Lolcommits' topic tag.
15
+ Automatically posts a new message to your Yammer account with the
16
+ captured lolcommit, your commit message and a 'Lolcommits' topic tag.
17
17
  DESC
18
18
 
19
19
  spec.metadata = {
20
- "homepage_uri" => "https://github.com/lolcommits/lolcommits-yammer",
21
- "changelog_uri" => "https://github.com/lolcommits/lolcommits-yammer/blob/master/CHANGELOG.md",
22
- "source_code_uri" => "https://github.com/lolcommits/lolcommits-yammer",
23
- "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-yammer/issues",
20
+ "homepage_uri" => "https://github.com/lolcommits/lolcommits-yammer",
21
+ "changelog_uri" => "https://github.com/lolcommits/lolcommits-yammer/blob/master/CHANGELOG.md",
22
+ "source_code_uri" => "https://github.com/lolcommits/lolcommits-yammer",
23
+ "bug_tracker_uri" => "https://github.com/lolcommits/lolcommits-yammer/issues",
24
+ "allowed_push_host" => "https://rubygems.org"
24
25
  }
25
26
 
26
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
27
- # to allow pushing to a single host or delete this section to allow pushing to any host.
28
- if spec.respond_to?(:metadata)
29
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
30
- else
31
- raise "RubyGems 2.0 or newer is required to protect against " \
32
- "public gem pushes."
33
- end
34
-
35
27
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(assets|test|features)/}) }
36
28
  spec.test_files = `git ls-files -- {test,features}/*`.split("\n")
37
29
  spec.bindir = "bin"
@@ -42,8 +34,8 @@ Gem::Specification.new do |spec|
42
34
 
43
35
  spec.add_runtime_dependency "rest-client"
44
36
  spec.add_runtime_dependency "webrick"
37
+ spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
45
38
 
46
- spec.add_development_dependency "lolcommits", ">= 0.12.0"
47
39
  spec.add_development_dependency "bundler"
48
40
  spec.add_development_dependency "webmock"
49
41
  spec.add_development_dependency "pry"
@@ -10,9 +10,8 @@ describe Lolcommits::Plugin::Yammer do
10
10
 
11
11
  describe "with a runner" do
12
12
  def runner
13
- # a simple lolcommits runner with an empty configuration Hash
14
13
  @runner ||= Lolcommits::Runner.new(
15
- main_image: Tempfile.new('main_image.jpg')
14
+ lolcommit_path: Tempfile.new('lolcommit.jpg').path
16
15
  )
17
16
  end
18
17
 
@@ -46,7 +45,7 @@ describe Lolcommits::Plugin::Yammer do
46
45
 
47
46
  after { teardown_repo }
48
47
 
49
- it "posts lolcommit image to Yammer with commit message" do
48
+ it "posts lolcommit to Yammer with commit message" do
50
49
  in_repo do
51
50
  stub_request(:post, create_message_api_url).to_return(status: 201)
52
51
  output = fake_io_capture { plugin.run_capture_ready }
@@ -56,7 +55,7 @@ describe Lolcommits::Plugin::Yammer do
56
55
  'Authorization' => 'Bearer oV4MuwnNKql3ebJMAYZRaD',
57
56
  'Content-Type' => /multipart\/form-data/
58
57
  } do |req|
59
- req.body.must_match(/Content-Disposition: form-data;.+name="attachment1"; filename="main_image.jpg.+"/)
58
+ req.body.must_match(/Content-Disposition: form-data;.+name="attachment1"; filename="lolcommit.jpg.+"/)
60
59
  end
61
60
  end
62
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-yammer
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
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.12.0
48
- type: :development
47
+ version: 0.14.2
48
+ type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.12.0
54
+ version: 0.14.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -137,8 +137,8 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: |2
140
- Automatically posts a new message to your Yammer account with the captured
141
- lolcommit image, your commit message and a 'Lolcommits' topic tag.
140
+ Automatically posts a new message to your Yammer account with the
141
+ captured lolcommit, your commit message and a 'Lolcommits' topic tag.
142
142
  email:
143
143
  - matt@hiddenloop.com
144
144
  executables: []
@@ -166,7 +166,7 @@ files:
166
166
  - test/test_helper.rb
167
167
  homepage: https://github.com/lolcommits/lolcommits-yammer
168
168
  licenses:
169
- - LGPL-3
169
+ - LGPL-3.0
170
170
  metadata:
171
171
  homepage_uri: https://github.com/lolcommits/lolcommits-yammer
172
172
  changelog_uri: https://github.com/lolcommits/lolcommits-yammer/blob/master/CHANGELOG.md