rox-rollout 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +45 -0
  3. data/.gitignore +8 -0
  4. data/Gemfile +6 -0
  5. data/LICENSE +50 -0
  6. data/README_DEVELOP.md +19 -0
  7. data/Rakefile +16 -0
  8. data/_archive/.document +5 -0
  9. data/_archive/.rspec +1 -0
  10. data/_archive/Gemfile +15 -0
  11. data/_archive/Gemfile.lock +87 -0
  12. data/_archive/README.md +32 -0
  13. data/_archive/README.rdoc +19 -0
  14. data/_archive/Rakefile +50 -0
  15. data/_archive/lib/expr_function_definition.rb +52 -0
  16. data/_archive/lib/function_definition.rb +48 -0
  17. data/_archive/lib/function_token.rb +12 -0
  18. data/_archive/lib/object_extends.rb +12 -0
  19. data/_archive/lib/ruby_interpreter.rb +292 -0
  20. data/_archive/lib/stack.rb +48 -0
  21. data/_archive/lib/string_extends.rb +14 -0
  22. data/_archive/spec/ruby_interpreter_spec.rb +203 -0
  23. data/_archive/spec/spec_helper.rb +30 -0
  24. data/_archive/spec/stack_spec.rb +77 -0
  25. data/bin/console +14 -0
  26. data/bin/setup +8 -0
  27. data/e2e/container.rb +38 -0
  28. data/e2e/custom_props.rb +55 -0
  29. data/e2e/rox_e2e_test.rb +159 -0
  30. data/e2e/test_vars.rb +24 -0
  31. data/lib/rox.rb +5 -0
  32. data/lib/rox/core/client/buid.rb +82 -0
  33. data/lib/rox/core/client/device_properties.rb +45 -0
  34. data/lib/rox/core/client/internal_flags.rb +20 -0
  35. data/lib/rox/core/client/sdk_settings.rb +5 -0
  36. data/lib/rox/core/configuration/configuration.rb +5 -0
  37. data/lib/rox/core/configuration/configuration_fetched_args.rb +23 -0
  38. data/lib/rox/core/configuration/configuration_fetched_invoker.rb +37 -0
  39. data/lib/rox/core/configuration/configuration_parser.rb +85 -0
  40. data/lib/rox/core/configuration/fetcher_error.rb +13 -0
  41. data/lib/rox/core/configuration/fetcher_status.rb +10 -0
  42. data/lib/rox/core/configuration/models/experiment_model.rb +5 -0
  43. data/lib/rox/core/configuration/models/target_group_model.rb +5 -0
  44. data/lib/rox/core/consts/build.rb +8 -0
  45. data/lib/rox/core/consts/environment.rb +42 -0
  46. data/lib/rox/core/consts/property_type.rb +29 -0
  47. data/lib/rox/core/context/merged_context.rb +16 -0
  48. data/lib/rox/core/core.rb +131 -0
  49. data/lib/rox/core/entities/flag.rb +26 -0
  50. data/lib/rox/core/entities/flag_setter.rb +39 -0
  51. data/lib/rox/core/entities/variant.rb +56 -0
  52. data/lib/rox/core/impression/impression_args.rb +5 -0
  53. data/lib/rox/core/impression/impression_invoker.rb +41 -0
  54. data/lib/rox/core/impression/models/experiment.rb +14 -0
  55. data/lib/rox/core/impression/models/reporting_value.rb +5 -0
  56. data/lib/rox/core/logging/logging.rb +17 -0
  57. data/lib/rox/core/logging/no_op_logger.rb +11 -0
  58. data/lib/rox/core/network/configuration_fetch_result.rb +5 -0
  59. data/lib/rox/core/network/configuration_fetcher.rb +38 -0
  60. data/lib/rox/core/network/configuration_fetcher_base.rb +25 -0
  61. data/lib/rox/core/network/configuration_fetcher_roxy.rb +29 -0
  62. data/lib/rox/core/network/configuration_source.rb +9 -0
  63. data/lib/rox/core/network/request.rb +46 -0
  64. data/lib/rox/core/network/request_configuration_builder.rb +48 -0
  65. data/lib/rox/core/network/request_data.rb +5 -0
  66. data/lib/rox/core/network/response.rb +16 -0
  67. data/lib/rox/core/properties/custom_property.rb +18 -0
  68. data/lib/rox/core/properties/custom_property_type.rb +18 -0
  69. data/lib/rox/core/properties/device_property.rb +11 -0
  70. data/lib/rox/core/register/registerer.rb +35 -0
  71. data/lib/rox/core/reporting/error_reporter.rb +152 -0
  72. data/lib/rox/core/repositories/custom_property_repository.rb +61 -0
  73. data/lib/rox/core/repositories/experiment_repository.rb +21 -0
  74. data/lib/rox/core/repositories/flag_repository.rb +49 -0
  75. data/lib/rox/core/repositories/roxx/experiments_extensions.rb +82 -0
  76. data/lib/rox/core/repositories/roxx/properties_extensions.rb +26 -0
  77. data/lib/rox/core/repositories/target_group_repository.rb +17 -0
  78. data/lib/rox/core/roxx/core_stack.rb +22 -0
  79. data/lib/rox/core/roxx/evaluation_result.rb +28 -0
  80. data/lib/rox/core/roxx/node.rb +11 -0
  81. data/lib/rox/core/roxx/parser.rb +143 -0
  82. data/lib/rox/core/roxx/regular_expression_extensions.rb +33 -0
  83. data/lib/rox/core/roxx/string_tokenizer.rb +68 -0
  84. data/lib/rox/core/roxx/symbols.rb +14 -0
  85. data/lib/rox/core/roxx/token_type.rb +30 -0
  86. data/lib/rox/core/roxx/tokenized_expression.rb +119 -0
  87. data/lib/rox/core/roxx/value_compare_extensions.rb +137 -0
  88. data/lib/rox/core/security/signature_verifier.rb +18 -0
  89. data/lib/rox/core/utils/periodic_task.rb +12 -0
  90. data/lib/rox/core/utils/type_utils.rb +9 -0
  91. data/lib/rox/server/client/sdk_settings.rb +5 -0
  92. data/lib/rox/server/client/server_properties.rb +20 -0
  93. data/lib/rox/server/flags/rox_flag.rb +19 -0
  94. data/lib/rox/server/flags/rox_variant.rb +8 -0
  95. data/lib/rox/server/logging/server_logger.rb +35 -0
  96. data/lib/rox/server/rox_options.rb +27 -0
  97. data/lib/rox/server/rox_server.rb +83 -0
  98. data/lib/rox/version.rb +3 -0
  99. data/rox.gemspec +29 -0
  100. metadata +184 -0
@@ -0,0 +1,137 @@
1
+ module Rox
2
+ module Core
3
+ class ValueCompareExtensions
4
+ def initialize(parser)
5
+ @parser = parser
6
+ end
7
+
8
+ def extend
9
+ @parser.add_operator('lt') do |parser, stack, context|
10
+ op1 = stack.pop
11
+ op2 = stack.pop
12
+ if op1.is_a?(Numeric) && op2.is_a?(Numeric)
13
+ stack.push(op1 < op2)
14
+ else
15
+ stack.push(false)
16
+ end
17
+ end
18
+
19
+ @parser.add_operator('lte') do |parser, stack, context|
20
+ op1 = stack.pop
21
+ op2 = stack.pop
22
+ if op1.is_a?(Numeric) && op2.is_a?(Numeric)
23
+ stack.push(op1 <= op2)
24
+ else
25
+ stack.push(false)
26
+ end
27
+ end
28
+
29
+ @parser.add_operator('gt') do |parser, stack, context|
30
+ op1 = stack.pop
31
+ op2 = stack.pop
32
+ if op1.is_a?(Numeric) && op2.is_a?(Numeric)
33
+ stack.push(op1 > op2)
34
+ else
35
+ stack.push(false)
36
+ end
37
+ end
38
+
39
+ @parser.add_operator('gte') do |parser, stack, context|
40
+ op1 = stack.pop
41
+ op2 = stack.pop
42
+ if op1.is_a?(Numeric) && op2.is_a?(Numeric)
43
+ stack.push(op1 >= op2)
44
+ else
45
+ stack.push(false)
46
+ end
47
+ end
48
+
49
+ @parser.add_operator('semverNe') do |parser, stack, context|
50
+ op1 = stack.pop
51
+ op2 = stack.pop
52
+ if op1.is_a?(String) && op2.is_a?(String)
53
+ version1, version2 = normalize_versions(op1, op2)
54
+ stack.push(Gem::Version.new(version1) != Gem::Version.new(version2))
55
+ else
56
+ stack.push(false)
57
+ end
58
+ end
59
+
60
+ @parser.add_operator('semverEq') do |parser, stack, context|
61
+ op1 = stack.pop
62
+ op2 = stack.pop
63
+ if op1.is_a?(String) && op2.is_a?(String)
64
+ version1, version2 = normalize_versions(op1, op2)
65
+ stack.push(Gem::Version.new(version1) == Gem::Version.new(version2))
66
+ else
67
+ stack.push(false)
68
+ end
69
+ end
70
+
71
+ @parser.add_operator('semverLt') do |parser, stack, context|
72
+ op1 = stack.pop
73
+ op2 = stack.pop
74
+ if op1.is_a?(String) && op2.is_a?(String)
75
+ version1, version2 = normalize_versions(op1, op2)
76
+ stack.push(Gem::Version.new(version1) < Gem::Version.new(version2))
77
+ else
78
+ stack.push(false)
79
+ end
80
+ end
81
+
82
+ @parser.add_operator('semverLte') do |parser, stack, context|
83
+ op1 = stack.pop
84
+ op2 = stack.pop
85
+ if op1.is_a?(String) && op2.is_a?(String)
86
+ version1, version2 = normalize_versions(op1, op2)
87
+ stack.push(Gem::Version.new(version1) <= Gem::Version.new(version2))
88
+ else
89
+ stack.push(false)
90
+ end
91
+ end
92
+
93
+ @parser.add_operator('semverGt') do |parser, stack, context|
94
+ op1 = stack.pop
95
+ op2 = stack.pop
96
+ if op1.is_a?(String) && op2.is_a?(String)
97
+ version1, version2 = normalize_versions(op1, op2)
98
+ stack.push(Gem::Version.new(version1) > Gem::Version.new(version2))
99
+ else
100
+ stack.push(false)
101
+ end
102
+ end
103
+
104
+ @parser.add_operator('semverGte') do |parser, stack, context|
105
+ op1 = stack.pop
106
+ op2 = stack.pop
107
+ if op1.is_a?(String) && op2.is_a?(String)
108
+ version1, version2 = normalize_versions(op1, op2)
109
+ stack.push(Gem::Version.new(version1) >= Gem::Version.new(version2))
110
+ else
111
+ stack.push(false)
112
+ end
113
+ end
114
+ end
115
+
116
+ def normalize_versions(version1, version2)
117
+ # Gem::Version treats versions "1.1", "1.1.0", "1.1.0.0", etc as equal.
118
+ # Fix this behavior.
119
+
120
+ segment_count1 = version1.split('.').length
121
+ segment_count2 = version2.split('.').length
122
+
123
+ return [version1, version2] if segment_count1 == segment_count2
124
+
125
+ if segment_count1 < segment_count2
126
+ version1 += '.0' * (segment_count2 - segment_count1) + '.0'
127
+ version2 += '.1'
128
+ else
129
+ version1 += '.1'
130
+ version2 += '.0' * (segment_count1 - segment_count2) + '.0'
131
+ end
132
+
133
+ [version1, version2]
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,18 @@
1
+ require 'base64'
2
+ require 'openssl'
3
+
4
+ module Rox
5
+ module Core
6
+ class SignatureVerifier
7
+ ROX_CERTIFICATE_BASE64 = 'MIIDWDCCAkACCQDR039HDUMyzTANBgkqhkiG9w0BAQUFADBuMQswCQYDVQQHEwJjYTETMBEGA1UEChMKcm9sbG91dC5pbzERMA8GA1UECxMIc2VjdXJpdHkxFzAVBgNVBAMTDnd3dy5yb2xsb3V0LmlvMR4wHAYJKoZIhvcNAQkBFg9leWFsQHJvbGxvdXQuaW8wHhcNMTQwODE4MDkzNjAyWhcNMjQwODE1MDkzNjAyWjBuMQswCQYDVQQHEwJjYTETMBEGA1UEChMKcm9sbG91dC5pbzERMA8GA1UECxMIc2VjdXJpdHkxFzAVBgNVBAMTDnd3dy5yb2xsb3V0LmlvMR4wHAYJKoZIhvcNAQkBFg9leWFsQHJvbGxvdXQuaW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDq8GMRFLyaQVDEdcHlYm7NnGrAqhLP2E/27W21yTQein7r8FOT/7jJ0PLpcGLw/3zDT5wzIJ3OtFy4HWre2hn7wmt+bI+bbS/9kKrmqkpjAj1+PwnB4lhEad27lolMCuz5purqi209k7q51IMdfq0/Ot7P/Bmp+LBNs2F4jMsPYxZUUYkVTAmPqgnwxuWoJZan/OGNjtj9OGg8eOcOfcyxC4GDR/Yail+kht4I/HHesSXVukqXntsbdgnXKFkX682TuFPc3pd8ly+6N6OSWpbNV8UmEVZygnxWT3vxBT2TWvFexbW52KOFY91wIkjt+IPEMPJBPPDiN9J2nuttvfMpAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAIXrD6YsIhZa6fYDAR8huP0V3BRwMKjeLGLCXLzvuPaoQGDhn4RJNgz3leNcomIkV/AwneeS9BXgBAcEKjNeLD+nW58RSRnAfxDT5cUtQgIeR6dFmEK05u+8j/cK3VO410xr0taNMbmJfEn07WjfCdcJS3hsGJuVmEUC85KYznbIcafQMGklLYArXYVnR3XKqzxcLohSPX99weujH5wt78Zy3pXxuYCDETwhgcCYCQaZz7mpvtSOub3JQT+Ir5cBSdyI1oPI2dIamUL5+ntTyll/1rbYj83qREw8PKA9Q0KIIgfpggy19TS9zknwOLz44wRdLyT2tFoaiRqHvm6JKaA='
8
+
9
+ def verify(data, signature_base64)
10
+ certificate_bytes = Base64.decode64(SignatureVerifier::ROX_CERTIFICATE_BASE64)
11
+ cert = OpenSSL::X509::Certificate.new certificate_bytes
12
+ rsa = cert.public_key
13
+ signature_bytes = Base64.decode64(signature_base64)
14
+ rsa.verify(OpenSSL::Digest::SHA256.new, signature_bytes, data)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ module Rox
2
+ module Core
3
+ module PeriodicTask
4
+ def self.run(period)
5
+ Thread.new do
6
+ sleep(period)
7
+ yield
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ module Rox
2
+ module Core
3
+ module Utils
4
+ def self.boolean?(value)
5
+ [true, false].include?(value)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Rox
2
+ module Server
3
+ SdkSettings = Struct.new(:api_key, :dev_mode_secret)
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ require 'securerandom'
2
+ require 'rox/core/client/device_properties'
3
+ require 'rox/version'
4
+
5
+ module Rox
6
+ module Server
7
+ class ServerProperties < Rox::Core::DeviceProperties
8
+ attr_accessor :distinct_id
9
+
10
+ def initialize(sdk_settings, rox_options)
11
+ super(sdk_settings, rox_options)
12
+ @distinct_id = SecureRandom.uuid
13
+ end
14
+
15
+ def lib_version
16
+ Rox::VERSION
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ require 'rox/core/entities/flag'
2
+
3
+ module Rox
4
+ module Server
5
+ class RoxFlag < Rox::Core::Flag
6
+ def enabled?(context = nil)
7
+ super(context)
8
+ end
9
+
10
+ def enabled(context = nil)
11
+ super(context)
12
+ end
13
+
14
+ def disabled(context = nil)
15
+ super(context)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,8 @@
1
+ require 'rox/core/entities/variant'
2
+
3
+ module Rox
4
+ module Server
5
+ class RoxVariant < Rox::Core::Variant
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,35 @@
1
+ require 'logger'
2
+
3
+ module Rox
4
+ module Server
5
+ class ServerLogger
6
+ def initialize
7
+ @logger = Logger.new(STDOUT)
8
+ end
9
+
10
+ def debug(message, ex = nil)
11
+ if ex.nil?
12
+ @logger.debug(message)
13
+ else
14
+ @logger.debug("#{message}. Exception: #{ex}")
15
+ end
16
+ end
17
+
18
+ def error(message, ex = nil)
19
+ if ex.nil?
20
+ @logger.error(message)
21
+ else
22
+ @logger.error("#{message}. Exception: #{ex}")
23
+ end
24
+ end
25
+
26
+ def warn(message, ex = nil)
27
+ if ex.nil?
28
+ @logger.warn(message)
29
+ else
30
+ @logger.warn("#{message}. Exception: #{ex}")
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,27 @@
1
+ require 'rox/core/logging/logging'
2
+ require 'rox/server/logging/server_logger'
3
+
4
+ module Rox
5
+ module Server
6
+ class RoxOptions
7
+ attr_accessor :dev_mode_key, :version, :fetch_interval, :logger, :impression_handler, :configuration_fetched_handler, :roxy_url
8
+
9
+ def initialize(dev_mode_key: nil, version: nil, fetch_interval: nil, logger: nil, impression_handler: nil, configuration_fetched_handler: nil, roxy_url: nil)
10
+ @dev_mode_key = dev_mode_key || 'stam'
11
+ @version = version || '0.0'
12
+
13
+ if fetch_interval.nil?
14
+ @fetch_interval = 60
15
+ else
16
+ @fetch_interval = fetch_interval < 30 ? 30 : fetch_interval
17
+ end
18
+
19
+ Rox::Core::Logging.logger = logger || ServerLogger.new
20
+
21
+ @impression_handler = impression_handler
22
+ @configuration_fetched_handler = configuration_fetched_handler
23
+ @roxy_url = roxy_url
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,83 @@
1
+ require 'securerandom'
2
+ require 'rox/core/core'
3
+ require 'rox/core/logging/logging'
4
+ require 'rox/server/rox_options'
5
+ require 'rox/server/client/sdk_settings'
6
+ require 'rox/server/client/server_properties'
7
+ require 'rox/core/properties/device_property'
8
+ require 'rox/core/properties/custom_property'
9
+ require 'rox/core/properties/custom_property_type'
10
+ require 'rox/core/consts/property_type'
11
+
12
+ module Rox
13
+ module Server
14
+ class RoxServer
15
+ @core = Rox::Core::Core.new
16
+
17
+ def self.setup(api_key, rox_options = nil)
18
+ rox_options = RoxOptions.new if rox_options.nil?
19
+
20
+ sdk_settings = SdkSettings.new(api_key, rox_options.dev_mode_key)
21
+ server_properties = ServerProperties.new(sdk_settings, rox_options)
22
+
23
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new(Rox::Core::PropertyType::PLATFORM.name, Rox::Core::CustomPropertyType::STRING, server_properties.all_properties[Rox::Core::PropertyType::PLATFORM.name]))
24
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new(Rox::Core::PropertyType::APP_RELEASE.name, Rox::Core::CustomPropertyType::SEMVER, server_properties.all_properties[Rox::Core::PropertyType::APP_RELEASE.name]))
25
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new(Rox::Core::PropertyType::DISTINCT_ID.name, Rox::Core::CustomPropertyType::STRING) {|_| SecureRandom.uuid})
26
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new('internal.realPlatform', Rox::Core::CustomPropertyType::STRING, server_properties.all_properties[Rox::Core::PropertyType::PLATFORM.name]))
27
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new('internal.customPlatform', Rox::Core::CustomPropertyType::STRING, server_properties.all_properties[Rox::Core::PropertyType::PLATFORM.name]))
28
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new('internal.appKey', Rox::Core::CustomPropertyType::STRING, server_properties.rollout_key))
29
+ @core.add_custom_property_if_not_exists(Rox::Core::DeviceProperty.new("internal.#{Rox::Core::PropertyType::DISTINCT_ID.name}", Rox::Core::CustomPropertyType::STRING) {|_| SecureRandom.uuid})
30
+
31
+ Thread.new do
32
+ Thread.current.report_on_exception = false if Thread.current.respond_to?(:report_on_exception)
33
+ begin
34
+ @core.setup(sdk_settings, server_properties, rox_options).join
35
+ rescue StandardError => ex
36
+ Rox::Core::Logging.logger.error('Failed in Rox.setup', ex)
37
+ end
38
+ end
39
+ rescue StandardError => ex
40
+ Rox::Core::Logging.logger.error('Failed in Rox.setup', ex)
41
+ end
42
+
43
+ def self.register(namespace, rox_container)
44
+ @core.register(namespace, rox_container)
45
+ end
46
+
47
+ def self.context=(context)
48
+ @core.context = context
49
+ end
50
+
51
+ def self.fetch
52
+ Thread.new do
53
+ Thread.current.report_on_exception = false if Thread.current.respond_to?(:report_on_exception)
54
+ begin
55
+ @core.fetch.join
56
+ rescue StandardError => ex
57
+ Rox::Core::Logging.logger.error('Failed in Rox.fetch', ex)
58
+ end
59
+ end
60
+ end
61
+
62
+ def self.set_custom_string_property(name, value = nil, &block)
63
+ @core.add_custom_property(Rox::Core::CustomProperty.new(name, Rox::Core::CustomPropertyType::STRING, value, &block))
64
+ end
65
+
66
+ def self.set_custom_boolean_property(name, value = nil, &block)
67
+ @core.add_custom_property(Rox::Core::CustomProperty.new(name, Rox::Core::CustomPropertyType::BOOL, value, &block))
68
+ end
69
+
70
+ def self.set_custom_int_property(name, value = nil, &block)
71
+ @core.add_custom_property(Rox::Core::CustomProperty.new(name, Rox::Core::CustomPropertyType::INT, value, &block))
72
+ end
73
+
74
+ def self.set_custom_float_property(name, value = nil, &block)
75
+ @core.add_custom_property(Rox::Core::CustomProperty.new(name, Rox::Core::CustomPropertyType::FLOAT, value, &block))
76
+ end
77
+
78
+ def self.set_custom_semver_property(name, value = nil, &block)
79
+ @core.add_custom_property(Rox::Core::CustomProperty.new(name, Rox::Core::CustomPropertyType::SEMVER, value, &block))
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,3 @@
1
+ module Rox
2
+ VERSION = "0.1.3"
3
+ end
data/rox.gemspec ADDED
@@ -0,0 +1,29 @@
1
+
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rox/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'rox-rollout'
8
+ spec.version = Rox::VERSION
9
+ spec.authors = ['Rollout.io']
10
+ spec.email = ['support@rollout.io']
11
+ spec.summary = 'Rollout.io ROX Ruby SDK'
12
+ spec.homepage = "https://github.com/rollout/rox-ruby"
13
+ spec.license = 'Nonstandard'
14
+
15
+ # Specify which files should be added to the gem when it is released.
16
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ spec.bindir = 'exe'
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.required_ruby_version = '>= 2.3'
25
+
26
+ spec.add_development_dependency 'bundler', '~> 1.16'
27
+ spec.add_development_dependency 'minitest', '~> 5.0'
28
+ spec.add_development_dependency 'rake', '~> 12.3'
29
+ end
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rox-rollout
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Rollout.io
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '12.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '12.3'
55
+ description:
56
+ email:
57
+ - support@rollout.io
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".circleci/config.yml"
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - LICENSE
66
+ - README_DEVELOP.md
67
+ - Rakefile
68
+ - _archive/.document
69
+ - _archive/.rspec
70
+ - _archive/Gemfile
71
+ - _archive/Gemfile.lock
72
+ - _archive/README.md
73
+ - _archive/README.rdoc
74
+ - _archive/Rakefile
75
+ - _archive/lib/expr_function_definition.rb
76
+ - _archive/lib/function_definition.rb
77
+ - _archive/lib/function_token.rb
78
+ - _archive/lib/object_extends.rb
79
+ - _archive/lib/ruby_interpreter.rb
80
+ - _archive/lib/stack.rb
81
+ - _archive/lib/string_extends.rb
82
+ - _archive/spec/ruby_interpreter_spec.rb
83
+ - _archive/spec/spec_helper.rb
84
+ - _archive/spec/stack_spec.rb
85
+ - bin/console
86
+ - bin/setup
87
+ - e2e/container.rb
88
+ - e2e/custom_props.rb
89
+ - e2e/rox_e2e_test.rb
90
+ - e2e/test_vars.rb
91
+ - lib/rox.rb
92
+ - lib/rox/core/client/buid.rb
93
+ - lib/rox/core/client/device_properties.rb
94
+ - lib/rox/core/client/internal_flags.rb
95
+ - lib/rox/core/client/sdk_settings.rb
96
+ - lib/rox/core/configuration/configuration.rb
97
+ - lib/rox/core/configuration/configuration_fetched_args.rb
98
+ - lib/rox/core/configuration/configuration_fetched_invoker.rb
99
+ - lib/rox/core/configuration/configuration_parser.rb
100
+ - lib/rox/core/configuration/fetcher_error.rb
101
+ - lib/rox/core/configuration/fetcher_status.rb
102
+ - lib/rox/core/configuration/models/experiment_model.rb
103
+ - lib/rox/core/configuration/models/target_group_model.rb
104
+ - lib/rox/core/consts/build.rb
105
+ - lib/rox/core/consts/environment.rb
106
+ - lib/rox/core/consts/property_type.rb
107
+ - lib/rox/core/context/merged_context.rb
108
+ - lib/rox/core/core.rb
109
+ - lib/rox/core/entities/flag.rb
110
+ - lib/rox/core/entities/flag_setter.rb
111
+ - lib/rox/core/entities/variant.rb
112
+ - lib/rox/core/impression/impression_args.rb
113
+ - lib/rox/core/impression/impression_invoker.rb
114
+ - lib/rox/core/impression/models/experiment.rb
115
+ - lib/rox/core/impression/models/reporting_value.rb
116
+ - lib/rox/core/logging/logging.rb
117
+ - lib/rox/core/logging/no_op_logger.rb
118
+ - lib/rox/core/network/configuration_fetch_result.rb
119
+ - lib/rox/core/network/configuration_fetcher.rb
120
+ - lib/rox/core/network/configuration_fetcher_base.rb
121
+ - lib/rox/core/network/configuration_fetcher_roxy.rb
122
+ - lib/rox/core/network/configuration_source.rb
123
+ - lib/rox/core/network/request.rb
124
+ - lib/rox/core/network/request_configuration_builder.rb
125
+ - lib/rox/core/network/request_data.rb
126
+ - lib/rox/core/network/response.rb
127
+ - lib/rox/core/properties/custom_property.rb
128
+ - lib/rox/core/properties/custom_property_type.rb
129
+ - lib/rox/core/properties/device_property.rb
130
+ - lib/rox/core/register/registerer.rb
131
+ - lib/rox/core/reporting/error_reporter.rb
132
+ - lib/rox/core/repositories/custom_property_repository.rb
133
+ - lib/rox/core/repositories/experiment_repository.rb
134
+ - lib/rox/core/repositories/flag_repository.rb
135
+ - lib/rox/core/repositories/roxx/experiments_extensions.rb
136
+ - lib/rox/core/repositories/roxx/properties_extensions.rb
137
+ - lib/rox/core/repositories/target_group_repository.rb
138
+ - lib/rox/core/roxx/core_stack.rb
139
+ - lib/rox/core/roxx/evaluation_result.rb
140
+ - lib/rox/core/roxx/node.rb
141
+ - lib/rox/core/roxx/parser.rb
142
+ - lib/rox/core/roxx/regular_expression_extensions.rb
143
+ - lib/rox/core/roxx/string_tokenizer.rb
144
+ - lib/rox/core/roxx/symbols.rb
145
+ - lib/rox/core/roxx/token_type.rb
146
+ - lib/rox/core/roxx/tokenized_expression.rb
147
+ - lib/rox/core/roxx/value_compare_extensions.rb
148
+ - lib/rox/core/security/signature_verifier.rb
149
+ - lib/rox/core/utils/periodic_task.rb
150
+ - lib/rox/core/utils/type_utils.rb
151
+ - lib/rox/server/client/sdk_settings.rb
152
+ - lib/rox/server/client/server_properties.rb
153
+ - lib/rox/server/flags/rox_flag.rb
154
+ - lib/rox/server/flags/rox_variant.rb
155
+ - lib/rox/server/logging/server_logger.rb
156
+ - lib/rox/server/rox_options.rb
157
+ - lib/rox/server/rox_server.rb
158
+ - lib/rox/version.rb
159
+ - rox.gemspec
160
+ homepage: https://github.com/rollout/rox-ruby
161
+ licenses:
162
+ - Nonstandard
163
+ metadata: {}
164
+ post_install_message:
165
+ rdoc_options: []
166
+ require_paths:
167
+ - lib
168
+ required_ruby_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '2.3'
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ requirements: []
179
+ rubyforge_project:
180
+ rubygems_version: 2.6.14
181
+ signing_key:
182
+ specification_version: 4
183
+ summary: Rollout.io ROX Ruby SDK
184
+ test_files: []