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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a73519d15b98bcb02f0fb8e111d301839fb8401
4
- data.tar.gz: 3a6a476a10a497bc7695028f1a197c91069f07a0
3
+ metadata.gz: 90bab32e29619fe24b31a74ddfa23ec825b68d2a
4
+ data.tar.gz: 3fd83f272000a6313895eb8ae02f1d089b35bd36
5
5
  SHA512:
6
- metadata.gz: 451e8ea84cb0be1a56d2b7050fe92929d64d9cacf2e2396ca1e0f953dfcfeff3df8b9dc7e89c5e849bb36463a40b369b722e26a73fb8f1dc82be49dd73f04463
7
- data.tar.gz: 09a5bc459d836a586c5996e61e80acc31475db8d35db2466c11f020570df00a7ab07cbc87651270a35087c569dc8b666e89326418fc121c28b2de96efe1017cd
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.get_flag?("your.flag.key", {:key => "user@test.com"}, false)
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
@@ -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
@@ -324,7 +324,7 @@ module LaunchDarkly
324
324
  end
325
325
 
326
326
  def log_timings(label, &block)
327
- if !@config.logger.debug?
327
+ if !@config.log_timings? || !@config.logger.debug?
328
328
  return block.call
329
329
  end
330
330
  res = nil
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
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.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-03-10 00:00:00.000000000 Z
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
- - ".gitignore"
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.2.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: