Skip to content

Commit bb44a01

Browse files
committed
Lint/Eval
1 parent c5b8a16 commit bb44a01

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.rubocop_todo.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This configuration was generated by `rubocop --auto-gen-config`
2-
# on 2015-03-12 17:46:21 -0700 using RuboCop version 0.29.1.
2+
# on 2015-03-12 17:46:52 -0700 using RuboCop version 0.29.1.
33
# The point is for the user to remove these configuration records
44
# one by one as the offenses are removed from the code base.
55
# Note that changes in the inspected code, or installation of new
@@ -10,10 +10,6 @@
1010
Lint/AssignmentInCondition:
1111
Enabled: false
1212

13-
# Offense count: 1
14-
Lint/Eval:
15-
Enabled: false
16-
1713
# Offense count: 1
1814
Lint/RescueException:
1915
Enabled: false
@@ -51,7 +47,7 @@ Metrics/BlockNesting:
5147
Metrics/CyclomaticComplexity:
5248
Max: 23
5349

54-
# Offense count: 238
50+
# Offense count: 237
5551
# Configuration parameters: AllowURI, URISchemes.
5652
Metrics/LineLength:
5753
Max: 232

mysql2.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require File.expand_path('../lib/mysql2/version', __FILE__)
22

3-
Gem::Specification.new do |s|
3+
Mysql2::GEMSPEC = Gem::Specification.new do |s|
44
s.name = 'mysql2'
55
s.version = Mysql2::VERSION
66
s.authors = ['Brian Lopez', 'Aaron Stone']

tasks/compile.rake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
require "rake/extensiontask"
22

3-
def gemspec
4-
@clean_gemspec ||= eval(File.read(File.expand_path('../../mysql2.gemspec', __FILE__)))
5-
end
3+
load File.expand_path('../../mysql2.gemspec', __FILE__)
64

7-
Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
5+
Rake::ExtensionTask.new("mysql2", Mysql2::GEMSPEC) do |ext|
86
# put binaries into lib/mysql2/ or lib/mysql2/x.y/
97
ext.lib_dir = File.join 'lib', 'mysql2'
108

@@ -60,7 +58,7 @@ file 'vendor/README' do |t|
6058
end
6159

6260
file 'lib/mysql2/mysql2.rb' do |t|
63-
name = gemspec.name
61+
name = Mysql2::GEMSPEC.name
6462
File.open(t.name, 'wb') do |f|
6563
f.write <<-eoruby
6664
RUBY_VERSION =~ /(\\d+.\\d+)/

0 commit comments

Comments
 (0)