Drop support for Ruby 2.2

It reached EOL on 20th Jun 2018 and no longer receives patches.

* set required Ruby version to >= 2.3 in spec file
* set rubocop's TargetRubyVersion to 2.3 and fix all the offenses
This commit is contained in:
Claudio Bley 2019-01-04 11:40:16 +01:00
parent b6a5366159
commit e02b30a111
12 changed files with 21 additions and 5 deletions

View file

@ -8,7 +8,7 @@ AllCops:
- 'lib/yaml/*'
- 'lib/**/*.sh'
DisplayCopNames: true
TargetRubyVersion: 2.2
TargetRubyVersion: 2.3
# Preferred codebase style ---------------------------------------------

View file

@ -9,7 +9,6 @@ cache:
bundler
rvm:
- '2.2'
- '2.3'
- '2.4'
- '2.5'

View file

@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/athityakumar/colorls'
spec.license = 'MIT'
spec.required_ruby_version = '>= 2.2.0'
spec.required_ruby_version = '>= 2.3.0'
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})

View file

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'colorls'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'yaml'
require 'etc'
require 'English'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ColorLS
class Core
def initialize(input, all: false, report: false, sort: false, show: false,

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'forwardable'
module ColorLS

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'optparse'
require 'colorls/version'
require 'ostruct'
@ -42,7 +44,7 @@ module ColorLS
begin
next STDERR.puts "\n Specified path '#{path}' doesn't exist.".colorize(:red) unless File.exist?(path)
puts '' if i > 0
puts '' if i.positive?
puts "\n#{path}:" if Dir.exist?(path) && @args.size > 1
Core.new(path, @opts).ls
rescue SystemCallError => e

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ColorLS
module Git
def self.status(repo_path)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class String
def colorize(color)
self.color(color.to_sym)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ColorLS
VERSION = '1.1.1'.freeze
VERSION = '1.1.1'
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ColorLS
class Yaml
def initialize(filename)