Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
DevCycle - the Ruby gem for the DevCycle Bucketing API
Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs.
This SDK is automatically generated by the OpenAPI Generator project:
Install the gem
gem install devcycle-server-sdk
Please follow the installation procedure and then run the following code:
# Load the gem
require 'devcycle-server-sdk'
# Setup authorization
DevCycle.configure do |config|
# Configure API key authorization
config.api_key['bearerAuth'] = 'YOUR API KEY'
end
api_instance = DevCycle::DVCClient.new
user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
begin
#Get all features for user data
result = api_instance.all_features(user_data)
p result
rescue DevCycle::ApiError => e
puts "Exception when calling DVCClient->all_features: #{e}"
end
# Load the gem
require 'devcycle-server-sdk'
# Setup authorization
DevCycle.configure do |config|
# Configure API key authorization
config.api_key['bearerAuth'] = 'YOUR API KEY'
end
api_instance = DevCycle::DVCClient.new
user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
begin
#Get all features for user data
result = api_instance.all_features(user_data)
p result
rescue DevCycle::ApiError => e
puts "Exception when calling DVCClient->all_features: #{e}"
end
begin
# Get value of given variable by key, using default value if segmentation is not passed or variable does not exit
result = api_instance.variable("variable-key", user_data, true)
p "Received value for #{result.key}: #{result.value}"
rescue DevCycle::ApiError => e
puts "Exception when calling DVCClient->variable: #{e}"
end
begin
#Get all variables for user data
result = api_instance.all_variables(user_data)
p result
rescue DevCycle::ApiError => e
puts "Exception when calling DVCClient->all_variables: #{e}"
end
event_data = DevCycle::Event.new({
type: "my-event",
target: "some_event_target",
value: 12,
meta_data: {
myKey: "my-value"
}
})
begin
# Post events for given user data
result = api_instance.track(user_data, event_data)
p result
rescue DevCycle::ApiError => e
puts "Exception when calling DVCClient->track: #{e}"
end
To provide a custom logger, override the logger
property of the SDK configuration.
DevCycle.configure do |config|
# Configure API key authorization
config.api_key['bearerAuth'] = 'YOUR API KEY'
# Override the default logger
config.logger = MyLogger
end
To see a detailed log of the requests being made to the DevCycle API, enable SDK debug logging:
DevCycle.configure do |config|
# Configure API key authorization
config.api_key['bearerAuth'] = 'YOUR API KEY'
# Enable detailed debug logs of requests being sent to the DevCycle API
config.debugging = true
end
To build the Ruby code into a gem:
gem build devcycle-server-sdk.gemspec
Then either install the gem locally:
gem install ./devcycle-server-sdk-1.0.0.gem
(for development, run gem install --dev ./devcycle-server-sdk-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'devcycle-server-sdk', '~> 1.0.0'
FAQs
Unknown package
We found that devcycle-server-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.