lolcommits-yammer 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +1 -1
- data/lib/lolcommits/yammer/version.rb +1 -1
- data/lolcommits-yammer.gemspec +1 -1
- data/test/lolcommits/plugin/yammer_test.rb +10 -10
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce3bd8f1ab3b00bf1838ccc729bf0b90c0fff3daf26f0045616527f58c64baa
|
4
|
+
data.tar.gz: 9d84c4451c8d94a01c07b1128649ec5693ad3e1f55c8ea2441684a048bf01421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 128aebcf4829af56edca4d153f945b12c74d49398cd1fdb9c357f953e3a848cea476c04246973742e25ce122c3998f4f9471e71e3532e687a69d613e2354b80b
|
7
|
+
data.tar.gz: 9fc5d3dd6707f3e0fd3a10dc3a19a84e67756e252f68845d5b43ec984b59ea9e2bb020b7da8b27d5347c453ec3bd55f12a0b7c158934fa6077c436062260cb57
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,10 @@ project adheres to [Semantic Versioning][Semver].
|
|
9
9
|
|
10
10
|
- Your contribution here!
|
11
11
|
|
12
|
+
## [0.5.0] - 2020-01-24
|
13
|
+
### Removed
|
14
|
+
- Support for Ruby < 2.4 (older rubies no longer supported)
|
15
|
+
|
12
16
|
## [0.4.0] - 2019-08-25
|
13
17
|
### Changed
|
14
18
|
- Require an up-to-date `rest-client` (`>= 2.1.0`)
|
@@ -65,7 +69,8 @@ project adheres to [Semantic Versioning][Semver].
|
|
65
69
|
### Changed
|
66
70
|
- Initial release
|
67
71
|
|
68
|
-
[Unreleased]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.
|
72
|
+
[Unreleased]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.5.0...HEAD
|
73
|
+
[0.5.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.4.0...v0.5.0
|
69
74
|
[0.4.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.3.0...v0.4.0
|
70
75
|
[0.3.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.2.0...v0.3.0
|
71
76
|
[0.2.0]: https://github.com/lolcommits/lolcommits-yammer/compare/v0.1.1...v0.2.0
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ commit](https://github.com/lolcommits/lolcommits-yammer/raw/master/assets/images
|
|
19
19
|
|
20
20
|
## Requirements
|
21
21
|
|
22
|
-
* Ruby >= 2.
|
22
|
+
* Ruby >= 2.4
|
23
23
|
* A webcam
|
24
24
|
* [ImageMagick](http://www.imagemagick.org)
|
25
25
|
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
|
data/lolcommits-yammer.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = []
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.required_ruby_version = ">= 2.
|
33
|
+
spec.required_ruby_version = ">= 2.4"
|
34
34
|
|
35
35
|
spec.add_runtime_dependency "rest-client", ">= 2.1.0"
|
36
36
|
spec.add_runtime_dependency "webrick"
|
@@ -28,12 +28,12 @@ describe Lolcommits::Plugin::Yammer do
|
|
28
28
|
|
29
29
|
describe "#enabled?" do
|
30
30
|
it "is false by default" do
|
31
|
-
plugin.enabled
|
31
|
+
_(plugin.enabled?).must_equal false
|
32
32
|
end
|
33
33
|
|
34
34
|
it "is true when configured" do
|
35
35
|
plugin.configuration = valid_enabled_config
|
36
|
-
plugin.enabled
|
36
|
+
_(plugin.enabled?).must_equal true
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -50,12 +50,12 @@ describe Lolcommits::Plugin::Yammer do
|
|
50
50
|
stub_request(:post, create_message_api_url).to_return(status: 201)
|
51
51
|
output = fake_io_capture { plugin.run_capture_ready }
|
52
52
|
|
53
|
-
output.must_equal "Posting to Yammer ... done!\n"
|
53
|
+
_(output).must_equal "Posting to Yammer ... done!\n"
|
54
54
|
assert_requested :post, create_message_api_url, times: 1, headers: {
|
55
55
|
'Authorization' => 'Bearer oV4MuwnNKql3ebJMAYZRaD',
|
56
56
|
'Content-Type' => /multipart\/form-data/
|
57
57
|
} do |req|
|
58
|
-
req.body.must_match(/Content-Disposition: form-data;.+name="attachment1"; filename="lolcommit.jpg.+"/)
|
58
|
+
_(req.body).must_match(/Content-Disposition: form-data;.+name="attachment1"; filename="lolcommit.jpg.+"/)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
@@ -65,7 +65,7 @@ describe Lolcommits::Plugin::Yammer do
|
|
65
65
|
stub_request(:post, create_message_api_url).to_return(status: 503)
|
66
66
|
output = fake_io_capture { plugin.run_capture_ready }
|
67
67
|
|
68
|
-
output.split("\n").must_equal(
|
68
|
+
_(output.split("\n")).must_equal(
|
69
69
|
[
|
70
70
|
"Posting to Yammer ... failed :(",
|
71
71
|
"Yammer error: 503 Service Unavailable",
|
@@ -80,12 +80,12 @@ describe Lolcommits::Plugin::Yammer do
|
|
80
80
|
|
81
81
|
describe "#valid_configuration?" do
|
82
82
|
it "returns false when not configured correctly" do
|
83
|
-
plugin.valid_configuration
|
83
|
+
_(plugin.valid_configuration?).must_equal false
|
84
84
|
end
|
85
85
|
|
86
86
|
it "returns true when configured" do
|
87
87
|
plugin.configuration = valid_enabled_config
|
88
|
-
plugin.valid_configuration
|
88
|
+
_(plugin.valid_configuration?).must_equal true
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -107,11 +107,11 @@ describe Lolcommits::Plugin::Yammer do
|
|
107
107
|
configured_plugin_options = plugin.configure_options!
|
108
108
|
end
|
109
109
|
|
110
|
-
output.split("\n").last.must_equal(
|
110
|
+
_(output.split("\n").last).must_equal(
|
111
111
|
"Aborting.. Plugin disabled since Yammer Oauth was denied"
|
112
112
|
)
|
113
113
|
|
114
|
-
configured_plugin_options.must_equal({ enabled: false })
|
114
|
+
_(configured_plugin_options).must_equal({ enabled: false })
|
115
115
|
end
|
116
116
|
|
117
117
|
it "configures successfully with a Yammer Oauth access token" do
|
@@ -141,7 +141,7 @@ describe Lolcommits::Plugin::Yammer do
|
|
141
141
|
configured_plugin_options = plugin.configure_options!
|
142
142
|
end
|
143
143
|
|
144
|
-
configured_plugin_options.must_equal({
|
144
|
+
_(configured_plugin_options).must_equal({
|
145
145
|
enabled: true,
|
146
146
|
access_token: "yam-oauth-token"
|
147
147
|
})
|
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.
|
4
|
+
version: 0.5.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:
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -181,14 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: '2.
|
184
|
+
version: '2.4'
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
191
|
+
rubygems_version: 3.1.2
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: Uploads lolcommits to Yammer
|