Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev updates #329

Merged
merged 8 commits into from Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions .travis.yml
Expand Up @@ -33,10 +33,12 @@ script:
rvm:
- 2.1.10
- 2.1.10-clang
- 2.2.6
- 2.2.6-clang
- 2.3.3
- 2.3.3-clang
- 2.2.7
- 2.2.7-clang
- 2.3.4
- 2.3.4-clang
- 2.4.1
- 2.4.1-clang
- ruby-head
- ruby-head-clang

Expand Down
7 changes: 5 additions & 2 deletions Gemfile
Expand Up @@ -6,11 +6,14 @@ gem 'chandler', '0.7.0'
gem 'codeclimate-test-reporter', '~> 1.0'
gem 'mdl', '0.4.0'
gem 'minitest', '~> 5.7'
gem 'overcommit', '0.38.0'
gem 'overcommit', '0.39.0'
gem 'pry', git: 'https://github.com/pry/pry'
gem 'rake', '~> 12.0'
gem 'rake-compiler', '~> 1.0'
gem 'rubocop', '0.47.1'

# Until https://github.com/bbatsov/rubocop/pull/4237 released
gem 'rubocop', git: 'https://github.com/bbatsov/rubocop'

gem 'simplecov', '0.13.0'
gem 'travis', '~> 1.8'
gem 'yard', '0.9.8'
47 changes: 26 additions & 21 deletions Gemfile.lock
@@ -1,3 +1,14 @@
GIT
remote: https://github.com/bbatsov/rubocop
revision: 7c12ce31c47461d860753590f0a43faf88514b62
specs:
rubocop (0.48.1)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)

GIT
remote: https://github.com/pry/pry
revision: 1f64463184e0a160d0b41d1a1f92b8e2f230278c
Expand All @@ -16,24 +27,24 @@ GEM
specs:
addressable (2.4.0)
ast (2.3.0)
backports (3.6.8)
backports (3.7.0)
chandler (0.7.0)
netrc
octokit (>= 2.2.0)
childprocess (0.5.9)
childprocess (0.6.3)
ffi (~> 1.0, >= 1.0.11)
codeclimate-test-reporter (1.0.5)
simplecov
codeclimate-test-reporter (1.0.8)
simplecov (<= 0.13)
coderay (1.1.1)
docile (1.1.5)
ethon (0.10.1)
ffi (>= 1.3.0)
faraday (0.11.0)
faraday (0.12.0.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.11.0.1)
faraday (>= 0.7.4, < 1.0)
ffi (1.9.17)
gh (0.15.0)
ffi (1.9.18)
gh (0.15.1)
addressable (~> 2.4.0)
backports
faraday (~> 0.8)
Expand All @@ -59,12 +70,12 @@ GEM
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
netrc (0.11.0)
octokit (4.6.2)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
overcommit (0.38.0)
childprocess (~> 0.5.8)
overcommit (0.39.0)
childprocess (~> 0.6.1)
iniparse (~> 1.4)
parser (2.3.3.1)
parser (2.4.0.0)
ast (~> 2.2)
powerpack (0.1.1)
pusher-client (0.6.2)
Expand All @@ -74,12 +85,6 @@ GEM
rake (12.0.0)
rake-compiler (1.0.3)
rake
rubocop (0.47.1)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
Expand All @@ -89,7 +94,7 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
travis (1.8.6)
travis (1.8.8)
backports
faraday (~> 0.9)
faraday_middleware (~> 0.9, >= 0.9.1)
Expand All @@ -114,14 +119,14 @@ DEPENDENCIES
codeclimate-test-reporter (~> 1.0)
mdl (= 0.4.0)
minitest (~> 5.7)
overcommit (= 0.38.0)
overcommit (= 0.39.0)
pry!
rake (~> 12.0)
rake-compiler (~> 1.0)
rubocop (= 0.47.1)
rubocop!
simplecov (= 0.13.0)
travis (~> 1.8)
yard (= 0.9.8)

BUNDLED WITH
1.14.3
1.14.6
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -54,6 +54,7 @@ Windows [![Vey][vey]][vey_url]
* MRI 2.1.8 or higher.
* MRI 2.2.4 or higher.
* MRI 2.3.0 or higher.
* MRI 2.4.0 or higher.

## Install

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -58,7 +58,7 @@ task :sign_hooks do
system('bundle exec overcommit --sign pre-commit')
end

task default: %i(compile test overcommit)
task default: %i[compile test overcommit]

#
# Custom tasks for development
Expand Down
2 changes: 1 addition & 1 deletion byebug.gemspec
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.files = Dir['lib/**/*.rb', 'lib/**/*.yml', 'ext/**/*.[ch]', 'LICENSE']
s.bindir = 'bin'
s.executables = ['byebug']
s.extra_rdoc_files = %w(CHANGELOG.md CONTRIBUTING.md README.md GUIDE.md)
s.extra_rdoc_files = %w[CHANGELOG.md CONTRIBUTING.md README.md GUIDE.md]
s.extensions = ['ext/byebug/extconf.rb']
s.require_path = 'lib'

Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/breakpoint.rb
Expand Up @@ -81,7 +81,7 @@ def self.none?
# Prints all information associated to the breakpoint
#
def inspect
meths = %w(id pos source expr hit_condition hit_count hit_value enabled?)
meths = %w[id pos source expr hit_condition hit_count hit_value enabled?]
values = meths.map { |field| "#{field}: #{send(field)}" }.join(', ')
"#<Byebug::Breakpoint #{values}>"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/commands/save.rb
Expand Up @@ -62,7 +62,7 @@ def save_displays(file)
end

def save_settings(file)
%w(autoirb autolist basename).each do |setting|
%w[autoirb autolist basename].each do |setting|
file.puts "set #{setting} #{Setting[setting.to_sym]}"
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/helpers/var.rb
Expand Up @@ -18,7 +18,7 @@ def var_list(ary, binding = context.frame._binding)

def var_global
globals = global_variables.reject do |v|
[:$IGNORECASE, :$=, :$KCODE, :$-K, :$binding].include?(v)
%i[$IGNORECASE $= $KCODE $-K $binding].include?(v)
end

var_list(globals)
Expand Down
1 change: 1 addition & 0 deletions lib/byebug/interfaces/local_interface.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

module Byebug
#
# Interface class for standard byebug use.
Expand Down
1 change: 1 addition & 0 deletions lib/byebug/printers/base.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'yaml'

module Byebug
Expand Down
1 change: 1 addition & 0 deletions lib/byebug/settings/callstyle.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'byebug/setting'

module Byebug
Expand Down
1 change: 1 addition & 0 deletions lib/byebug/version.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

#
# Reopen main module to define the library version
#
Expand Down
2 changes: 1 addition & 1 deletion tasks/dev_utils.rb
Expand Up @@ -62,7 +62,7 @@ def run_command(version, cmd)
desc 'Runs tests continuously'
task :loop_tests do
iterations = (ENV['TIMES'] || '8').to_i
rubies = ENV['RUBIES'] ? ENV['RUBIES'].split(',') : %w(2.1 2.2 2.3)
rubies = ENV['RUBIES'] ? ENV['RUBIES'].split(',') : %w[2.1 2.2 2.3]
ruby_manager = ENV['MANAGER'] || 'chruby'

LoopRunner.new(iterations, rubies, ruby_manager).run
Expand Down
6 changes: 3 additions & 3 deletions test/commands/set_test.rb
Expand Up @@ -18,7 +18,7 @@ def program
end

settings =
%i(autolist autosave basename fullpath post_mortem stack_on_error)
%i[autolist autosave basename fullpath post_mortem stack_on_error]

settings.each do |set|
['on', '1', 'true', ''].each do |key|
Expand All @@ -32,7 +32,7 @@ def program
end
end

%w(off 0 false).each do |key|
%w[off 0 false].each do |key|
define_method(:"test_disable_boolean_setting_#{set}_using_#{key}") do
with_setting set, true do
enter "set #{set} #{key}"
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_set_histfile_shows_an_error_message_if_no_filename_is_provided
check_error_includes 'You must specify a value for setting :histfile'
end

[:listsize, :width].each do |set|
%i[listsize width].each do |set|
define_method(:"test_set_#{set}_changes_integer_setting_#{set}") do
with_setting set, 100 do
enter "set #{set} 50"
Expand Down
2 changes: 1 addition & 1 deletion test/commands/show_test.rb
Expand Up @@ -6,7 +6,7 @@ module Byebug
#
class ShowTest < TestCase
settings =
%i(autolist autosave basename fullpath post_mortem stack_on_error)
%i[autolist autosave basename fullpath post_mortem stack_on_error]

settings.each do |set|
define_method(:"test_show_#{set}_shows_disabled_bool_setting_#{set}") do
Expand Down
2 changes: 1 addition & 1 deletion test/printers/plain_test.rb
Expand Up @@ -89,7 +89,7 @@ def test_print_variables
with_dummy_yaml do
assert_equal \
"a: b\nc: d\n",
printer.print_variables([%w(a b), %w(c d)])
printer.print_variables([%w[a b], %w[c d]])
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/runner_test.rb
Expand Up @@ -143,7 +143,7 @@ def test_run_with_require_flag
end

hsh = { 'can' => 'can', 'cat' => 'cat' }
assert_equal hsh, %w(can cat).abbrev
assert_equal hsh, %w[can cat].abbrev
end

def test_run_with_a_single_include_flag
Expand Down
1 change: 0 additions & 1 deletion test/support/temporary.rb
Expand Up @@ -74,7 +74,6 @@ def with_init_file(content)
with_new_file(File.expand_path('.byebug_test_rc'), content) do
yield
end

ensure
Byebug.init_file = old_init_file
end
Expand Down