castle-rb 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/castle-rb/client.rb +15 -2
- data/lib/castle-rb/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c80e0f6121cdd9c4b914d5dee3e497a72ed7b8a3
|
4
|
+
data.tar.gz: a2e9b71846f87d339c715682f29aabe40fe8acc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fce99899d97c33bc764d2d86c95613e715122fff126aed50f8a81dc0eb41e7cf169c44e2ef3553e61771b67cb5bb1ad5f1a0e7ef30c3252333a9ae131f49bc4d
|
7
|
+
data.tar.gz: b62455350a0c8b2de21b257ea83b908526277f66205d104636b1d56d2e8f146956dfe6d8e85201fca00d3ca7e2d584db7d6f7c638e62ff613ba50d58d11dfb5c
|
data/lib/castle-rb/client.rb
CHANGED
@@ -11,7 +11,7 @@ module Castle
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def identify(args)
|
14
|
-
@api.request('identify', args)
|
14
|
+
@api.request('identify', args) unless do_not_track?
|
15
15
|
end
|
16
16
|
|
17
17
|
def authenticate(args)
|
@@ -19,9 +19,22 @@ module Castle
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def track(args)
|
22
|
-
@api.request('track', args)
|
22
|
+
@api.request('track', args) unless do_not_track?
|
23
23
|
end
|
24
24
|
|
25
|
+
def do_not_track!
|
26
|
+
@do_not_track = true
|
27
|
+
end
|
28
|
+
|
29
|
+
def track!
|
30
|
+
@do_not_track = false
|
31
|
+
end
|
32
|
+
|
33
|
+
def do_not_track?
|
34
|
+
!!@do_not_track
|
35
|
+
end
|
36
|
+
|
37
|
+
|
25
38
|
private
|
26
39
|
|
27
40
|
# Extract the cookie set by the Castle Javascript
|
data/lib/castle-rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: castle-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Brissmyr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.10.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.10.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.6'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.5'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: webmock
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.21'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.21'
|
69
69
|
description: The easiest way to protect your users
|
@@ -72,8 +72,6 @@ executables: []
|
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
|
-
- README.md
|
76
|
-
- lib/castle-rb.rb
|
77
75
|
- lib/castle-rb/api.rb
|
78
76
|
- lib/castle-rb/client.rb
|
79
77
|
- lib/castle-rb/configuration.rb
|
@@ -83,6 +81,8 @@ files:
|
|
83
81
|
- lib/castle-rb/support/rails.rb
|
84
82
|
- lib/castle-rb/support/sinatra.rb
|
85
83
|
- lib/castle-rb/version.rb
|
84
|
+
- lib/castle-rb.rb
|
85
|
+
- README.md
|
86
86
|
- spec/api_spec.rb
|
87
87
|
- spec/client_spec.rb
|
88
88
|
- spec/spec_helper.rb
|
@@ -96,17 +96,17 @@ require_paths:
|
|
96
96
|
- lib
|
97
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- -
|
104
|
+
- - '>='
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.0.14.1
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Castle
|