exception-hashify 0.0.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.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/exception-hashify.gemspec +21 -0
- data/lib/exception-hashify.rb +16 -0
- data/lib/exception-hashify/version.rb +6 -0
- data/spec/exception-hashify_spec.rb +15 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/support/helpers.rb +11 -0
- metadata +71 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "exception-hashify/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "exception-hashify"
|
|
7
|
+
s.version = Exception::Hashify::VERSION
|
|
8
|
+
s.authors = ["Rafael Souza"]
|
|
9
|
+
s.email = ["me@rafaelss.com"]
|
|
10
|
+
s.homepage = ""
|
|
11
|
+
s.summary = %q{Transform your exceptions into hashes}
|
|
12
|
+
s.description = %q{A very simples gem that transforms exceptions into hashes}
|
|
13
|
+
|
|
14
|
+
s.files = `git ls-files`.split("\n")
|
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
17
|
+
s.require_paths = ["lib"]
|
|
18
|
+
|
|
19
|
+
s.add_development_dependency "rspec", "~> 2.6.0"
|
|
20
|
+
end
|
|
21
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe Exception::Hashify do
|
|
4
|
+
|
|
5
|
+
it "should return a hash with exception information" do
|
|
6
|
+
with_exception do |ex|
|
|
7
|
+
hash = ex.to_hash
|
|
8
|
+
hash[:class_name].should == "RuntimeError"
|
|
9
|
+
hash[:message].should == "teste"
|
|
10
|
+
hash[:backtrace].should be_a Array
|
|
11
|
+
hash[:backtrace].should_not be_empty
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: exception-hashify
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Rafael Souza
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2011-07-27 00:00:00.000000000 -03:00
|
|
13
|
+
default_executable:
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: rspec
|
|
17
|
+
requirement: &2152907820 !ruby/object:Gem::Requirement
|
|
18
|
+
none: false
|
|
19
|
+
requirements:
|
|
20
|
+
- - ~>
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 2.6.0
|
|
23
|
+
type: :development
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: *2152907820
|
|
26
|
+
description: A very simples gem that transforms exceptions into hashes
|
|
27
|
+
email:
|
|
28
|
+
- me@rafaelss.com
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- .gitignore
|
|
34
|
+
- .rspec
|
|
35
|
+
- Gemfile
|
|
36
|
+
- Rakefile
|
|
37
|
+
- exception-hashify.gemspec
|
|
38
|
+
- lib/exception-hashify.rb
|
|
39
|
+
- lib/exception-hashify/version.rb
|
|
40
|
+
- spec/exception-hashify_spec.rb
|
|
41
|
+
- spec/spec_helper.rb
|
|
42
|
+
- spec/support/helpers.rb
|
|
43
|
+
has_rdoc: true
|
|
44
|
+
homepage: ''
|
|
45
|
+
licenses: []
|
|
46
|
+
post_install_message:
|
|
47
|
+
rdoc_options: []
|
|
48
|
+
require_paths:
|
|
49
|
+
- lib
|
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
|
+
none: false
|
|
52
|
+
requirements:
|
|
53
|
+
- - ! '>='
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: '0'
|
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
requirements: []
|
|
63
|
+
rubyforge_project:
|
|
64
|
+
rubygems_version: 1.6.2
|
|
65
|
+
signing_key:
|
|
66
|
+
specification_version: 3
|
|
67
|
+
summary: Transform your exceptions into hashes
|
|
68
|
+
test_files:
|
|
69
|
+
- spec/exception-hashify_spec.rb
|
|
70
|
+
- spec/spec_helper.rb
|
|
71
|
+
- spec/support/helpers.rb
|