Skip to content

Commit ddd43d3

Browse files
committed
rubocop
1 parent 913e26c commit ddd43d3

File tree

11 files changed

+35
-11
lines changed

11 files changed

+35
-11
lines changed

.rubocop.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
AllCops:
22
SuggestExtensions: false
3-
NewCops: disable
4-
TargetRubyVersion: 2.0
3+
NewCops: enable
4+
TargetRubyVersion: 3.2
55
Exclude:
66
- src/**/*
77
- pkg/**/*
@@ -21,14 +21,20 @@ Style/ClassAndModuleChildren:
2121
Style/NumericPredicate:
2222
Enabled: false
2323

24-
Metrics/LineLength:
24+
Layout/LineLength:
2525
Enabled: false
2626

2727
Style/WordArray:
2828
Enabled: false
2929

30-
Style/PerlBackrefs:
30+
Style/SuperWithArgsParentheses:
31+
Enabled: false
32+
33+
Gemspec/DevelopmentDependencies:
3134
Enabled: false
3235

3336
Gemspec/RequiredRubyVersion:
3437
Enabled: false
38+
39+
Style/PerlBackrefs:
40+
Enabled: false

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gemspec

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'bundler/setup'
24

35
Bundler::GemHelper.install_tasks

Vagrantfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Vagrant.configure('2') do |config|
24
config.vm.box = 'secretescapes/smartos-base64'
35
config.vm.box_version = '1.0.0'

ext/libv8-node/builder.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
unless $LOAD_PATH.include?(File.expand_path('../../lib', __dir__)) # rubocop:disable Style/IfUnlessModifier
24
$LOAD_PATH.unshift(File.expand_path('../../lib', __dir__))
35
end

ext/libv8-node/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'mkmf'
44

55
if RUBY_ENGINE == 'truffleruby'
6-
File.write('Makefile', dummy_makefile($srcdir).join('')) # rubocop:disable Style/GlobalVars
6+
File.write('Makefile', dummy_makefile($srcdir).join) # rubocop:disable Style/GlobalVars
77
return
88
end
99

ext/libv8-node/location.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ module Libv8; end
99
module Libv8::Node
1010
class Location
1111
def install!
12-
File.open(Pathname(__FILE__).dirname.join('.location.yml'), 'w') do |f|
13-
f.write(to_yaml)
14-
end
12+
File.write(Pathname(__FILE__).dirname.join('.location.yml'), to_yaml)
1513

1614
0
1715
end
1816

1917
def self.load!
2018
File.open(Pathname(__FILE__).dirname.join('.location.yml')) do |f|
21-
YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(f) : YAML.load(f) # rubocop:disable Security/YAMLLoad
19+
YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(f) : YAML.load(f)
2220
end
2321
end
2422

@@ -58,7 +56,7 @@ class HeaderNotFound < StandardError; end
5856

5957
class ArchiveNotFound < StandardError
6058
def initialize(filename)
61-
super "libv8 did not install properly, expected binary v8 archive '#{filename}'to exist, but it was not found"
59+
super("libv8 did not install properly, expected binary v8 archive '#{filename}'to exist, but it was not found")
6260
end
6361
end
6462
end

ext/libv8-node/paths.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'rbconfig'
24
require 'shellwords'
35

lib/libv8-node.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
# frozen_string_literal: true
2+
13
require 'libv8/node'

lib/libv8/node.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'libv8/node/version'
24
require 'libv8-node/location'
35

0 commit comments

Comments
 (0)