Skip to content

Commit

Permalink
Fix remaining issues with minor refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Utkarsh Gupta <[email protected]>
  • Loading branch information
utkarsh2102 authored and ai committed Jul 31, 2020
1 parent 56a9fdc commit 65f48ea
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ AllCops:
NewCops: enable
TargetRubyVersion: 2.4

Lint/SuppressedException:
Enabled: false

Metrics:
Enabled: false

Naming/FileName:
Enabled: false

Style/GuardClause:
Enabled: false

Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ task :test_all do
::Process.wait pid
end
end
[$CHILD_STATUS && $CHILD_STATUS.exitstatus == 0, gemfile]
[$CHILD_STATUS&.exitstatus&.zero?, gemfile]
end
end
failed = statuses.reject(&:first).map(&:last)
Expand Down
3 changes: 2 additions & 1 deletion autoprefixer-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
s.extra_rdoc_files = ["README.md", "LICENSE", "CHANGELOG.md"]
s.require_path = "lib"
s.required_ruby_version = ">= 2.0"
s.required_ruby_version = ">= 2.4"

s.author = "Andrey Sitnik"
s.email = "[email protected]"
Expand All @@ -30,6 +30,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rails"
s.add_development_dependency "rake"
s.add_development_dependency "rspec-rails"
s.add_development_dependency "rubocop"
s.add_development_dependency "standard"

s.metadata["changelog_uri"] = "https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md"
Expand Down
4 changes: 2 additions & 2 deletions lib/autoprefixer-rails/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def params_with_browsers(from = nil)
Rails.root.join("app/assets/stylesheets").to_s
else
"."
end
end

params = @params
if !params.key?(:browsers) && !params.key?(:overrideBrowserslist) && from
Expand Down Expand Up @@ -169,7 +169,7 @@ def runtime

# Cache autoprefixer.js content
def read_js
@@js ||= begin
@read_js ||= begin
root = Pathname(File.dirname(__FILE__))
path = root.join("../../vendor/autoprefixer.js")
path.read
Expand Down
2 changes: 1 addition & 1 deletion lib/autoprefixer-rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

begin
module AutoprefixedRails
class Railtie < ::Rails::Railtie
class Railtie < ::Rails::Railtie # :nodoc:
rake_tasks do |app|
require "rake/autoprefixer_tasks"
Rake::AutoprefixerTasks.new(config) if defined? app.assets
Expand Down
2 changes: 1 addition & 1 deletion lib/autoprefixer-rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module AutoprefixerRails
module AutoprefixerRails # :nodoc:
VERSION = "9.8.6" unless defined? AutoprefixerRails::VERSION
end

0 comments on commit 65f48ea

Please sign in to comment.