Skip to content

Commit 51e5db9

Browse files
committed
Some fixes for newer API interface
1 parent 04286c6 commit 51e5db9

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ These instructions will get you a copy of the project up and running on your loc
1919
```ruby
2020
require "bullet-train-ruby-client"
2121

22-
bt = BulletTrain.new(<<Your API KEY>>")
22+
bt = BulletTrain.new("<<Your API KEY>>")
2323

2424
if bt.getValue("font_size")
2525
# Do something awesome with the font size

bullet-train-ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |spec|
22
spec.name = "bullet-train-client"
3-
spec.version = "0.0.1"
3+
spec.version = "1.0.0"
44
spec.authors = ["Tom Stuart"]
55
spec.email = ["[email protected]"]
66
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }

lib/bullet-train.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ def processFlags(inputFlags)
2525
enabled = feature["enabled"]
2626
state = feature["feature_state_value"]
2727
flags[featureName] = {"enabled" => enabled, "value" => state}
28-
29-
return flags
3028
end
3129

3230
return flags
@@ -37,7 +35,7 @@ def getFlagsForUser(identity = nil)
3735
end
3836

3937
def getFlags()
40-
processFlags(getJSON("flags"))
38+
processFlags(getJSON("flags/"))
4139
end
4240

4341
def getValue(key, userId = nil)
@@ -69,8 +67,3 @@ def hasFeature(key, userId = nil)
6967
end
7068
end
7169
end
72-
73-
# bt = BulletTrain.new("QjgYur4LQTwe5HpvbvhpzK")
74-
# print bt.getFlags()
75-
# print bt.getValue("font_size")
76-
# print bt.hasFeature("font_size")

0 commit comments

Comments
 (0)