glitchy_gem 0.2.4 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/glitchy_gem/glitch.rb +12 -0
- data/lib/glitchy_gem/version.rb +1 -1
- data/lib/glitchy_gem.rb +3 -1
- metadata +55 -49
data/lib/glitchy_gem/glitch.rb
CHANGED
@@ -11,6 +11,8 @@ module GlitchyGem
|
|
11
11
|
action = options[:action] || params['action']
|
12
12
|
session = options[:session] || @rack_env['rack.session']
|
13
13
|
|
14
|
+
params = filter_params(params)
|
15
|
+
|
14
16
|
@uri = URI.parse("http://#{GlitchyGem.url}/glitches?auth_token=#{GlitchyGem.api_key}")
|
15
17
|
@http = Net::HTTP.new(@uri.host, @uri.port)
|
16
18
|
@request = Net::HTTP::Post.new(@uri.request_uri)
|
@@ -30,6 +32,16 @@ module GlitchyGem
|
|
30
32
|
|
31
33
|
private
|
32
34
|
|
35
|
+
def filter_params(params)
|
36
|
+
filter_fields = GlitchyGem.filter_params.map(&:upcase)
|
37
|
+
filtered_params = {}
|
38
|
+
params.each_pair do |k,v|
|
39
|
+
filtered_params[k] = filter_fields.include?(k.upcase) ? "[FILTERED]" : v
|
40
|
+
end
|
41
|
+
|
42
|
+
filtered_params
|
43
|
+
end
|
44
|
+
|
33
45
|
def rack_env(method)
|
34
46
|
rack_request.send(method) if rack_request
|
35
47
|
end
|
data/lib/glitchy_gem/version.rb
CHANGED
data/lib/glitchy_gem.rb
CHANGED
@@ -5,8 +5,10 @@ require 'glitchy_gem/railtie' if defined?(Rails::Railtie)
|
|
5
5
|
|
6
6
|
module GlitchyGem
|
7
7
|
class << self
|
8
|
-
attr_accessor :api_key, :environment, :logger, :url, :environments, :ignore_exceptions
|
8
|
+
attr_accessor :api_key, :environment, :logger, :url, :environments, :ignore_exceptions, :filter_params
|
9
9
|
def configure
|
10
|
+
self.filter_params = ["password", "password_confirmation"]
|
11
|
+
|
10
12
|
yield(self)
|
11
13
|
|
12
14
|
self.environments ||= ["production"]
|
metadata
CHANGED
@@ -1,39 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glitchy_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.2.4
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: "0.3"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
|
-
|
12
|
+
- GlitchyApp
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-06-
|
17
|
+
date: 2011-06-29 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bundler
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 23
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
version: 1.0.0
|
34
|
+
type: :development
|
35
|
+
version_requirements: *id001
|
34
36
|
description: Track your application errors with GlitchyApp and search through them.
|
35
37
|
email:
|
36
|
-
|
38
|
+
- support@glitchygem.com
|
37
39
|
executables: []
|
38
40
|
|
39
41
|
extensions: []
|
@@ -41,20 +43,20 @@ extensions: []
|
|
41
43
|
extra_rdoc_files: []
|
42
44
|
|
43
45
|
files:
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
46
|
+
- .gitignore
|
47
|
+
- Gemfile
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- glitchy_gem.gemspec
|
51
|
+
- lib/glitchy_gem.rb
|
52
|
+
- lib/glitchy_gem/glitch.rb
|
53
|
+
- lib/glitchy_gem/patches.rb
|
54
|
+
- lib/glitchy_gem/rack.rb
|
55
|
+
- lib/glitchy_gem/rails.rb
|
56
|
+
- lib/glitchy_gem/rails/action_controller_catcher.rb
|
57
|
+
- lib/glitchy_gem/railtie.rb
|
58
|
+
- lib/glitchy_gem/version.rb
|
59
|
+
- rails/init.rb
|
58
60
|
has_rdoc: true
|
59
61
|
homepage: http://rubygems.org/gems/glitchy_gem
|
60
62
|
licenses: []
|
@@ -63,27 +65,31 @@ post_install_message:
|
|
63
65
|
rdoc_options: []
|
64
66
|
|
65
67
|
require_paths:
|
66
|
-
|
68
|
+
- lib
|
67
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
68
71
|
requirements:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 3
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
version: "0"
|
74
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
75
80
|
requirements:
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
hash: 23
|
84
|
+
segments:
|
85
|
+
- 1
|
86
|
+
- 3
|
87
|
+
- 6
|
88
|
+
version: 1.3.6
|
83
89
|
requirements: []
|
84
90
|
|
85
91
|
rubyforge_project: glitchy_gem
|
86
|
-
rubygems_version: 1.3.
|
92
|
+
rubygems_version: 1.3.7
|
87
93
|
signing_key:
|
88
94
|
specification_version: 3
|
89
95
|
summary: The gem to enable you to track your application errors with GlitchApp
|