Skip to content

Instantly share code, notes, and snippets.

begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '~> 6.0.3'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'graphql', '1.9.12'
gem 'rspec'
end
require 'rspec/autorun'
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'graphql', '1.9.3'
gem 'json_spec'
gem 'rspec'
end
require 'rspec/autorun'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '~> 5.2.0' # Fails in '~> 5.1.0'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '~> 5.2.0' # Fails with '~> 5.1.0'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
# Class API that instantiates a new `Overstock::Connector::BatchHandler` for each run of the pipeline
# There would be some registry of handlers that maps 'Overstock Supplier API' to Overstock::Connector::BatchHandler.
# This hides any classes involved in splitting, validating, etc. giving subclasses more freedom to implement behavior
# inline.
# Note method names indicate the action to be performed.
module Overstock
module Connector
class BatchHandler < Base::Connector::BaseBatchHandler
PIPELINE_NAME = 'Overstock Supplier API'.freeze
JSON_SCHEMA_PATH = 'resources/schemas/overstock/overstock-schema-2017-06-23.json'.freeze
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '~> 5.2.0' # Works with '~> 5.1.0'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '5.2.0.rc2' # works with '5.1.5'