ldclient-rb 0.1.1 → 0.1.3
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 +1 -1
- data/lib/ldclient-rb/config.rb +14 -0
- data/lib/ldclient-rb/ldclient.rb +1 -1
- data/lib/ldclient-rb/version.rb +1 -1
- metadata +20 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90bab32e29619fe24b31a74ddfa23ec825b68d2a
|
4
|
+
data.tar.gz: 3fd83f272000a6313895eb8ae02f1d089b35bd36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf202515c0ba433d8c04d714502686ec21b2d620c7e3b2cac0d2f7c1984b5c163e75799874c7764ab1ec00e16a379a8b549db317f9c8ac3e4ace251ee34e2c15
|
7
|
+
data.tar.gz: 2ffbbfe89474a7d91f6d085aa009197e2c2c4fb5bcfcde4addf194069ac906b879a1aabc56f39834ef052147288f01914ae15f75109fc7d8c22f9e91a5f0f668
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Your first feature flag
|
|
23
23
|
1. Create a new feature flag on your [dashboard](https://app.launchdarkly.com)
|
24
24
|
2. In your application code, use the feature's key to check wthether the flag is on for each user:
|
25
25
|
|
26
|
-
if client.
|
26
|
+
if client.toggle?("your.flag.key", {:key => "user@test.com"}, false)
|
27
27
|
# application code to show the feature
|
28
28
|
else
|
29
29
|
# the code to run if the feature is off
|
data/lib/ldclient-rb/config.rb
CHANGED
@@ -29,6 +29,7 @@ module LaunchDarkly
|
|
29
29
|
@flush_interval = opts[:flush_interval] || Config.default_flush_interval
|
30
30
|
@connect_timeout = opts[:connect_timeout] || Config.default_connect_timeout
|
31
31
|
@read_timeout = opts[:read_timeout] || Config.default_read_timeout
|
32
|
+
@log_timings = opts[:log_timings] || Config.default_log_timings
|
32
33
|
end
|
33
34
|
|
34
35
|
#
|
@@ -90,6 +91,15 @@ module LaunchDarkly
|
|
90
91
|
@connect_timeout
|
91
92
|
end
|
92
93
|
|
94
|
+
#
|
95
|
+
# Whether timing information should be logged. If it is logged, it will be logged to the DEBUG
|
96
|
+
# level on the configured logger. This can be very verbose.
|
97
|
+
#
|
98
|
+
# @return [Boolean] True if timing information should be logged.
|
99
|
+
def log_timings?
|
100
|
+
@log_timings
|
101
|
+
end
|
102
|
+
|
93
103
|
#
|
94
104
|
# The default LaunchDarkly client configuration. This configuration sets reasonable defaults for most users.
|
95
105
|
#
|
@@ -126,5 +136,9 @@ module LaunchDarkly
|
|
126
136
|
defined?(Rails) && Rails.respond_to?(:logger) ? Rails.logger : ::Logger.new($stdout)
|
127
137
|
end
|
128
138
|
|
139
|
+
def self.default_log_timings
|
140
|
+
false
|
141
|
+
end
|
142
|
+
|
129
143
|
end
|
130
144
|
end
|
data/lib/ldclient-rb/ldclient.rb
CHANGED
data/lib/ldclient-rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ldclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Catamorphic Co
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
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: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
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: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.8'
|
48
48
|
type: :runtime
|
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: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: faraday
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.9'
|
62
62
|
type: :runtime
|
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: '0.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: faraday-http-cache
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.4'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: thread_safe
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.3'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: net-http-persistent
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 2.9.4
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 2.9.4
|
111
111
|
description: Official LaunchDarkly SDK for Ruby
|
@@ -115,7 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
-
|
118
|
+
- .gitignore
|
119
119
|
- Gemfile
|
120
120
|
- Gemfile.lock
|
121
121
|
- LICENSE.txt
|
@@ -137,19 +137,18 @@ require_paths:
|
|
137
137
|
- lib
|
138
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - '>='
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- -
|
145
|
+
- - '>='
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.0.14
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: LaunchDarkly SDK for Ruby
|
154
154
|
test_files: []
|
155
|
-
has_rdoc:
|