From 5ef6d7d6a0afcf1a47a77463479e47315243e0df Mon Sep 17 00:00:00 2001 From: Peter Adam Korodi <52385411+kp-cat@users.noreply.github.com> Date: Fri, 14 Jul 2023 16:16:44 +0200 Subject: [PATCH] remove deprecated code (#24) (#30) * remove deprecated code (#24) * version 7.0.0 * coverage fix --- .github/workflows/ruby-ci.yml | 4 +- lib/configcat.rb | 160 ------------------------- lib/configcat/configcatclient.rb | 46 ------- lib/configcat/version.rb | 2 +- spec/configcat/configcatclient_spec.rb | 63 +--------- spec/integration_spec.rb | 61 ++++++---- spec/rollout_spec.rb | 2 +- 7 files changed, 43 insertions(+), 295 deletions(-) diff --git a/.github/workflows/ruby-ci.yml b/.github/workflows/ruby-ci.yml index c9a870a..7f69c7f 100644 --- a/.github/workflows/ruby-ci.yml +++ b/.github/workflows/ruby-ci.yml @@ -52,8 +52,8 @@ jobs: bundler-cache: true - name: Run tests with coverage run: bundle exec rake - env: - COV: true + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 publish: needs: coverage diff --git a/lib/configcat.rb b/lib/configcat.rb index a9c0483..1b276de 100644 --- a/lib/configcat.rb +++ b/lib/configcat.rb @@ -24,164 +24,4 @@ def ConfigCat.get(sdk_key, options = nil) def ConfigCat.close_all ConfigCatClient.close_all end - - def ConfigCat.create_client(sdk_key, data_governance: DataGovernance::GLOBAL) - # - # Create an instance of ConfigCatClient and setup Auto Poll mode with default options - # - # :param sdk_key: ConfigCat SDK Key to access your configuration. - # :param data_governance: - # Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: - # https://app.configcat.com/organization/data-governance - # (Only Organization Admins have access) - # - return create_client_with_auto_poll(sdk_key, data_governance: data_governance) - end - - # Create an instance of ConfigCatClient and setup Auto Poll mode with custom options - # - # :param sdk_key: ConfigCat SDK Key to access your configuration. - # :param poll_interval_seconds: The client's poll interval in seconds. Default: 60 seconds. - # :param on_configuration_changed_callback: You can subscribe to configuration changes with this callback - # :param max_init_wait_time_seconds: maximum waiting time for first configuration fetch in polling mode. - # :param config_cache: If you want to use custom caching instead of the client's default, - # You can provide an implementation of ConfigCache. - # :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat - # :param proxy_address: Proxy address - # :param proxy_port: Proxy port - # :param proxy_user: username for proxy authentication - # :param proxy_pass: password for proxy authentication - # :param open_timeout_seconds: The number of seconds to wait for the server to make the initial connection. Default: 10 seconds. - # :param read_timeout_seconds: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds. - # :param flag_overrides: A FlagOverrides implementation used to override feature flags & settings. - # :param data_governance: - # Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: - # https://app.configcat.com/organization/data-governance - # (Only Organization Admins have access) - def ConfigCat.create_client_with_auto_poll(sdk_key, - poll_interval_seconds: 60, - max_init_wait_time_seconds: 5, - on_configuration_changed_callback: nil, - config_cache: nil, - base_url: nil, - proxy_address: nil, - proxy_port: nil, - proxy_user: nil, - proxy_pass: nil, - open_timeout_seconds: 10, - read_timeout_seconds: 30, - flag_overrides: nil, - data_governance: DataGovernance::GLOBAL) - options = ConfigCatOptions.new( - base_url: base_url, - polling_mode: PollingMode.auto_poll(poll_interval_seconds: poll_interval_seconds, max_init_wait_time_seconds: max_init_wait_time_seconds), - config_cache: config_cache, - proxy_address: proxy_address, - proxy_port: proxy_port, - proxy_user: proxy_user, - proxy_pass: proxy_pass, - open_timeout_seconds: open_timeout_seconds, - read_timeout_seconds: read_timeout_seconds, - flag_overrides: flag_overrides, - data_governance: data_governance - ) - ConfigCat.logger.warn('create_client_with_auto_poll is deprecated. Create the ConfigCat Client as a Singleton object with `configcatclient.get()` instead') - client = ConfigCatClient.get(sdk_key, options) - client.hooks.add_on_config_changed(on_configuration_changed_callback) if on_configuration_changed_callback - return client - end - - # Create an instance of ConfigCatClient and setup Lazy Load mode with custom options - # - # :param sdk_key: ConfigCat SDK Key to access your configuration. - # :param cache_time_to_live_seconds: The cache TTL. - # :param config_cache: If you want to use custom caching instead of the client's default, - # You can provide an implementation of ConfigCache. - # :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat - # :param proxy_address: Proxy address - # :param proxy_port: Proxy port - # :param proxy_user: username for proxy authentication - # :param proxy_pass: password for proxy authentication - # :param open_timeout_seconds: The number of seconds to wait for the server to make the initial connection. Default: 10 seconds. - # :param read_timeout_seconds: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds. - # :param flag_overrides: A FlagOverrides implementation used to override feature flags & settings. - # :param data_governance: - # Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: - # https://app.configcat.com/organization/data-governance - # (Only Organization Admins have access) - def ConfigCat.create_client_with_lazy_load(sdk_key, - cache_time_to_live_seconds: 60, - config_cache: nil, - base_url: nil, - proxy_address: nil, - proxy_port: nil, - proxy_user: nil, - proxy_pass: nil, - open_timeout_seconds: 10, - read_timeout_seconds: 30, - flag_overrides: nil, - data_governance: DataGovernance::GLOBAL) - options = ConfigCatOptions.new( - base_url: base_url, - polling_mode: PollingMode.lazy_load(cache_refresh_interval_seconds: cache_time_to_live_seconds), - config_cache: config_cache, - proxy_address: proxy_address, - proxy_port: proxy_port, - proxy_user: proxy_user, - proxy_pass: proxy_pass, - open_timeout_seconds: open_timeout_seconds, - read_timeout_seconds: read_timeout_seconds, - flag_overrides: flag_overrides, - data_governance: data_governance - ) - ConfigCat.logger.warn('create_client_with_lazy_load is deprecated. Create the ConfigCat Client as a Singleton object with `configcatclient.get()` instead') - client = ConfigCatClient.get(sdk_key, options) - return client - end - - # Create an instance of ConfigCatClient and setup Manual Poll mode with custom options - # - # :param sdk_key: ConfigCat SDK Key to access your configuration. - # :param config_cache: If you want to use custom caching instead of the client's default, - # You can provide an implementation of ConfigCache. - # :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat - # :param proxy_address: Proxy address - # :param proxy_port: Proxy port - # :param proxy_user: username for proxy authentication - # :param proxy_pass: password for proxy authentication - # :param open_timeout_seconds: The number of seconds to wait for the server to make the initial connection. Default: 10 seconds. - # :param read_timeout_seconds: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds. - # :param flag_overrides: A FlagOverrides implementation used to override feature flags & settings. - # :param data_governance: - # Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: - # https://app.configcat.com/organization/data-governance - # (Only Organization Admins have access) - def ConfigCat.create_client_with_manual_poll(sdk_key, - config_cache: nil, - base_url: nil, - proxy_address: nil, - proxy_port: nil, - proxy_user: nil, - proxy_pass: nil, - open_timeout_seconds: 10, - read_timeout_seconds: 30, - flag_overrides: nil, - data_governance: DataGovernance::GLOBAL) - options = ConfigCatOptions.new( - base_url: base_url, - polling_mode: PollingMode.manual_poll(), - config_cache: config_cache, - proxy_address: proxy_address, - proxy_port: proxy_port, - proxy_user: proxy_user, - proxy_pass: proxy_pass, - open_timeout_seconds: open_timeout_seconds, - read_timeout_seconds: read_timeout_seconds, - flag_overrides: flag_overrides, - data_governance: data_governance - ) - ConfigCat.logger.warn('create_client_with_manual_poll is deprecated. Create the ConfigCat Client as a Singleton object with `configcatclient.get()` instead') - client = ConfigCatClient.get(sdk_key, options) - return client - end end diff --git a/lib/configcat/configcatclient.rb b/lib/configcat/configcatclient.rb index 743842a..0bca562 100644 --- a/lib/configcat/configcatclient.rb +++ b/lib/configcat/configcatclient.rb @@ -146,52 +146,6 @@ def get_all_keys return settings.keys end - # Gets the Variation ID (analytics) of a feature flag or setting based on it's key. - # - # :param key [String] the identifier of the feature flag or setting. - # :param default_variation_id in case of any failure, this value will be returned. - # :param user [User] the user object to identify the caller. - # :return the variation ID. - def get_variation_id(key, default_variation_id, user = nil) - ConfigCat.logger.warn("get_variation_id is deprecated and will be removed in a future major version. " \ - "Please use [get_value_details] instead.") - - settings, fetch_time = _get_settings() - if settings === nil - message = "Config JSON is not present when evaluating setting '#{key}'. Returning the `default_variation_id` parameter that you specified in your application: '#{default_variation_id}'." - @log.error(1000, message) - @hooks.invoke_on_flag_evaluated(EvaluationDetails.from_error(key, nil, error: message, - variation_id: default_variation_id)) - return default_variation_id - end - details = _evaluate(key, user, nil, default_variation_id, settings, fetch_time) - return details.variation_id - end - - # Gets the Variation IDs (analytics) of all feature flags or settings. - # - # :param user [User] the user object to identify the caller. - # :return list of variation IDs - def get_all_variation_ids(user = nil) - ConfigCat.logger.warn("get_all_variation_ids is deprecated and will be removed in a future major version. " \ - "Please use [get_value_details] instead.") - - settings, _ = _get_settings() - if settings === nil - @log.error(1000, "Config JSON is not present. Returning empty list.") - return [] - end - - variation_ids = [] - for key in settings.keys - variation_id = get_variation_id(key, nil, user) - if !variation_id.equal?(nil) - variation_ids.push(variation_id) - end - end - return variation_ids - end - # Gets the key of a setting, and it's value identified by the given Variation ID (analytics) # # :param variation_id [String] variation ID diff --git a/lib/configcat/version.rb b/lib/configcat/version.rb index 6b17e84..954888a 100644 --- a/lib/configcat/version.rb +++ b/lib/configcat/version.rb @@ -1,3 +1,3 @@ module ConfigCat - VERSION = "6.1.0" + VERSION = "7.0.0" end diff --git a/spec/configcat/configcatclient_spec.rb b/spec/configcat/configcatclient_spec.rb index 0abd77b..f32bc74 100644 --- a/spec/configcat/configcatclient_spec.rb +++ b/spec/configcat/configcatclient_spec.rb @@ -211,51 +211,6 @@ def details_by_key(all_details, key) client.close end - it "test_default_user_get_variation_id" do - client = ConfigCatClient.get('test', ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, - config_cache: ConfigCacheMock.new)) - user1 = User.new("test@test1.com") - user2 = User.new("test@test2.com") - - client.set_default_user(user1) - expect(client.get_variation_id("testStringKey", "")).to eq("id1") - expect(client.get_variation_id("testStringKey", "", user2)).to eq("id2") - - client.clear_default_user - expect(client.get_variation_id("testStringKey", "")).to eq("id") - - client.close - end - - it "test_default_user_get_all_variation_ids" do - client = ConfigCatClient.get('test', ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, - config_cache: ConfigCacheMock.new)) - user1 = User.new("test@test1.com") - user2 = User.new("test@test2.com") - - client.set_default_user(user1) - result = client.get_all_variation_ids - expect(result.length).to eq(3) - expect(result).to include('id1') - expect(result).to include('fakeId1') - expect(result).to include('fakeId2') - - result = client.get_all_variation_ids(user2) - expect(result.length).to eq(3) - expect(result).to include('id2') - expect(result).to include('fakeId1') - expect(result).to include('fakeId2') - - client.clear_default_user - result = client.get_all_variation_ids - expect(result.length).to eq(3) - expect(result).to include('id') - expect(result).to include('fakeId1') - expect(result).to include('fakeId2') - - client.close - end - it "test_online_offline" do stub_request = WebMock.stub_request(:get, Regexp.new('https://.*')).to_return(status: 200, body: TEST_OBJECT_JSON, headers: {}) @@ -309,32 +264,22 @@ def details_by_key(all_details, key) it "test_get_variation_id" do client = ConfigCatClient.get("test", ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, config_cache: ConfigCacheMock.new)) - expect(client.get_variation_id("key1", nil)).to eq "fakeId1" - expect(client.get_variation_id("key2", nil)).to eq "fakeId2" + expect(client.get_value_details("key1", nil).variation_id).to eq "fakeId1" + expect(client.get_value_details("key2", nil).variation_id).to eq "fakeId2" client.close() end it "test_get_variation_id_not_found" do client = ConfigCatClient.get("test", ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, config_cache: ConfigCacheMock.new)) - expect(client.get_variation_id("nonexisting", "default_variation_id")).to eq "default_variation_id" + expect(client.get_value_details("nonexisting", "default_value").variation_id).to be_nil client.close() end it "test_get_variation_id_empty_config" do client = ConfigCatClient.get("test", ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, config_cache: ConfigCacheMock.new)) - expect(client.get_variation_id("nonexisting", "default_variation_id")).to eq "default_variation_id" - client.close() - end - - it "test_get_all_variation_ids" do - client = ConfigCatClient.get("test", ConfigCatOptions.new(polling_mode: PollingMode.manual_poll, - config_cache: ConfigCacheMock.new)) - result = client.get_all_variation_ids() - expect(result.size).to eq 3 - expect(result.include?("fakeId1")).to eq true - expect(result.include?("fakeId2")).to eq true + expect(client.get_value_details("nonexisting", "default_value").variation_id).to be_nil client.close() end diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index deb0ff6..81b2ca8 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -4,25 +4,25 @@ RSpec.describe 'Integration test: DefaultTests', type: :feature do it "test_without_sdk_key" do expect { - ConfigCat.create_client(nil) + ConfigCat.get(nil) }.to raise_error(ConfigCat::ConfigCatClientException) end it "test_client_works" do - client = ConfigCat.create_client(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_get_all_keys" do - client = ConfigCat.create_client(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY) keys = client.get_all_keys expect(keys.size).to eq 5 expect(keys).to include "keySampleText" end it "test_force_refresh" do - client = ConfigCat.create_client(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.force_refresh expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" @@ -33,40 +33,43 @@ RSpec.describe 'Integration test: AutoPollTests', type: :feature do it "test_without_sdk_key" do expect { - ConfigCat::create_client_with_auto_poll(nil) + ConfigCat.get(nil, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll)) }.to raise_error(ConfigCat::ConfigCatClientException) end it "test_client_works" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll)) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_valid_base_url" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY, base_url: "https://cdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll, + base_url: "https://cdn.configcat.com")) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_valid_base_url_trailing_slash" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY, base_url: "https://cdn.configcat.com/") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll, + base_url: "https://cdn.configcat.com/")) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_invalid_base_url" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY, base_url: "https://invalidcdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll, + base_url: "https://invalidcdn.configcat.com")) expect(client.get_value("keySampleText", "default value")).to eq "default value" client.close end it "test_client_works_invalid_proxy" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY, - proxy_address: "0.0.0.0", - proxy_port: 0, - proxy_user: "test", - proxy_pass: "test") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll, + proxy_address: "0.0.0.0", + proxy_port: 0, + proxy_user: "test", + proxy_pass: "test")) expect(client.get_value("keySampleText", "default value")).to eq "default value" client.close end @@ -75,13 +78,13 @@ uri = ConfigCat::BASE_URL_GLOBAL + "/" + ConfigCat::BASE_PATH + _SDK_KEY + ConfigCat::BASE_EXTENSION WebMock.stub_request(:get, uri).to_timeout() - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll)) expect(client.get_value("keySampleText", "default value")).to eq "default value" client.close end it "test_force_refresh" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll)) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.force_refresh expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" @@ -89,7 +92,8 @@ end it "test_wrong_param" do - client = ConfigCat::create_client_with_auto_poll(_SDK_KEY, poll_interval_seconds: 0, max_init_wait_time_seconds: -1) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.auto_poll( + poll_interval_seconds: 0, max_init_wait_time_seconds: -1))) sleep(2) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close @@ -99,30 +103,33 @@ RSpec.describe 'Integration test: LazyLoadingTests', type: :feature do it "test_without_sdk_key" do expect { - ConfigCat::create_client_with_lazy_load(nil) + ConfigCat.get(nil, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.lazy_load)) }.to raise_error(ConfigCat::ConfigCatClientException) end it "test_client_works" do - client = ConfigCat::create_client_with_lazy_load(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.lazy_load)) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_valid_base_url" do - client = ConfigCat::create_client_with_lazy_load(_SDK_KEY, base_url: "https://cdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.lazy_load, + base_url: "https://cdn.configcat.com")) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_invalid_base_url" do - client = ConfigCat::create_client_with_lazy_load(_SDK_KEY, base_url: "https://invalidcdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.lazy_load, + base_url: "https://invalidcdn.configcat.com")) expect(client.get_value("keySampleText", "default value")).to eq "default value" client.close end it "test_wrong_param" do - client = ConfigCat::create_client_with_lazy_load(_SDK_KEY, cache_time_to_live_seconds: 0) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.lazy_load( + cache_refresh_interval_seconds: 0))) expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end @@ -131,12 +138,12 @@ RSpec.describe 'Integration test: ManualPollingTests', type: :feature do it "test_without_sdk_key" do expect { - ConfigCat::create_client_with_manual_poll(nil) + ConfigCat.get(nil, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.manual_poll)) }.to raise_error(ConfigCat::ConfigCatClientException) end it "test_client_works" do - client = ConfigCat::create_client_with_manual_poll(_SDK_KEY) + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.manual_poll)) expect(client.get_value("keySampleText", "default value")).to eq "default value" client.force_refresh expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" @@ -144,14 +151,16 @@ end it "test_client_works_valid_base_url" do - client = ConfigCat::create_client_with_manual_poll(_SDK_KEY, base_url: "https://cdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.manual_poll, + base_url: "https://cdn.configcat.com")) client.force_refresh expect(client.get_value("keySampleText", "default value")).to eq "This text came from ConfigCat" client.close end it "test_client_works_invalid_base_url" do - client = ConfigCat::create_client_with_manual_poll(_SDK_KEY, base_url: "https://invalidcdn.configcat.com") + client = ConfigCat.get(_SDK_KEY, ConfigCat::ConfigCatOptions.new(polling_mode: ConfigCat::PollingMode.manual_poll, + base_url: "https://invalidcdn.configcat.com")) client.force_refresh expect(client.get_value("keySampleText", "default value")).to eq "default value" client.close diff --git a/spec/rollout_spec.rb b/spec/rollout_spec.rb index a62830b..b922e04 100644 --- a/spec/rollout_spec.rb +++ b/spec/rollout_spec.rb @@ -62,7 +62,7 @@ def test_matrix(file_path, sdk_key, type) end i = 0 for setting_key in setting_keys - value = (type == VARIATION_TEST_TYPE) ? client.get_variation_id(setting_key, nil, user_object) : client.get_value(setting_key, nil, user_object) + value = (type == VARIATION_TEST_TYPE) ? client.get_value_details(setting_key, nil, user_object).variation_id : client.get_value(setting_key, nil, user_object) if value.to_s != (user_descriptor[i + 4]).to_s errors += ((((((("Identifier: " + user_descriptor[0]) + ". SettingKey: ") + setting_key) + ". Expected: ") + ((user_descriptor[i + 4]).to_s)) + ". Result: ") + value.to_s) + ".\n" end