Skip to content

Commit

Permalink
Merge pull request #237 from gsamokovarov/bindex
Browse files Browse the repository at this point in the history
Bindex Integration
  • Loading branch information
gsamokovarov authored Mar 28, 2017
2 parents c783415 + eb96ad4 commit 3a6864a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 119 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
language: ruby

rvm:
- 2.3.1
- 2.2.5
- 2.3.1
- 2.4.1
- ruby-head
- rbx-2
- jruby
- jruby-9.1.8.0
- jruby-head

env:
global:
Expand All @@ -19,8 +21,8 @@ matrix:
allow_failures:
- rvm: ruby-head
- rvm: rbx-2
- rvm: jruby
- rvm: jruby-head
- env: TEST_SUITE=templates:test
include:
- env: TEST_SUITE=templates:test
rvm: 2.2.5
rvm: 2.4.0
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'

group :development do
gem 'byebug'
platform :ruby do
gem 'byebug'
end
gem 'puma'
end

Expand Down
18 changes: 2 additions & 16 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
_Web Console_ is a debugging tool for your Ruby on Rails applications.

- [Installation](#installation)
- [Runtime](#runtime)
- [CRuby](#cruby)
- [JRuby](#jruby)
- [Rubinius](#rubinius)
- [Configuration](#configuration)
- [Usage](#usage)
- [FAQ](#faq)
Expand All @@ -33,16 +29,6 @@ end
After you save the `Gemfile` changes, make sure to run `bundle install` and
restart your server for the _Web Console_ to kick in.

## Runtime

### CRuby

CRuby 2.2 and above is required.

### Rubinius

Internal errors like `ZeroDevisionError` aren't caught.

## Usage

The web console allows you to create an interactive Ruby session in your
Expand Down Expand Up @@ -162,7 +148,6 @@ All of _Web Console_ sessions are stored in memory. If you happen to run on a
multi-process server (like Unicorn) you may get unavailable session errors
while the server is still running. This is because a request may hit a
different worker (process) that doesn't have the desired session in memory.

To avoid that, if you use such servers in development, configure them so they
server requests only out of one process.

Expand Down Expand Up @@ -190,12 +175,13 @@ Make sure your configuration lives in `config/environments/development.rb`.
## Credits

* Shoutout to [Charlie Somerville] for [better_errors].
* Kudos to [John Mair] for [debug_inspector].
* Kudos to [John Mair] for [binding_of_caller] and [debug_inspector].
* Thanks to [Charles Oliver Nutter] for all the _JRuby_ feedback.
* Hugs and kisses to all of our [contributors]!

[better_errors]: https://github.com/charliesome/better_errors
[debug_inspector]: https://github.com/banister/debug_inspector
[binding_of_caller]: https://github.com/banister/binding_of_caller
[Charlie Somerville]: https://github.com/charliesome
[John Mair]: https://github.com/banister
[Charles Oliver Nutter]: https://github.com/headius
Expand Down
2 changes: 1 addition & 1 deletion lib/web_console/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Kernel
#
# Raises DoubleRenderError if a double +console+ invocation per request is
# detected.
def console(binding = WebConsole.caller_bindings.first)
def console(binding = Bindex.current_bindings.second)
raise WebConsole::DoubleRenderError if Thread.current[:__web_console_binding]

Thread.current[:__web_console_binding] = binding
Expand Down
33 changes: 0 additions & 33 deletions lib/web_console/integration.rb

This file was deleted.

23 changes: 0 additions & 23 deletions lib/web_console/integration/cruby.rb

This file was deleted.

39 changes: 0 additions & 39 deletions lib/web_console/integration/rubinius.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/web_console/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Railtie < ::Rails::Railtie
config.web_console.whitelisted_ips = %w( 127.0.0.1 ::1 )

initializer 'web_console.initialize' do
require 'web_console/integration'
require 'bindex'
require 'web_console/extensions'

if logger = ::Rails.logger
Expand Down
2 changes: 1 addition & 1 deletion web-console.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Gem::Specification.new do |s|
s.add_dependency "railties", rails_version
s.add_dependency "activemodel", rails_version
s.add_dependency "actionview", rails_version
s.add_dependency "debug_inspector"
s.add_dependency "bindex", '>= 0.4.0'
end

0 comments on commit 3a6864a

Please sign in to comment.