Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing commit #354

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/optimizely.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This is just a test branch
require_relative 'optimizely/audience'
require_relative 'optimizely/config/datafile_project_config'
require_relative 'optimizely/config_manager/http_project_config_manager'
Expand Down
4 changes: 2 additions & 2 deletions lib/optimizely/helpers/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ def inputs_valid?(variables, logger = NoOpLogger.new, level = Logger::ERROR)

return false unless variables.respond_to?(:each) && !variables.empty?

is_valid = true
is_valid = true # rubocop:disable Lint/UselessAssignment
if variables.include? :user_id
# Empty str is a valid user ID.
unless variables[:user_id].is_a?(String)
is_valid = false
is_valid = false # rubocop:disable Lint/UselessAssignment
logger.log(level, "#{Constants::INPUT_VARIABLES['USER_ID']} is invalid")
end
variables.delete :user_id
Expand Down
1 change: 0 additions & 1 deletion lib/optimizely/optimizely_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def self.custom_instance( # rubocop:disable Metrics/ParameterLists
notification_center = nil,
settings = nil
)

error_handler ||= NoOpErrorHandler.new
logger ||= NoOpLogger.new
notification_center = notification_center.is_a?(Optimizely::NotificationCenter) ? notification_center : NotificationCenter.new(logger, error_handler)
Expand Down
Loading