xp_ruby_client 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.travis.yml +15 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +41 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/lib/xp_ruby_client.rb +11 -0
- data/lib/xp_ruby_client/configurator.rb +35 -0
- data/lib/xp_ruby_client/requester.rb +38 -0
- data/spec/lib/configurator_spec.rb +31 -0
- data/spec/lib/requester_spec.rb +36 -0
- data/spec/lib/xp_ruby_client_spec.rb +28 -0
- data/spec/spec_helper.rb +104 -0
- data/xp_ruby_client.gemspec +71 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 15589eeadd2ae2f65c65cddfec9689a444e7713b
|
4
|
+
data.tar.gz: 2c12704811de890318cbc149876f6d16732354a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2110b47b418385b46c112de738487cfa4740d5755d2f1cff73a48546ced5953738d1fa25c7b9caf3509fafe54270ccdaa15fb0eebcf3a1540714fa4b74f775ad
|
7
|
+
data.tar.gz: 02bdd443b8e34c9f285675a6db06ddd87b63150e5902cf72c1e9e09fb2ddbb2f0f2c040110cc72b1476556f71d464b448e33c1abe03c12aacd5dd16678033031
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.travis.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
rvm:
|
2
|
+
- 2.3.3
|
3
|
+
|
4
|
+
dist: trusty # https://docs.travis-ci.com/user/trusty-ci-environment/
|
5
|
+
sudo: required # Switch back to non-containerized because https://github.com/travis-ci/travis-ci/issues/6842
|
6
|
+
|
7
|
+
cache: bundler
|
8
|
+
|
9
|
+
# Travis permits the following phases: before_install, install, after_install, before_script, script, after_script
|
10
|
+
|
11
|
+
before_install:
|
12
|
+
- gem update bundler # Travis RVM ships with an old-ish Bundler which has no install_if support
|
13
|
+
|
14
|
+
script:
|
15
|
+
- bundle exec rspec --backtrace
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2017 Dmitry Tymchuk
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Ruby Client for Xperiments
|
2
|
+
[](https://travis-ci.com/WeTransfer/xp_ruby_client)
|
3
|
+
|
4
|
+
Ruby client for A/B tool [Xperiments](https://github.com/WeTransfer/Xperiments). Based on [Patron](https://github.com/toland/patron).
|
5
|
+
It is used to show the experiments during the page load.
|
6
|
+
|
7
|
+
Usage
|
8
|
+
-------
|
9
|
+
Add `gem 'xp_ruby_client'` to your Gemfile.
|
10
|
+
|
11
|
+
You must to add `XP_RUBY_CLIENT_HOST` variable into your environment.
|
12
|
+
|
13
|
+
To use it, first you need to configure some settings:
|
14
|
+
- `application` is required.
|
15
|
+
- `timeout`, optional, default: 100 (ms)
|
16
|
+
- `segments`, optional, can be set as an arguemnt on a request, default: {}
|
17
|
+
- `assigned`, optional, can be set as an arguemnt on a request, default: []
|
18
|
+
|
19
|
+
Configurations:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
experiment = XpRubyClient.experiment do |config|
|
23
|
+
config.application = "web"
|
24
|
+
config.timeout = 50
|
25
|
+
end
|
26
|
+
|
27
|
+
```
|
28
|
+
|
29
|
+
And retrieve an experiment:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
experiment.retrieve # by default won't be used any segments
|
33
|
+
# OR
|
34
|
+
experiment.retrieve(segments: {lang: "en"})
|
35
|
+
```
|
36
|
+
|
37
|
+
Copyright
|
38
|
+
---------
|
39
|
+
|
40
|
+
Copyright (c) 2017 WeTransfer, Dmitry Tymchuk. See
|
41
|
+
LICENSE.txt for further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
require 'juwelier'
|
14
|
+
Juwelier::Tasks.new do |gem|
|
15
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
16
|
+
gem.name = "xp_ruby_client"
|
17
|
+
gem.homepage = "http://github.com/WeTransfer/xp_ruby_client"
|
18
|
+
gem.license = "MIT"
|
19
|
+
gem.summary = %Q{Ruby Client for A/B Xperiments tool. It is used to show the experiments during the page load.}
|
20
|
+
gem.description = %Q{Ruby client for A/B/ Xperiments tool}
|
21
|
+
gem.email = "dsnipe@gmail.com"
|
22
|
+
gem.authors = ["Dmitry Tymchuk"]
|
23
|
+
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Juwelier::RubygemsDotOrgTasks.new
|
27
|
+
require 'rspec/core'
|
28
|
+
require 'rspec/core/rake_task'
|
29
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
30
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Code coverage detail"
|
34
|
+
task :simplecov do
|
35
|
+
ENV['COVERAGE'] = "true"
|
36
|
+
Rake::Task['spec'].execute
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
40
|
+
|
41
|
+
require 'rdoc/task'
|
42
|
+
Rake::RDocTask.new do |rdoc|
|
43
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
|
+
|
45
|
+
rdoc.rdoc_dir = 'rdoc'
|
46
|
+
rdoc.title = "xp_ruby_client #{version}"
|
47
|
+
rdoc.rdoc_files.include('README*')
|
48
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module XpRubyClient
|
2
|
+
class Configurator
|
3
|
+
ASSIGN_URL_PATH = "/assigner/application/"
|
4
|
+
DEFAULT_TIMEOUT = 100
|
5
|
+
|
6
|
+
class NotSetError < StandardError; end
|
7
|
+
|
8
|
+
attr_accessor :application, :segments, :assigned, :timeout
|
9
|
+
|
10
|
+
def initialize(&block)
|
11
|
+
@segments = {}
|
12
|
+
@assigned = []
|
13
|
+
|
14
|
+
block.call(self)
|
15
|
+
|
16
|
+
@timeout = DEFAULT_TIMEOUT unless timeout
|
17
|
+
raise(NotSetError, "'application' must be set") unless @application
|
18
|
+
end
|
19
|
+
|
20
|
+
def base_url
|
21
|
+
@base_url ||= URI.join(host, ASSIGN_URL_PATH, @application).to_s
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_h
|
25
|
+
{segments: @segments,
|
26
|
+
assigned: @assigned}
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def host
|
32
|
+
ENV.fetch("XP_RUBY_CLIENT_HOST")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require "json"
|
2
|
+
require "patron"
|
3
|
+
|
4
|
+
module XpRubyClient
|
5
|
+
class Requester
|
6
|
+
def initialize(conn)
|
7
|
+
@sess = Patron::Session.new do |patron|
|
8
|
+
patron.timeout = 30
|
9
|
+
patron.base_url = conn.base_url
|
10
|
+
patron.headers = {"User-Agent" => "XpRubyClient",
|
11
|
+
"Content-Type" => "application/json"}
|
12
|
+
end
|
13
|
+
# @sess.enable_debug "/tmp/patron.debug"
|
14
|
+
build_payload(conn.to_h)
|
15
|
+
end
|
16
|
+
|
17
|
+
def build_payload(segments: {}, assigned: [], **)
|
18
|
+
# TODO: log not used arguemnts
|
19
|
+
@payload = JSON.dump({segments: segments, assigned: assigned})
|
20
|
+
end
|
21
|
+
|
22
|
+
def retrieve(req_payload = nil)
|
23
|
+
build_payload(req_payload) if req_payload
|
24
|
+
resp = @sess.post("/experiments", @payload)
|
25
|
+
parse_body(resp)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def parse_body(resp)
|
31
|
+
JSON.parse(resp.body) if resp.status < 400
|
32
|
+
# we don't wat to panic anyhow, so always return nil
|
33
|
+
# TODO: log it and/or send to an error catcher
|
34
|
+
rescue => e
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe XpRubyClient::Configurator do
|
4
|
+
before(:each) {ENV["XP_RUBY_CLIENT_HOST"] = "http://lvh.me:5000"}
|
5
|
+
|
6
|
+
it "parses a given block with required args and returns correct configutaion" do
|
7
|
+
conn = described_class.new do |config|
|
8
|
+
config.application = "web"
|
9
|
+
config.segments = {}
|
10
|
+
config.assigned = []
|
11
|
+
end
|
12
|
+
expect(conn.base_url).to eq("http://lvh.me:5000/assigner/application/web")
|
13
|
+
expect(conn.timeout).to eq(100) # default
|
14
|
+
end
|
15
|
+
|
16
|
+
it "raises an error if application is not set" do
|
17
|
+
expect {
|
18
|
+
described_class.new do |config|
|
19
|
+
end
|
20
|
+
}.to raise_error(described_class::NotSetError)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "raises an error if environment variable XP_RUBY_CLIENT_HOST is not set" do
|
24
|
+
ENV["XP_RUBY_CLIENT_HOST"] = nil
|
25
|
+
expect {
|
26
|
+
described_class.new do |config|
|
27
|
+
config.application = "web"
|
28
|
+
end.base_url
|
29
|
+
}.to raise_error KeyError
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "ostruct"
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
RSpec.describe XpRubyClient::Requester do
|
5
|
+
before(:each) do
|
6
|
+
ENV["XP_RUBY_CLIENT_HOST"] = "http://localhost:5000"
|
7
|
+
@conn = XpRubyClient::Configurator.new do |config|
|
8
|
+
config.application = "web"
|
9
|
+
config.timeout = 30
|
10
|
+
end
|
11
|
+
@empty_resp = OpenStruct.new({body: JSON.dump({"unassign"=>[], "assign"=>[]}), status: 200})
|
12
|
+
end
|
13
|
+
|
14
|
+
it "uses default segments and assigned if they are not set" do
|
15
|
+
expect_any_instance_of(Patron::Session).to receive(:post).and_return(@empty_resp)
|
16
|
+
expect(described_class.new(@conn).retrieve).to eq({"unassign" => [], "assign" => []})
|
17
|
+
end
|
18
|
+
|
19
|
+
it "uses segments which we pass to `retrieve` instead of default" do
|
20
|
+
segments = {segments: {lang: "en"}}
|
21
|
+
expect_any_instance_of(Patron::Session).to receive(:post)
|
22
|
+
.with("/experiments", JSON.dump(segments.merge(assigned: [])))
|
23
|
+
described_class.new(@conn).retrieve(segments)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "uses segements set in a config block" do
|
27
|
+
expect_any_instance_of(Patron::Session).to receive(:post)
|
28
|
+
.with("/experiments", JSON.dump(segments: {country: "nl"}, assigned: []))
|
29
|
+
conn = XpRubyClient::Configurator.new do |config|
|
30
|
+
config.application = "web"
|
31
|
+
config.timeout = 30
|
32
|
+
config.segments = {country: "nl"}
|
33
|
+
end
|
34
|
+
described_class.new(conn).retrieve
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe XpRubyClient do
|
4
|
+
before(:each) do
|
5
|
+
ENV["XP_RUBY_CLIENT_HOST"] = "http://localhost:5000"
|
6
|
+
@empty_resp = OpenStruct.new({body: JSON.dump({"unassign"=>[], "assign"=>[]}), status: 200})
|
7
|
+
end
|
8
|
+
|
9
|
+
it "returns experiments" do
|
10
|
+
expect_any_instance_of(Patron::Session).to receive(:post).and_return(@empty_resp)
|
11
|
+
req = described_class.experiment do |config|
|
12
|
+
config.application = "web"
|
13
|
+
config.timeout = 30
|
14
|
+
end
|
15
|
+
expect(req.retrieve).to eq(JSON.parse(@empty_resp.body))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns nil when timeout is reached" do
|
19
|
+
expect_any_instance_of(Patron::Session).to receive(:post) do
|
20
|
+
sleep 0.2
|
21
|
+
end
|
22
|
+
req = described_class.experiment do |config|
|
23
|
+
config.application = "web"
|
24
|
+
config.timeout = 1
|
25
|
+
end
|
26
|
+
expect(req.retrieve).to be_nil
|
27
|
+
end
|
28
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
require "./lib/xp_ruby_client"
|
2
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
3
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
4
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
5
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
6
|
+
# files.
|
7
|
+
#
|
8
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
9
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
10
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
11
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
12
|
+
# a separate helper file that requires the additional dependencies and performs
|
13
|
+
# the additional setup, and require it from the spec files that actually need
|
14
|
+
# it.
|
15
|
+
#
|
16
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
17
|
+
# users commonly want.
|
18
|
+
#
|
19
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
20
|
+
RSpec.configure do |config|
|
21
|
+
# rspec-expectations config goes here. You can use an alternate
|
22
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
23
|
+
# assertions if you prefer.
|
24
|
+
config.expect_with :rspec do |expectations|
|
25
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
26
|
+
# and `failure_message` of custom matchers include text for helper methods
|
27
|
+
# defined using `chain`, e.g.:
|
28
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
29
|
+
# # => "be bigger than 2 and smaller than 4"
|
30
|
+
# ...rather than:
|
31
|
+
# # => "be bigger than 2"
|
32
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
33
|
+
end
|
34
|
+
|
35
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
36
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
37
|
+
config.mock_with :rspec do |mocks|
|
38
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
39
|
+
# a real object. This is generally recommended, and will default to
|
40
|
+
# `true` in RSpec 4.
|
41
|
+
mocks.verify_partial_doubles = true
|
42
|
+
end
|
43
|
+
|
44
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
45
|
+
# have no way to turn it off -- the option exists only for backwards
|
46
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
47
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
48
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
49
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
50
|
+
|
51
|
+
# The settings below are suggested to provide a good initial experience
|
52
|
+
# with RSpec, but feel free to customize to your heart's content.
|
53
|
+
=begin
|
54
|
+
# This allows you to limit a spec run to individual examples or groups
|
55
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
56
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
57
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
58
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
59
|
+
config.filter_run_when_matching :focus
|
60
|
+
|
61
|
+
# Allows RSpec to persist some state between runs in order to support
|
62
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
63
|
+
# you configure your source control system to ignore this file.
|
64
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
65
|
+
|
66
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
67
|
+
# recommended. For more details, see:
|
68
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
69
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
70
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
71
|
+
config.disable_monkey_patching!
|
72
|
+
|
73
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
74
|
+
# be too noisy due to issues in dependencies.
|
75
|
+
config.warnings = true
|
76
|
+
|
77
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
78
|
+
# file, and it's useful to allow more verbose output when running an
|
79
|
+
# individual spec file.
|
80
|
+
if config.files_to_run.one?
|
81
|
+
# Use the documentation formatter for detailed output,
|
82
|
+
# unless a formatter has already been configured
|
83
|
+
# (e.g. via a command-line flag).
|
84
|
+
config.default_formatter = 'doc'
|
85
|
+
end
|
86
|
+
|
87
|
+
# Print the 10 slowest examples and example groups at the
|
88
|
+
# end of the spec run, to help surface which specs are running
|
89
|
+
# particularly slow.
|
90
|
+
config.profile_examples = 10
|
91
|
+
|
92
|
+
# Run specs in random order to surface order dependencies. If you find an
|
93
|
+
# order dependency and want to debug it, you can fix the order by providing
|
94
|
+
# the seed, which is printed after each run.
|
95
|
+
# --seed 1234
|
96
|
+
config.order = :random
|
97
|
+
|
98
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
99
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
100
|
+
# test failures related to randomization by passing the same `--seed` value
|
101
|
+
# as the one that triggered the failure.
|
102
|
+
Kernel.srand config.seed
|
103
|
+
=end
|
104
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: xp_ruby_client 0.1.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "xp_ruby_client".freeze
|
9
|
+
s.version = "0.1.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Dmitry Tymchuk".freeze]
|
14
|
+
s.date = "2017-11-03"
|
15
|
+
s.description = "Ruby client for A/B/ Xperiments tool".freeze
|
16
|
+
s.email = "dsnipe@gmail.com".freeze
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
".travis.yml",
|
25
|
+
"Gemfile",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.markdown",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"lib/xp_ruby_client.rb",
|
31
|
+
"lib/xp_ruby_client/configurator.rb",
|
32
|
+
"lib/xp_ruby_client/requester.rb",
|
33
|
+
"spec/lib/configurator_spec.rb",
|
34
|
+
"spec/lib/requester_spec.rb",
|
35
|
+
"spec/lib/xp_ruby_client_spec.rb",
|
36
|
+
"spec/spec_helper.rb",
|
37
|
+
"xp_ruby_client.gemspec"
|
38
|
+
]
|
39
|
+
s.homepage = "http://github.com/WeTransfer/xp_ruby_client".freeze
|
40
|
+
s.licenses = ["MIT".freeze]
|
41
|
+
s.rubygems_version = "2.5.2".freeze
|
42
|
+
s.summary = "Ruby Client for A/B Xperiments tool. It is used to show the experiments during the page load.".freeze
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
s.specification_version = 4
|
46
|
+
|
47
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
|
+
s.add_runtime_dependency(%q<patron>.freeze, ["~> 0.10"])
|
49
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
50
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
51
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
52
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
53
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<patron>.freeze, ["~> 0.10"])
|
56
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
57
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
58
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
59
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
60
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<patron>.freeze, ["~> 0.10"])
|
64
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
65
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
66
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
67
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
68
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
metadata
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xp_ruby_client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dmitry Tymchuk
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: patron
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.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: 3.5.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: juwelier
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.1.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.1.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Ruby client for A/B/ Xperiments tool
|
98
|
+
email: dsnipe@gmail.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files:
|
102
|
+
- LICENSE.txt
|
103
|
+
- README.markdown
|
104
|
+
files:
|
105
|
+
- ".document"
|
106
|
+
- ".rspec"
|
107
|
+
- ".travis.yml"
|
108
|
+
- Gemfile
|
109
|
+
- LICENSE.txt
|
110
|
+
- README.markdown
|
111
|
+
- Rakefile
|
112
|
+
- VERSION
|
113
|
+
- lib/xp_ruby_client.rb
|
114
|
+
- lib/xp_ruby_client/configurator.rb
|
115
|
+
- lib/xp_ruby_client/requester.rb
|
116
|
+
- spec/lib/configurator_spec.rb
|
117
|
+
- spec/lib/requester_spec.rb
|
118
|
+
- spec/lib/xp_ruby_client_spec.rb
|
119
|
+
- spec/spec_helper.rb
|
120
|
+
- xp_ruby_client.gemspec
|
121
|
+
homepage: http://github.com/WeTransfer/xp_ruby_client
|
122
|
+
licenses:
|
123
|
+
- MIT
|
124
|
+
metadata: {}
|
125
|
+
post_install_message:
|
126
|
+
rdoc_options: []
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
requirements: []
|
140
|
+
rubyforge_project:
|
141
|
+
rubygems_version: 2.5.2
|
142
|
+
signing_key:
|
143
|
+
specification_version: 4
|
144
|
+
summary: Ruby Client for A/B Xperiments tool. It is used to show the experiments during
|
145
|
+
the page load.
|
146
|
+
test_files: []
|