castle-rb 1.2.12 → 1.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/castle-rb/configuration.rb +1 -0
- data/lib/castle-rb/request.rb +5 -0
- data/lib/castle-rb/version.rb +1 -1
- 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: 1709b4da2a8474e4d61c66cb8e9bcd6051772d76
|
4
|
+
data.tar.gz: 22a86c01dd9714f2c1485f7b883abc3058e9e6b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4e308d7f1257f0698b6b7fbe71a725148c2a1624cfcd83e1d799737b2f046fd4ed892781866cb8ba08b8eb4f918b0480e128d7ce20cb08a351511b2845cabd4
|
7
|
+
data.tar.gz: 09cef947e6ed3d9e6009868a914b08513fe213edf4af2d76bd650d887db68433f933137626b78222d1bbe2e44a69a359a231e4123d9e4d1ff8b9f0bd1ad890d9
|
data/README.md
CHANGED
@@ -50,5 +50,8 @@ Castle.configure do |config|
|
|
50
50
|
|
51
51
|
# Castle::RequestError is raised when timing out (default: 30.0)
|
52
52
|
config.request_timeout = 2.0
|
53
|
+
|
54
|
+
# For tracking in non-web environments: https://castle.io/docs/sources (default: 'web')
|
55
|
+
config.source_header = 'backend'
|
53
56
|
end
|
54
57
|
```
|
data/lib/castle-rb/request.rb
CHANGED
@@ -66,6 +66,11 @@ module Castle
|
|
66
66
|
rescue # ignored
|
67
67
|
end
|
68
68
|
|
69
|
+
if Castle.config.source_header
|
70
|
+
env[:request_headers]["X-Castle-Source"] =
|
71
|
+
Castle.config.source_header
|
72
|
+
end
|
73
|
+
|
69
74
|
env[:request_headers]["User-Agent"] =
|
70
75
|
"Castle/v1 RubyBindings/#{Castle::VERSION}"
|
71
76
|
|
data/lib/castle-rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: castle-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Brissmyr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: her
|