moesif_rack 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +19 -0
- data/lib/moesif_rack/moesif_middleware.rb +15 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17fdfd9dc7dec268ff1ca36c5912acb91289eef5
|
|
4
|
+
data.tar.gz: 1f24b2712c21f1faf4a7be7c58ae7b6e95a69d8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3adf4d1ddc1d36cf0f4b6b092144be4ae2c46bdee157cd0f38f8c99e7b6be18eee706276ada9a9c1f5cbdcab8bc1ee61a51d9aa1b052b16911b2dbb8632aebdb
|
|
7
|
+
data.tar.gz: 7029a3fa64c8fd6a29474a613dcaf961f2c1a39faab6e818571cd5b86266a49d86685eb0dbbdf4cca748c68abd5550f4d03b6894008da77c161da6f4ff10d2e4
|
data/README.md
CHANGED
|
@@ -117,6 +117,25 @@ moesif_options['mask_data'] = Proc.new { |event_model|
|
|
|
117
117
|
|
|
118
118
|
For details for the spec of event model, please see the [moesifapi-ruby git](https://github.com/Moesif/moesifapi-ruby)
|
|
119
119
|
|
|
120
|
+
#### skip
|
|
121
|
+
|
|
122
|
+
Optional. A Proc that takes env, headers, body and returns a boolean.
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
|
|
126
|
+
moesif_options['skip'] = Proc.new { |env, headers, body|
|
|
127
|
+
|
|
128
|
+
#snip
|
|
129
|
+
|
|
130
|
+
false
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
For details for the spec of event model, please see the [moesifapi-ruby git](https://github.com/Moesif/moesifapi-ruby)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
120
139
|
|
|
121
140
|
#### debug
|
|
122
141
|
|
|
@@ -17,6 +17,7 @@ module MoesifRack
|
|
|
17
17
|
@identify_user = options['identify_user']
|
|
18
18
|
@identify_session = options['identify_session']
|
|
19
19
|
@mask_data = options['mask_data']
|
|
20
|
+
@skip = options['skip']
|
|
20
21
|
@debug = options['debug']
|
|
21
22
|
end
|
|
22
23
|
|
|
@@ -119,10 +120,20 @@ module MoesifRack
|
|
|
119
120
|
|
|
120
121
|
end
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
should_skip = false
|
|
124
|
+
|
|
125
|
+
if @skip
|
|
126
|
+
if @skip.call(env, headers, body)
|
|
127
|
+
should_skip = true;
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if !should_skip
|
|
132
|
+
if @debug
|
|
133
|
+
process_send.call
|
|
134
|
+
else
|
|
135
|
+
Thread.start(&process_send)
|
|
136
|
+
end
|
|
126
137
|
end
|
|
127
138
|
|
|
128
139
|
[status, headers, body]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moesif_rack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Moesif, Inc
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-11-
|
|
12
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: test-unit
|