inspectbang 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8ac10b0c7bdb0666dd27eb1fca98c66f2a6f8b3202ba1e9cfafe29e282004ff0
4
+ data.tar.gz: 90350b0c74ea48b1aa58ce0a927215bc5706f8d8336447943c033afc7432e576
5
+ SHA512:
6
+ metadata.gz: 9215c2fb0270a0b7f1ff8792a7a48bf31ba4c97d5562c962b6e8139a42b27aa83fc4c8e29cd2b4daadb52e6f01fbe49d4e76eace784808619055cd7bde9a8050
7
+ data.tar.gz: 2c7de5cd77097179953dfb5ffe93f35aa83ce1cf213ce9198784e6e5b3dfaa8bbbdc2d1f0ef29061482d430e65901f37d0d3712f84a8be3c24c83da931f5a844
data/LICENSE.txt ADDED
@@ -0,0 +1,4 @@
1
+ Copyright (c) 2012-2026 TIMCRAFT
2
+
3
+ This is an Open Source project licensed under the terms of the LGPLv3 license.
4
+ Please see <http://www.gnu.org/licenses/lgpl-3.0.html> for license text.
data/README.md CHANGED
@@ -1,28 +1,25 @@
1
- Inspect with a bang!
2
- ====================
1
+ # inspectbang
3
2
 
4
3
 
5
4
  Easy peasy "puts" style debugging in your browser, for Rails and Sinatra.
6
5
 
7
6
 
8
- Installation
9
- ------------
7
+ ## Installation
10
8
 
11
9
  Add inspectbang to your Gemfile and run `bundle`:
12
10
 
13
11
  ```ruby
14
12
  group :development do
15
- gem 'inspectbang', '~> 1.1.0'
13
+ gem 'inspectbang'
16
14
  end
17
15
  ```
18
16
 
19
17
 
20
- Usage
21
- -----
18
+ ## Example usage
22
19
 
23
20
  Use the `Object#inspect!` method to output an HTML safe representation of
24
- the object in your browser. For example, here's how you would inspect the
25
- form data that was posted to your Rails application:
21
+ the object in your browser. For example, you could inspect form data posted
22
+ to your Rails application like this:
26
23
 
27
24
  ```ruby
28
25
  class SomeController < ApplicationController
@@ -32,7 +29,7 @@ class SomeController < ApplicationController
32
29
  end
33
30
  ```
34
31
 
35
- And here's how you would inspect the request in a Sinatra application:
32
+ Or you could inspect the request in a Sinatra application like this:
36
33
 
37
34
  ```ruby
38
35
  get '/' do
data/inspectbang.gemspec CHANGED
@@ -1,12 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'inspectbang'
3
- s.version = '1.1.0'
3
+ s.version = '1.2.1'
4
+ s.license = 'LGPL-3.0'
4
5
  s.platform = Gem::Platform::RUBY
5
6
  s.authors = ['Tim Craft']
6
- s.email = ['mail@timcraft.com']
7
- s.homepage = 'http://github.com/timcraft/inspectbang'
7
+ s.email = ['email@timcraft.com']
8
+ s.homepage = 'https://rubygems.org/gems/inspectbang'
8
9
  s.description = 'Inspect with a bang!'
9
- s.summary = 'See description'
10
- s.files = %w(lib/inspectbang.rb README.md inspectbang.gemspec)
10
+ s.summary = 'Inspect with a bang!'
11
+ s.files = %w(lib/inspectbang.rb LICENSE.txt README.md inspectbang.gemspec)
12
+ s.required_ruby_version = '>= 1.9.3'
11
13
  s.require_path = 'lib'
12
14
  end
data/lib/inspectbang.rb CHANGED
@@ -12,8 +12,14 @@ module InspectBang
12
12
 
13
13
  class Railtie < Rails::Railtie
14
14
  initializer 'inspectbang' do |app|
15
- ActionController::Base.rescue_from(Exception) do |exception|
16
- render :text => CGI.escapeHTML(exception.message)
15
+ if defined?(ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY) && ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY.include?(:plain)
16
+ ActionController::Base.rescue_from(Exception) do |exception|
17
+ render :plain => exception.message
18
+ end
19
+ else
20
+ ActionController::Base.rescue_from(Exception) do |exception|
21
+ render :text => CGI.escapeHTML(exception.message)
22
+ end
17
23
  end
18
24
 
19
25
  Object.send(:include, Method)
metadata CHANGED
@@ -1,49 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspectbang
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tim Craft
9
- autorequire:
10
8
  bindir: bin
11
9
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
13
11
  dependencies: []
14
12
  description: Inspect with a bang!
15
13
  email:
16
- - mail@timcraft.com
14
+ - email@timcraft.com
17
15
  executables: []
18
16
  extensions: []
19
17
  extra_rdoc_files: []
20
18
  files:
21
- - lib/inspectbang.rb
19
+ - LICENSE.txt
22
20
  - README.md
23
21
  - inspectbang.gemspec
24
- homepage: http://github.com/timcraft/inspectbang
25
- licenses: []
26
- post_install_message:
22
+ - lib/inspectbang.rb
23
+ homepage: https://rubygems.org/gems/inspectbang
24
+ licenses:
25
+ - LGPL-3.0
26
+ metadata: {}
27
27
  rdoc_options: []
28
28
  require_paths:
29
29
  - lib
30
30
  required_ruby_version: !ruby/object:Gem::Requirement
31
- none: false
32
31
  requirements:
33
- - - ! '>='
32
+ - - ">="
34
33
  - !ruby/object:Gem::Version
35
- version: '0'
34
+ version: 1.9.3
36
35
  required_rubygems_version: !ruby/object:Gem::Requirement
37
- none: false
38
36
  requirements:
39
- - - ! '>='
37
+ - - ">="
40
38
  - !ruby/object:Gem::Version
41
39
  version: '0'
42
40
  requirements: []
43
- rubyforge_project:
44
- rubygems_version: 1.8.24
45
- signing_key:
46
- specification_version: 3
47
- summary: See description
41
+ rubygems_version: 4.0.6
42
+ specification_version: 4
43
+ summary: Inspect with a bang!
48
44
  test_files: []
49
- has_rdoc: