-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds Rubocop and makes a number of changes to address open lints. In addition it: 1. Sets the minimum Ruby version to 2.6, removing 2.5 and jruby-9.2 from the CI matrix. 2. Adds Ruby 3.1, jruby-9.3, ruby-head, and jruby-head to the CI matrix 3. Adds missing specs for the client method on Dalli::Elasticache 4. Adds a linting GitHub action
- Loading branch information
1 parent
a69a747
commit 958357d
Showing
18 changed files
with
309 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
name: Lint - Ruby 2.6 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby 2.6 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true # 'bundle install' and cache | ||
- name: Run Rubocop | ||
run: bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.rbc | ||
.bundle | ||
.config | ||
.ruby-version | ||
coverage | ||
InstalledFiles | ||
lib/bundler/man | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
require: | ||
- rubocop-performance | ||
- rubocop-rake | ||
- rubocop-rspec | ||
|
||
AllCops: | ||
NewCops: enable | ||
TargetRubyVersion: 2.6 | ||
|
||
Metrics/BlockLength: | ||
Max: 50 | ||
Exclude: | ||
- 'spec/**/*' | ||
|
||
Naming/FileName: | ||
Exclude: | ||
- 'lib/dalli-elasticache.rb' | ||
|
||
Style/Documentation: | ||
Exclude: | ||
- 'spec/**/*' | ||
|
||
RSpec/ExampleLength: | ||
Enabled: false | ||
|
||
RSpec/MultipleExpectations: | ||
Enabled: false | ||
|
||
RSpec/MultipleMemoizedHelpers: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
require "rubygems" | ||
require "bundler/setup" | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
# frozen_string_literal: true | ||
|
||
require 'rubygems' | ||
require 'bundler/setup' | ||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
|
||
RSpec::Core::RakeTask.new(:test) | ||
|
||
task :default => :test | ||
task default: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
# -*- encoding: utf-8 -*- | ||
lib = File.expand_path('../lib/', __FILE__) | ||
$:.unshift lib unless $:.include?(lib) | ||
# frozen_string_literal: true | ||
|
||
require 'dalli/elasticache/version' | ||
require_relative './lib/dalli/elasticache/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'dalli-elasticache' | ||
s.version = Dalli::ElastiCache::VERSION | ||
s.licenses = ['MIT'] | ||
|
||
s.summary = "Configure Dalli clients with ElastiCache's AutoDiscovery" | ||
s.description = <<-EOS | ||
s.description = <<-DESC | ||
This gem provides an interface for fetching cluster information from an AWS | ||
ElastiCache AutoDiscovery server and configuring a Dalli client to connect | ||
to all nodes in the cache cluster. | ||
EOS | ||
s.authors = ["Aaron Suggs", "Zach Millman"] | ||
s.email = ["[email protected]", "[email protected]"] | ||
DESC | ||
|
||
s.authors = ['Aaron Suggs', 'Zach Millman', 'Peter M. Goldstein'] | ||
s.email = ['[email protected]', '[email protected]', '[email protected]'] | ||
s.homepage = 'http://github.com/ktheory/dalli-elasticache' | ||
s.files = Dir.glob("{bin,lib}/**/*") + %w(README.md Rakefile) | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.test_files = Dir.glob("{test,spec}/**/*") | ||
s.required_ruby_version = '>= 1.9.2' # Maybe less? | ||
|
||
s.files = Dir.glob('{bin,lib}/**/*') + %w[README.md Rakefile] | ||
s.rdoc_options = ['--charset=UTF-8'] | ||
s.require_paths = ['lib'] | ||
s.test_files = Dir.glob('{test,spec}/**/*') | ||
|
||
s.required_ruby_version = '>= 2.6.0' | ||
s.required_rubygems_version = '>= 1.3.5' | ||
|
||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'rspec' | ||
s.add_dependency 'dalli', ">= 1.0.0" # ?? | ||
s.add_development_dependency 'rubocop' | ||
s.add_development_dependency 'rubocop-performance' | ||
s.add_development_dependency 'rubocop-rake' | ||
s.add_development_dependency 'rubocop-rspec' | ||
s.add_dependency 'dalli', '>= 2.0.0' | ||
s.metadata['rubygems_mfa_required'] = 'true' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
# Support default bundler require path | ||
require 'dalli/elasticache' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.