Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Sep 12, 2023
1 parent 2c87c45 commit acd902d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions examples/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source "https://rubygems.org"

gem "openfeature-sdk", path: ".."
gem "sinatra"
gem "concurrent-ruby"
gem "cowsay"
gem "openfeature-sdk", path: ".."
gem "puma"
gem "concurrent-ruby"
gem "sinatra"
20 changes: 10 additions & 10 deletions examples/app.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
require 'sinatra'
require 'cowsay'
require 'openfeature/sdk'
# frozen_string_literal: true

require "sinatra"
require "cowsay"
require "openfeature/sdk"

OpenFeature::SDK.configure do |config|
config.provider = OpenFeature::SDK::Provider::NoOpProvider.new
config.provider = OpenFeature::SDK::Provider::NoOpProvider.new
end
feature_flags = OpenFeature::SDK.build_client(name: "my-app")

get '/' do
with_cows = true

if feature_flags.fetch_boolean_value(flag_key: 'with-cows', default_value: false)
"<pre>#{Cowsay.say 'Hello, world!', 'cow'}</pre>"
get "/" do
if feature_flags.fetch_boolean_value(flag_key: "with-cows", default_value: false)
"<pre>#{Cowsay.say "Hello, world!", "cow"}</pre>"
else
'<p>Hello, world!</p>'
"<p>Hello, world!</p>"
end
end

0 comments on commit acd902d

Please sign in to comment.