Skip to content

Commit

Permalink
remove support for Ruby < 2.4, prep release
Browse files Browse the repository at this point in the history
  • Loading branch information
matthutchinson committed Jan 24, 2020
1 parent 3758cc2 commit 90feaee
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ sudo: false
language: ruby
cache: bundler
rvm:
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.3
- 2.4.9
- 2.5.7
- 2.6.5
- 2.7.0
- ruby-head

before_install:
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ adheres to [Semantic Versioning][Semver].

- Your contribution here!

## [0.5.0] - 2020-01-24
### Removed
- Support for Ruby < 2.4 (older rubies no longer supported)

## [0.4.0] - 2019-08-25
### Changed
- Require an up-to-date `rest-client` (`>= 2.1.0`)
Expand Down Expand Up @@ -62,7 +66,8 @@ adheres to [Semantic Versioning][Semver].
### Changed
- Initial release

[Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.4.0...HEAD
[Unreleased]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/lolcommits/lolcommits-uploldz/compare/v0.1.1...v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ password).

## Requirements

* Ruby >= 2.3
* Ruby >= 2.4
* A webcam
* [ImageMagick](http://www.imagemagick.org)
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
Expand Down
2 changes: 1 addition & 1 deletion lib/lolcommits/uploldz/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Lolcommits
module Uploldz
VERSION = "0.4.0".freeze
VERSION = "0.5.0".freeze
end
end
2 changes: 1 addition & 1 deletion lolcommits-uploldz.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.executables = []
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.3"
spec.required_ruby_version = ">= 2.4"

spec.add_runtime_dependency "rest-client", ">= 2.1.0"
spec.add_runtime_dependency "lolcommits", ">= 0.14.2"
Expand Down
30 changes: 15 additions & 15 deletions test/lolcommits/plugin/uploldz_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def valid_enabled_config

describe "initalizing" do
it "assigns runner and all plugin options" do
plugin.runner.must_equal runner
plugin.options.must_equal [
_(plugin.runner).must_equal runner
_(plugin.options).must_equal [
:enabled,
:endpoint,
:optional_key,
Expand All @@ -44,12 +44,12 @@ def valid_enabled_config

describe "#enabled?" do
it "is false by default" do
plugin.enabled?.must_equal false
_(plugin.enabled?).must_equal false
end

it "is true when configured" do
plugin.configuration = valid_enabled_config
plugin.enabled?.must_equal true
_(plugin.enabled?).must_equal true
end
end

Expand All @@ -67,14 +67,14 @@ def valid_enabled_config

assert_requested :post, "https://uploldz.com/uplol", times: 1,
headers: {'Content-Type' => /multipart\/form-data/ } do |req|
req.body.must_match(/Content-Disposition: form-data;.+name="file"; filename="lolcommit.jpg.+"/)
req.body.must_match 'name="repo"'
req.body.must_match 'name="author_name"'
req.body.must_match 'name="author_email"'
req.body.must_match 'name="sha"'
req.body.must_match 'name="key"'
req.body.must_match "plugin-test-repo"
req.body.must_match "first commit!"
_(req.body).must_match(/Content-Disposition: form-data;.+name="file"; filename="lolcommit.jpg.+"/)
_(req.body).must_match 'name="repo"'
_(req.body).must_match 'name="author_name"'
_(req.body).must_match 'name="author_email"'
_(req.body).must_match 'name="sha"'
_(req.body).must_match 'name="key"'
_(req.body).must_match "plugin-test-repo"
_(req.body).must_match "first commit!"
end
end
end
Expand All @@ -96,7 +96,7 @@ def valid_enabled_config
configured_plugin_options = plugin.configure_options!
end

configured_plugin_options.must_equal({
_(configured_plugin_options).must_equal({
enabled: true,
endpoint: "https://my-server.com/uplol",
optional_key: "key-123",
Expand All @@ -108,12 +108,12 @@ def valid_enabled_config
describe "#valid_configuration?" do
it "returns false for an invalid configuration" do
plugin.configuration = { endpoint: "gibberish" }
plugin.valid_configuration?.must_equal false
_(plugin.valid_configuration?).must_equal false
end

it "returns true with a valid configuration" do
plugin.configuration = valid_enabled_config
plugin.valid_configuration?.must_equal true
_(plugin.valid_configuration?).must_equal true
end
end
end
Expand Down

0 comments on commit 90feaee

Please sign in to comment.