hexsha
stringlengths 40
40
| size
int64 2
1.01M
| content
stringlengths 2
1.01M
| avg_line_length
float64 1.5
100
| max_line_length
int64 2
1k
| alphanum_fraction
float64 0.25
1
|
---|---|---|---|---|---|
33b15eab2bf804d5c6df3af46f0aafa8fee75b7b | 1,428 | module Selenium
module WebDriver
class Wait
DEFAULT_TIMEOUT = 5
DEFAULT_INTERVAL = 0.2
#
# Create a new Wait instance
#
# @param [Hash] opts Options for this instance
# @option opts [Numeric] :timeout (5) Seconds to wait before timing out.
# @option opts [Numeric] :interval (0.2) Seconds to sleep between polls.
# @option opts [String] :message Exception mesage if timed out.
def initialize(opts = {})
@timeout = opts.fetch(:timeout, DEFAULT_TIMEOUT)
@interval = opts.fetch(:interval, DEFAULT_INTERVAL)
@message = opts[:message]
end
#
# Wait until the given block returns a true value.
#
# @raise [Error::TimeOutError]
# @return [Object] the result of the block
#
def until(&blk)
end_time = Time.now + @timeout
last_error = nil
until Time.now > end_time
begin
result = yield
return result if result
rescue Error::NoSuchElementError => last_error
# swallowed
end
sleep @interval
end
if @message
msg = @message.dup
else
msg = "timed out after #{@timeout} seconds"
end
msg << " (#{last_error.message})}" if last_error
raise Error::TimeOutError, msg
end
end # Wait
end # WebDriver
end # Selenium
| 23.409836 | 78 | 0.567227 |
383f79beaa5dca28d50abd5bda612182d2c666df | 418 | class AddMetadataToSpreeOrders < ActiveRecord::Migration[5.2]
def change
change_table :spree_orders do |t|
if t.respond_to? :jsonb
add_column :spree_orders, :public_metadata, :jsonb
add_column :spree_orders, :private_metadata, :jsonb
else
add_column :spree_orders, :public_metadata, :json
add_column :spree_orders, :private_metadata, :json
end
end
end
end
| 29.857143 | 61 | 0.69378 |
bb0fcd4807093216f0b489207ce4402f16f8f2a3 | 674 | module ScaffoldParser
module Scaffolders
class XSD
class Parser
module Handlers
class Choice
include OrderElements
attr_accessor :elements
def initialize(elements = [])
@elements = [*elements]
end
def complex_type(source)
if source.has_name?
STACK.push Klass.new(source, elements)
else
ComplexType.new(elements)
end
end
def extension(source)
Extension.new elements, source.attributes
end
end
end
end
end
end
end
| 21.0625 | 55 | 0.5 |
edbd434debf04ccc81ada0a5723c21ec59f42d26 | 1,003 | Gem::Specification.new do |gem|
gem.name = 'fpm-fry'
gem.version = '0.5.0'
gem.date = Time.now.strftime("%Y-%m-%d")
gem.summary = "FPM Fry"
gem.description = 'deep-fried package builder'
gem.authors = [
'Maxime Lagresle',
'Stefan Kaes',
'Sebastian Brandt',
'Hannes Georg',
'Julian Tabel',
'Dennis Konert'
]
gem.email = '[email protected]'
gem.homepage = 'https://github.com/xing/fpm-fry'
gem.license = 'MIT'
gem.bindir = 'bin'
gem.executables << 'fpm-fry'
# ensure the gem is built out of versioned files
gem.files = Dir['lib/**/*'] & `git ls-files -z`.split("\0")
gem.add_dependency 'excon', '~> 0.71.0'
gem.add_dependency 'fpm', '~> 1.13'
gem.add_development_dependency 'rake', '~> 12.0'
gem.add_development_dependency 'rspec', '~> 3.0', '>= 3.0.0'
gem.add_development_dependency 'webmock', '~> 3.0'
gem.add_development_dependency 'coveralls', '~> 0'
gem.add_development_dependency 'simplecov', '~> 0'
end
| 26.394737 | 62 | 0.63011 |
08e86ff30569abf13312d6a6093815f8430b7402 | 213 | object @device
attributes hardware_identifier: :id
attributes :name, :activation_token, :compressor_delay, :left_output_function, :left_output_state, :right_output_function, :right_output_state, :signal_strength
| 42.6 | 160 | 0.84507 |
61c519384a1727efa8f52b49d77bef1e70e8b610 | 1,638 | Hurl::Application.routes.draw do
get "play/index"
get "play/media"
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
root 'play#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
| 26 | 84 | 0.644689 |
918e0eb83ac5f92b72e27cb43a1de49f92d0eeb9 | 1,422 | # frozen_string_literal: true
module OrgDateRangeable
# rubocop:disable Metrics/MethodLength, Metrics/LineLength
def monthly_range(org:, start_date: nil, end_date: Date.today.end_of_month, filtered: false)
# rubocop:enable Metrics/LineLength
query_string = "org_id = :org_id and filtered = :filtered"
query_hash = { org_id: org.id, filtered: filtered }
unless start_date.nil?
query_string += " and date >= :start_date"
query_hash[:start_date] = start_date
end
unless end_date.nil?
query_string += " and date <= :end_date"
query_hash[:end_date] = end_date
end
where(query_string, query_hash)
end
# rubocop:enable Metrics/MethodLength
class << self
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
def split_months_from_creation(org, &block)
starts_at = org.created_at
ends_at = starts_at.end_of_month
callable = block.nil? ?
Proc.new {} :
lambda { | start_date, end_date| block.call(start_date, end_date) }
enumerable = []
while !(starts_at.future? || ends_at.future?) do
callable.call(starts_at, ends_at)
enumerable << { start_date: starts_at, end_date: ends_at }
starts_at = starts_at.next_month.beginning_of_month
ends_at = starts_at.end_of_month
end
enumerable
end
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
end
end
| 29.020408 | 94 | 0.684248 |
6ae96fceb1040c4ba633544dc61e85c3dd187e63 | 3,896 | # encoding: utf-8
require 'spec_helper'
require 'support/service_common'
describe 'service for sysv init style' do
include_context 'service setup'
describe 'service kafka start' do
context 'when kafka is not already running' do
before do
backend.run_command 'service kafka stop 2> /dev/null || true'
end
it 'is not actually running' do
expect(kafka_service).not_to be_running
end
it 'prints a message about starting kafka' do
expect(start_command).to return_stdout /starting.+kafka/i
end
it 'exits with status 0' do
expect(start_command).to return_exit_status 0
end
it 'actually starts kafka' do
backend.run_command 'service kafka start'
expect(kafka_service).to be_running
end
it_behaves_like 'a kafka start command'
end
context 'when kafka is already running' do
before do
backend.run_command 'service kafka start 2> /dev/null || true'
end
it 'is actually running' do
expect(kafka_service).to be_running
end
it 'prints a message about starting kafka' do
expect(start_command).to return_stdout /starting.+kafka/i
end
it 'exits with status 0' do
expect(start_command).to return_exit_status 0
end
it_behaves_like 'a kafka start command'
end
end
describe 'service kafka stop' do
context 'when kafka is running' do
before do
backend.run_command 'service kafka start 2> /dev/null || true'
end
it 'is actually running' do
expect(kafka_service).to be_running
end
it 'prints a message about stopping kafka' do
expect(stop_command).to return_stdout /stopping.+kafka/i
end
it 'exits with status 0' do
expect(stop_command).to return_exit_status 0
end
it 'stops kafka' do
backend.run_command 'service kafka stop'
expect(kafka_service).not_to be_running
end
it_behaves_like 'a kafka stop command'
end
context 'when kafka is not running' do
before do
backend.run_command 'service kafka stop 2> /dev/null || true'
end
it 'is actually not running' do
expect(kafka_service).not_to be_running
end
it 'prints a message about stopping kafka' do
expect(stop_command).to return_stdout /stopping.+kafka/i
end
it 'exits with status 0' do
expect(stop_command).to return_exit_status 0
end
it_behaves_like 'a kafka stop command'
end
end
describe 'service kafka status' do
context 'when kafka is running' do
before do
backend.run_command 'service kafka start 2> /dev/null || true'
end
it 'exits with status 0' do
expect(status_command).to return_exit_status 0
end
it 'prints a message that kafka is running' do
if fedora?
expect(status_command).to return_stdout /Active: active \(running\)/
expect(status_command).to return_stdout /Started SYSV: kafka daemon/
else
expect(status_command).to return_stdout /kafka.+running/i
end
end
end
context 'when kafka is not running' do
before do
backend.run_command 'service kafka stop 2> /dev/null || true'
end
it 'exits with status 3' do
expect(status_command).to return_exit_status 3
end
it 'prints a message that kafka is not running / stopped' do
if debian? || ubuntu?
expect(status_command).to return_stdout /kafka is not running/
elsif fedora?
expect(status_command).to return_stdout /Active: failed/
expect(status_command).to return_stdout /Stopped SYSV: kafka daemon/
else
expect(status_command).to return_stdout /kafka is stopped/
end
end
end
end
end
| 26.503401 | 78 | 0.647844 |
f786031c18defd15d73f614009eec477db6075e4 | 2,573 | require File.dirname(__FILE__) + "/spec_helper"
require File.dirname(__FILE__) + "/rest_dm_helper"
describe "REST DataMapper" do
before do
@app = Invisible.new do
rest :dproduct
end
end
it "should return a list of products to GET /products.xml" do
@app.mock.get("/dproducts.xml").body.should == "<dproducts type='array'><dproduct><id>1</id><name>Chair</name><price>23.45</price></dproduct></dproducts>"
end
it "should return a list of products to GET /products.js" do
@app.mock.get("/dproducts.js").body.should == "[{ \"id\": 1, \"name\": \"Chair\", \"price\": 23.45 }]"
end
it "should return a product for GET /products/2.xml" do
@app.mock.get("/dproducts/2.xml").body.should == "<dproduct><id>2</id><name>Chair</name><price>23.45</price></dproduct>"
end
it "should return a product for GET /products/2.js" do
@app.mock.get("/dproducts/2.js").body.should == "{ \"id\": 2, \"name\": \"Chair\", \"price\": 23.45 }"
end
it "should return an updated product for PUT /products/2.xml" do
xml = "<dproduct><id>2</id><name>Chair</name><price>9.99</price></dproduct>"
opts = {'CONTENT_TYPE' => "application/xml", :input => xml}
@app.mock.put("/dproducts/2.xml", opts).status.should == 204
end
it "should return an updated product for PUT /products/2.js" do
json = "{dproduct: {id: 2, name: 'Chair', price: 9.99}}"
opts = {'CONTENT_TYPE' => "application/json", :input => json}
@app.mock.put("/dproducts/2.js", opts).status.should == 204
end
it "should return a Location for a new product for POST /products.xml" do
xml = "<dproduct><id>3</id><name>Chair</name><price>9.99</price></dproduct>"
opts = {'CONTENT_TYPE' => "application/xml", :input => xml}
response = @app.mock.post("/dproducts.xml", opts)
response.status.should == 201
response.headers['Location'].should == "http://example.org/dproducts/3.xml"
end
it "should return a Location for a new product for POST /products.js" do
json = "{dproduct: {id: 3, name: 'Chair', price: 9.99}}"
opts = {'CONTENT_TYPE' => "application/json", :input => json}
response = @app.mock.post("/dproducts.js", opts)
response.status.should == 201
response.headers['Location'].should == "http://example.org/dproducts/3.js"
end
it "should return success for deleting product DELETE /products/2.xml" do
@app.mock.delete("/dproducts/2.xml").status == 200
end
it "should return success for deleting product DELETE /products/2.js" do
@app.mock.delete("/dproducts/2.js").status == 200
end
end | 41.5 | 158 | 0.650214 |
ed0eada92603309c785ebcdc040de88ebecd8f16 | 5,407 | # -*- encoding : utf-8 -*-
require 'spec_helper'
describe OCRSDK::Promise do
before do
OCRSDK.setup do |config|
config.application_id = 'app_id'
config.password = 'pass'
end
end
describe ".parse_response" do
context "correct response" do
subject { OCRSDK::Promise.new(nil).parse_response OCRSDK::Mock.response(:get_task_status, :submitted) }
its(:task_id) { should == '22345200-abe8-4f60-90c8-0d43c5f6c0f6' }
its(:status) { should == :submitted }
its(:result_url) { should == 'http://cloud.ocrsdk.com/result_url' }
its(:estimate_processing_time) { should == 3600 }
its(:estimate_completion) { should == DateTime.parse("2001-01-01T13:18:22Z") + 3600.seconds }
end
context "incorrect response" do
subject { OCRSDK::Promise.new nil }
it "should raise OCRSDKError" do
expect {
subject.parse_response ''
}.to raise_error(OCRSDK::OCRSDKError)
end
end
context "insufficient credits" do
subject { OCRSDK::Promise.new nil }
it "should raise an OCRSDK::NotEnoughCredits error" do
expect {
subject.parse_response OCRSDK::Mock.response(:get_task_status, :not_enough_credits)
}.to raise_error(OCRSDK::NotEnoughCredits)
end
end
end
describe "self.from_response" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :submitted) }
its(:task_id) { should == '22345200-abe8-4f60-90c8-0d43c5f6c0f6' }
its(:status) { should == :submitted }
its(:result_url) { should == 'http://cloud.ocrsdk.com/result_url' }
its(:estimate_processing_time) { should == 3600 }
its(:estimate_completion) { should == DateTime.parse("2001-01-01T13:18:22Z") + 3600.seconds }
end
describe ".update" do
subject { OCRSDK::Promise.new 'update-task-id' }
before do
OCRSDK::Mock.in_progress
subject.update
end
its(:task_id) { should == 'update-task-id' }
its(:status) { should == :in_progress }
it "should raise a NetworkError in case REST request fails, and retry 3 times" do
RestClient.stub(:get) {|url| raise RestClient::ExceptionWithResponse }
RestClient.should_receive(:get).exactly(3)
expect {
subject.result(0)
}.to raise_error(OCRSDK::NetworkError)
end
end
describe ".api_update_status" do
subject { OCRSDK::Promise.new 'test' }
it "should make an api call with correct url" do
RestClient.stub(:get) do |url|
url.to_s.should == "http://app_id:[email protected]/getTaskStatus?taskId=test"
end
RestClient.should_receive(:get).once
subject.instance_eval { api_update_status }
end
it "should raise a NetworkError in case REST request fails" do
RestClient.stub(:get) {|url| raise RestClient::ExceptionWithResponse }
RestClient.should_receive(:get).once
expect {
subject.instance_eval { api_update_status }
}.to raise_error(OCRSDK::NetworkError)
end
end
describe ".result" do
context "processing completed without errors" do
before { OCRSDK::Mock.success }
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :completed) }
its(:result) { should == 'meow' }
it "should raise NetworkError in case getting file fails, but retry 3 times before failing" do
RestClient.stub(:get) {|url| raise RestClient::ExceptionWithResponse }
RestClient.should_receive(:get).exactly(3)
expect {
subject.result(0)
}.to raise_error(OCRSDK::NetworkError)
end
end
context "processing failed" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :failed) }
it "should raise an ProcessingFailed" do
expect {
subject.result
}.to raise_error(OCRSDK::ProcessingFailed)
end
end
end
describe ".completed? and .failed?" do
context "processed job" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :in_progress) }
its(:processing?) { should be_true }
its(:completed?) { should be_false }
its(:failed?) { should be_false }
end
context "completed job" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :completed) }
its(:processing?) { should be_false }
its(:completed?) { should be_true }
its(:failed?) { should be_false }
end
context "failed job" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :failed) }
its(:processing?) { should be_false }
its(:completed?) { should be_false }
its(:failed?) { should be_true }
end
end
describe ".wait" do
subject { OCRSDK::Promise.from_response OCRSDK::Mock.response(:get_task_status, :in_progress) }
it "should check the status as many times as needed waiting while ocr is completed" do
called_once = false
subject.stub(:update) do
if called_once
subject.parse_response OCRSDK::Mock.response(:get_task_status, :completed)
else
called_once = true
end
end
subject.should_receive(:update).twice
start = Time.now
subject.wait 0.1
(Time.now - start).should >= 0.2
end
end
end
| 31.805882 | 109 | 0.652672 |
7ad7460586587e17d91da41d99c960a058f8f69e | 285 | Британские женщины выиграли олимпийское золото в парах гребли
Британские женщины, Хелен Гловер и Хизер Стэннинг, завоевали олимпийское золото в парах гребли.
Новозеландцы, Ребекка Сконе и Женевьев Берен, взяли серебро, а Анн Андерсен и Хедвиг Расмуссен из Дании вышли на третье место.
| 71.25 | 126 | 0.831579 |
f8efc882b37cdd380cc437790b955b1faf98dd4a | 1,185 | # Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/texttospeech_v1/service.rb'
require 'google/apis/texttospeech_v1/classes.rb'
require 'google/apis/texttospeech_v1/representations.rb'
module Google
module Apis
# Cloud Text-to-Speech API
#
# Synthesizes natural-sounding speech by applying powerful neural network models.
#
# @see https://cloud.google.com/text-to-speech/
module TexttospeechV1
VERSION = 'V1'
REVISION = '20190628'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end
| 33.857143 | 85 | 0.741772 |
ff0f16bc3ed8aa6f3b0ab9e039c1dbb825b0ad56 | 367 | require 'bundler/setup'
require 'codebreaker'
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!
config.expect_with :rspec do |c|
c.syntax = :expect
end
end
| 24.466667 | 66 | 0.754768 |
abba00d9dbaff104c0c521e9b48e86ad00ec376a | 203 | class CreateFormImages < ActiveRecord::Migration[5.1]
def change
create_table :form_images do |t|
t.string :name
t.text :text
t.string :image
t.timestamps
end
end
end
| 18.454545 | 53 | 0.64532 |
6a6188c2e128dbc4bac2e79db04b3ed2730729de | 211 | # frozen_string_literal: true
class CreateCategories < ActiveRecord::Migration[6.1]
def change
create_table :categories do |t|
t.string :name, null: false, index: { unique: true }
end
end
end
| 21.1 | 58 | 0.696682 |
5dac1adc75212854d3d56fec299f560514848da4 | 664 | class Tool < ApplicationRecord
has_many :readme_tools, dependent: :destroy
has_many :readmes, through: :readme_tools
validates_presence_of :name # TODO: Add category
validates_uniqueness_of :name, case_sensitive: false
before_create :fetch_tool_data
scope :gems, -> { where(category: 'gem')}
scope :packages, -> { where(category: 'package')}
def fetch_tool_data
tool_data = RubygemsInfoService.call(name).first
self.name = tool_data[:name]
self.version = tool_data[:version]
self.description = tool_data[:description]
self.repository_url = tool_data[:repository_url]
self.website_url = tool_data[:website_url]
end
end
| 30.181818 | 54 | 0.740964 |
7afcc2c6c0410be3a14f48c4656053f6b2e33809 | 8,009 | require 'spec_helper'
describe SVG do
describe '#new' do
it "sets default attributes" do
expect(subject.svg_attributes[:height]).to eq "100%"
expect(subject.svg_attributes[:width]).to eq "100%"
end
context "with attributes" do
subject { described_class.new height: '90%', width: '80%', viewBox: "0 0 100 200" }
it "sets the attributes" do
expect(subject.svg_attributes[:height]).to eq "90%"
expect(subject.svg_attributes[:width]).to eq "80%"
expect(subject.svg_attributes[:viewBox]).to eq "0 0 100 200"
end
end
context "with nested attributes" do
subject { described_class.new style: { color: 'red', anything: 10 } }
it "converts the nested attributes to style" do
expect(subject.svg_attributes.to_s).to match(/style="color:red; anything:10"/)
end
end
context "when a block is given" do
subject do
described_class.new do
circle cx: 10, cy: 10, r: 20
end
end
it "builds with the block" do
expect(subject.to_s).to eq "<circle cx=\"10\" cy=\"10\" r=\"20\"/>"
end
end
end
context 'appending SVGs' do
let(:fire) { SVG.new }
let(:earth) { SVG.new }
let(:water) { SVG.new }
before do
fire.circle color: 'red'
earth.triangle color: 'green'
water.rect color: 'blue'
end
describe '#<<' do
it "pushes stringable objects as content" do
subject << fire
subject << earth
subject << water
expect(subject.to_s).to eq "<circle color=\"red\"/>\n<triangle color=\"green\"/>\n<rect color=\"blue\"/>"
end
end
describe '#append' do
it "pushes stringable objects as content" do
subject.append fire
subject.append earth
subject.append water
expect(subject.to_s).to eq "<circle color=\"red\"/>\n<triangle color=\"green\"/>\n<rect color=\"blue\"/>"
end
end
end
describe '#setup' do
it "updates attributes" do
subject.setup width: '80%', anything: 'ok'
expect(subject.svg_attributes.to_s).to eq 'width="80%" anything="ok" height="100%"'
end
it "sets default template" do
subject.setup width: '80%'
expect(subject.template).to eq :default
end
context "when the provided attributes contain :template" do
before { subject.template = :something_non_default }
it "sets template to the provided value" do
subject.setup width: '80%', template: :minimal
expect(subject.template).to eq :minimal
end
end
context "when template is set in advance" do
before { subject.template = :html }
it "does not alter the template value" do
subject.setup width: '80%'
expect(subject.template).to eq :html
end
end
end
describe '#element' do
it "generates xml without attributes" do
subject.element 'anything'
expect(subject.content).to eq ['<anything />']
end
it "generates xml with attributes" do
subject.element 'anything', at: 'all'
expect(subject.content).to eq ['<anything at="all"/>']
end
it "converts snake attributes to kebabs" do
subject.element 'text', font_family: 'arial'
expect(subject.content).to eq ['<text font-family="arial"/>']
end
context 'with hashed attributes' do
it "converts attributes to style syntax" do
subject.element 'cool', style: { color: 'red', anything: 10 }
expect(subject.content).to eq ['<cool style="color:red; anything:10"/>']
end
end
context "with a block" do
it "generates nested elements" do
subject.build do
universe do
world do
me
end
end
end
expect(subject.content).to eq ["<universe>", "<world>", "<me />", "</world>", "</universe>"]
end
end
context "with a plain text value" do
it "generates a container element" do
subject.element 'prison', 'inmate', number: '6'
expect(subject.content).to eq ["<prison number=\"6\">", "inmate", "</prison>"]
end
it "escapes XML" do
subject.element 'text', 'For Dumb & Dumber, 2 > 3'
expect(subject.content).to eq ["<text>", "For Dumb & Dumber, 2 > 3", "</text>"]
end
context "when the element is an underscore" do
it "generates a tagless element" do
subject.element '_', 'You are (not) surrounded!'
expect(subject.content).to eq ["You are (not) surrounded!"]
end
it "escapes XML" do
subject.element '_', 'For Dumb & Dumber, 2 > 3'
expect(subject.content).to eq ["For Dumb & Dumber, 2 > 3"]
end
context "when the element is _!" do
it "does not escape XML" do
subject.element '_!', 'For Dumb & Dumber, 2 > 3'
expect(subject.content).to eq ["For Dumb & Dumber, 2 > 3"]
end
end
end
context "when the element name ends with !" do
it "does not escape XML" do
subject.element 'text!', 'For Dumb & Dumber, 2 > 3'
expect(subject.content).to eq ["<text>", "For Dumb & Dumber, 2 > 3", "</text>"]
end
end
end
end
describe '#method_missing' do
it "calls #element" do
expect(subject).to receive(:element).with(:anything)
subject.anything
end
it "passes arguments to #element" do
expect(subject).to receive(:element).with(:anything, {:at=>"all"})
subject.anything at: 'all'
end
end
describe '#build' do
it "evaluates in context" do
subject.build { rect x: 10, y: 10 }
expect(subject.content).to eq ['<rect x="10" y="10"/>']
end
end
describe '#template' do
context 'with a symbol' do
it "loads a built in template" do
subject.template = :html
subject.circle of: 'trust'
expect(subject.render).to eq "<svg width=\"100%\" height=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\n\n<circle of=\"trust\"/>\n\n</svg>"
end
end
context 'with a path' do
let(:path) { 'spec/fixtures/custom_template.svg' }
it "loads a custom template" do
subject.template = path
subject.circle of: 'trust'
expect(subject.render).to eq "<!-- Custom Template -->\n<svg width=\"100%\" height=\"100%\">\n<circle of=\"trust\"/>\n</svg>"
end
end
end
describe '#render' do
before do
subject.circle radius: 10
end
it "generates full xml" do
expect(subject.render).to match_approval('svg/full')
end
context "with template argument" do
it "uses the provided template" do
expect(subject.render template: :minimal).to match_approval('svg/minimal')
end
end
context "with css elements" do
let(:css) do
{
'.main' => {
stroke: "green",
stroke_width: 2
}
}
end
it "includes a css block" do
subject.css = css
expect(subject.render).to match_approval('svg/css')
end
end
end
describe '#to_s' do
it "returns svg xml as string" do
subject.circle radius: 10
expect(subject.to_s).to eq '<circle radius="10"/>'
end
end
describe '#save' do
let(:filename) { 'test.svg' }
before do
File.unlink filename if File.exist? filename
expect(File).not_to exist filename
subject.circle radius: 10
end
it "saves to a file" do
subject.save filename
expect(File).to exist filename
end
it "saves xml" do
subject.save filename
expect(File.read filename).to match_approval('svg/full')
end
context "with template argument" do
it "uses the provided template" do
subject.save filename, template: :minimal
expect(File.read filename).to match_approval('svg/minimal')
end
end
end
end
| 28.200704 | 201 | 0.592334 |
6157a9468361939d28d4e6f0e5c45b2ddd618e90 | 439 | require 'spec_helper'
describe Blobsterix do
it "should allow_chunked_stream for backward comp. by default" do
Blobsterix.allow_chunked_stream.should == true
end
it "should set allow_chunked_stream" do
Blobsterix.allow_chunked_stream=false
Blobsterix.allow_chunked_stream.should == false
#set it back as this is global!
Blobsterix.allow_chunked_stream=true
Blobsterix.allow_chunked_stream.should == true
end
end | 25.823529 | 66 | 0.790433 |
4a4bdb85e0b1567cb75da25abe5c5cd158a95af4 | 344 | class FontPollerOne < Cask
version '1.002'
sha256 '49c5128cb550156e9384453906b869b830aafacfc3a9332ccf989c8ed146d773'
url 'https://googlefontdirectory.googlecode.com/hg-history/67342bc472599b4c32201ee4a002fe59a6447a42/ofl/pollerone/PollerOne.ttf'
homepage 'http://www.google.com/fonts/specimen/Poller%20One'
font 'PollerOne.ttf'
end
| 34.4 | 130 | 0.822674 |
215586d10051e0744c64d3d5f4fc35a46d7dcc13 | 272 | # frozen_string_literal: true
module Bow
module Commands
class Ping < Command
def description
'Check connectivity to all given hosts.'
end
def run
@argv << 'echo pong'
Exec.new(@app, @argv).run
end
end
end
end
| 16 | 48 | 0.588235 |
bf780087e5d471a2de0b6dea2d0174ccac1e6f75 | 5,734 | require 'spec_helper'
RSpec::Matchers.define :eq_datetime do |*expected|
match do |actual|
actual.to_i == DateTime.new(*expected).to_i
end
end
describe Travis::API::V3::Models::Cron do
let(:subject) { FactoryBot.create(:cron, branch_id: FactoryBot.create(:branch).id) }
let!(:scheduler_interval) { Travis::API::V3::Models::Cron::SCHEDULER_INTERVAL + 1.minute }
shared_examples_for "cron is deactivated" do
before { subject.enqueue }
it { expect(subject.active?).to be_falsey }
end
describe "scheduled scope" do
it "collects all upcoming cron jobs" do
cron1 = FactoryBot.create(:cron)
cron2 = FactoryBot.create(:cron)
cron2.update_attribute(:next_run, 2.hours.from_now)
Timecop.travel(scheduler_interval.from_now)
expect(Travis::API::V3::Models::Cron.scheduled.count).to eql 1
Timecop.return
cron1.destroy
cron2.destroy
end
end
describe "next build time is calculated correctly on year changes" do
before do
Timecop.return
Timecop.travel(DateTime.new(2015, 12, 31, 16))
end
after do
Timecop.return
Timecop.freeze(Time.now.utc)
end
it "for daily builds" do
subject.schedule_next_build(from: DateTime.now)
expect(subject.next_run).to eq_datetime(2016, 1, 1, 16)
end
it "for weekly builds" do
subject.interval = "weekly"
subject.schedule_next_build(from: DateTime.now)
expect(subject.next_run).to eq_datetime(2016, 1, 7, 16)
end
it "for monthly builds" do
subject.interval = "monthly"
subject.schedule_next_build(from: DateTime.now)
expect(subject.next_run).to eq_datetime(2016, 1, 31, 16)
end
end
context "for daily runs, when last_run is set" do
it "sets the next_run correctly" do
subject.last_run = 1.day.ago.utc + 5.minutes
subject.schedule_next_build
expect(subject.next_run.to_i).to eql 5.minutes.from_now.utc.to_i
end
end
context "when last_run is not set" do
context "and from: is not passed" do
it "sets the next_run from now" do
subject.schedule_next_build
expect(subject.next_run).to be_within(1.second).of DateTime.now + 1.day
end
end
context "and from: is passed" do
it "sets the next_run from from:" do
subject.schedule_next_build(from: DateTime.now + 3.day)
expect(subject.next_run).to be_within(1.second).of DateTime.now + 4.day
end
end
context "and from: is more than one interval in the past" do
it "ensures that the next_run is in the future" do
subject.schedule_next_build(from: DateTime.now - 2.day)
expect(subject.next_run).to be >= DateTime.now
end
end
end
describe "enqueue" do
it "enqueues the cron" do
expect_any_instance_of(Sidekiq::Client).to receive(:push).once
subject.enqueue
end
it "set the last_run time to now" do
subject.enqueue
expect(subject.last_run).to be_within(1.second).of DateTime.now.utc
end
it "schedules the next run" do
subject.enqueue
expect(subject.next_run).to be_within(1.second).of DateTime.now.utc + 1.day
end
context "when branch does not exist on github" do
before { subject.branch.exists_on_github = false }
include_examples "cron is deactivated"
end
context "when repo is no longer active" do
before { subject.branch.repository.active = false }
include_examples "cron is deactivated"
end
end
context "when always_run? is false" do
context "when no build has existed before running a cron build" do
let(:cron) { FactoryBot.create(:cron, branch_id: FactoryBot.create(:branch).id, dont_run_if_recent_build_exists: true) }
it "needs_new_build? returns true" do
expect(cron.needs_new_build?).to be_truthy
end
end
context "when last build within last 24h has no started_at" do
let(:build) { FactoryBot.create(:v3_build, started_at: nil, number: 100) }
let(:cron) { FactoryBot.create(:cron, branch_id: FactoryBot.create(:branch, last_build: build).id, dont_run_if_recent_build_exists: true) }
it "needs_new_build? returns true" do
expect(cron.needs_new_build?).to be_truthy
end
end
context "when there was a build in the last 24h" do
let(:cron) { FactoryBot.create(:cron, branch_id: FactoryBot.create(:branch, last_build: FactoryBot.create(:v3_build, number: 200)).id, dont_run_if_recent_build_exists: true) }
it "needs_new_build? returns false" do
expect(cron.needs_new_build?).to be_falsey
end
end
end
describe 'needs_new_build' do
let(:repo) { FactoryBot.create(:repository_without_last_build, active: active) }
let(:branch) { FactoryBot.create(:branch, repository_id: repo.id) }
let(:cron) { FactoryBot.create(:cron, branch_id: branch.id) }
describe 'given the repository is active' do
let(:active) { true }
it { expect(cron.enqueue).to eq true }
end
describe 'given the repository is active' do
let(:active) { false }
it { expect(cron.enqueue).to eq false }
it "logs the reason" do
expect(Travis.logger).to receive(:info).with("Removing cron #{cron.id} because the associated #{Travis::API::V3::Models::Cron::REPO_IS_INACTIVE}")
cron.enqueue
end
end
end
context "when repo ownership is transferred" do
it "enqueues a cron for the repo with the new owner" do
subject.branch.repository.update_attribute(:owner, FactoryBot.create(:user, name: "Yoda", login: "yoda", email: "[email protected]"))
expect_any_instance_of(Sidekiq::Client).to receive(:push).once
subject.enqueue
end
end
end
| 33.337209 | 181 | 0.681897 |
f7c42208b496a8f9c78ebf931864d9044aaf71ef | 80 | module Guard
module AnnotateGemVersion
VERSION = '0.1.0'.freeze
end
end
| 13.333333 | 28 | 0.7125 |
3365d4907d733e4bcbbb2d1e44b917ab5230d425 | 474 | class CreateCourseSkills < ActiveRecord::Migration[5.1]
def change
unless CourseSkill.table_exists?
create_table :course_skills do |t|
t.timestamps
t.references :course, foreign_key: { on_update: :cascade, on_delete: :cascade }
t.integer :priority, limit: 2, default: 1, null: false
t.string :body, null: false
end
end
end
def down
if CourseSkill.table_exists?
drop_table :course_skills
end
end
end
| 24.947368 | 87 | 0.664557 |
1dbf15fb5cef5bd272228f0818c388307c60df71 | 371 | require 'lite_spec_helper'
describe Mongo::Monitoring::Event::Cmap::PoolCleared do
describe '#summary' do
let(:address) do
Mongo::Address.new('127.0.0.1:27017')
end
let(:event) do
described_class.new(address)
end
it 'renders correctly' do
expect(event.summary).to eq('#<PoolCleared address=127.0.0.1:27017>')
end
end
end | 19.526316 | 75 | 0.657682 |
61dd9283136a1e8804869e532cb5156ae869e9dd | 21,953 | # This file maps the files within `metasploit-framework.wiki/` to the navigational menu
# Modify this file to change the doc site's navigation/hierarchy
# @param path [String] the prefix to remove from a string
# @return [proc<String, String>] When called with a string, the returned string has the prefix removed
def without_prefix(prefix)
proc { |value| value.sub(/^#{prefix}/, '') }
end
NAVIGATION_CONFIG = [
{
path: 'Home.md',
nav_order: 1
},
{
path: 'Code-Of-Conduct.md',
nav_order: 2
},
{
title: 'Pentesting',
folder: 'pentesting',
nav_order: 3,
children: [
{
path: 'Metasploit-Guide-Setting-Module-Options.md',
nav_order: 1,
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-Upgrading-Shells-to-Meterpreter.md',
nav_order: 2,
title: without_prefix('Metasploit Guide ')
},
{
nav_order: 3,
path: 'Metasploit-Guide-Post-Gather-Modules.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-HTTP.md',
title: 'HTTP + HTTPS'
},
{
path: 'Metasploit-Guide-MySQL.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-PostgreSQL.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-SMB.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-SSH.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-WinRM.md',
title: without_prefix('Metasploit Guide ')
},
{
path: 'Metasploit-Guide-Kubernetes.md',
title: without_prefix('Metasploit Guide ')
}
]
},
{
title: 'Using Metasploit',
folder: 'using-metasploit',
nav_order: 4,
children: [
{
title: 'Getting Started',
folder: 'getting-started',
nav_order: 1,
children: [
{
path: 'Nightly-Installers.md',
nav_order: 1
},
{
path: 'Reporting-a-Bug.md',
nav_order: 4
},
]
},
{
title: 'Basics',
folder: 'basics',
nav_order: 2,
children: [
{
path: 'Using-Metasploit.md',
title: 'Running modules',
nav_order: 2
},
{
path: 'How-to-use-msfvenom.md',
nav_order: 3
},
{
path: 'How-to-use-a-Metasploit-module-appropriately.md'
},
{
path: 'How-payloads-work.md'
},
{
path: 'Module-Documentation.md'
},
{
path: 'How-to-use-a-reverse-shell-in-Metasploit.md'
},
]
},
{
title: 'Intermediate',
folder: 'intermediate',
nav_order: 3,
children: [
{
path: 'Evading-Anti-Virus.md'
},
{
path: 'Payload-UUID.md'
},
{
path: 'Running-Private-Modules.md'
},
{
path: 'Exploit-Ranking.md'
},
{
path: 'Pivoting-in-Metasploit.md'
},
{
path: 'Hashes-and-Password-Cracking.md'
},
{
path: 'msfdb:-Database-Features-&-How-to-Set-up-a-Database-for-Metasploit.md',
new_base_name: 'Metasploit-Database-Support.md',
title: 'Database Support'
},
]
},
{
title: 'Advanced',
folder: 'advanced',
nav_order: 4,
children: [
{
path: 'Metasploit-Web-Service.md'
},
{
title: 'Meterpreter',
folder: 'meterpreter',
children: [
{
path: 'Meterpreter.md',
title: 'Overview',
nav_order: 1
},
{
path: 'Meterpreter-Transport-Control.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Unicode-Support.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Paranoid-Mode.md',
title: without_prefix('Meterpreter ')
},
{
path: 'The-ins-and-outs-of-HTTP-and-HTTPS-communications-in-Meterpreter-and-Metasploit-Stagers.md'
},
{
path: 'Meterpreter-Timeout-Control.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Wishlist.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Sleep-Control.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Configuration.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Reliable-Network-Communication.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Debugging-Dead-Meterpreter-Sessions.md'
},
{
path: 'Meterpreter-HTTP-Communication.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Stageless-Mode.md',
title: without_prefix('Meterpreter ')
},
{
path: 'Meterpreter-Debugging-Meterpreter-Sessions.md',
title: without_prefix('Meterpreter ')
},
{
path: 'How-to-get-started-with-writing-a-Meterpreter-script.md'
},
{
path: 'Powershell-Extension.md'
},
{
path: 'Python-Extension.md'
},
]
},
]
},
{
title: 'Other',
folder: 'other',
children: [
{
title: 'Oracle Support',
folder: 'oracle-support',
children: [
{
path: 'Oracle-Usage.md'
},
{
path: 'How-to-get-Oracle-Support-working-with-Kali-Linux.md'
},
]
},
{
path: 'Information-About-Unmet-Browser-Exploit-Requirements.md'
},
{
path: 'Why-CVE-is-not-available.md'
},
{
path: 'How-to-use-the-Favorite-command.md'
},
]
},
]
},
{
title: 'Development',
folder: 'development',
nav_order: 5,
children: [
{
title: 'Get Started ',
folder: 'get-started',
nav_order: 1,
children: [
{
path: 'Contributing-to-Metasploit.md',
nav_order: 1
},
{
path: 'dev/Setting-Up-a-Metasploit-Development-Environment.md',
nav_order: 2
},
{
path: 'Sanitizing-PCAPs.md',
nav_order: 3
},
{
path: "Navigating-and-Understanding-Metasploit's-Codebase.md",
new_base_name: 'Navigating-and-Understanding-Metasploits-Codebase.md',
title: 'Navigating the codebase'
},
{
title: 'Git',
folder: 'git',
children: [
{
path: 'Keeping-in-sync-with-rapid7-master.md'
},
{
path: 'git/Git-cheatsheet.md'
},
{
path: 'git/Using-Git.md'
},
{
path: 'git/Git-Reference-Sites.md'
},
{
path: 'Remote-Branch-Pruning.md'
},
]
},
]
},
{
title: 'Developing Modules',
folder: 'developing-modules',
nav_order: 2,
children: [
{
title: 'Guides',
folder: 'guides',
nav_order: 2,
children: [
{
path: 'How-to-get-started-with-writing-a-post-module.md',
title: 'Writing a post module'
},
{
path: 'Get-Started-Writing-an-Exploit.md',
title: 'Writing an exploit'
},
{
path: 'How-to-write-a-browser-exploit-using-HttpServer.md',
title: 'Writing a browser exploit'
},
{
title: 'Scanners',
folder: 'scanners',
nav_order: 2,
children: [
{
path: 'How-to-write-a-HTTP-LoginScanner-Module.md',
title: 'Writing a HTTP LoginScanner'
},
{
path: 'Creating-Metasploit-Framework-LoginScanners.md',
title: 'Writing an FTP LoginScanner'
},
]
},
{
path: 'How-to-get-started-with-writing-an-auxiliary-module.md',
title: 'Writing an auxiliary module'
},
{
path: 'How-to-use-command-stagers.md'
},
{
path: 'How-to-write-a-check()-method.md',
new_base_name: 'How-to-write-a-check-method.md'
},
{
path: 'How-to-check-Microsoft-patch-levels-for-your-exploit.md'
},
]
},
{
title: 'Libraries',
folder: 'libraries',
children: [
{
path: 'API.md',
nav_order: 0
},
{
title: 'Compiling C',
folder: 'c',
children: [
{
path: 'How-to-use-Metasploit-Framework-Compiler-Windows-to-compile-C-code.md',
title: 'Overview',
nav_order: 1
},
{
path: 'How-to-XOR-with-Metasploit-Framework-Compiler.md',
title: 'XOR Support'
},
{
path: 'How-to-decode-Base64-with-Metasploit-Framework-Compiler.md',
title: 'Base64 Support'
},
{
path: 'How-to-decrypt-RC4-with-Metasploit-Framework-Compiler.md',
title: 'RC4 Support'
},
]
},
{
path: 'How-to-log-in-Metasploit.md',
title: 'Logging'
},
{
path: 'How-to-use-Railgun-for-Windows-post-exploitation.md',
title: 'Railgun'
},
{
path: 'How-to-zip-files-with-Msf-Util-EXE.to_zip.md',
new_base_name: 'How-to-zip-files-with-Msf-Util-EXE-to_zip.md',
title: 'Zip'
},
{
path: 'Handling-Module-Failures-with-`fail_with`.md',
new_base_name: 'Handling-Module-Failures-with-fail_with.md',
title: 'Fail_with'
},
{
path: 'How-to-use-Msf-Auxiliary-AuthBrute-to-write-a-bruteforcer.md',
title: 'AuthBrute'
},
{
path: 'How-to-Use-the-FILEFORMAT-mixin-to-create-a-file-format-exploit.md',
title: 'Fileformat'
},
{
path: 'SQL-Injection-(SQLi)-Libraries.md',
new_base_name: 'SQL-Injection-Libraries.md',
title: 'SQL Injection'
},
{
path: 'How-to-use-Powershell-in-an-exploit.md',
title: 'Powershell'
},
{
path: 'How-to-use-the-Seh-mixin-to-exploit-an-exception-handler.md',
title: 'SEH Exploitation'
},
{
path: 'How-to-clean-up-files-using-FileDropper.md',
title: 'FileDropper'
},
{
path: 'How-to-use-PhpEXE-to-exploit-an-arbitrary-file-upload-bug.md',
title: 'PhpExe'
},
{
title: 'HTTP',
folder: 'http',
children: [
{
path: 'How-to-send-an-HTTP-request-using-Rex-Proto-Http-Client.md'
},
{
path: 'How-to-parse-an-HTTP-response.md'
},
{
path: 'How-to-write-a-module-using-HttpServer-and-HttpClient.md'
},
{
path: 'How-to-Send-an-HTTP-Request-Using-HttpClient.md'
},
{
path: 'How-to-write-a-browser-exploit-using-BrowserExploitServer.md',
title: 'BrowserExploitServer'
},
]
},
{
title: 'Deserialization',
folder: 'deserialization',
children: [
{
path: 'Dot-Net-Deserialization.md'
},
{
path: 'Generating-`ysoserial`-Java-serialized-objects.md',
new_base_name: 'Generating-ysoserial-Java-serialized-objects.md',
title: 'Java Deserialization'
}
]
},
{
title: 'Obfuscation',
folder: 'obfuscation',
children: [
{
path: 'How-to-obfuscate-JavaScript-in-Metasploit.md',
title: 'JavaScript Obfuscation'
},
{
path: 'How-to-use-Metasploit-Framework-Obfuscation-CRandomizer.md',
title: 'C Obfuscation'
},
]
},
{
path: 'How-to-use-the-Msf-Exploit-Remote-Tcp-mixin.md',
title: 'TCP'
},
{
path: 'How-to-do-reporting-or-store-data-in-module-development.md',
title: 'Reporting and Storing Data'
},
{
path: 'How-to-use-WbemExec-for-a-write-privilege-attack-on-Windows.md',
title: 'WbemExec'
},
{
title: 'SMB Library',
folder: 'smb_library',
children: [
{
path: 'What-my-Rex-Proto-SMB-Error-means.md'
},
{
path: 'Guidelines-for-Writing-Modules-with-SMB.md'
},
]
},
{
path: 'Using-ReflectiveDLL-Injection.md',
title: 'ReflectiveDLL Injection'
},
]
},
{
title: 'External Modules',
folder: 'external-modules',
nav_order: 3,
children: [
{
path: 'Writing-External-Metasploit-Modules.md',
title: 'Overview',
nav_order: 1
},
{
path: 'Writing-External-Python-Modules.md',
title: 'Writing Python Modules'
},
{
path: 'Writing-External-GoLang-Modules.md',
title: 'Writing GoLang Modules'
},
]
},
{
title: 'Module metadata',
folder: 'module-metadata',
nav_order: 3,
children: [
{
path: 'How-to-use-datastore-options.md'
},
{
path: 'Module-Reference-Identifiers.md'
},
{
path: 'Definition-of-Module-Reliability,-Side-Effects,-and-Stability.md',
new_base_name: 'Definition-of-Module-Reliability-Side-Effects-and-Stability.md'
},
]
}
]
},
{
title: 'Maintainers',
folder: 'maintainers',
children: [
{
title: 'Process',
folder: 'process',
children: [
{
path: 'Guidelines-for-Accepting-Modules-and-Enhancements.md'
},
{
path: 'How-to-deprecate-a-Metasploit-module.md'
},
{
path: 'Landing-Pull-Requests.md'
},
{
path: 'Assigning-Labels.md'
},
{
path: 'Adding-Release-Notes-to-PRs.md',
title: 'Release Notes'
},
{
path: 'Rolling-back-merges.md'
},
{
path: 'Unstable-Modules.md'
},
]
},
{
path: 'Committer-Rights.md'
},
{
title: 'Ruby Gems',
folder: 'ruby-gems',
children: [
{
path: 'How-to-add-and-update-gems-in-metasploit-framework.md',
title: 'Adding and Updating'
},
{
path: 'Testing-Rex-and-other-Gem-File-Updates-With-Gemfile.local-and-Gemfile.local.example.md',
new_base_name: 'using-local-gems.md',
title: 'Using local Gems'
},
{
path: 'Merging-Metasploit-Payload-Gem-Updates.md'
},
]
},
{
path: 'Committer-Keys.md'
},
{
path: 'Metasploit-Loginpalooza.md'
},
{
path: 'Metasploit-Hackathons.md'
},
{
path: 'Downloads-by-Version.md'
}
]
},
{
title: 'Quality',
folder: 'quality',
children: [
{
path: 'Style-Tips.md'
},
{
path: 'Msftidy.md'
},
{
path: 'Using-Rubocop.md'
},
{
path: 'Common-Metasploit-Module-Coding-Mistakes.md'
},
{
path: 'Writing-Module-Documentation.md'
},
]
},
{
title: 'Google Summer of Code',
folder: 'google-summer-of-code',
children: [
{
path: 'How-to-Apply-to-GSoC.md'
},
{
path: 'GSoC-2017-Student-Proposal.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2017-Project-Ideas.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2018-Project-Ideas.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2017-Mentor-Organization-Application.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2019-Project-Ideas.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2020-Project-Ideas.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2021-Project-Ideas.md',
title: without_prefix('GSoC')
},
{
path: 'GSoC-2022-Project-Ideas.md',
title: without_prefix('GSoC')
},
]
},
{
title: 'Proposals',
folder: 'propsals',
children: [
{
path: 'Bundled-Modules-Proposal.md'
},
{
path: 'MSF6-Feature-Proposals.md'
},
{
path: 'RFC---Metasploit-URL-support.md',
new_base_name: 'Metasploit-URL-support-proposal.md'
},
{
path: 'Uberhandler.md'
},
{
path: 'Work-needed-to-allow-msfdb-to-use-postgresql-common.md'
},
{
path: 'Payload-Rename-Justification.md'
},
]
},
{
title: 'Roadmap',
folder: 'roadmap',
children: [
{
path: 'Metasploit-Framework-Wish-List.md'
},
{
path: 'Metasploit-5.0-Release-Notes.md',
new_base_name: 'Metasploit-5-Release-Notes.md',
title: 'Metasploit Framework 5.0 Release Notes'
},
{
path: '2017-Roadmap-Review.md'
},
{
path: 'Metasploit-6.0-Development-Notes.md',
new_base_name: 'Metasploit-6-Release-Notes.md',
title: 'Metasploit Framework 6.0 Release Notes'
},
{
path: '2017-Roadmap.md'
},
{
path: 'Metasploit-Breaking-Changes.md'
},
{
path: 'Metasploit-Data-Service-Enhancements-(Goliath).md',
new_base_name: 'Metasploit-Data-Service-Enhancements-Goliath.md',
title: 'Metasploit Data Service'
},
]
},
]
},
{
path: 'Contact.md',
nav_order: 5
},
].freeze
| 29.270667 | 114 | 0.414249 |
b90c99051b4680ffb73187ab9ff3d7b702e5c397 | 1,451 | # frozen_string_literal: true
require 'dry-initializer'
module SpyAlleyApplication
module Results
class ProcessEliminatingPlayer
include Dry::Initializer.define -> do
option :get_eliminated_player_node, type: ::Types::Callable, reader: :private
option :get_game_over_node, type: ::Types::Callable, reader: :private
option :get_result_game_board_node, type: ::Types::Callable, reader: :private
option :eliminate_player, type: ::Types::Callable, reader: :private
option :process_next_turn_options, type: ::Types::Callable, reader: :private
end
def call(game_board:, change_orders:, eliminating_player:, eliminated_player:)
change_orders = change_orders.push(get_eliminated_player_node.(
eliminating_player: eliminating_player,
eliminated_player: eliminated_player))
game_board = eliminate_player.(
game_board: game_board,
eliminating_player: eliminating_player,
eliminated_player: eliminated_player)
if game_board.players.count(&:active) < 2
change_orders = change_orders.push(get_game_over_node.(
winning_player: eliminating_player,
reason: {name: 'by_elimination'}))
end
process_next_turn_options.(
game_board: game_board,
change_orders: change_orders.push(get_result_game_board_node.(game_board: game_board)))
end
end
end
end
| 39.216216 | 97 | 0.698828 |
28d4a520ae88005784e59cb22d363f1ad926579f | 1,495 | # Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::MixedReality::Mgmt::V2020_04_06_preview
module Models
#
# Developer Keys of account
#
class AccountKeys
include MsRestAzure
# @return [String] value of primary key.
attr_accessor :primary_key
# @return [String] value of secondary key.
attr_accessor :secondary_key
#
# Mapper for AccountKeys class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'AccountKeys',
type: {
name: 'Composite',
class_name: 'AccountKeys',
model_properties: {
primary_key: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'primaryKey',
type: {
name: 'String'
}
},
secondary_key: {
client_side_validation: true,
required: false,
read_only: true,
serialized_name: 'secondaryKey',
type: {
name: 'String'
}
}
}
}
}
end
end
end
end
| 25.338983 | 70 | 0.514381 |
39346ca02fdcb13cc870925393339c5a30e2bae4 | 1,254 | module ExtractI18n
module HTMLExtractor
module Match
class ErbDirectiveMatch < NodeMatch
REGEXPS = [
[/^([ \t]*link_to )(("[^"]+")|('[^']+'))/, '\1%s', 2],
[/^([ \t]*link_to (.*),[ ]?title:[ ]?)(("[^"]+")|('[^']+'))/, '\1%s', 3],
[/^([ \t]*[a-z_]+\.[a-z_]+_field (.*),[ ]?placeholder:[ ]?)(("[^"]+")|('[^']+'))/, '\1%s', 3],
[/^([ \t]*[a-z_]+\.text_area (.*),[ ]?placeholder:[ ]?)(("[^"]+")|('[^']+'))/, '\1%s', 3],
[/^([ \t]*[a-z_]+\.submit )(("[^"]+")|('[^']+'))/, '\1%s', 2],
[/^([ \t]*[a-z_]+\.label\s+\:[a-z_]+\,\s+)(("[^"]+")|('[^']+'))/, '\1%s', 2]
].freeze
def initialize(document, fragment_id, text, regexp)
super(document, text)
@fragment_id = fragment_id
@regexp = regexp
end
def replace_text!(key, i18n_t)
document.erb_directives[@fragment_id].gsub!(@regexp[0], @regexp[1] % i18n_t.strip)
end
def self.create(document, fragment_id)
REGEXPS.map do |r|
match = document.erb_directives[fragment_id].match(r[0])
new(document, fragment_id, match[r[2]][1...-1], r) if match && match[r[2]]
end
end
end
end
end
end
| 36.882353 | 104 | 0.431419 |
7a7dddf1751977b76002696b5f52841b8f5b3739 | 1,701 | require "json"
module Gcpc
module Interceptors
module Subscriber
# `DecodeInterceptor` decodes the message according to the strategy and
# sets it in the attributes.
class DecodeInterceptor < Gcpc::Subscriber::BaseInterceptor
class BaseStrategy
def decode(data, attributes, message)
raise NotImplementedError.new("You must implement #{self.class}##{__method__}")
end
end
class JSONStrategy < BaseStrategy
def decode(data, attributes, message)
JSON.parse(data)
end
end
# @param [BaseStrategy] strategy
# @param [Logger] logger
# @param [Boolean] ignore_on_error Ignore the message when decode failed
def initialize(strategy:, logger: Logger.new(STDOUT), ignore_on_error: true)
@strategy = strategy
@logger = logger
@ignore_on_error = ignore_on_error
end
# @param [String] data
# @param [Hash] attributes
# @param [Google::Cloud::Pubsub::ReceivedMessage] message
# @param [Proc] block
def handle(data, attributes, message, &block)
begin
m = @strategy.decode(data, attributes, message)
rescue => e
@logger.error(e)
if @ignore_on_error
@logger.info("Ack a message{data=#{message.data}, attributes=#{message.attributes}} because it can't be decoded!")
message.ack! # Ack immediately if decode failed
return
else
raise e
end
end
yield m, attributes, message
end
end
end
end
end
| 30.927273 | 128 | 0.581423 |
3882bfda86d37b203cfa6aaf395fc6749f0b4e65 | 750 | class RegistrationsController < ApplicationController
skip_before_filter :authenticate!
def new
@user = User.new
end
def create
@user = User.new(user_params)
#gives "user" role to the newly created user
@user.add_role :user
if @user.save
warden.logout
flash[:notice] = t("registrations.user.success")
respond_to do |format|
format.html do
authenticate!
redirect_to user_path(current_user)
end
format.json { render :create }
end
end
end
private
# Never trust parameters from the scary internet, only allow the white list through.
def user_params
params.require(:user).permit(:email, :password, :username)
end
end | 22.727273 | 86 | 0.646667 |
5d7d2fb9c007bd7fc91721f6f4a4bc16c4a073d0 | 491 | require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module KmPersonalPage
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
end
end
| 30.6875 | 82 | 0.765784 |
f83fe28286452185a2a55dd79e5194615d6891f3 | 1,427 | require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
class Libxml2 < AbstractOsqueryFormula
desc "GNOME XML library"
homepage "http://xmlsoft.org"
license "MIT"
url "http://xmlsoft.org/sources/libxml2-2.9.5.tar.gz"
mirror "ftp://xmlsoft.org/libxml2/libxml2-2.9.5.tar.gz"
sha256 "4031c1ecee9ce7ba4f313e91ef6284164885cdb69937a123f6a83bb6a72dcd38"
revision 100
bottle do
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
cellar :any_skip_relocation
sha256 "145739ead08f85fff40695ac83d615aeaae9a121d388f675f29f7330fcade892" => :sierra
sha256 "899d898d6930c15b21e97c62091fe70640ce93b37dbe08273e6b694d33de40b9" => :x86_64_linux
end
option :universal
def install
ENV.universal_binary if build.universal?
if build.head?
inreplace "autogen.sh", "libtoolize", "glibtoolize"
system "./autogen.sh"
end
args = []
args << "--with-zlib=#{legacy_prefix}" if OS.linux?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--without-python",
"--without-lzma",
"--enable-static",
"--disable-shared",
*args
system "make"
ENV.deparallelize
system "make", "install"
ln_sf prefix/"include/libxml2/libxml", prefix/"include/libxml"
end
end
| 32.431818 | 94 | 0.644008 |
1cf6f0f3b58109869615e8a67cf814cfd9f2fc76 | 2,153 | # frozen_string_literal: true
RSpec.describe LAA::FeeCalculator do
it 'has a version number' do
expect(described_class::VERSION).not_to be_nil
end
describe '.client' do
subject(:client) { described_class.client }
it 'returns a client object' do
expect(client).to be_a described_class::Client
end
end
describe '.configuration' do
subject(:configuration) { described_class.configuration }
it 'returns configuration object' do
expect(configuration).to be_a described_class::Configuration
end
it 'memoized' do
expect(configuration).to be_equal(described_class.configuration)
end
end
describe '.configure' do
it 'yields a config' do
expect { |block| described_class.configure(&block) }.to yield_with_args(kind_of(described_class::Configuration))
end
it 'returns a configuration' do
expect(described_class.configure).to be_an_instance_of(described_class::Configuration)
end
context 'configuring host' do
let(:host) { 'https://mycustom-laa-fee-calculator-api-v2/api/v2' }
before do
described_class.configure do |config|
config.host = host
end
end
it 'changes the host configuration' do
expect(described_class.configuration.host).to eql host
end
it 'changes the connection host' do
expect(described_class::Connection.instance.host).to eql host
end
end
end
describe '.reset' do
subject(:reset) { described_class.reset }
let(:host) { 'https://mycustom-laa-fee-calculator-api-v2/api/v2' }
before do
described_class.configure do |config|
config.host = host
end
end
it 'resets the configured host' do
expect { reset }
.to change { described_class.configuration.host }
.from(host)
.to(described_class::Configuration::LAA_FEE_CALCULATOR_API_V1)
end
it 'resets the connection host' do
expect { reset }
.to change { described_class::Connection.instance.host }
.from(host)
.to(described_class::Configuration::LAA_FEE_CALCULATOR_API_V1)
end
end
end
| 26.256098 | 118 | 0.677659 |
ac1ffa412874a98124b630241e0c6a44f6be22fa | 2,445 | class Thread
LOCK = Mutex.new # :nodoc:
# Returns the value of a thread local variable that has been set. Note that
# these are different than fiber local values.
#
# Thread local values are carried along with threads, and do not respect
# fibers. For example:
#
# Thread.new {
# Thread.current.thread_variable_set("foo", "bar") # set a thread local
# Thread.current["foo"] = "bar" # set a fiber local
#
# Fiber.new {
# Fiber.yield [
# Thread.current.thread_variable_get("foo"), # get the thread local
# Thread.current["foo"], # get the fiber local
# ]
# }.resume
# }.join.value # => ['bar', nil]
#
# The value <tt>"bar"</tt> is returned for the thread local, where +nil+ is returned
# for the fiber local. The fiber is executed in the same thread, so the
# thread local values are available.
def thread_variable_get(key)
_locals[key.to_sym]
end
# Sets a thread local with +key+ to +value+. Note that these are local to
# threads, and not to fibers. Please see Thread#thread_variable_get for
# more information.
def thread_variable_set(key, value)
_locals[key.to_sym] = value
end
# Returns an array of the names of the thread-local variables (as Symbols).
#
# thr = Thread.new do
# Thread.current.thread_variable_set(:cat, 'meow')
# Thread.current.thread_variable_set("dog", 'woof')
# end
# thr.join # => #<Thread:0x401b3f10 dead>
# thr.thread_variables # => [:dog, :cat]
#
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
# for more details.
def thread_variables
_locals.keys
end
# Returns <tt>true</tt> if the given string (or symbol) exists as a
# thread-local variable.
#
# me = Thread.current
# me.thread_variable_set(:oliver, "a")
# me.thread_variable?(:oliver) # => true
# me.thread_variable?(:stanley) # => false
#
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
# for more details.
def thread_variable?(key)
_locals.has_key?(key.to_sym)
end
def freeze
_locals.freeze
super
end
private
def _locals
if defined?(@_locals)
@_locals
else
LOCK.synchronize { @_locals ||= {} }
end
end
end unless Thread.instance_methods.include?(:thread_variable_set)
| 30.5625 | 88 | 0.640082 |
ffdc0af3c4e3ea14ee6daba493a939d886628e70 | 264 | class RemoveAddressFromPersonAndTrip < ActiveRecord::Migration
def self.up
remove_column :people, :address
remove_column :trips, :address
end
def self.down
add_column :people, :address, :string
add_column :trips, :address, :string
end
end
| 22 | 62 | 0.731061 |
ff6a39e6e6086059f683f08319f4680461f82fa4 | 5,015 | # This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to explicitly require it in any
# files.
#
# Given that it is always loaded, you are encouraged to keep this file as
# light-weight as possible. Requiring heavyweight dependencies from this file
# will add to the boot time of your test suite on EVERY test run, even for an
# individual file that may not need all of that loaded. Instead, consider making
# a separate helper file that requires the additional dependencies and performs
# the additional setup, and require it from the spec files that actually need
# it.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
require 'pry'
require 'pry-nav'
require 'simplecov'
SimpleCov.start do
add_filter "spec"
end
require './lib/maxima'
RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
# assertions if you prefer.
config.expect_with :rspec do |expectations|
# This option will default to `true` in RSpec 4. It makes the `description`
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
# be_bigger_than(2).and_smaller_than(4).description
# # => "be bigger than 2 and smaller than 4"
# ...rather than:
# # => "be bigger than 2"
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended, and will default to
# `true` in RSpec 4.
mocks.verify_partial_doubles = true
end
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
# have no way to turn it off -- the option exists only for backwards
# compatibility in RSpec 3). It causes shared context metadata to be
# inherited by the metadata hash of host groups and examples, rather than
# triggering implicit auto-inclusion in groups with matching metadata.
config.shared_context_metadata_behavior = :apply_to_host_groups
# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
=begin
# This allows you to limit a spec run to individual examples or groups
# you care about by tagging them with `:focus` metadata. When nothing
# is tagged with `:focus`, all examples get run. RSpec also provides
# aliases for `it`, `describe`, and `context` that include `:focus`
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
config.filter_run_when_matching :focus
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"
# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
config.disable_monkey_patching!
# This setting enables warnings. It's recommended, but in some cases may
# be too noisy due to issues in dependencies.
config.warnings = true
# Many RSpec users commonly either run the entire suite or an individual
# file, and it's useful to allow more verbose output when running an
# individual spec file.
if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
config.default_formatter = "doc"
end
# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
# particularly slow.
config.profile_examples = 10
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = :random
# Seed global randomization in this process using the `--seed` CLI option.
# Setting this allows you to use `--seed` to deterministically reproduce
# test failures related to randomization by passing the same `--seed` value
# as the one that triggered the failure.
Kernel.srand config.seed
=end
end
| 45.18018 | 92 | 0.742373 |
4af66d94d65c9d608e4c88418b2ff4abc0fbb2fb | 9,833 | FactoryGirl.define do
sequence :name do |n|
"Foo bar #{n}"
end
sequence :bank_number do |n|
n.to_s.rjust(3, '0')
end
sequence :email do |n|
"person#{n}@example.com"
end
sequence :uid do |n|
"#{n}"
end
sequence :serial do |n|
n
end
sequence :permalink do |n|
"foo_page_#{n}"
end
sequence :domain do |n|
"foo#{n}lorem.com"
end
factory :category_follower do |f|
f.association :user
f.association :category
end
factory :country do |f|
f.name "Brasil"
end
factory :origin do |f|
f.referral { generate(:permalink) }
f.domain { generate(:domain) }
end
factory :project_reminder do |f|
f.association :user
f.association :project
end
factory :balance_transaction do |f|
f.association :user
f.association :project
f.amount 100
f.event_name 'foo'
end
factory :user do |f|
f.association :bank_account
f.permalink { generate(:permalink) }
f.name "Foo bar"
f.public_name "Public bar"
f.password "123456"
f.cpf "97666238991"
f.uploaded_image File.open("#{Rails.root}/spec/support/testimg.png")
f.email { generate(:email) }
f.about_html "This is Foo bar's biography."
f.association :country, factory: :country
f.address_street 'fooo'
f.address_number '123'
f.address_city 'fooo bar'
f.address_state 'fooo'
f.address_neighbourhood 'bar'
f.address_zip_code '123344333'
f.phone_number '1233443355'
trait :without_bank_data do
bank_account { nil }
end
end
factory :category do |f|
f.name_pt { generate(:name) }
end
factory :project do |f|
#after(:create) do |project|
# create(:reward, project: project)
# if project.state == 'change_to_online_after_create'
# project.update_attributes(state: 'online')
# end
#end
f.name "Foo bar"
f.permalink { generate(:permalink) }
f.association :user
f.association :category
f.association :city
f.about_html "Foo bar"
f.headline "Foo bar"
f.mode 'aon'
f.goal 10000
f.online_days 5
f.more_links 'Ipsum dolor'
f.video_url 'http://vimeo.com/17298435'
f.state 'online'
f.budget '1000'
f.uploaded_image File.open("#{Rails.root}/spec/support/testimg.png")
after :create do |project|
unless project.project_transitions.where(to_state: project.state).present?
FactoryGirl.create(:project_transition, to_state: project.state, project: project)
end
# should set expires_at when create a project in these states
if %w(online waiting_funds failed successful).include?(project.state) && project.online_days.present? && project.online_at.present?
project.expires_at = (project.online_at + project.online_days.days).end_of_day
project.save
end
end
after :build do |project|
project.account = build(:project_account, project: nil)
project.rewards.build(deliver_at: 1.year.from_now, minimum_value: 10, description: 'test')
end
end
factory :balance_transfer do |f|
f.amount 50
f.association :project
f.association :user
end
factory :flexible_project do |f|
f.state 'draft'
f.mode 'flex'
f.name "Foo bar"
f.permalink { generate(:permalink) }
f.association :user
f.association :category
f.association :city
f.about_html "Foo bar"
f.headline "Foo bar"
f.goal 10000
f.online_days 5
f.more_links 'Ipsum dolor'
f.video_url 'http://vimeo.com/17298435'
f.budget '1000'
f.uploaded_image File.open("#{Rails.root}/spec/support/testimg.png")
after :create do |flex_project|
FactoryGirl.create(:project_transition, {
to_state: flex_project.state,
project: flex_project
})
end
after :build do |project|
project.account = build(:project_account, project: nil)
end
end
factory :project_transition do |f|
f.association :project
f.most_recent true
f.to_state 'online'
f.sort_key { generate(:serial) }
end
factory :project_account_error do |f|
f.association :project_account
f.solved false
f.reason 'foo bar reason'
end
factory :project_account do |f|
f.association :project
f.association :bank
f.email "[email protected]"
f.address_zip_code "foo"
f.address_neighbourhood "foo"
f.address_state "foo"
f.address_city "foo"
f.address_number "foo"
f.address_street "foo"
f.phone_number "1234"
f.agency "fooo"
f.agency_digit "foo"
f.owner_document "foo"
f.owner_name "foo"
f.account "1"
f.account_digit "1000"
f.account_type "foo"
end
factory :user_link do |f|
f.association :user
f.link "http://www.foo.com"
end
factory :project_budget do |f|
f.association :project
f.name "Foo Bar"
f.value "10"
end
factory :unsubscribe do |f|
f.association :user, factory: :user
f.association :project, factory: :project
end
factory :project_invite do |f|
f.associations :project
f.user_email { generate(:user_email) }
end
factory :notification do |f|
f.template_name 'project_invite'
f.user_email '[email protected]'
f.metadata do
{
associations: {
project_id: 10
},
origin_name: 'Foo Bar',
origin_email: '[email protected]',
locale: 'pt'
}
end
end
factory :project_notification do |f|
f.association :user, factory: :user
f.association :project, factory: :project
f.template_name 'project_success'
f.from_email '[email protected]'
f.from_name 'from_name'
f.locale 'pt'
end
factory :reward do |f|
f.association :project, factory: :project
f.minimum_value 10.00
f.description "Foo bar"
f.deliver_at 1.year.from_now
end
factory :rewards, class: Reward do |f|
f.minimum_value 10.00
f.description "Foo bar"
f.deliver_at 1.year.from_now
end
factory :donation do |f|
f.amount 10
f.association :user
end
factory :contribution do |f|
f.association :project, factory: :project
f.association :user, factory: :user
f.value 10.00
f.payer_name 'Foo Bar'
f.payer_email '[email protected]'
f.anonymous false
factory :deleted_contribution do
after :create do |contribution|
create(:payment, state: 'deleted', value: contribution.value, contribution: contribution, created_at: contribution.created_at)
end
end
factory :refused_contribution do
after :create do |contribution|
create(:payment, state: 'refused', value: contribution.value, contribution: contribution, created_at: contribution.created_at)
end
end
factory :confirmed_contribution do
after :create do |contribution|
create(:payment, state: 'paid', gateway: 'Pagarme', value: contribution.value, contribution: contribution, created_at: contribution.created_at, payment_method: 'BoletoBancario')
end
end
factory :pending_contribution do
after :create do |contribution|
create(:payment, state: 'pending', value: contribution.value, contribution: contribution, created_at: contribution.created_at)
end
end
factory :pending_refund_contribution do
after :create do |contribution|
create(:payment, state: 'pending_refund', value: contribution.value, contribution: contribution, created_at: contribution.created_at)
end
end
factory :refunded_contribution do
after :create do |contribution|
create(:payment, state: 'refunded', value: contribution.value, contribution: contribution, created_at: contribution.created_at)
end
end
factory :contribution_with_credits do
after :create do |contribution|
create(:payment, state: 'paid', gateway: 'Credits', value: contribution.value, contribution: contribution)
end
end
end
factory :payment do |f|
f.association :contribution
f.gateway 'Pagarme'
f.value 10.00
f.installment_value 10.00
f.payment_method "CartaoDeCredito"
end
factory :user_follow do |f|
f.association :user
f.association :follow, factory: :user
end
factory :payment_notification do |f|
f.association :contribution, factory: :contribution
f.extra_data {}
end
factory :credit_card do |f|
f.association :user
f.last_digits '1234'
f.card_brand 'Foo'
end
factory :authorization do |f|
f.association :oauth_provider
f.association :user
f.uid 'Foo'
end
factory :oauth_provider do |f|
f.name 'facebook'
f.strategy 'GitHub'
f.path 'github'
f.key 'test_key'
f.secret 'test_secret'
end
factory :configuration do |f|
f.name 'Foo'
f.value 'Bar'
end
factory :institutional_video do |f|
f.title "My title"
f.description "Some Description"
f.video_url "http://vimeo.com/35492726"
f.visible false
end
factory :project_post do |f|
f.association :project, factory: :project
f.association :user, factory: :user
f.title "My title"
f.comment_html "<p>This is a comment</p>"
end
factory :state do
name { generate(:name) }
acronym { generate(:name) }
end
factory :city do |f|
f.association :state
f.name "foo"
end
factory :bank do
name "Foo"
code { generate(:bank_number) }
end
factory :bank_account do |f|
#f.association :user, factory: :user
f.association :bank, factory: :bank
input_bank_number nil
owner_name "Foo Bar"
owner_document "97666238991"
account_digit "1"
agency "1234"
agency_digit "1"
account "1"
end
factory :single_bank_account, class: BankAccount do |f|
f.association :bank, factory: :bank
owner_name "Foo"
owner_document "000"
account_digit "1"
agency "1234"
account '1'
end
end
| 25.020356 | 185 | 0.663582 |
7998e419d05eafb817160c16e1cdd5ebcb877849 | 840 | namespace :open_flash_chart_2 do
PLUGIN_ROOT = File.dirname(__FILE__) + '/../'
desc 'Installs required swf in public/ and javascript files to the public/javascripts directory.'
task :install do
FileUtils.cp "#{PLUGIN_ROOT}requirements/open-flash-chart.swf", "#{RAILS_ROOT}/public", :verbose => true
FileUtils.cp "#{PLUGIN_ROOT}requirements/swfobject.js", "#{RAILS_ROOT}/public/javascripts", :verbose => true
# don't copy json.js file, it's seems tjat everything works without that file
# FileUtils.cp "#{PLUGIN_ROOT}/requirements/json/*.js", "#{RAILS_ROOT}/public/javascripts", :verbose => true
end
desc 'Removes the swf and javascripts for the plugin.'
task :uninstall do
FileUtils.rm "#{RAILS_ROOT}/public/javascripts/swfobject.js"
FileUtils.rm "#{RAILS_ROOT}/public/open-flash-chart.swf"
end
end | 52.5 | 115 | 0.727381 |
5d0421662f6a1c752e788ffdd5bd347ef9bdb70a | 276 | # frozen_string_literal: true
require_relative "setup"
Schema = Dry::Types["params.hash"].schema(
email?: "string",
age?: "coercible.integer"
).lax
ValidInput = { email: "[email protected]", age: "19" }.freeze
profile do
10_000.times do
Schema.(ValidInput)
end
end
| 16.235294 | 56 | 0.684783 |
4a58f734fa75cecc866e546998394d68e2f60211 | 5,295 | #
# Be sure to run `pod spec lint BLAPIManagers.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "MediatorUserModuleCategory"
s.version = "1.0"
s.summary = "MediatorUserModuleCategory."
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
this is MediatorUserModuleCategory
DESC
s.homepage = "https://github.com/ModularAppLab/MediatorUserModuleCategory"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
# s.license = "MIT (example)"
s.license = { :type => "MIT", :file => "FILE_LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "CasaTaloyum" => "[email protected]" }
# Or just: s.author = "CasaTaloyum"
# s.authors = { "CasaTaloyum" => "[email protected]" }
# s.social_media_url = "http://twitter.com/CasaTaloyum"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# s.platform = :ios
s.platform = :ios, "7.0"
# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/ModularAppLab/MediatorUserModuleCategory.git", :tag => s.version.to_s }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = "MediatorUserModuleCategory/MediatorUserModuleCategory/**/*.{h,m}"
# s.exclude_files = "Classes/Exclude"
# s.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "BLNetworking"
# s.dependency "BLAPIManagers"
# s.dependency "BLMediator"
s.dependency "CTMediator"
end
| 37.288732 | 120 | 0.603966 |
5d909855d500470b240ac777e422c4f2c6d58103 | 1,653 | require "rails_helper"
RSpec.describe "Subscription endpoints", type: :request do
let(:json_resp) { JSON.parse(response.body) }
let(:user) { create :user }
before { user.generate_spree_api_key! }
describe "#cancel" do
let(:subscription) do
create :subscription, :with_line_item, actionable_date: (Date.current + 1.month), user: user
end
it "returns the canceled record", :aggregate_failures do
post solidus_subscriptions.cancel_api_v1_subscription_path(subscription), params: { token: user.spree_api_key }
expect(json_resp["state"]).to eq "canceled"
expect(json_resp["actionable_date"]).to be_nil
end
context 'when the miniumum notice has been past' do
let(:subscription) do
create :subscription, :with_line_item, actionable_date: Date.current, user: user
end
it "returns the record pending cancellation", :aggregate_failures do
post solidus_subscriptions.cancel_api_v1_subscription_path(subscription), params: { token: user.spree_api_key }
expect(json_resp["state"]).to eq "pending_cancellation"
end
end
end
describe "#skip" do
let(:subscription) { create :subscription, :with_line_item, actionable_date: 1.day.from_now, user: user }
before { Timecop.freeze(Date.parse("2016-09-26")) }
after { Timecop.return }
let(:expected_date) { "2016-10-27T00:00:00.000Z" }
it "returns the updated record", :aggregate_failures do
post solidus_subscriptions.skip_api_v1_subscription_path(subscription), params: { token: user.spree_api_key }
expect(json_resp["actionable_date"]).to eq expected_date
end
end
end
| 37.568182 | 119 | 0.716273 |
e21f4c631e295f1549437bb3a17a39d5390bd5aa | 323 | GimmeABreak::Application.routes.draw do
resources :users, only: [:show]
match 'auth/:provider/callback', to: 'sessions#create', as: 'callback', via: [:get, :post]
get 'auth/failure', to: "sessions#failure"
get 'signout', to: 'sessions#destroy', as: 'signout', via: [:delete]
root to: "application#home"
end
| 32.3 | 92 | 0.671827 |
f74c9d1ef2691f146bb1d2b121b8d28075a86583 | 170 | class CreateBlorghTags < ActiveRecord::Migration
def change
create_table :blorgh_tags do |t|
t.string :name
t.timestamps null: false
end
end
end
| 17 | 48 | 0.688235 |
b99787b0b981b3b17e72e6cf9ab2dd304700c514 | 140 | # Sample code from Programing Ruby, page 645
require 'dbm'
DBM.open("/etc/aliases", nil) do |dbm|
p dbm.keys
p dbm["postfix\000"]
end
| 15.555556 | 44 | 0.678571 |
ffd4c6db5dc4856267d194a2b8b88eb132fcf1c7 | 1,950 | module SexyScopes
module ActiveRecord
module QueryMethods
# Adds support for blocks to ActiveRecord `where`.
#
# @example
# User.where { username =~ 'bob%' }
# # is equivalent to:
# User.where(User.username =~ 'bob%')
#
# The block is evaluated in the context of the current relation, and the resulting expression
# is used as an argument to `where`, thus allowing a cleaner syntax where you don't have to write
# the receiver of the method explicitely, in this case: `username` vs `User.username`
#
# This form can also be used with relations:
#
# @example
# post.comments.where { rating > 5 }
# # is equivalent to:
# post.comments.where(Comment.rating > 5)
#
# @raise [ArgumentError] if both arguments and a block are passed
#
# @see WhereChainMethods#not
#
def where(*args, &block)
if block
super(sexy_scopes_build_conditions_from_block(args, block))
else
super
end
end
protected
def sexy_scopes_build_conditions_from_block(args, block)
raise ArgumentError, "You can't use both arguments and a block" if args.any?
if block.arity.zero?
instance_eval(&block)
else
block.call(self)
end
end
module WhereChainMethods
# Adds support for blocks to ActiveRecord `where.not`.
#
# @example
# User.where.not { username =~ 'bob%' }
#
# @raise [ArgumentError] if both arguments and a block are passed
#
# @see QueryMethods#where
#
def not(*args, &block)
if block
conditions = @scope.send(:sexy_scopes_build_conditions_from_block, args, block)
@scope.where(conditions.not)
else
super
end
end
end
end
end
end
| 29.104478 | 103 | 0.578462 |
bf275e8e7f1e9f32ff8eb19c99ea13ff84c4bd5f | 88 | # desc "Explaining what the task does"
# task :active_api do
# # Task goes here
# end
| 17.6 | 38 | 0.681818 |
e2ec4bad1d49be8502f7193f52f431badb7ff3b8 | 395 | class Uwucat < Formula
desc "A cat clone that translates to uwutext"
homepage "https://github.com/mckernant1/uwucat"
url "https://github.com/mckernant1/uwucat/archive/0.0.1.tar.gz"
sha256 "2d49473c9c1fca4465e2a61ea3e65df0ad15b5e4bca0b87d6c01b02e8babfa0d"
depends_on "rust" => :build
def install
system "cargo", "install", "--locked", "--root", prefix, "--path", "."
end
end
| 28.214286 | 75 | 0.716456 |
035f99af44aef7e1788dc8e458dd56a8d12c1a07 | 298 | class AddSkippableToAssessments < ActiveRecord::Migration
def change
add_column :course_assessments, :skippable, :boolean, default: false
# Set all autograded worksheet assessments to skippable
Course::Assessment.where(mode: 0, autograded: true).update_all(skippable: true)
end
end
| 37.25 | 83 | 0.778523 |
26ca248d23853ce996b2ba441d514f3f076f1414 | 325 | require 'ostruct'
module Rhouse::Models
class EventCategory < ActiveRecord::Base
set_table_name 'EventCategory'
set_primary_key "PK_#{Device.table_name}"
# relationships...
belongs_to :parent,
:foreign_key => "FK_EventCategory",
:class_name => "Rhouse::Models::EventCategory"
end
end | 25 | 54 | 0.689231 |
393615d43c7d7b8501cc55a3ebcd824434b898ed | 534 | require 'rails_helper'
RSpec.describe Book, type: :model do
it { should validate_presence_of(:name) }
describe '#author' do
context 'when books belonging to different authors exist' do
let(:author) { create(:author) }
let(:other_author) { create(:author) }
let(:books) { create_list(:book, 3, author: author) }
let(:other_books) { create_list(:book, 3, author: other_author) }
it 'returns books by author' do
expect(Book.authored_by(author.id)).to eq books
end
end
end
end
| 28.105263 | 71 | 0.657303 |
26a350f5a754f6fa25412ea9c333cd34d69f180f | 2,080 | require "fisk"
class TenderJIT
class ExitCode
attr_reader :stats_addr, :exit_stats_addr, :jit_buffer
def initialize jit_buffer, stats_addr, exit_stats_addr
@jit_buffer = jit_buffer
@stats_addr = stats_addr
@exit_stats_addr = exit_stats_addr
end
def make_exit exit_insn_name, exit_pc, stack_depth
fisk = Fisk.new
stats_addr = fisk.imm64(self.stats_addr)
exit_stats_addr = fisk.imm64(self.exit_stats_addr)
__ = fisk
__.with_register do |tmp|
# increment the exits counter
__.mov(tmp, stats_addr)
.inc(__.m64(tmp, Stats.offsetof("exits")))
offset = ExitStats.offsetof(exit_insn_name)
raise "Unknown exit name #{exit_insn_name}" unless offset
# increment the instruction specific counter
__.mov(tmp, exit_stats_addr)
.inc(__.m64(tmp, ExitStats.offsetof(exit_insn_name)))
# Flush the SP
__.lea(tmp, __.m(REG_BP, stack_depth * Fiddle::SIZEOF_VOIDP))
.mov(__.m64(REG_CFP, RbControlFrameStruct.offsetof("sp")), tmp)
# Set the PC on the CFP
__.mov(tmp, __.uimm(exit_pc))
.mov(__.m64(REG_CFP, RbControlFrameStruct.offsetof("pc")), tmp)
if $DEBUG
print_str __, "EXITING! #{exit_insn_name}\n"
end
__.mov(__.rsp, REG_TOP)
__.mov(__.rax, __.uimm(Qundef))
.ret
end
__.assign_registers(ISEQCompiler::SCRATCH_REGISTERS, local: true)
jump_location = @jit_buffer.memory.to_i + @jit_buffer.pos
fisk.write_to(@jit_buffer)
jump_location
end
def print_str fisk, string
fisk.jmp(fisk.label(:after_bytes))
pos = nil
fisk.lazy { |x| pos = x; string.bytes.each { |b| jit_buffer.putc b } }
fisk.put_label(:after_bytes)
fisk.mov fisk.rdi, fisk.uimm(2)
fisk.lazy { |x|
fisk.mov fisk.rsi, fisk.uimm(jit_buffer.memory + pos)
}
fisk.mov fisk.rdx, fisk.uimm(string.bytesize)
fisk.mov fisk.rax, fisk.uimm(0x02000004)
fisk.syscall
end
end
end
| 29.714286 | 76 | 0.634615 |
ff14502bb5f157d2384d053fe4a6a79ad1abdd75 | 92 | module Cms
class Progression < ApplicationRecord
include Model::Progression
end
end
| 15.333333 | 39 | 0.771739 |
28fd0f236a5a28a7bc5cd6e6ebae228bb41f8721 | 5,532 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe Boards::Lists::CreateService do
describe '#execute' do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
let_it_be(:board, refind: true) { create(:board, project: project) }
let_it_be(:user) { create(:user) }
context 'when assignee_id param is sent' do
let_it_be(:other_user) { create(:user) }
before_all do
project.add_developer(user)
project.add_developer(other_user)
end
subject(:service) { described_class.new(project, user, 'assignee_id' => other_user.id) }
before do
stub_licensed_features(board_assignee_lists: true)
end
it 'creates a new assignee list' do
response = service.execute(board)
expect(response.success?).to eq(true)
expect(response.payload[:list].list_type).to eq('assignee')
end
end
context 'when milestone_id param is sent' do
let_it_be(:milestone) { create(:milestone, project: project) }
before_all do
project.add_developer(user)
end
subject(:service) { described_class.new(project, user, 'milestone_id' => milestone.id) }
before do
stub_licensed_features(board_milestone_lists: true)
end
it 'creates a milestone list when param is valid' do
response = service.execute(board)
expect(response.success?).to eq(true)
expect(response.payload[:list].list_type).to eq('milestone')
end
end
context 'when iteration_id param is sent' do
let_it_be(:iteration) { create(:iteration, group: group) }
before_all do
group.add_developer(user)
end
subject(:service) { described_class.new(project, user, 'iteration_id' => iteration.id) }
before do
stub_licensed_features(board_iteration_lists: true)
end
it 'creates an iteration list when param is valid' do
response = service.execute(board)
expect(response.success?).to eq(true)
expect(response.payload[:list].list_type).to eq('iteration')
end
context 'when iteration is from another group' do
let_it_be(:iteration) { create(:iteration) }
it 'returns an error' do
response = service.execute(board)
expect(response.success?).to eq(false)
expect(response.errors).to include('Iteration not found')
end
end
it 'returns an error when feature flag is disabled' do
stub_feature_flags(iteration_board_lists: false)
response = service.execute(board)
expect(response.success?).to eq(false)
expect(response.errors).to include('iteration_board_lists feature flag is disabled')
end
it 'returns an error when license is unavailable' do
stub_licensed_features(board_iteration_lists: false)
response = service.execute(board)
expect(response.success?).to eq(false)
expect(response.errors).to include('Iteration lists not available with your current license')
end
end
context 'max limits' do
describe '#create_list_attributes' do
shared_examples 'attribute provider for list creation' do
before do
stub_feature_flags(wip_limits: wip_limits_enabled)
end
where(:params, :expected_max_issue_count, :expected_max_issue_weight, :expected_limit_metric) do
[
[{ max_issue_count: 0 }, 0, 0, nil],
[{ max_issue_count: nil }, 0, 0, nil],
[{ max_issue_count: 1 }, 1, 0, nil],
[{ max_issue_weight: 0 }, 0, 0, nil],
[{ max_issue_weight: nil }, 0, 0, nil],
[{ max_issue_weight: 1 }, 0, 1, nil],
[{ max_issue_count: 1, max_issue_weight: 0 }, 1, 0, nil],
[{ max_issue_count: 0, max_issue_weight: 1 }, 0, 1, nil],
[{ max_issue_count: 1, max_issue_weight: 1 }, 1, 1, nil],
[{ max_issue_count: nil, max_issue_weight: 1 }, 0, 1, nil],
[{ max_issue_count: 1, max_issue_weight: nil }, 1, 0, nil],
[{ max_issue_count: nil, max_issue_weight: nil }, 0, 0, nil],
[{ limit_metric: 'all_metrics' }, 0, 0, 'all_metrics'],
[{ limit_metric: 'issue_count' }, 0, 0, 'issue_count'],
[{ limit_metric: 'issue_weights' }, 0, 0, 'issue_weights'],
[{ limit_metric: '' }, 0, 0, ''],
[{ limit_metric: nil }, 0, 0, nil]
]
end
with_them do
it 'contains the expected max limits' do
service = described_class.new(project, user, params)
attrs = service.send(:create_list_attributes, nil, nil, nil)
if wip_limits_enabled
expect(attrs).to include(max_issue_count: expected_max_issue_count,
max_issue_weight: expected_max_issue_weight,
limit_metric: expected_limit_metric)
else
expect(attrs).not_to include(max_issue_count: 0, max_issue_weight: 0, limit_metric: nil)
end
end
end
end
it_behaves_like 'attribute provider for list creation' do
let(:wip_limits_enabled) { true }
end
it_behaves_like 'attribute provider for list creation' do
let(:wip_limits_enabled) { false }
end
end
end
end
end
| 33.125749 | 106 | 0.606471 |
08449e111423b30efeb26b0ea9de14311df819e2 | 859 | require File.expand_path('../lib/em/warden/client/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["mpage"]
gem.email = ["[email protected]"]
gem.description = "EM/Fiber compatible client for Warden"
gem.summary = "Provides EventMachine compatible code for talking with Warden"
gem.homepage = "http://www.cloudfoundry.com"
gem.files = Dir.glob("**/*")
gem.test_files = Dir.glob("spec/**/*")
gem.name = "em-warden-client"
gem.require_paths = ["lib"]
gem.version = EventMachine::Warden::Client::VERSION
gem.add_dependency('eventmachine')
gem.add_dependency('warden-protocol', '>= 0.0.9')
# Only needed for backwards API compatibility.
gem.add_dependency('warden-client')
gem.add_development_dependency('rake')
gem.add_development_dependency('rspec')
end
| 34.36 | 85 | 0.672875 |
ac7672d1d2c4e0a2fe3b3c5c44b0d205eca03bce | 404 | class SessionController < ApplicationController
def create
user = User.find_by email:params[:email]
if user.present? && user.authenticate(params[:password])
session[:user_id]=user.id
redirect_to root_path
else flash[:error] = 'Invalid email or password'
redirect_to login_path
end
end
def destroy
session[:user_id]=nil
redirect_to login_path
end
end
| 22.444444 | 60 | 0.700495 |
08fae977a64d9caea26def942f2aa2994130e84e | 3,860 | module Rubinius
class ConfigurationVariables
def self.define
obj = new
yield obj.root
@instance = obj
end
def self.instance
@instance
end
def initialize
@root = Section.new(self, nil)
@variables = []
end
attr_reader :root, :variables
def write_vm_variables(io)
@variables.each do |v|
if decl = v.declaration
io.puts decl
end
end
io.puts "Configuration() :"
all = @variables.map { |v| v.initializer }.compact
io.puts all.join(",\n")
io.puts "{"
@variables.each do |v|
if des = v.setup
io.puts des
end
end
io.puts "}"
end
def show_help(io)
max = @variables.map { |v| v.name.size }.max
@variables.each do |v|
width = v.name.size
io.puts "#{' ' * (max - width)}#{v.name}: #{v.description}"
if s = v.value_info
io.puts "#{' ' * max} #{s}"
end
end
end
class Variable
def initialize(name, vm=true)
@name = name
@default = nil
@type = nil
@vm = vm
@description = nil
@options = nil
if vm
@vm_name = name.gsub(".","_")
else
@vm_name = nil
end
end
attr_reader :name
attr_accessor :default, :type, :description, :vm_name, :options
def value_info
if @type == "config::Radio"
possible = @options[:possible]
default = @options[:default]
"default: #{default}, possible: #{possible.map { |x| x[0] }.join(", ")}"
elsif @default
"default: #{@default}"
else
nil
end
end
def declaration
return nil unless @vm
raise "No type set for #{@name}" unless @type
raise "No vm name set for #{@name}" unless @vm_name
"#{@type} #{@vm_name};"
end
def initializer
return nil unless @vm
if @default
"#{@vm_name}(this, \"#{@name}\", #{@default.inspect})"
else
"#{@vm_name}(this, \"#{@name}\")"
end
end
def setup
return nil unless @vm
str = "#{@vm_name}.set_description(#{@description.inspect});"
if @type == "config::Radio"
possible = @options[:possible]
unless possible
raise "Radio type requires the :possible key"
end
default = @options[:default] || possible.first
possible.each do |k,v|
if k == default
str << "\n#{@vm_name}.add(#{k.inspect}, #{v.inspect}, true);"
else
str << "\n#{@vm_name}.add(#{k.inspect}, #{v.inspect});"
end
end
end
str
end
end
class Section
def initialize(config, prefix)
@config = config
@prefix = prefix
end
def section(name)
s = Section.new @config, full_name(name)
yield s
end
def full_name(name)
return name unless @prefix
"#{@prefix}.#{name}"
end
def vm_variable(name, default, options=nil)
var = Variable.new full_name(name)
case default
when Fixnum
var.default = default
var.type = "config::Integer"
when :integer
var.type = "config::Integer"
when String
var.default = default
var.type = "config::String"
when :string
var.type = "config::String"
when true, false
var.default = default
var.type = "config::Bool"
when :bool
var.type = "config::Bool"
when Array
var.default = default
var.type = "config::Radio"
when :radio
var.type = "config::Radio"
end
case options
when String
var.description = options
when Hash
var.options = options
var.description = options[:description]
var.vm_name = options[:as] if options[:as]
end
@config.variables << var
end
end
end
end
| 20 | 80 | 0.538083 |
5de63ca5d69e65c1c4d7b9ddb2b5c575eaadbf76 | 1,177 | require "language/node"
class Typescript < Formula
desc "Language for application scale JavaScript development"
homepage "http://typescriptlang.org/"
url "https://registry.npmjs.org/typescript/-/typescript-2.1.5.tgz"
sha256 "ce5532a3bc58cfe756a7f7299d82588de80db13774751d6be6a48f8447d2caf7"
head "https://github.com/Microsoft/TypeScript.git"
bottle do
cellar :any_skip_relocation
sha256 "84ad2d1e73d2d4c8ba9af3b4b9737d98ba4b13a1297c3abf3c262bb239c5907f" => :sierra
sha256 "374a0e8adce7a370f294657b154b7df86e108787db1e6d07d3568d51dc5ac672" => :el_capitan
sha256 "59e66ec04ff2490454f79a70127d9642c7e8dcece8b68eac4217c35ef29d88b3" => :yosemite
end
depends_on "node"
def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
(testpath/"test.ts").write <<-EOS.undent
class Test {
greet() {
return "Hello, world!";
}
};
var test = new Test();
document.body.innerHTML = test.greet();
EOS
system bin/"tsc", "test.ts"
assert File.exist?("test.js"), "test.js was not generated"
end
end
| 30.179487 | 92 | 0.715378 |
39dfa5eccb77b93a14d41233c68330b022f76a15 | 204 | name 'build_cookbook'
maintainer 'Bryan L. Gay'
maintainer_email '[email protected]'
license 'all_rights'
version '0.1.0'
chef_version '>= 12.14' if respond_to?(:chef_version)
depends 'delivery-truck'
| 22.666667 | 53 | 0.769608 |
6118a2aff4c12ea6a6257afcb4fb34a755093e4a | 433 | class CreateJobRetries < ActiveRecord::Migration[5.0]
def change
create_table :job_retries, options: 'ENGINE=InnoDB ROW_FORMAT=dynamic DEFAULT CHARSET=utf8mb4' do |t|
t.string :message_id, null: false
t.integer :job_execution_id, null: false
t.integer :status, null: false, default: 0
t.datetime :finished_at
t.timestamps
end
add_index :job_retries, [:message_id], unique: true
end
end
| 30.928571 | 105 | 0.706697 |
5d49201c9bfa6f0d1fcc34ca3e2d3c644908c300 | 292 | module Faker
class DumbAndDumber < Base
class << self
def actor
fetch('dumb_and_dumber.actors')
end
def character
fetch('dumb_and_dumber.characters')
end
def quote
fetch('dumb_and_dumber.quotes')
end
end
end
end
| 16.222222 | 43 | 0.582192 |
1a1774b2eac4b217765fcf96bdb414d7c107dd90 | 3,415 | require 'spec_helper'
describe Wongi::Engine::Network do
let( :engine ) { Wongi::Engine.create }
subject { engine }
it 'should assert facts' do
subject << [1,2,3]
expect( subject.select( :_, 2, :_) ).to have(1).item
end
it 'should retract facts' do
subject << [1,2,3]
subject.retract [1,2,3]
expect( subject.select( :_, 2, :_) ).to be_empty
end
it 'asserted facts end up in productions' do
prod = subject << rule { forall { has :X, 2, :Z } }
subject << [1,2,3]
expect( prod ).to have(1).tokens
end
it 'retracted facts are removed from productions' do
prod = subject << rule { forall { has :X, 2, :Z } }
subject << [1,2,3]
subject.retract [1,2,3]
expect( prod ).to have(0).tokens
end
it 'retracted facts should trigger deactivation' do
activated_z = nil
deactivated_z = nil
prod = subject << rule {
forall { has :X, 2, :Z }
make {
action activate: ->(token) { activated_z = token[:Z] },
deactivate: ->(token) { deactivated_z = token[:Z] }
}
}
subject << [1,2,3]
expect( activated_z ).to be == 3
subject.retract [1,2,3]
expect( deactivated_z ).to be == 3
end
it 'retracted facts should propagate through join chains' do
deactivated = nil
prod = engine << rule {
forall {
has :X, :is, :Y
has :Y, :is, :Z
}
make {
action deactivate: ->(token) { deactivated = token }
}
}
engine << [1, :is, 2]
engine << [2, :is, 3]
expect( prod ).to have(1).tokens
engine.retract [1, :is, 2]
expect( prod ).to have(0).tokens
expect( deactivated[:X] ).to be == 1
expect( deactivated[:Y] ).to be == 2
expect( deactivated[:Z] ).to be == 3
end
it 'retraction should reactivate neg nodes' do
prod = engine << rule { forall { neg 1, 2, 3} }
expect( prod ).to have(1).tokens
engine << [1, 2 ,3]
expect( prod ).to have(0).tokens
engine.retract [1, 2, 3]
expect( prod ).to have(1).tokens
end
describe 'retraction with neg nodes lower in the chain' do
def expect_tokens n
expect( prod ).to have(n).tokens
end
before :each do
engine << rule('retract') {
forall {
has :x, :u, :Y
neg :Y, :w, :_
}
}
end
let( :prod ) { engine.productions['retract'] }
specify 'case 1' do
engine << [:x, :u, :y]
expect_tokens 1
engine << [:y, :w, :z]
expect_tokens 0
engine.retract [:y, :w, :z]
expect_tokens 1
engine.retract [:x, :u, :y]
expect_tokens 0
end
specify 'case 2' do
engine << [:x, :u, :y]
expect_tokens 1
engine << [:y, :w, :z]
expect_tokens 0
engine.retract [:x, :u, :y]
expect_tokens 0
engine.retract [:y, :w, :z]
expect_tokens 0
end
specify 'case 3' do
engine << [:y, :w, :z]
expect_tokens 0
engine << [:x, :u, :y]
expect_tokens 0
engine.retract [:x, :u, :y]
expect_tokens 0
engine.retract [:y, :w, :z]
expect_tokens 0
end
specify 'case 4' do
engine << [:y, :w, :z]
expect_tokens 0
engine << [:x, :u, :y]
expect_tokens 0
engine.retract [:y, :w, :z]
expect_tokens 1
engine.retract [:x, :u, :y]
expect_tokens 0
end
end
end
| 18.661202 | 66 | 0.536164 |
edcfd055ec849f06b4a4eecc168b8f485620d97f | 410 | class UpdateAFewColumnDefaults < ActiveRecord::Migration[5.2]
def change
change_column_default(:firmware_configs, :encoder_enabled_x, from: 1, to: 0)
change_column_default(:firmware_configs, :encoder_enabled_y, from: 1, to: 0)
change_column_default(:firmware_configs, :encoder_enabled_z, from: 1, to: 0)
change_column_default(:web_app_configs, :show_spread, from: false, to: true)
end
end
| 45.555556 | 81 | 0.768293 |
334613ce929467b1d610eb3eb8073aada270a9f6 | 6,020 | #!/opt/puppetlabs/puppet/bin/ruby
require 'json'
require 'puppet'
require 'openssl'
def create_events_v1beta1_namespaced_event(*args)
header_params = {}
params=args[0][1..-1].split(',')
arg_hash={}
params.each { |param|
mapValues= param.split(':',2)
if mapValues[1].include?(';')
mapValues[1].gsub! ';',','
end
arg_hash[mapValues[0][1..-2]]=mapValues[1][1..-2]
}
# Remove task name from arguments - should contain all necessary parameters for URI
arg_hash.delete('_task')
operation_verb = 'Post'
query_params, body_params, path_params = format_params(arg_hash)
uri_string = "#{arg_hash['kube_api']}/apis/events.k8s.io/v1beta1/namespaces/%{namespace}/events" % path_params
if query_params
uri_string = uri_string + '?' + to_query(query_params)
end
header_params['Content-Type'] = 'application/json' # first of #{parent_consumes}
if arg_hash['token']
header_params['Authentication'] = 'Bearer ' + arg_hash['token']
end
uri = URI(uri_string)
verify_mode= OpenSSL::SSL::VERIFY_NONE
if arg_hash['ca_file']
verify_mode=OpenSSL::SSL::VERIFY_PEER
end
Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https', verify_mode: verify_mode, ca_file: arg_hash['ca_file']) do |http|
if operation_verb == 'Get'
req = Net::HTTP::Get.new(uri)
elsif operation_verb == 'Put'
req = Net::HTTP::Put.new(uri)
elsif operation_verb == 'Delete'
req = Net::HTTP::Delete.new(uri)
elsif operation_verb == 'Post'
req = Net::HTTP::Post.new(uri)
end
header_params.each { |x, v| req[x] = v } unless header_params.empty?
unless body_params.empty?
if body_params.key?('file_content')
req.body = body_params['file_content']
else
req.body = body_params.to_json
end
end
Puppet.debug("URI is (#{operation_verb}) #{uri} headers are #{header_params}")
response = http.request req # Net::HTTPResponse object
Puppet.debug("response code is #{response.code} and body is #{response.body}")
success = response.is_a? Net::HTTPSuccess
Puppet.debug("Called (#{operation_verb}) endpoint at #{uri}, success was #{success}")
response
end
end
def to_query(hash)
if hash
return_value = hash.map { |x, v| "#{x}=#{v}" }.reduce { |x, v| "#{x}&#{v}" }
if !return_value.nil?
return return_value
end
end
return ''
end
def op_param(name, inquery, paramalias, namesnake)
{ :name => name, :location => inquery, :paramalias => paramalias, :namesnake => namesnake }
end
def format_params(key_values)
query_params = {}
body_params = {}
path_params = {}
key_values.each { | key, value |
if value.include?("=>")
Puppet.debug("Running hash from string on #{value}")
value.gsub!("=>",":")
value.gsub!("'","\"")
key_values[key] = JSON.parse(value)
Puppet.debug("Obtained hash #{key_values[key].inspect}")
end
}
if key_values.key?('body')
if File.file?(key_values['body'])
if key_values['body'].include?('json')
body_params['file_content'] = File.read(key_values['body'])
else
body_params['file_content'] =JSON.pretty_generate(YAML.load_file(key_values['body']))
end
end
end
op_params = [
op_param('action', 'body', 'action', 'action'),
op_param('apiversion', 'body', 'api_version', 'apiversion'),
op_param('body', 'body', 'body', 'body'),
op_param('deprecatedcount', 'body', 'deprecated_count', 'deprecatedcount'),
op_param('deprecatedfirsttimestamp', 'body', 'deprecated_first_timestamp', 'deprecatedfirsttimestamp'),
op_param('deprecatedlasttimestamp', 'body', 'deprecated_last_timestamp', 'deprecatedlasttimestamp'),
op_param('deprecatedsource', 'body', 'deprecated_source', 'deprecatedsource'),
op_param('dryRun', 'query', 'dry_run', 'dry_run'),
op_param('eventtime', 'body', 'event_time', 'eventtime'),
op_param('fieldManager', 'query', 'field_manager', 'field_manager'),
op_param('kind', 'body', 'kind', 'kind'),
op_param('metadata', 'body', 'metadata', 'metadata'),
op_param('namespace', 'path', 'namespace', 'namespace'),
op_param('note', 'body', 'note', 'note'),
op_param('pretty', 'query', 'pretty', 'pretty'),
op_param('reason', 'body', 'reason', 'reason'),
op_param('regarding', 'body', 'regarding', 'regarding'),
op_param('related', 'body', 'related', 'related'),
op_param('reportingcontroller', 'body', 'reporting_controller', 'reportingcontroller'),
op_param('reportinginstance', 'body', 'reporting_instance', 'reportinginstance'),
op_param('series', 'body', 'series', 'series'),
op_param('type', 'body', 'type', 'type'),
]
op_params.each do |i|
location = i[:location]
name = i[:name]
paramalias = i[:paramalias]
name_snake = i[:namesnake]
if location == 'query'
query_params[name] = key_values[name_snake] unless key_values[name_snake].nil?
query_params[name] = ENV["azure__#{name_snake}"] unless ENV["<no value>_#{name_snake}"].nil?
elsif location == 'body'
body_params[name] = key_values[name_snake] unless key_values[name_snake].nil?
body_params[name] = ENV["azure_#{name_snake}"] unless ENV["<no value>_#{name_snake}"].nil?
else
path_params[name_snake.to_sym] = key_values[name_snake] unless key_values[name_snake].nil?
path_params[name_snake.to_sym] = ENV["azure__#{name_snake}"] unless ENV["<no value>_#{name_snake}"].nil?
end
end
return query_params,body_params,path_params
end
def task
# Get operation parameters from an input JSON
params = STDIN.read
result = create_events_v1beta1_namespaced_event(params)
if result.is_a? Net::HTTPSuccess
puts result.body
else
raise result.body
end
rescue StandardError => e
result = {}
result[:_error] = {
msg: e.message,
kind: 'puppetlabs-kubernetes/error',
details: { class: e.class.to_s },
}
puts result
exit 1
end
task | 33.444444 | 135 | 0.654651 |
1acb8e558f1f87b4afce4011ac86fd2d1ef90a1c | 18,646 | require 'spec_helper'
describe OracleConnection, :oracle_integration do
let(:data_source) { OracleIntegration.real_data_source }
let(:database_name) { data_source.db_name }
let(:account) { OracleIntegration.real_account }
let(:exception_class) { OracleConnection::DatabaseError }
let(:options) { { :logger => Rails.logger } }
let(:connection) { OracleConnection.new(data_source, account, options) }
let(:db_url) { connection.db_url }
let(:db_options) { connection.db_options }
let(:db) { Sequel.connect(db_url, db_options) }
before do
stub.proxy(Sequel).connect.with_any_args
end
it_should_behave_like "a data source connection" do
let(:empty_set_sql) { "SELECT 1 FROM dual where 1=2" }
let(:sql) { "SELECT 1 as col1 FROM dual" }
let(:sql_with_parameter) { "SELECT :param as col1 FROM dual" }
end
describe "#connect!" do
it "should connect" do
mock.proxy(Sequel).connect(db_url, hash_including(:test => true))
connection.connect!
connection.connected?.should be_true
end
context "when oracle is not configured" do
before do
stub(ChorusConfig.instance).oracle_configured? { false }
end
it "raises an error" do
expect {
connection.connect!
}.to raise_error(DataSourceConnection::DriverNotConfigured) { |error|
error.data_source.should == 'Oracle'
}
end
end
end
describe "#schemas" do
let(:schema_blacklist) {
["OBE", "SCOTT", "DIP", "ORACLE_OCM", "XS$NULL", "MDDATA", "SPATIAL_WFS_ADMIN_USR", "SPATIAL_CSW_ADMIN_USR", "IX", "SH", "PM", "BI", "DEMO", "HR1", "OE1", "XDBPM", "XDBEXT", "XFILES", "APEX_PUBLIC_USER", "TIMESTEN", "CACHEADM", "PLS", "TTHR", "APEX_REST_PUBLIC_USER", "APEX_LISTENER", "OE", "HR", "HR_TRIG", "PHPDEMO", "APPQOSSYS", "WMSYS", "OWBSYS_AUDIT", "OWBSYS", "SYSMAN", "EXFSYS", "CTXSYS", "XDB", "ANONYMOUS", "OLAPSYS", "APEX_040200", "ORDSYS", "ORDDATA", "ORDPLUGINS", "FLOWS_FILES", "SI_INFORMTN_SCHEMA", "MDSYS", "DBSNMP", "OUTLN", "MGMT_VIEW", "SYSTEM", "SYS"]
}
let(:schema_list_sql) {
blacklist = schema_blacklist.join("', '")
<<-SQL
SELECT DISTINCT OWNER as name
FROM ALL_OBJECTS
WHERE OBJECT_TYPE IN ('TABLE', 'VIEW') AND OWNER NOT IN ('#{blacklist}')
SQL
}
let(:expected) { db.fetch(schema_list_sql).all.collect { |row| row[:name] } }
let(:subject) { connection.schemas }
it_should_behave_like "a well-behaved database query"
end
describe "#schema_exists?" do
let(:schema_name) { OracleIntegration.schema_name }
let(:subject) { connection.schema_exists?(schema_name) }
let(:expected) { true }
it_should_behave_like "a well-behaved database query"
context "when the schema doesn't exist" do
let(:schema_name) { "does_not_exist" }
it 'returns false' do
connection.schema_exists?(schema_name).should be_false
end
end
end
describe "#set_timeout" do
let (:statement) { Object.new }
it "calls setQueryTimeout on statement" do
mock(statement).set_query_timeout(123)
connection.set_timeout(123, statement)
end
end
describe '#version' do
let(:subject) { connection.version }
let(:expected) { /11\.2\.0.*/ }
let(:use_match_matcher) { true }
it_should_behave_like 'a well-behaved database query'
end
describe "#stream_sql" do
let(:sql) { "SELECT * from \"#{OracleIntegration.schema_name}\".NEWTABLE" }
let(:subject) {
connection.stream_sql(sql) { true }
}
let(:expected) { true }
it_behaves_like "a well-behaved database query"
it "streams all rows of the results" do
bucket = []
connection.stream_sql(sql) { |row| bucket << row }
bucket.length.should == 10
bucket.each_with_index do |row, index|
index = index + 1
row.should == {:ID => index.to_s, :ROWNAME => "row_#{index}"}
end
end
it 'stores the statement through the cancelable_query' do
cancelable_query = Object.new
mock(cancelable_query).store_statement.with_any_args
connection.stream_sql(sql, {}, cancelable_query) {}
end
context "when a limit is provided" do
it "only processes part of the results" do
bucket = []
connection.stream_sql(sql, {:limit => 1}) { |row| bucket << row }
bucket.should == [{:ID => "1", :ROWNAME => "row_1"}]
end
end
end
describe "#prepare_and_execute_statement" do
let(:sql) { "SELECT * from \"#{OracleIntegration.schema_name}\".NEWTABLE" }
context "when a timeout is specified" do
let(:execute_options) { {:timeout => 1} }
let(:too_many_rows) { 2500 }
let(:sql) do
sql = <<-SQL
INSERT INTO "#{OracleIntegration.schema_name}".BIG_TABLE
SQL
sql + (1..too_many_rows).map do |count|
<<-SQL
(SELECT #{count} FROM "#{OracleIntegration.schema_name}".BIG_TABLE)
SQL
end.join(" UNION ")
end
# TODO: New oracle box seems to be too fast to get this to timeout consistently
#around do |example|
# connection.execute(<<-SQL) rescue nil
# CREATE TABLE "#{OracleIntegration.schema_name}".BIG_TABLE
# (COLUMN1 NUMBER)
# SQL
#
# connection.execute <<-SQL
# INSERT INTO "#{OracleIntegration.schema_name}".BIG_TABLE VALUES (0)
# SQL
#
# example.run
#
# connection.execute <<-SQL
# DROP TABLE "#{OracleIntegration.schema_name}".BIG_TABLE
# SQL
#end
#
#it "should raise a timeout error (which is 'requested cancel' on oracle)" do
# expect do
# connection.prepare_and_execute_statement sql, execute_options
# end.to raise_error(DataSourceConnection::QueryError, /requested cancel/)
#end
end
it 'stores the statement through the cancelable_query' do
cancelable_query = Object.new
mock(cancelable_query).store_statement.with_any_args
connection.prepare_and_execute_statement(sql, {}, cancelable_query)
end
end
describe "methods within a schema" do
let(:schema_name) { OracleIntegration.schema_name }
let(:connection) { OracleConnection.new(data_source, account, options.merge(:schema => schema_name)) }
describe "#datasets" do
let(:dataset_list_sql) {
<<-SQL
SELECT * FROM (
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}'
UNION
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}'
)
ORDER BY name
SQL
}
let(:expected) { db.fetch(dataset_list_sql).all }
let(:subject) { connection.datasets }
it_should_behave_like "a well-behaved database query"
context "when a limit is passed" do
let(:dataset_list_sql) {
<<-SQL
SELECT * FROM (
SELECT * FROM (
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}'
UNION
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}'
)
ORDER BY name
)
WHERE rownum <= 2
SQL
}
let(:expected) { db.fetch(dataset_list_sql).all }
let(:subject) { connection.datasets(:limit => 2) }
it_should_behave_like "a well-behaved database query"
end
context "when a name filter is passed" do
let(:subject) { connection.datasets(:name_filter => name_filter) }
context "and the filter does not contain LIKE wildcards" do
let(:name_filter) {'nEWer'}
let(:dataset_list_sql) {
<<-SQL
SELECT * FROM (
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(TABLE_NAME, 'EWer', 'i')
UNION
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(VIEW_NAME, 'EWer', 'i'))
ORDER BY name
SQL
}
let(:expected) { db.fetch(dataset_list_sql).all }
it_should_behave_like "a well-behaved database query"
end
context "and the filter contains LIKE wildcards" do
let(:name_filter) {'_T'}
it "only returns datasets which contain '_T' in their names (it should not use _ as a wildcard)" do
subject.length.should > 0
subject.each { |dataset| dataset[:name].should match /_T/i }
end
end
end
context "when showing only tables" do
let(:dataset_list_sql) {
<<-SQL
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}'
ORDER BY name
SQL
}
let(:expected) { db.fetch(dataset_list_sql).all }
let(:subject) { connection.datasets(:tables_only => true) }
it_should_behave_like "a well-behaved database query"
end
context "when multiple options are passed" do
let(:dataset_list_sql) {
<<-SQL
SELECT * FROM (
SELECT * FROM (
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(TABLE_NAME, 'EWer', 'i')
UNION
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(VIEW_NAME, 'EWer', 'i')
)
ORDER BY name
)
WHERE rownum <= 1
SQL
}
let(:expected) { db.fetch(dataset_list_sql).all }
let(:subject) { connection.datasets(:name_filter => 'nEWer', :limit => 1) }
it_should_behave_like "a well-behaved database query"
end
end
describe "#datasets_count" do
let(:connection) { OracleConnection.new(data_source, account, options.merge(:schema => schema_name)) }
let(:schema_name) { OracleIntegration.schema_name }
let(:dataset_list_sql) {
<<-SQL
SELECT count(*) FROM (
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}'
UNION
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}'
)
SQL
}
let(:expected) { db.fetch(dataset_list_sql).single_value }
let(:subject) { connection.datasets_count }
it_should_behave_like "a well-behaved database query"
context "when a name filter is passed" do
let(:dataset_list_sql) {
<<-SQL
SELECT count(*) FROM (
SELECT 't' as type, TABLE_NAME AS name FROM ALL_TABLES WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(TABLE_NAME, 'EWer', 'i')
UNION
SELECT 'v' as type, VIEW_NAME AS name FROM ALL_VIEWS WHERE OWNER = '#{schema_name}' AND REGEXP_LIKE(VIEW_NAME, 'EWer', 'i')
)
SQL
}
let(:expected) { db.fetch(dataset_list_sql).single_value }
let(:subject) { connection.datasets_count(:name_filter => 'nEWer') }
it_should_behave_like "a well-behaved database query"
end
context "when showing only tables" do
let(:dataset_list_sql) {
<<-SQL
SELECT count(*) FROM ALL_TABLES WHERE OWNER = '#{schema_name}'
SQL
}
let(:expected) { db.fetch(dataset_list_sql).single_value }
let(:subject) { connection.datasets_count(:tables_only => true) }
it_should_behave_like "a well-behaved database query"
end
end
describe "#metadata_for_dataset" do
let(:schema_name) { OracleIntegration.schema_name }
let(:expected) { {:column_count => 2} }
let(:subject) { connection.metadata_for_dataset('TWO_COLUMN_TABLE') }
it_should_behave_like "a well-behaved database query"
end
describe "#table_exists?" do
let(:subject) { connection.table_exists?(table_name) }
let(:expected) { true }
context 'when the table exists' do
context 'with an all caps table name' do
let(:table_name) { 'NEWTABLE' }
it_should_behave_like 'a well-behaved database query'
end
context 'with a lower case table name' do
let(:table_name) { 'lowercase_table' }
it_should_behave_like 'a well-behaved database query'
end
end
context "when the table doesn't exist" do
let(:table_name) { "MISSING_TABLE" }
let(:expected) { false }
it_should_behave_like "a well-behaved database query"
end
context "when the table name given is nil" do
let(:table_name) { nil }
let(:expected) { false }
it_should_behave_like "a well-behaved database query"
end
end
describe "#view_exists?" do
let(:subject) { connection.view_exists?(view_name) }
context 'when the view exists' do
let(:expected) { true }
context 'with an all caps view name' do
let(:view_name) { 'NEWVIEW' }
it_behaves_like 'a well-behaved database query'
end
context 'with a lowercase view name' do
let(:view_name) { 'lowercase_view' }
it_behaves_like 'a well-behaved database query'
end
end
context "when the view doesn't exist" do
let(:view_name) { "MISSING_VIEW" }
let(:expected) { false }
it_behaves_like 'a well-behaved database query'
end
context "when the view name given is nil" do
let(:view_name) { nil }
let(:expected) { false }
it_behaves_like 'a well-behaved database query'
end
end
describe "#column_info" do
let(:table_name) { "NEWERTABLE" }
let(:columns_sql) do
<<-SQL
SELECT COLUMN_NAME as attname, DATA_TYPE as format_type, COLUMN_ID as attnum
FROM ALL_TAB_COLUMNS
WHERE TABLE_NAME = :table AND OWNER = :schema
ORDER BY attnum
SQL
end
let(:expected) do
db.fetch(columns_sql, :schema => schema_name, :table => table_name).all
end
let(:subject) { connection.column_info(table_name, 'ignored setup sql to be consistent with other datasource connections') }
it_should_behave_like "a well-behaved database query"
end
describe "primary_key_columns" do
context "with a primary key" do
let(:expected) { %w(COLUMN2 COLUMN1) }
let(:subject) { connection.primary_key_columns('WITH_COMPOSITE_KEY') }
it_should_behave_like "a well-behaved database query"
end
context "without a primary key" do
let(:expected) { [] }
let(:subject) { connection.primary_key_columns('NEWTABLE') }
it_should_behave_like "a well-behaved database query"
end
end
end
describe "OracleConnection::DatabaseError" do
let(:sequel_exception) {
exception = Exception.new
wrapped_exception = Object.new
stub(exception).wrapped_exception { wrapped_exception }
stub(exception).message { "A message" }
exception
}
let(:error) do
OracleConnection::DatabaseError.new(sequel_exception)
end
describe "error_type" do
context "when the wrapped error has an error code" do
before do
stub(sequel_exception.wrapped_exception).get_error_code { error_code }
end
context "when the error code is 12514" do
let(:error_code) { 12514 }
it "returns :DATABASE_MISSING" do
error.error_type.should == :DATABASE_MISSING
end
end
context "when the error code is 1017" do
let(:error_code) { 1017 }
it "returns :INVALID_PASSWORD" do
error.error_type.should == :INVALID_PASSWORD
end
end
context "when the error code is 17002" do
let(:error_code) { 17002 }
it "returns :DATA_SOURCE_UNREACHABLE" do
error.error_type.should == :DATA_SOURCE_UNREACHABLE
end
end
end
context "when the wrapped error has no sql state error code" do
it "returns :GENERIC" do
error.error_type.should == :GENERIC
end
end
end
describe "sanitizing exception messages" do
let(:error) { OracleConnection::DatabaseError.new(StandardError.new(message)) }
context "when the error as username and password" do
let(:message) do
"foo jdbc:oracle:thin:system/oracle@//chorus-oracle:8888/orcl and stuff"
end
it "replaces them with x'es" do
error.message.should == "foo jdbc:oracle:thin:xxxx/xxxx@//chorus-oracle:8888/orcl and stuff"
end
end
context "when Java::JavaSql:: starts the message" do
let(:message) { "Java::JavaSql::SOMETHING TERRIBLE HAPPENED!" }
it "removes it from the message" do
error.message.should == "SOMETHING TERRIBLE HAPPENED!"
end
end
end
end
context "when the user doesn't have permission to access some object in the database" do
let(:db) { Sequel.connect(db_url, db_options) }
let(:schema_name) { OracleIntegration.schema_name }
let(:restricted_user) { "user_with_no_access" }
let(:restricted_password) { "secret" }
before do
db.execute("CREATE USER #{restricted_user} IDENTIFIED BY #{restricted_password}") rescue nil
db.execute("GRANT CREATE SESSION TO #{restricted_user}")
account.db_username = restricted_user
account.db_password = restricted_password
end
after do
connection.disconnect
db.execute("DROP USER #{restricted_user}")
db.disconnect
end
it "does not flag the account as invalid_credentials when they access an object for which they don't have permission" do
connection.connect!
expect { connection.execute("SELECT * FROM #{schema_name}.NEWTABLE") }.to raise_error
account.invalid_credentials.should be_false
end
end
context "when the user has a crazy password" do
let(:db) { Sequel.connect(db_url, db_options) }
let(:user) { "user_with_crazy_password" }
let(:password) { '!@#$%^&*()' }
before do
db.execute("CREATE USER #{user} IDENTIFIED BY \"#{password}\"")
db.execute("GRANT CREATE SESSION TO #{user}")
account.db_username = user
account.db_password = password
end
after do
connection.disconnect
db.execute("DROP USER #{user}")
db.disconnect
end
it "can connect successfully" do
expect { connection.connect! }.not_to raise_error
end
end
end | 32.769772 | 578 | 0.624584 |
612d59a407dd2df4466d0a141eb114c848f659d6 | 3,142 | # encoding: utf-8
require 'spec_helper'
describe 'password input' do
include FormtasticSpecHelper
before do
@output_buffer = ''
mock_everything
concat(semantic_form_for(@new_post) do |builder|
concat(builder.input(:title, :as => :password))
end)
end
it_should_have_bootstrap_horizontal_wrapping
it_should_have_input_wrapper_with_class(:password)
it_should_have_input_wrapper_with_class(:input)
it_should_have_input_wrapper_with_class(:stringish)
it_should_have_input_wrapper_with_id("post_title_input")
it_should_have_label_with_text(/Title/)
it_should_have_label_for("post_title")
it_should_have_input_with_id("post_title")
it_should_have_input_with_type(:password)
it_should_have_input_with_name("post[title]")
it_should_have_maxlength_matching_column_limit
it_should_use_default_text_field_size_when_not_nil(:string)
it_should_not_use_default_text_field_size_when_nil(:string)
it_should_apply_custom_input_attributes_when_input_html_provided(:string)
it_should_apply_custom_for_to_label_when_input_html_id_provided(:string)
it_should_apply_error_logic_for_input_type(:password)
describe "when no object is provided" do
before do
concat(semantic_form_for(:project, :url => 'http://test.host/') do |builder|
concat(builder.input(:title, :as => :password))
end)
end
it_should_have_label_with_text(/Title/)
it_should_have_label_for("project_title")
it_should_have_input_with_id("project_title")
it_should_have_input_with_type(:password)
it_should_have_input_with_name("project[title]")
end
describe "when namespace is provided" do
before do
concat(semantic_form_for(@new_post, :namespace => "context2") do |builder|
concat(builder.input(:title, :as => :password))
end)
end
it_should_have_input_wrapper_with_id("context2_post_title_input")
it_should_have_label_and_input_with_id("context2_post_title")
end
describe "when index is provided" do
before do
@output_buffer = ''
mock_everything
concat(semantic_form_for(@new_post) do |builder|
concat(builder.fields_for(:author, :index => 3) do |author|
concat(author.input(:name, :as => :password))
end)
end)
end
it 'should index the id of the control-group' do
output_buffer.should have_tag("div.control-group#post_author_attributes_3_name_input")
end
it 'should index the id of the select tag' do
output_buffer.should have_tag("input#post_author_attributes_3_name")
end
it 'should index the name of the select tag' do
output_buffer.should have_tag("input[@name='post[author_attributes][3][name]']")
end
end
describe "when required" do
it "should add the required attribute to the input's html options" do
with_config :use_required_attribute, true do
concat(semantic_form_for(@new_post) do |builder|
concat(builder.input(:title, :as => :password, :required => true))
end)
output_buffer.should have_tag("input[@required]")
end
end
end
end
| 31.108911 | 92 | 0.735519 |
4a601edda50f093b0147301e364f97164d3fdf0f | 51 | class RequestFromUnknownDomain < StandardError
end
| 17 | 46 | 0.882353 |
87fcd8d66eba5d33027eafd50e622a32e2544635 | 3,500 | require 'net/http'
class PageIndexer
attr_accessor :page
def initialize(page)
@page = page
@repository_service = RepositoryService.new(nil)
end
def generate_solr_doc(issue_doc)
full_text = get_full_text(@page.page_identifier, @page.text_link)
solr_doc = {
id: @page.page_identifier, # "#{issue_doc[:volume_identifier]}-#{volume_sequence}",
page_number_t:@page.page_number,
issue_sequence: @page.issue_sequence,
volume_sequence: @page.volume_sequence,
page_identifier: @page.page_identifier,
issue_identifier: issue_doc[:issue_identifier],
page_label: @page.page_label,
text_link: @page.text_link,
image_link: @page.image_link,
coordinates_link: @page.coordinates_link,
page_text:full_text,
image_height_ti: @page.height,
image_width_ti: @page.width,
prev_page_link: nil,
next_page_link: nil,
next_page_sequence_label: nil,
prev_page_sequence_label: nil,
next_page_label: nil,
prev_page_label: nil
}
[ :date_issued_display,
:issue_number_t,
:variant_sequence,
:date_issued_dt,
:issue_id_t,
:issue_vol_iss_display,
:date_issued_yyyy_ti,
:date_issued_yyyymm_ti,
:date_issued_yyyymmdd_ti,
:date_issued_yyyy10_ti,
:date_issued_mm_ti,
:date_issued_dd_ti,
:date_issued_link,
:volume_identifier,
:publication_link,
:publication_label
].each do |key|
solr_doc[key] = issue_doc[key]
end
current_index = issue_doc[:pages].index { |v| v[0] == @page.id }
unless current_index - 1 < 0
solr_doc[:prev_page_link] = issue_doc[:pages][current_index - 1][1]
solr_doc[:prev_page_sequence_label] = issue_doc[:pages][current_index - 1][2]
solr_doc[:prev_page_label] = issue_doc[:pages][current_index - 1][3]
end
if current_index + 1 <= ( issue_doc[:pages].size - 1 )
solr_doc[:next_page_link] = issue_doc[:pages][current_index + 1][1]
solr_doc[:next_page_sequence_label] = issue_doc[:pages][current_index + 1][2]
solr_doc[:next_page_label] = issue_doc[:pages][current_index + 1][3]
end
solr_doc
end
def index(issue_doc)
solr_doc = generate_solr_doc(issue_doc)
conn = Blacklight.default_index.connection
conn.add solr_doc
end
def get_full_text(page_identifier, text_link)
return "" unless text_link
if ENV['USE_FILESYSTEM']
# this is the text_link - bhl_midaily:mdp.39015071730621-00000003:TXT00000003
resource_filename = @repository_service.dlxs_filename(text_link)
response = Zlib::GzipReader.open(resource_filename) { |f| f.read }
else
# HTTP request
resource_url = @repository_service.dlxs_file_url(text_link)
resource_uri = URI.parse(resource_url)
http = Net::HTTP.new(resource_uri.host, resource_uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(resource_uri.request_uri)
response = http.request(request)
# response = Net::HTTP.request_get(resource_uri)
unless response.is_a?(Net::HTTPSuccess)
# STDERR.puts "#{resource_uri} : #{response.code}"
response = ""
else
# STDERR.puts ":: #{response.body.encoding} :: #{response.type_params}"
response = response.body.force_encoding('UTF-8') # .encode('UTF-8', invalid: :replace, undef: :replace)
# STDERR.puts ":: >> #{response.encoding}"
end
end
response
end
end | 30.973451 | 111 | 0.674286 |
389fa1d9af47bb5666aa5c0359bdc990ccd90021 | 3,701 | VERSION = "1.0.2"
class Board
attr_accessor :board, :turn_counter, :winner
def initialize
@board = [[" ", " ", " "],[" ", " ", " "],[" ", " ", " "]]
@turn_counter = 0
@winner = 0
end
def print_board
puts " A B C"
puts "1 #{@board[0][0]} | #{@board[1][0]} | #{@board[2][0]}"
puts " --+---+--"
puts "2 #{@board[0][1]} | #{@board[1][1]} | #{@board[2][1]}"
puts " --+---+--"
puts "3 #{@board[0][2]} | #{@board[1][2]} | #{@board[2][2]}"
end
def status
for i in (0..2) do
if @board[i][0] == @board[i][1] && @board[i][0] == @board[i][2] && @board[i][0] != " "
return @board[i][0]
elsif @board[0][i] == @board[1][i] && @board[0][i] == @board[2][i] && @board[0][i] != " "
return @board[0][i]
end
end
if @board[0][0] == @board[1][1] && @board[0][0] == @board[2][2] && @board[0][0] != " "
return @board[0][0]
elsif @board[2][0] == @board[1][1] && @board[2][0] == @board[0][2] && @board[2][0] != " "
return @board[2][0]
end
if @board.count(" ") == 9
return 'Nobody'
end
return false
end
private
def spin_board
new_board = [[@board[2][0],@board[2][1],@board[2][2]],[@board[1][0],@board[1][1],@board[1][2]],[@board[0][0],@board[0][1],@board[0][2]]]
@board = new_board
end
end
def welcome
100.times { puts "" }
puts "TIC-TAC-TOE v#{VERSION}"
puts "by CSTAICH"
puts "======================"
$game = Array.new
end
def menu
puts "Enter command ( new_game :: score )"
input = gets.chomp.downcase
case input
when "new_game"
$game << Board.new
play_game
when "score"
x_score = 0
o_score = 0
$game.each do |x|
if x.winner == 'X'; x_score += 1
elsif x.winner == 'O'; o_score += 1
end
end
puts ""
puts "Current score is X:#{x_score} to O:#{o_score}."
puts ""
return
else
puts "unknown command"
end
end
def play_game
$game[-2] != nil && $game[-2].status == 'X' ? turn = 'O' : turn = 'X'
while $game.last.status == false && $game.last.turn_counter != 9
puts ""
$game.last.print_board
puts "#{turn}'s turn. Enter input in form: A1"
input = gets.downcase.split(//)
case input[0]
when "a"; col = 0
when "b"; col = 1
when "c"; col = 2
end
row = input[1].to_i - 1
if $game.last.board[col][row] == " "
$game.last.board[col][row] = turn
if turn == 'X'
turn = 'O'
else
turn = 'X'
end
$game.last.turn_counter += 1
else
puts ""
puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
puts "You can't go there, that space is taken."
puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
end
end
if $game.last.status == false
winner = "Nobody"
else
winner = $game.last.status
$game.last.winner = winner
end
10.times { puts "" }
3.times { puts "= = = = = = = = = =" }
puts "Game Over! #{winner} wins!"
3.times { puts "= = = = = = = = = =" }
3.times { puts "" }
$game.last.print_board
5.times { puts "" }
end
welcome
while true do
menu
end
$game << Board.new
$game.last.print_board
$game.last.status
| 27.414815 | 145 | 0.415023 |
e93385d2663cb75a0ebcbac2eca04f0eb72bc0c8 | 457 | class CreateInstChapters < ActiveRecord::Migration[5.1]
def change
create_table :inst_chapters do |t|
t.integer "inst_book_id", null: false
t.string "name", limit: 100, null: false
t.string "short_display_name", limit: 45
t.integer "position", null: true
t.integer "lms_chapter_id"
t.integer "lms_assignment_group_id"
t.timestamps
end
end
end
| 30.466667 | 67 | 0.588621 |
28d9edc09475acce49671946a2b0b0e3aecea000 | 1,202 | require_dependency "idp_app/application_controller"
module IdpApp
class SamlIdpController < SamlIdp::IdpController
def idp_authenticate(email, password)
email
end
def idp_make_saml_response(email)
encode_SAMLResponse(email, attributes_provider: attributes_provider(email))
end
protected
def attributes_provider(email)
%Q{
<saml:AttributeStatement>
<saml:Attribute Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue>#{email}</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="firstName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue>Perry</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="lastName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue>Elselvier</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue>my-group</saml:AttributeValue>
<saml:AttributeValue>another-group</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
}
end
end
end
| 31.631579 | 98 | 0.746256 |
bb90f96821b43974392b4beaf87319d5ec26a10e | 1,171 |
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "blazer/version"
Gem::Specification.new do |spec|
spec.name = "sql-jarvis"
spec.version = Blazer::VERSION
spec.authors = ["ThanhKhoaIT"]
spec.email = ["[email protected]"]
spec.summary = "Fork from ankane! Explore your data with SQL. Easily create charts and dashboards, and share them with your team."
spec.homepage = "https://github.com/ThanhKhoaIT/blazer"
spec.license = "MIT"
spec.author = "Andrew Kane"
spec.email = "[email protected]"
spec.files = Dir["*.{md,txt}", "{app,config,lib}/**/*"]
spec.require_path = "lib"
spec.required_ruby_version = ">= 2.3"
spec.add_dependency "railties", ">= 4.2"
spec.add_dependency "activerecord", ">= 4.2"
spec.add_dependency "haml-rails"
spec.add_dependency "zip-zip"
spec.add_dependency "axlsx"
spec.add_dependency "axlsx_rails"
spec.add_dependency "chartkick"
spec.add_dependency "safely_block", ">= 0.1.1"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
end
| 33.457143 | 138 | 0.672075 |
d52bad245232481760890b9d083c61d31daad5c3 | 1,006 | class Mg < Formula
desc "Small Emacs-like editor"
homepage "http://homepage.boetes.org/software/mg/"
url "http://homepage.boetes.org/software/mg/mg-20131118.tar.gz"
sha256 "b99fe10cb8473e035ff43bf3fbf94a24035e4ebb89484d48e5b33075d22d79f3"
depends_on "clens"
def install
# makefile hardcodes include path to clens; since it's a
# nonstandard path, Homebrew's standard include paths won't
# fix this for people with nonstandard prefixes.
# Note mg also has a Makefile; but MacOS make uses GNUmakefile
inreplace "GNUmakefile", "$(includedir)/clens", "#{Formula["clens"].opt_include}/clens"
system "make"
bin.install "mg"
doc.install "tutorial"
man1.install "mg.1"
end
test do
(testpath/"command.sh").write <<-EOS.undent
#!/usr/bin/expect -f
set timeout -1
spawn #{bin}/mg
match_max 100000
send -- "\u0018\u0003"
expect eof
EOS
chmod 0755, testpath/"command.sh"
system testpath/"command.sh"
end
end
| 27.944444 | 91 | 0.683897 |
62181cf02d426f1e8123365827e7d7d3bf0b5a16 | 117 | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'data_href_highlight'
require 'minitest/autorun'
| 23.4 | 58 | 0.769231 |
ab3c12762ecbbad281ff726205720999de6de711 | 579 | # frozen_string_literal: true
set :application, "nucore"
set :eye_config, "config/eye.yml.erb"
set :eye_env, -> { { rails_env: fetch(:rails_env) } }
set :repo_url, "[email protected]:tablexi/nucore-open.git"
set :rollbar_env, Proc.new { fetch :rails_env }
set :rollbar_role, Proc.new { :app }
set :rollbar_token, ENV["ROLLBAR_ACCESS_TOKEN"]
set :linked_files, fetch(:linked_files, []).concat(
%w(config/database.yml config/secrets.yml),
)
set :linked_dirs, fetch(:linked_dirs, []).concat(
%w(bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/files),
)
| 34.058824 | 86 | 0.73057 |
e96b55b238a56292e7f304d982b706e9ad1ed5eb | 1,349 | class Abnfgen < Formula
desc "Quickly generate random documents that match an ABFN grammar"
homepage "http://www.quut.com/abnfgen/"
url "http://www.quut.com/abnfgen/abnfgen-0.20.tar.gz"
sha256 "73ce23ab8f95d649ab9402632af977e11666c825b3020eb8c7d03fa4ca3e7514"
livecheck do
url :homepage
regex(%r{href=.*?/abnfgen[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
bottle do
sha256 cellar: :any_skip_relocation, catalina: "c1531bab58a352221fca0cc5b73db2d9f206e1b98272ff06a90d72aa9e991925"
sha256 cellar: :any_skip_relocation, mojave: "b553651b5500f66d10a369f4d8862ed9c6d2b39d395c43e372b346b4c7bfead0"
sha256 cellar: :any_skip_relocation, high_sierra: "3a62e72bec09b9bfff637710db366f713abc95de45437aeadbfa87a87dfc040c"
sha256 cellar: :any_skip_relocation, sierra: "0d69f39473838a8e46fb02009329e05be6eeaed579ff5533a09cbbecd8d46a2d"
sha256 cellar: :any_skip_relocation, el_capitan: "fd51cb760ed8afb8a9e3dd5d05c8efa832361b238ad95410fb2864c91c081825"
end
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
system "make", "install"
end
test do
(testpath/"grammar").write 'ring = 1*12("ding" SP) "dong" CRLF'
system "#{bin}/abnfgen", (testpath/"grammar")
end
end
| 42.15625 | 120 | 0.722758 |
b9dc60341a4b128a7e1d30f50340996b8e4d97f3 | 452 | describe 'failing consumers', integration: true do
before(:context) { $consumer = FailingConsumer }
it 'report failures and sends to DLQ in the end' do
expect_nsq_topic_count $consumer.full_dlq_topic_name, 0
Tiki::Torch.publish $consumer.topic, 'failure'
$lines.wait_for_size 3
expect($lines.all).to eq %w{ failed:1:requeued failed:2:requeued failed:3:dead }
expect_nsq_topic_count $consumer.full_dlq_topic_name, 1
end
end
| 34.769231 | 84 | 0.745575 |
abbee7765e2641249579e08f2780f1527b2ab233 | 178,612 | # frozen_string_literal: true
# WARNING ABOUT GENERATED CODE
#
# This file is generated. See the contributing guide for more information:
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
module Aws::DatabaseMigrationService
# @api private
module ClientApi
include Seahorse::Model
AccessDeniedFault = Shapes::StructureShape.new(name: 'AccessDeniedFault')
AccountQuota = Shapes::StructureShape.new(name: 'AccountQuota')
AccountQuotaList = Shapes::ListShape.new(name: 'AccountQuotaList')
AddTagsToResourceMessage = Shapes::StructureShape.new(name: 'AddTagsToResourceMessage')
AddTagsToResourceResponse = Shapes::StructureShape.new(name: 'AddTagsToResourceResponse')
ApplyPendingMaintenanceActionMessage = Shapes::StructureShape.new(name: 'ApplyPendingMaintenanceActionMessage')
ApplyPendingMaintenanceActionResponse = Shapes::StructureShape.new(name: 'ApplyPendingMaintenanceActionResponse')
AuthMechanismValue = Shapes::StringShape.new(name: 'AuthMechanismValue')
AuthTypeValue = Shapes::StringShape.new(name: 'AuthTypeValue')
AvailabilityZone = Shapes::StructureShape.new(name: 'AvailabilityZone')
AvailabilityZonesList = Shapes::ListShape.new(name: 'AvailabilityZonesList')
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
BooleanOptional = Shapes::BooleanShape.new(name: 'BooleanOptional')
CancelReplicationTaskAssessmentRunMessage = Shapes::StructureShape.new(name: 'CancelReplicationTaskAssessmentRunMessage')
CancelReplicationTaskAssessmentRunResponse = Shapes::StructureShape.new(name: 'CancelReplicationTaskAssessmentRunResponse')
Certificate = Shapes::StructureShape.new(name: 'Certificate')
CertificateList = Shapes::ListShape.new(name: 'CertificateList')
CertificateWallet = Shapes::BlobShape.new(name: 'CertificateWallet')
CharLengthSemantics = Shapes::StringShape.new(name: 'CharLengthSemantics')
CompressionTypeValue = Shapes::StringShape.new(name: 'CompressionTypeValue')
Connection = Shapes::StructureShape.new(name: 'Connection')
ConnectionList = Shapes::ListShape.new(name: 'ConnectionList')
CreateEndpointMessage = Shapes::StructureShape.new(name: 'CreateEndpointMessage')
CreateEndpointResponse = Shapes::StructureShape.new(name: 'CreateEndpointResponse')
CreateEventSubscriptionMessage = Shapes::StructureShape.new(name: 'CreateEventSubscriptionMessage')
CreateEventSubscriptionResponse = Shapes::StructureShape.new(name: 'CreateEventSubscriptionResponse')
CreateReplicationInstanceMessage = Shapes::StructureShape.new(name: 'CreateReplicationInstanceMessage')
CreateReplicationInstanceResponse = Shapes::StructureShape.new(name: 'CreateReplicationInstanceResponse')
CreateReplicationSubnetGroupMessage = Shapes::StructureShape.new(name: 'CreateReplicationSubnetGroupMessage')
CreateReplicationSubnetGroupResponse = Shapes::StructureShape.new(name: 'CreateReplicationSubnetGroupResponse')
CreateReplicationTaskMessage = Shapes::StructureShape.new(name: 'CreateReplicationTaskMessage')
CreateReplicationTaskResponse = Shapes::StructureShape.new(name: 'CreateReplicationTaskResponse')
DataFormatValue = Shapes::StringShape.new(name: 'DataFormatValue')
DatePartitionDelimiterValue = Shapes::StringShape.new(name: 'DatePartitionDelimiterValue')
DatePartitionSequenceValue = Shapes::StringShape.new(name: 'DatePartitionSequenceValue')
DeleteCertificateMessage = Shapes::StructureShape.new(name: 'DeleteCertificateMessage')
DeleteCertificateResponse = Shapes::StructureShape.new(name: 'DeleteCertificateResponse')
DeleteConnectionMessage = Shapes::StructureShape.new(name: 'DeleteConnectionMessage')
DeleteConnectionResponse = Shapes::StructureShape.new(name: 'DeleteConnectionResponse')
DeleteEndpointMessage = Shapes::StructureShape.new(name: 'DeleteEndpointMessage')
DeleteEndpointResponse = Shapes::StructureShape.new(name: 'DeleteEndpointResponse')
DeleteEventSubscriptionMessage = Shapes::StructureShape.new(name: 'DeleteEventSubscriptionMessage')
DeleteEventSubscriptionResponse = Shapes::StructureShape.new(name: 'DeleteEventSubscriptionResponse')
DeleteReplicationInstanceMessage = Shapes::StructureShape.new(name: 'DeleteReplicationInstanceMessage')
DeleteReplicationInstanceResponse = Shapes::StructureShape.new(name: 'DeleteReplicationInstanceResponse')
DeleteReplicationSubnetGroupMessage = Shapes::StructureShape.new(name: 'DeleteReplicationSubnetGroupMessage')
DeleteReplicationSubnetGroupResponse = Shapes::StructureShape.new(name: 'DeleteReplicationSubnetGroupResponse')
DeleteReplicationTaskAssessmentRunMessage = Shapes::StructureShape.new(name: 'DeleteReplicationTaskAssessmentRunMessage')
DeleteReplicationTaskAssessmentRunResponse = Shapes::StructureShape.new(name: 'DeleteReplicationTaskAssessmentRunResponse')
DeleteReplicationTaskMessage = Shapes::StructureShape.new(name: 'DeleteReplicationTaskMessage')
DeleteReplicationTaskResponse = Shapes::StructureShape.new(name: 'DeleteReplicationTaskResponse')
DescribeAccountAttributesMessage = Shapes::StructureShape.new(name: 'DescribeAccountAttributesMessage')
DescribeAccountAttributesResponse = Shapes::StructureShape.new(name: 'DescribeAccountAttributesResponse')
DescribeApplicableIndividualAssessmentsMessage = Shapes::StructureShape.new(name: 'DescribeApplicableIndividualAssessmentsMessage')
DescribeApplicableIndividualAssessmentsResponse = Shapes::StructureShape.new(name: 'DescribeApplicableIndividualAssessmentsResponse')
DescribeCertificatesMessage = Shapes::StructureShape.new(name: 'DescribeCertificatesMessage')
DescribeCertificatesResponse = Shapes::StructureShape.new(name: 'DescribeCertificatesResponse')
DescribeConnectionsMessage = Shapes::StructureShape.new(name: 'DescribeConnectionsMessage')
DescribeConnectionsResponse = Shapes::StructureShape.new(name: 'DescribeConnectionsResponse')
DescribeEndpointTypesMessage = Shapes::StructureShape.new(name: 'DescribeEndpointTypesMessage')
DescribeEndpointTypesResponse = Shapes::StructureShape.new(name: 'DescribeEndpointTypesResponse')
DescribeEndpointsMessage = Shapes::StructureShape.new(name: 'DescribeEndpointsMessage')
DescribeEndpointsResponse = Shapes::StructureShape.new(name: 'DescribeEndpointsResponse')
DescribeEventCategoriesMessage = Shapes::StructureShape.new(name: 'DescribeEventCategoriesMessage')
DescribeEventCategoriesResponse = Shapes::StructureShape.new(name: 'DescribeEventCategoriesResponse')
DescribeEventSubscriptionsMessage = Shapes::StructureShape.new(name: 'DescribeEventSubscriptionsMessage')
DescribeEventSubscriptionsResponse = Shapes::StructureShape.new(name: 'DescribeEventSubscriptionsResponse')
DescribeEventsMessage = Shapes::StructureShape.new(name: 'DescribeEventsMessage')
DescribeEventsResponse = Shapes::StructureShape.new(name: 'DescribeEventsResponse')
DescribeOrderableReplicationInstancesMessage = Shapes::StructureShape.new(name: 'DescribeOrderableReplicationInstancesMessage')
DescribeOrderableReplicationInstancesResponse = Shapes::StructureShape.new(name: 'DescribeOrderableReplicationInstancesResponse')
DescribePendingMaintenanceActionsMessage = Shapes::StructureShape.new(name: 'DescribePendingMaintenanceActionsMessage')
DescribePendingMaintenanceActionsResponse = Shapes::StructureShape.new(name: 'DescribePendingMaintenanceActionsResponse')
DescribeRefreshSchemasStatusMessage = Shapes::StructureShape.new(name: 'DescribeRefreshSchemasStatusMessage')
DescribeRefreshSchemasStatusResponse = Shapes::StructureShape.new(name: 'DescribeRefreshSchemasStatusResponse')
DescribeReplicationInstanceTaskLogsMessage = Shapes::StructureShape.new(name: 'DescribeReplicationInstanceTaskLogsMessage')
DescribeReplicationInstanceTaskLogsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationInstanceTaskLogsResponse')
DescribeReplicationInstancesMessage = Shapes::StructureShape.new(name: 'DescribeReplicationInstancesMessage')
DescribeReplicationInstancesResponse = Shapes::StructureShape.new(name: 'DescribeReplicationInstancesResponse')
DescribeReplicationSubnetGroupsMessage = Shapes::StructureShape.new(name: 'DescribeReplicationSubnetGroupsMessage')
DescribeReplicationSubnetGroupsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationSubnetGroupsResponse')
DescribeReplicationTaskAssessmentResultsMessage = Shapes::StructureShape.new(name: 'DescribeReplicationTaskAssessmentResultsMessage')
DescribeReplicationTaskAssessmentResultsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationTaskAssessmentResultsResponse')
DescribeReplicationTaskAssessmentRunsMessage = Shapes::StructureShape.new(name: 'DescribeReplicationTaskAssessmentRunsMessage')
DescribeReplicationTaskAssessmentRunsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationTaskAssessmentRunsResponse')
DescribeReplicationTaskIndividualAssessmentsMessage = Shapes::StructureShape.new(name: 'DescribeReplicationTaskIndividualAssessmentsMessage')
DescribeReplicationTaskIndividualAssessmentsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationTaskIndividualAssessmentsResponse')
DescribeReplicationTasksMessage = Shapes::StructureShape.new(name: 'DescribeReplicationTasksMessage')
DescribeReplicationTasksResponse = Shapes::StructureShape.new(name: 'DescribeReplicationTasksResponse')
DescribeSchemasMessage = Shapes::StructureShape.new(name: 'DescribeSchemasMessage')
DescribeSchemasResponse = Shapes::StructureShape.new(name: 'DescribeSchemasResponse')
DescribeTableStatisticsMessage = Shapes::StructureShape.new(name: 'DescribeTableStatisticsMessage')
DescribeTableStatisticsResponse = Shapes::StructureShape.new(name: 'DescribeTableStatisticsResponse')
DmsSslModeValue = Shapes::StringShape.new(name: 'DmsSslModeValue')
DmsTransferSettings = Shapes::StructureShape.new(name: 'DmsTransferSettings')
DocDbSettings = Shapes::StructureShape.new(name: 'DocDbSettings')
DynamoDbSettings = Shapes::StructureShape.new(name: 'DynamoDbSettings')
ElasticsearchSettings = Shapes::StructureShape.new(name: 'ElasticsearchSettings')
EncodingTypeValue = Shapes::StringShape.new(name: 'EncodingTypeValue')
EncryptionModeValue = Shapes::StringShape.new(name: 'EncryptionModeValue')
Endpoint = Shapes::StructureShape.new(name: 'Endpoint')
EndpointList = Shapes::ListShape.new(name: 'EndpointList')
Event = Shapes::StructureShape.new(name: 'Event')
EventCategoriesList = Shapes::ListShape.new(name: 'EventCategoriesList')
EventCategoryGroup = Shapes::StructureShape.new(name: 'EventCategoryGroup')
EventCategoryGroupList = Shapes::ListShape.new(name: 'EventCategoryGroupList')
EventList = Shapes::ListShape.new(name: 'EventList')
EventSubscription = Shapes::StructureShape.new(name: 'EventSubscription')
EventSubscriptionsList = Shapes::ListShape.new(name: 'EventSubscriptionsList')
ExceptionMessage = Shapes::StringShape.new(name: 'ExceptionMessage')
ExcludeTestList = Shapes::ListShape.new(name: 'ExcludeTestList')
Filter = Shapes::StructureShape.new(name: 'Filter')
FilterList = Shapes::ListShape.new(name: 'FilterList')
FilterValueList = Shapes::ListShape.new(name: 'FilterValueList')
IBMDb2Settings = Shapes::StructureShape.new(name: 'IBMDb2Settings')
ImportCertificateMessage = Shapes::StructureShape.new(name: 'ImportCertificateMessage')
ImportCertificateResponse = Shapes::StructureShape.new(name: 'ImportCertificateResponse')
IncludeTestList = Shapes::ListShape.new(name: 'IncludeTestList')
IndividualAssessmentNameList = Shapes::ListShape.new(name: 'IndividualAssessmentNameList')
InsufficientResourceCapacityFault = Shapes::StructureShape.new(name: 'InsufficientResourceCapacityFault')
Integer = Shapes::IntegerShape.new(name: 'Integer')
IntegerOptional = Shapes::IntegerShape.new(name: 'IntegerOptional')
InvalidCertificateFault = Shapes::StructureShape.new(name: 'InvalidCertificateFault')
InvalidResourceStateFault = Shapes::StructureShape.new(name: 'InvalidResourceStateFault')
InvalidSubnet = Shapes::StructureShape.new(name: 'InvalidSubnet')
KMSAccessDeniedFault = Shapes::StructureShape.new(name: 'KMSAccessDeniedFault')
KMSDisabledFault = Shapes::StructureShape.new(name: 'KMSDisabledFault')
KMSFault = Shapes::StructureShape.new(name: 'KMSFault')
KMSInvalidStateFault = Shapes::StructureShape.new(name: 'KMSInvalidStateFault')
KMSKeyNotAccessibleFault = Shapes::StructureShape.new(name: 'KMSKeyNotAccessibleFault')
KMSNotFoundFault = Shapes::StructureShape.new(name: 'KMSNotFoundFault')
KMSThrottlingFault = Shapes::StructureShape.new(name: 'KMSThrottlingFault')
KafkaSettings = Shapes::StructureShape.new(name: 'KafkaSettings')
KeyList = Shapes::ListShape.new(name: 'KeyList')
KinesisSettings = Shapes::StructureShape.new(name: 'KinesisSettings')
ListTagsForResourceMessage = Shapes::StructureShape.new(name: 'ListTagsForResourceMessage')
ListTagsForResourceResponse = Shapes::StructureShape.new(name: 'ListTagsForResourceResponse')
Long = Shapes::IntegerShape.new(name: 'Long')
MessageFormatValue = Shapes::StringShape.new(name: 'MessageFormatValue')
MicrosoftSQLServerSettings = Shapes::StructureShape.new(name: 'MicrosoftSQLServerSettings')
MigrationTypeValue = Shapes::StringShape.new(name: 'MigrationTypeValue')
ModifyEndpointMessage = Shapes::StructureShape.new(name: 'ModifyEndpointMessage')
ModifyEndpointResponse = Shapes::StructureShape.new(name: 'ModifyEndpointResponse')
ModifyEventSubscriptionMessage = Shapes::StructureShape.new(name: 'ModifyEventSubscriptionMessage')
ModifyEventSubscriptionResponse = Shapes::StructureShape.new(name: 'ModifyEventSubscriptionResponse')
ModifyReplicationInstanceMessage = Shapes::StructureShape.new(name: 'ModifyReplicationInstanceMessage')
ModifyReplicationInstanceResponse = Shapes::StructureShape.new(name: 'ModifyReplicationInstanceResponse')
ModifyReplicationSubnetGroupMessage = Shapes::StructureShape.new(name: 'ModifyReplicationSubnetGroupMessage')
ModifyReplicationSubnetGroupResponse = Shapes::StructureShape.new(name: 'ModifyReplicationSubnetGroupResponse')
ModifyReplicationTaskMessage = Shapes::StructureShape.new(name: 'ModifyReplicationTaskMessage')
ModifyReplicationTaskResponse = Shapes::StructureShape.new(name: 'ModifyReplicationTaskResponse')
MongoDbSettings = Shapes::StructureShape.new(name: 'MongoDbSettings')
MoveReplicationTaskMessage = Shapes::StructureShape.new(name: 'MoveReplicationTaskMessage')
MoveReplicationTaskResponse = Shapes::StructureShape.new(name: 'MoveReplicationTaskResponse')
MySQLSettings = Shapes::StructureShape.new(name: 'MySQLSettings')
NeptuneSettings = Shapes::StructureShape.new(name: 'NeptuneSettings')
NestingLevelValue = Shapes::StringShape.new(name: 'NestingLevelValue')
OracleSettings = Shapes::StructureShape.new(name: 'OracleSettings')
OrderableReplicationInstance = Shapes::StructureShape.new(name: 'OrderableReplicationInstance')
OrderableReplicationInstanceList = Shapes::ListShape.new(name: 'OrderableReplicationInstanceList')
ParquetVersionValue = Shapes::StringShape.new(name: 'ParquetVersionValue')
PendingMaintenanceAction = Shapes::StructureShape.new(name: 'PendingMaintenanceAction')
PendingMaintenanceActionDetails = Shapes::ListShape.new(name: 'PendingMaintenanceActionDetails')
PendingMaintenanceActions = Shapes::ListShape.new(name: 'PendingMaintenanceActions')
PostgreSQLSettings = Shapes::StructureShape.new(name: 'PostgreSQLSettings')
RebootReplicationInstanceMessage = Shapes::StructureShape.new(name: 'RebootReplicationInstanceMessage')
RebootReplicationInstanceResponse = Shapes::StructureShape.new(name: 'RebootReplicationInstanceResponse')
RedshiftSettings = Shapes::StructureShape.new(name: 'RedshiftSettings')
RefreshSchemasMessage = Shapes::StructureShape.new(name: 'RefreshSchemasMessage')
RefreshSchemasResponse = Shapes::StructureShape.new(name: 'RefreshSchemasResponse')
RefreshSchemasStatus = Shapes::StructureShape.new(name: 'RefreshSchemasStatus')
RefreshSchemasStatusTypeValue = Shapes::StringShape.new(name: 'RefreshSchemasStatusTypeValue')
ReleaseStatusValues = Shapes::StringShape.new(name: 'ReleaseStatusValues')
ReloadOptionValue = Shapes::StringShape.new(name: 'ReloadOptionValue')
ReloadTablesMessage = Shapes::StructureShape.new(name: 'ReloadTablesMessage')
ReloadTablesResponse = Shapes::StructureShape.new(name: 'ReloadTablesResponse')
RemoveTagsFromResourceMessage = Shapes::StructureShape.new(name: 'RemoveTagsFromResourceMessage')
RemoveTagsFromResourceResponse = Shapes::StructureShape.new(name: 'RemoveTagsFromResourceResponse')
ReplicationEndpointTypeValue = Shapes::StringShape.new(name: 'ReplicationEndpointTypeValue')
ReplicationInstance = Shapes::StructureShape.new(name: 'ReplicationInstance')
ReplicationInstanceList = Shapes::ListShape.new(name: 'ReplicationInstanceList')
ReplicationInstancePrivateIpAddressList = Shapes::ListShape.new(name: 'ReplicationInstancePrivateIpAddressList')
ReplicationInstancePublicIpAddressList = Shapes::ListShape.new(name: 'ReplicationInstancePublicIpAddressList')
ReplicationInstanceTaskLog = Shapes::StructureShape.new(name: 'ReplicationInstanceTaskLog')
ReplicationInstanceTaskLogsList = Shapes::ListShape.new(name: 'ReplicationInstanceTaskLogsList')
ReplicationPendingModifiedValues = Shapes::StructureShape.new(name: 'ReplicationPendingModifiedValues')
ReplicationSubnetGroup = Shapes::StructureShape.new(name: 'ReplicationSubnetGroup')
ReplicationSubnetGroupDoesNotCoverEnoughAZs = Shapes::StructureShape.new(name: 'ReplicationSubnetGroupDoesNotCoverEnoughAZs')
ReplicationSubnetGroups = Shapes::ListShape.new(name: 'ReplicationSubnetGroups')
ReplicationTask = Shapes::StructureShape.new(name: 'ReplicationTask')
ReplicationTaskAssessmentResult = Shapes::StructureShape.new(name: 'ReplicationTaskAssessmentResult')
ReplicationTaskAssessmentResultList = Shapes::ListShape.new(name: 'ReplicationTaskAssessmentResultList')
ReplicationTaskAssessmentRun = Shapes::StructureShape.new(name: 'ReplicationTaskAssessmentRun')
ReplicationTaskAssessmentRunList = Shapes::ListShape.new(name: 'ReplicationTaskAssessmentRunList')
ReplicationTaskAssessmentRunProgress = Shapes::StructureShape.new(name: 'ReplicationTaskAssessmentRunProgress')
ReplicationTaskIndividualAssessment = Shapes::StructureShape.new(name: 'ReplicationTaskIndividualAssessment')
ReplicationTaskIndividualAssessmentList = Shapes::ListShape.new(name: 'ReplicationTaskIndividualAssessmentList')
ReplicationTaskList = Shapes::ListShape.new(name: 'ReplicationTaskList')
ReplicationTaskStats = Shapes::StructureShape.new(name: 'ReplicationTaskStats')
ResourceAlreadyExistsFault = Shapes::StructureShape.new(name: 'ResourceAlreadyExistsFault')
ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
ResourceNotFoundFault = Shapes::StructureShape.new(name: 'ResourceNotFoundFault')
ResourcePendingMaintenanceActions = Shapes::StructureShape.new(name: 'ResourcePendingMaintenanceActions')
ResourceQuotaExceededFault = Shapes::StructureShape.new(name: 'ResourceQuotaExceededFault')
S3AccessDeniedFault = Shapes::StructureShape.new(name: 'S3AccessDeniedFault')
S3ResourceNotFoundFault = Shapes::StructureShape.new(name: 'S3ResourceNotFoundFault')
S3Settings = Shapes::StructureShape.new(name: 'S3Settings')
SNSInvalidTopicFault = Shapes::StructureShape.new(name: 'SNSInvalidTopicFault')
SNSNoAuthorizationFault = Shapes::StructureShape.new(name: 'SNSNoAuthorizationFault')
SafeguardPolicy = Shapes::StringShape.new(name: 'SafeguardPolicy')
SchemaList = Shapes::ListShape.new(name: 'SchemaList')
SecretString = Shapes::StringShape.new(name: 'SecretString')
SourceIdsList = Shapes::ListShape.new(name: 'SourceIdsList')
SourceType = Shapes::StringShape.new(name: 'SourceType')
StartReplicationTaskAssessmentMessage = Shapes::StructureShape.new(name: 'StartReplicationTaskAssessmentMessage')
StartReplicationTaskAssessmentResponse = Shapes::StructureShape.new(name: 'StartReplicationTaskAssessmentResponse')
StartReplicationTaskAssessmentRunMessage = Shapes::StructureShape.new(name: 'StartReplicationTaskAssessmentRunMessage')
StartReplicationTaskAssessmentRunResponse = Shapes::StructureShape.new(name: 'StartReplicationTaskAssessmentRunResponse')
StartReplicationTaskMessage = Shapes::StructureShape.new(name: 'StartReplicationTaskMessage')
StartReplicationTaskResponse = Shapes::StructureShape.new(name: 'StartReplicationTaskResponse')
StartReplicationTaskTypeValue = Shapes::StringShape.new(name: 'StartReplicationTaskTypeValue')
StopReplicationTaskMessage = Shapes::StructureShape.new(name: 'StopReplicationTaskMessage')
StopReplicationTaskResponse = Shapes::StructureShape.new(name: 'StopReplicationTaskResponse')
StorageQuotaExceededFault = Shapes::StructureShape.new(name: 'StorageQuotaExceededFault')
String = Shapes::StringShape.new(name: 'String')
Subnet = Shapes::StructureShape.new(name: 'Subnet')
SubnetAlreadyInUse = Shapes::StructureShape.new(name: 'SubnetAlreadyInUse')
SubnetIdentifierList = Shapes::ListShape.new(name: 'SubnetIdentifierList')
SubnetList = Shapes::ListShape.new(name: 'SubnetList')
SupportedEndpointType = Shapes::StructureShape.new(name: 'SupportedEndpointType')
SupportedEndpointTypeList = Shapes::ListShape.new(name: 'SupportedEndpointTypeList')
SybaseSettings = Shapes::StructureShape.new(name: 'SybaseSettings')
TStamp = Shapes::TimestampShape.new(name: 'TStamp')
TableListToReload = Shapes::ListShape.new(name: 'TableListToReload')
TableStatistics = Shapes::StructureShape.new(name: 'TableStatistics')
TableStatisticsList = Shapes::ListShape.new(name: 'TableStatisticsList')
TableToReload = Shapes::StructureShape.new(name: 'TableToReload')
Tag = Shapes::StructureShape.new(name: 'Tag')
TagList = Shapes::ListShape.new(name: 'TagList')
TargetDbType = Shapes::StringShape.new(name: 'TargetDbType')
TestConnectionMessage = Shapes::StructureShape.new(name: 'TestConnectionMessage')
TestConnectionResponse = Shapes::StructureShape.new(name: 'TestConnectionResponse')
UpgradeDependencyFailureFault = Shapes::StructureShape.new(name: 'UpgradeDependencyFailureFault')
VpcSecurityGroupIdList = Shapes::ListShape.new(name: 'VpcSecurityGroupIdList')
VpcSecurityGroupMembership = Shapes::StructureShape.new(name: 'VpcSecurityGroupMembership')
VpcSecurityGroupMembershipList = Shapes::ListShape.new(name: 'VpcSecurityGroupMembershipList')
AccessDeniedFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
AccessDeniedFault.struct_class = Types::AccessDeniedFault
AccountQuota.add_member(:account_quota_name, Shapes::ShapeRef.new(shape: String, location_name: "AccountQuotaName"))
AccountQuota.add_member(:used, Shapes::ShapeRef.new(shape: Long, location_name: "Used"))
AccountQuota.add_member(:max, Shapes::ShapeRef.new(shape: Long, location_name: "Max"))
AccountQuota.struct_class = Types::AccountQuota
AccountQuotaList.member = Shapes::ShapeRef.new(shape: AccountQuota)
AddTagsToResourceMessage.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResourceArn"))
AddTagsToResourceMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, required: true, location_name: "Tags"))
AddTagsToResourceMessage.struct_class = Types::AddTagsToResourceMessage
AddTagsToResourceResponse.struct_class = Types::AddTagsToResourceResponse
ApplyPendingMaintenanceActionMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
ApplyPendingMaintenanceActionMessage.add_member(:apply_action, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ApplyAction"))
ApplyPendingMaintenanceActionMessage.add_member(:opt_in_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "OptInType"))
ApplyPendingMaintenanceActionMessage.struct_class = Types::ApplyPendingMaintenanceActionMessage
ApplyPendingMaintenanceActionResponse.add_member(:resource_pending_maintenance_actions, Shapes::ShapeRef.new(shape: ResourcePendingMaintenanceActions, location_name: "ResourcePendingMaintenanceActions"))
ApplyPendingMaintenanceActionResponse.struct_class = Types::ApplyPendingMaintenanceActionResponse
AvailabilityZone.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
AvailabilityZone.struct_class = Types::AvailabilityZone
AvailabilityZonesList.member = Shapes::ShapeRef.new(shape: String)
CancelReplicationTaskAssessmentRunMessage.add_member(:replication_task_assessment_run_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskAssessmentRunArn"))
CancelReplicationTaskAssessmentRunMessage.struct_class = Types::CancelReplicationTaskAssessmentRunMessage
CancelReplicationTaskAssessmentRunResponse.add_member(:replication_task_assessment_run, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRun, location_name: "ReplicationTaskAssessmentRun"))
CancelReplicationTaskAssessmentRunResponse.struct_class = Types::CancelReplicationTaskAssessmentRunResponse
Certificate.add_member(:certificate_identifier, Shapes::ShapeRef.new(shape: String, location_name: "CertificateIdentifier"))
Certificate.add_member(:certificate_creation_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "CertificateCreationDate"))
Certificate.add_member(:certificate_pem, Shapes::ShapeRef.new(shape: String, location_name: "CertificatePem"))
Certificate.add_member(:certificate_wallet, Shapes::ShapeRef.new(shape: CertificateWallet, location_name: "CertificateWallet"))
Certificate.add_member(:certificate_arn, Shapes::ShapeRef.new(shape: String, location_name: "CertificateArn"))
Certificate.add_member(:certificate_owner, Shapes::ShapeRef.new(shape: String, location_name: "CertificateOwner"))
Certificate.add_member(:valid_from_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ValidFromDate"))
Certificate.add_member(:valid_to_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ValidToDate"))
Certificate.add_member(:signing_algorithm, Shapes::ShapeRef.new(shape: String, location_name: "SigningAlgorithm"))
Certificate.add_member(:key_length, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "KeyLength"))
Certificate.struct_class = Types::Certificate
CertificateList.member = Shapes::ShapeRef.new(shape: Certificate)
Connection.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
Connection.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, location_name: "EndpointArn"))
Connection.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
Connection.add_member(:last_failure_message, Shapes::ShapeRef.new(shape: String, location_name: "LastFailureMessage"))
Connection.add_member(:endpoint_identifier, Shapes::ShapeRef.new(shape: String, location_name: "EndpointIdentifier"))
Connection.add_member(:replication_instance_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceIdentifier"))
Connection.struct_class = Types::Connection
ConnectionList.member = Shapes::ShapeRef.new(shape: Connection)
CreateEndpointMessage.add_member(:endpoint_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointIdentifier"))
CreateEndpointMessage.add_member(:endpoint_type, Shapes::ShapeRef.new(shape: ReplicationEndpointTypeValue, required: true, location_name: "EndpointType"))
CreateEndpointMessage.add_member(:engine_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EngineName"))
CreateEndpointMessage.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
CreateEndpointMessage.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
CreateEndpointMessage.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
CreateEndpointMessage.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
CreateEndpointMessage.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
CreateEndpointMessage.add_member(:extra_connection_attributes, Shapes::ShapeRef.new(shape: String, location_name: "ExtraConnectionAttributes"))
CreateEndpointMessage.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
CreateEndpointMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
CreateEndpointMessage.add_member(:certificate_arn, Shapes::ShapeRef.new(shape: String, location_name: "CertificateArn"))
CreateEndpointMessage.add_member(:ssl_mode, Shapes::ShapeRef.new(shape: DmsSslModeValue, location_name: "SslMode"))
CreateEndpointMessage.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
CreateEndpointMessage.add_member(:external_table_definition, Shapes::ShapeRef.new(shape: String, location_name: "ExternalTableDefinition"))
CreateEndpointMessage.add_member(:dynamo_db_settings, Shapes::ShapeRef.new(shape: DynamoDbSettings, location_name: "DynamoDbSettings"))
CreateEndpointMessage.add_member(:s3_settings, Shapes::ShapeRef.new(shape: S3Settings, location_name: "S3Settings"))
CreateEndpointMessage.add_member(:dms_transfer_settings, Shapes::ShapeRef.new(shape: DmsTransferSettings, location_name: "DmsTransferSettings"))
CreateEndpointMessage.add_member(:mongo_db_settings, Shapes::ShapeRef.new(shape: MongoDbSettings, location_name: "MongoDbSettings"))
CreateEndpointMessage.add_member(:kinesis_settings, Shapes::ShapeRef.new(shape: KinesisSettings, location_name: "KinesisSettings"))
CreateEndpointMessage.add_member(:kafka_settings, Shapes::ShapeRef.new(shape: KafkaSettings, location_name: "KafkaSettings"))
CreateEndpointMessage.add_member(:elasticsearch_settings, Shapes::ShapeRef.new(shape: ElasticsearchSettings, location_name: "ElasticsearchSettings"))
CreateEndpointMessage.add_member(:neptune_settings, Shapes::ShapeRef.new(shape: NeptuneSettings, location_name: "NeptuneSettings"))
CreateEndpointMessage.add_member(:redshift_settings, Shapes::ShapeRef.new(shape: RedshiftSettings, location_name: "RedshiftSettings"))
CreateEndpointMessage.add_member(:postgre_sql_settings, Shapes::ShapeRef.new(shape: PostgreSQLSettings, location_name: "PostgreSQLSettings"))
CreateEndpointMessage.add_member(:my_sql_settings, Shapes::ShapeRef.new(shape: MySQLSettings, location_name: "MySQLSettings"))
CreateEndpointMessage.add_member(:oracle_settings, Shapes::ShapeRef.new(shape: OracleSettings, location_name: "OracleSettings"))
CreateEndpointMessage.add_member(:sybase_settings, Shapes::ShapeRef.new(shape: SybaseSettings, location_name: "SybaseSettings"))
CreateEndpointMessage.add_member(:microsoft_sql_server_settings, Shapes::ShapeRef.new(shape: MicrosoftSQLServerSettings, location_name: "MicrosoftSQLServerSettings"))
CreateEndpointMessage.add_member(:ibm_db_2_settings, Shapes::ShapeRef.new(shape: IBMDb2Settings, location_name: "IBMDb2Settings"))
CreateEndpointMessage.add_member(:resource_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ResourceIdentifier"))
CreateEndpointMessage.add_member(:doc_db_settings, Shapes::ShapeRef.new(shape: DocDbSettings, location_name: "DocDbSettings"))
CreateEndpointMessage.struct_class = Types::CreateEndpointMessage
CreateEndpointResponse.add_member(:endpoint, Shapes::ShapeRef.new(shape: Endpoint, location_name: "Endpoint"))
CreateEndpointResponse.struct_class = Types::CreateEndpointResponse
CreateEventSubscriptionMessage.add_member(:subscription_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SubscriptionName"))
CreateEventSubscriptionMessage.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SnsTopicArn"))
CreateEventSubscriptionMessage.add_member(:source_type, Shapes::ShapeRef.new(shape: String, location_name: "SourceType"))
CreateEventSubscriptionMessage.add_member(:event_categories, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategories"))
CreateEventSubscriptionMessage.add_member(:source_ids, Shapes::ShapeRef.new(shape: SourceIdsList, location_name: "SourceIds"))
CreateEventSubscriptionMessage.add_member(:enabled, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "Enabled"))
CreateEventSubscriptionMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
CreateEventSubscriptionMessage.struct_class = Types::CreateEventSubscriptionMessage
CreateEventSubscriptionResponse.add_member(:event_subscription, Shapes::ShapeRef.new(shape: EventSubscription, location_name: "EventSubscription"))
CreateEventSubscriptionResponse.struct_class = Types::CreateEventSubscriptionResponse
CreateReplicationInstanceMessage.add_member(:replication_instance_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceIdentifier"))
CreateReplicationInstanceMessage.add_member(:allocated_storage, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "AllocatedStorage"))
CreateReplicationInstanceMessage.add_member(:replication_instance_class, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceClass"))
CreateReplicationInstanceMessage.add_member(:vpc_security_group_ids, Shapes::ShapeRef.new(shape: VpcSecurityGroupIdList, location_name: "VpcSecurityGroupIds"))
CreateReplicationInstanceMessage.add_member(:availability_zone, Shapes::ShapeRef.new(shape: String, location_name: "AvailabilityZone"))
CreateReplicationInstanceMessage.add_member(:replication_subnet_group_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationSubnetGroupIdentifier"))
CreateReplicationInstanceMessage.add_member(:preferred_maintenance_window, Shapes::ShapeRef.new(shape: String, location_name: "PreferredMaintenanceWindow"))
CreateReplicationInstanceMessage.add_member(:multi_az, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "MultiAZ"))
CreateReplicationInstanceMessage.add_member(:engine_version, Shapes::ShapeRef.new(shape: String, location_name: "EngineVersion"))
CreateReplicationInstanceMessage.add_member(:auto_minor_version_upgrade, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AutoMinorVersionUpgrade"))
CreateReplicationInstanceMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
CreateReplicationInstanceMessage.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
CreateReplicationInstanceMessage.add_member(:publicly_accessible, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "PubliclyAccessible"))
CreateReplicationInstanceMessage.add_member(:dns_name_servers, Shapes::ShapeRef.new(shape: String, location_name: "DnsNameServers"))
CreateReplicationInstanceMessage.add_member(:resource_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ResourceIdentifier"))
CreateReplicationInstanceMessage.struct_class = Types::CreateReplicationInstanceMessage
CreateReplicationInstanceResponse.add_member(:replication_instance, Shapes::ShapeRef.new(shape: ReplicationInstance, location_name: "ReplicationInstance"))
CreateReplicationInstanceResponse.struct_class = Types::CreateReplicationInstanceResponse
CreateReplicationSubnetGroupMessage.add_member(:replication_subnet_group_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationSubnetGroupIdentifier"))
CreateReplicationSubnetGroupMessage.add_member(:replication_subnet_group_description, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationSubnetGroupDescription"))
CreateReplicationSubnetGroupMessage.add_member(:subnet_ids, Shapes::ShapeRef.new(shape: SubnetIdentifierList, required: true, location_name: "SubnetIds"))
CreateReplicationSubnetGroupMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
CreateReplicationSubnetGroupMessage.struct_class = Types::CreateReplicationSubnetGroupMessage
CreateReplicationSubnetGroupResponse.add_member(:replication_subnet_group, Shapes::ShapeRef.new(shape: ReplicationSubnetGroup, location_name: "ReplicationSubnetGroup"))
CreateReplicationSubnetGroupResponse.struct_class = Types::CreateReplicationSubnetGroupResponse
CreateReplicationTaskMessage.add_member(:replication_task_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskIdentifier"))
CreateReplicationTaskMessage.add_member(:source_endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SourceEndpointArn"))
CreateReplicationTaskMessage.add_member(:target_endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TargetEndpointArn"))
CreateReplicationTaskMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
CreateReplicationTaskMessage.add_member(:migration_type, Shapes::ShapeRef.new(shape: MigrationTypeValue, required: true, location_name: "MigrationType"))
CreateReplicationTaskMessage.add_member(:table_mappings, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TableMappings"))
CreateReplicationTaskMessage.add_member(:replication_task_settings, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskSettings"))
CreateReplicationTaskMessage.add_member(:cdc_start_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "CdcStartTime"))
CreateReplicationTaskMessage.add_member(:cdc_start_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStartPosition"))
CreateReplicationTaskMessage.add_member(:cdc_stop_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStopPosition"))
CreateReplicationTaskMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
CreateReplicationTaskMessage.add_member(:task_data, Shapes::ShapeRef.new(shape: String, location_name: "TaskData"))
CreateReplicationTaskMessage.add_member(:resource_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ResourceIdentifier"))
CreateReplicationTaskMessage.struct_class = Types::CreateReplicationTaskMessage
CreateReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
CreateReplicationTaskResponse.struct_class = Types::CreateReplicationTaskResponse
DeleteCertificateMessage.add_member(:certificate_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "CertificateArn"))
DeleteCertificateMessage.struct_class = Types::DeleteCertificateMessage
DeleteCertificateResponse.add_member(:certificate, Shapes::ShapeRef.new(shape: Certificate, location_name: "Certificate"))
DeleteCertificateResponse.struct_class = Types::DeleteCertificateResponse
DeleteConnectionMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
DeleteConnectionMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
DeleteConnectionMessage.struct_class = Types::DeleteConnectionMessage
DeleteConnectionResponse.add_member(:connection, Shapes::ShapeRef.new(shape: Connection, location_name: "Connection"))
DeleteConnectionResponse.struct_class = Types::DeleteConnectionResponse
DeleteEndpointMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
DeleteEndpointMessage.struct_class = Types::DeleteEndpointMessage
DeleteEndpointResponse.add_member(:endpoint, Shapes::ShapeRef.new(shape: Endpoint, location_name: "Endpoint"))
DeleteEndpointResponse.struct_class = Types::DeleteEndpointResponse
DeleteEventSubscriptionMessage.add_member(:subscription_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SubscriptionName"))
DeleteEventSubscriptionMessage.struct_class = Types::DeleteEventSubscriptionMessage
DeleteEventSubscriptionResponse.add_member(:event_subscription, Shapes::ShapeRef.new(shape: EventSubscription, location_name: "EventSubscription"))
DeleteEventSubscriptionResponse.struct_class = Types::DeleteEventSubscriptionResponse
DeleteReplicationInstanceMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
DeleteReplicationInstanceMessage.struct_class = Types::DeleteReplicationInstanceMessage
DeleteReplicationInstanceResponse.add_member(:replication_instance, Shapes::ShapeRef.new(shape: ReplicationInstance, location_name: "ReplicationInstance"))
DeleteReplicationInstanceResponse.struct_class = Types::DeleteReplicationInstanceResponse
DeleteReplicationSubnetGroupMessage.add_member(:replication_subnet_group_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationSubnetGroupIdentifier"))
DeleteReplicationSubnetGroupMessage.struct_class = Types::DeleteReplicationSubnetGroupMessage
DeleteReplicationSubnetGroupResponse.struct_class = Types::DeleteReplicationSubnetGroupResponse
DeleteReplicationTaskAssessmentRunMessage.add_member(:replication_task_assessment_run_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskAssessmentRunArn"))
DeleteReplicationTaskAssessmentRunMessage.struct_class = Types::DeleteReplicationTaskAssessmentRunMessage
DeleteReplicationTaskAssessmentRunResponse.add_member(:replication_task_assessment_run, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRun, location_name: "ReplicationTaskAssessmentRun"))
DeleteReplicationTaskAssessmentRunResponse.struct_class = Types::DeleteReplicationTaskAssessmentRunResponse
DeleteReplicationTaskMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
DeleteReplicationTaskMessage.struct_class = Types::DeleteReplicationTaskMessage
DeleteReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
DeleteReplicationTaskResponse.struct_class = Types::DeleteReplicationTaskResponse
DescribeAccountAttributesMessage.struct_class = Types::DescribeAccountAttributesMessage
DescribeAccountAttributesResponse.add_member(:account_quotas, Shapes::ShapeRef.new(shape: AccountQuotaList, location_name: "AccountQuotas"))
DescribeAccountAttributesResponse.add_member(:unique_account_identifier, Shapes::ShapeRef.new(shape: String, location_name: "UniqueAccountIdentifier"))
DescribeAccountAttributesResponse.struct_class = Types::DescribeAccountAttributesResponse
DescribeApplicableIndividualAssessmentsMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:source_engine_name, Shapes::ShapeRef.new(shape: String, location_name: "SourceEngineName"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:target_engine_name, Shapes::ShapeRef.new(shape: String, location_name: "TargetEngineName"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:migration_type, Shapes::ShapeRef.new(shape: MigrationTypeValue, location_name: "MigrationType"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeApplicableIndividualAssessmentsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeApplicableIndividualAssessmentsMessage.struct_class = Types::DescribeApplicableIndividualAssessmentsMessage
DescribeApplicableIndividualAssessmentsResponse.add_member(:individual_assessment_names, Shapes::ShapeRef.new(shape: IndividualAssessmentNameList, location_name: "IndividualAssessmentNames"))
DescribeApplicableIndividualAssessmentsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeApplicableIndividualAssessmentsResponse.struct_class = Types::DescribeApplicableIndividualAssessmentsResponse
DescribeCertificatesMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeCertificatesMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeCertificatesMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeCertificatesMessage.struct_class = Types::DescribeCertificatesMessage
DescribeCertificatesResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeCertificatesResponse.add_member(:certificates, Shapes::ShapeRef.new(shape: CertificateList, location_name: "Certificates"))
DescribeCertificatesResponse.struct_class = Types::DescribeCertificatesResponse
DescribeConnectionsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeConnectionsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeConnectionsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeConnectionsMessage.struct_class = Types::DescribeConnectionsMessage
DescribeConnectionsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeConnectionsResponse.add_member(:connections, Shapes::ShapeRef.new(shape: ConnectionList, location_name: "Connections"))
DescribeConnectionsResponse.struct_class = Types::DescribeConnectionsResponse
DescribeEndpointTypesMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeEndpointTypesMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeEndpointTypesMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEndpointTypesMessage.struct_class = Types::DescribeEndpointTypesMessage
DescribeEndpointTypesResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEndpointTypesResponse.add_member(:supported_endpoint_types, Shapes::ShapeRef.new(shape: SupportedEndpointTypeList, location_name: "SupportedEndpointTypes"))
DescribeEndpointTypesResponse.struct_class = Types::DescribeEndpointTypesResponse
DescribeEndpointsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeEndpointsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeEndpointsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEndpointsMessage.struct_class = Types::DescribeEndpointsMessage
DescribeEndpointsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEndpointsResponse.add_member(:endpoints, Shapes::ShapeRef.new(shape: EndpointList, location_name: "Endpoints"))
DescribeEndpointsResponse.struct_class = Types::DescribeEndpointsResponse
DescribeEventCategoriesMessage.add_member(:source_type, Shapes::ShapeRef.new(shape: String, location_name: "SourceType"))
DescribeEventCategoriesMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeEventCategoriesMessage.struct_class = Types::DescribeEventCategoriesMessage
DescribeEventCategoriesResponse.add_member(:event_category_group_list, Shapes::ShapeRef.new(shape: EventCategoryGroupList, location_name: "EventCategoryGroupList"))
DescribeEventCategoriesResponse.struct_class = Types::DescribeEventCategoriesResponse
DescribeEventSubscriptionsMessage.add_member(:subscription_name, Shapes::ShapeRef.new(shape: String, location_name: "SubscriptionName"))
DescribeEventSubscriptionsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeEventSubscriptionsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeEventSubscriptionsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEventSubscriptionsMessage.struct_class = Types::DescribeEventSubscriptionsMessage
DescribeEventSubscriptionsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEventSubscriptionsResponse.add_member(:event_subscriptions_list, Shapes::ShapeRef.new(shape: EventSubscriptionsList, location_name: "EventSubscriptionsList"))
DescribeEventSubscriptionsResponse.struct_class = Types::DescribeEventSubscriptionsResponse
DescribeEventsMessage.add_member(:source_identifier, Shapes::ShapeRef.new(shape: String, location_name: "SourceIdentifier"))
DescribeEventsMessage.add_member(:source_type, Shapes::ShapeRef.new(shape: SourceType, location_name: "SourceType"))
DescribeEventsMessage.add_member(:start_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "StartTime"))
DescribeEventsMessage.add_member(:end_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "EndTime"))
DescribeEventsMessage.add_member(:duration, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Duration"))
DescribeEventsMessage.add_member(:event_categories, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategories"))
DescribeEventsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeEventsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeEventsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEventsMessage.struct_class = Types::DescribeEventsMessage
DescribeEventsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeEventsResponse.add_member(:events, Shapes::ShapeRef.new(shape: EventList, location_name: "Events"))
DescribeEventsResponse.struct_class = Types::DescribeEventsResponse
DescribeOrderableReplicationInstancesMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeOrderableReplicationInstancesMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeOrderableReplicationInstancesMessage.struct_class = Types::DescribeOrderableReplicationInstancesMessage
DescribeOrderableReplicationInstancesResponse.add_member(:orderable_replication_instances, Shapes::ShapeRef.new(shape: OrderableReplicationInstanceList, location_name: "OrderableReplicationInstances"))
DescribeOrderableReplicationInstancesResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeOrderableReplicationInstancesResponse.struct_class = Types::DescribeOrderableReplicationInstancesResponse
DescribePendingMaintenanceActionsMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
DescribePendingMaintenanceActionsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribePendingMaintenanceActionsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribePendingMaintenanceActionsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribePendingMaintenanceActionsMessage.struct_class = Types::DescribePendingMaintenanceActionsMessage
DescribePendingMaintenanceActionsResponse.add_member(:pending_maintenance_actions, Shapes::ShapeRef.new(shape: PendingMaintenanceActions, location_name: "PendingMaintenanceActions"))
DescribePendingMaintenanceActionsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribePendingMaintenanceActionsResponse.struct_class = Types::DescribePendingMaintenanceActionsResponse
DescribeRefreshSchemasStatusMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
DescribeRefreshSchemasStatusMessage.struct_class = Types::DescribeRefreshSchemasStatusMessage
DescribeRefreshSchemasStatusResponse.add_member(:refresh_schemas_status, Shapes::ShapeRef.new(shape: RefreshSchemasStatus, location_name: "RefreshSchemasStatus"))
DescribeRefreshSchemasStatusResponse.struct_class = Types::DescribeRefreshSchemasStatusResponse
DescribeReplicationInstanceTaskLogsMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
DescribeReplicationInstanceTaskLogsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationInstanceTaskLogsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationInstanceTaskLogsMessage.struct_class = Types::DescribeReplicationInstanceTaskLogsMessage
DescribeReplicationInstanceTaskLogsResponse.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
DescribeReplicationInstanceTaskLogsResponse.add_member(:replication_instance_task_logs, Shapes::ShapeRef.new(shape: ReplicationInstanceTaskLogsList, location_name: "ReplicationInstanceTaskLogs"))
DescribeReplicationInstanceTaskLogsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationInstanceTaskLogsResponse.struct_class = Types::DescribeReplicationInstanceTaskLogsResponse
DescribeReplicationInstancesMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeReplicationInstancesMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationInstancesMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationInstancesMessage.struct_class = Types::DescribeReplicationInstancesMessage
DescribeReplicationInstancesResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationInstancesResponse.add_member(:replication_instances, Shapes::ShapeRef.new(shape: ReplicationInstanceList, location_name: "ReplicationInstances"))
DescribeReplicationInstancesResponse.struct_class = Types::DescribeReplicationInstancesResponse
DescribeReplicationSubnetGroupsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeReplicationSubnetGroupsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationSubnetGroupsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationSubnetGroupsMessage.struct_class = Types::DescribeReplicationSubnetGroupsMessage
DescribeReplicationSubnetGroupsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationSubnetGroupsResponse.add_member(:replication_subnet_groups, Shapes::ShapeRef.new(shape: ReplicationSubnetGroups, location_name: "ReplicationSubnetGroups"))
DescribeReplicationSubnetGroupsResponse.struct_class = Types::DescribeReplicationSubnetGroupsResponse
DescribeReplicationTaskAssessmentResultsMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
DescribeReplicationTaskAssessmentResultsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationTaskAssessmentResultsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskAssessmentResultsMessage.struct_class = Types::DescribeReplicationTaskAssessmentResultsMessage
DescribeReplicationTaskAssessmentResultsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskAssessmentResultsResponse.add_member(:bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "BucketName"))
DescribeReplicationTaskAssessmentResultsResponse.add_member(:replication_task_assessment_results, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentResultList, location_name: "ReplicationTaskAssessmentResults"))
DescribeReplicationTaskAssessmentResultsResponse.struct_class = Types::DescribeReplicationTaskAssessmentResultsResponse
DescribeReplicationTaskAssessmentRunsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeReplicationTaskAssessmentRunsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationTaskAssessmentRunsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskAssessmentRunsMessage.struct_class = Types::DescribeReplicationTaskAssessmentRunsMessage
DescribeReplicationTaskAssessmentRunsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskAssessmentRunsResponse.add_member(:replication_task_assessment_runs, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRunList, location_name: "ReplicationTaskAssessmentRuns"))
DescribeReplicationTaskAssessmentRunsResponse.struct_class = Types::DescribeReplicationTaskAssessmentRunsResponse
DescribeReplicationTaskIndividualAssessmentsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeReplicationTaskIndividualAssessmentsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationTaskIndividualAssessmentsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskIndividualAssessmentsMessage.struct_class = Types::DescribeReplicationTaskIndividualAssessmentsMessage
DescribeReplicationTaskIndividualAssessmentsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTaskIndividualAssessmentsResponse.add_member(:replication_task_individual_assessments, Shapes::ShapeRef.new(shape: ReplicationTaskIndividualAssessmentList, location_name: "ReplicationTaskIndividualAssessments"))
DescribeReplicationTaskIndividualAssessmentsResponse.struct_class = Types::DescribeReplicationTaskIndividualAssessmentsResponse
DescribeReplicationTasksMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeReplicationTasksMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeReplicationTasksMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTasksMessage.add_member(:without_settings, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "WithoutSettings"))
DescribeReplicationTasksMessage.struct_class = Types::DescribeReplicationTasksMessage
DescribeReplicationTasksResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeReplicationTasksResponse.add_member(:replication_tasks, Shapes::ShapeRef.new(shape: ReplicationTaskList, location_name: "ReplicationTasks"))
DescribeReplicationTasksResponse.struct_class = Types::DescribeReplicationTasksResponse
DescribeSchemasMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
DescribeSchemasMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeSchemasMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeSchemasMessage.struct_class = Types::DescribeSchemasMessage
DescribeSchemasResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeSchemasResponse.add_member(:schemas, Shapes::ShapeRef.new(shape: SchemaList, location_name: "Schemas"))
DescribeSchemasResponse.struct_class = Types::DescribeSchemasResponse
DescribeTableStatisticsMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
DescribeTableStatisticsMessage.add_member(:max_records, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRecords"))
DescribeTableStatisticsMessage.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeTableStatisticsMessage.add_member(:filters, Shapes::ShapeRef.new(shape: FilterList, location_name: "Filters"))
DescribeTableStatisticsMessage.struct_class = Types::DescribeTableStatisticsMessage
DescribeTableStatisticsResponse.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
DescribeTableStatisticsResponse.add_member(:table_statistics, Shapes::ShapeRef.new(shape: TableStatisticsList, location_name: "TableStatistics"))
DescribeTableStatisticsResponse.add_member(:marker, Shapes::ShapeRef.new(shape: String, location_name: "Marker"))
DescribeTableStatisticsResponse.struct_class = Types::DescribeTableStatisticsResponse
DmsTransferSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
DmsTransferSettings.add_member(:bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "BucketName"))
DmsTransferSettings.struct_class = Types::DmsTransferSettings
DocDbSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
DocDbSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
DocDbSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
DocDbSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
DocDbSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
DocDbSettings.add_member(:nesting_level, Shapes::ShapeRef.new(shape: NestingLevelValue, location_name: "NestingLevel"))
DocDbSettings.add_member(:extract_doc_id, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ExtractDocId"))
DocDbSettings.add_member(:docs_to_investigate, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "DocsToInvestigate"))
DocDbSettings.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
DocDbSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
DocDbSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
DocDbSettings.struct_class = Types::DocDbSettings
DynamoDbSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceAccessRoleArn"))
DynamoDbSettings.struct_class = Types::DynamoDbSettings
ElasticsearchSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceAccessRoleArn"))
ElasticsearchSettings.add_member(:endpoint_uri, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointUri"))
ElasticsearchSettings.add_member(:full_load_error_percentage, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "FullLoadErrorPercentage"))
ElasticsearchSettings.add_member(:error_retry_duration, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ErrorRetryDuration"))
ElasticsearchSettings.struct_class = Types::ElasticsearchSettings
Endpoint.add_member(:endpoint_identifier, Shapes::ShapeRef.new(shape: String, location_name: "EndpointIdentifier"))
Endpoint.add_member(:endpoint_type, Shapes::ShapeRef.new(shape: ReplicationEndpointTypeValue, location_name: "EndpointType"))
Endpoint.add_member(:engine_name, Shapes::ShapeRef.new(shape: String, location_name: "EngineName"))
Endpoint.add_member(:engine_display_name, Shapes::ShapeRef.new(shape: String, location_name: "EngineDisplayName"))
Endpoint.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
Endpoint.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
Endpoint.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
Endpoint.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
Endpoint.add_member(:extra_connection_attributes, Shapes::ShapeRef.new(shape: String, location_name: "ExtraConnectionAttributes"))
Endpoint.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
Endpoint.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
Endpoint.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, location_name: "EndpointArn"))
Endpoint.add_member(:certificate_arn, Shapes::ShapeRef.new(shape: String, location_name: "CertificateArn"))
Endpoint.add_member(:ssl_mode, Shapes::ShapeRef.new(shape: DmsSslModeValue, location_name: "SslMode"))
Endpoint.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
Endpoint.add_member(:external_table_definition, Shapes::ShapeRef.new(shape: String, location_name: "ExternalTableDefinition"))
Endpoint.add_member(:external_id, Shapes::ShapeRef.new(shape: String, location_name: "ExternalId"))
Endpoint.add_member(:dynamo_db_settings, Shapes::ShapeRef.new(shape: DynamoDbSettings, location_name: "DynamoDbSettings"))
Endpoint.add_member(:s3_settings, Shapes::ShapeRef.new(shape: S3Settings, location_name: "S3Settings"))
Endpoint.add_member(:dms_transfer_settings, Shapes::ShapeRef.new(shape: DmsTransferSettings, location_name: "DmsTransferSettings"))
Endpoint.add_member(:mongo_db_settings, Shapes::ShapeRef.new(shape: MongoDbSettings, location_name: "MongoDbSettings"))
Endpoint.add_member(:kinesis_settings, Shapes::ShapeRef.new(shape: KinesisSettings, location_name: "KinesisSettings"))
Endpoint.add_member(:kafka_settings, Shapes::ShapeRef.new(shape: KafkaSettings, location_name: "KafkaSettings"))
Endpoint.add_member(:elasticsearch_settings, Shapes::ShapeRef.new(shape: ElasticsearchSettings, location_name: "ElasticsearchSettings"))
Endpoint.add_member(:neptune_settings, Shapes::ShapeRef.new(shape: NeptuneSettings, location_name: "NeptuneSettings"))
Endpoint.add_member(:redshift_settings, Shapes::ShapeRef.new(shape: RedshiftSettings, location_name: "RedshiftSettings"))
Endpoint.add_member(:postgre_sql_settings, Shapes::ShapeRef.new(shape: PostgreSQLSettings, location_name: "PostgreSQLSettings"))
Endpoint.add_member(:my_sql_settings, Shapes::ShapeRef.new(shape: MySQLSettings, location_name: "MySQLSettings"))
Endpoint.add_member(:oracle_settings, Shapes::ShapeRef.new(shape: OracleSettings, location_name: "OracleSettings"))
Endpoint.add_member(:sybase_settings, Shapes::ShapeRef.new(shape: SybaseSettings, location_name: "SybaseSettings"))
Endpoint.add_member(:microsoft_sql_server_settings, Shapes::ShapeRef.new(shape: MicrosoftSQLServerSettings, location_name: "MicrosoftSQLServerSettings"))
Endpoint.add_member(:ibm_db_2_settings, Shapes::ShapeRef.new(shape: IBMDb2Settings, location_name: "IBMDb2Settings"))
Endpoint.add_member(:doc_db_settings, Shapes::ShapeRef.new(shape: DocDbSettings, location_name: "DocDbSettings"))
Endpoint.struct_class = Types::Endpoint
EndpointList.member = Shapes::ShapeRef.new(shape: Endpoint)
Event.add_member(:source_identifier, Shapes::ShapeRef.new(shape: String, location_name: "SourceIdentifier"))
Event.add_member(:source_type, Shapes::ShapeRef.new(shape: SourceType, location_name: "SourceType"))
Event.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
Event.add_member(:event_categories, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategories"))
Event.add_member(:date, Shapes::ShapeRef.new(shape: TStamp, location_name: "Date"))
Event.struct_class = Types::Event
EventCategoriesList.member = Shapes::ShapeRef.new(shape: String)
EventCategoryGroup.add_member(:source_type, Shapes::ShapeRef.new(shape: String, location_name: "SourceType"))
EventCategoryGroup.add_member(:event_categories, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategories"))
EventCategoryGroup.struct_class = Types::EventCategoryGroup
EventCategoryGroupList.member = Shapes::ShapeRef.new(shape: EventCategoryGroup)
EventList.member = Shapes::ShapeRef.new(shape: Event)
EventSubscription.add_member(:customer_aws_id, Shapes::ShapeRef.new(shape: String, location_name: "CustomerAwsId"))
EventSubscription.add_member(:cust_subscription_id, Shapes::ShapeRef.new(shape: String, location_name: "CustSubscriptionId"))
EventSubscription.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: String, location_name: "SnsTopicArn"))
EventSubscription.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
EventSubscription.add_member(:subscription_creation_time, Shapes::ShapeRef.new(shape: String, location_name: "SubscriptionCreationTime"))
EventSubscription.add_member(:source_type, Shapes::ShapeRef.new(shape: String, location_name: "SourceType"))
EventSubscription.add_member(:source_ids_list, Shapes::ShapeRef.new(shape: SourceIdsList, location_name: "SourceIdsList"))
EventSubscription.add_member(:event_categories_list, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategoriesList"))
EventSubscription.add_member(:enabled, Shapes::ShapeRef.new(shape: Boolean, location_name: "Enabled"))
EventSubscription.struct_class = Types::EventSubscription
EventSubscriptionsList.member = Shapes::ShapeRef.new(shape: EventSubscription)
ExcludeTestList.member = Shapes::ShapeRef.new(shape: String)
Filter.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
Filter.add_member(:values, Shapes::ShapeRef.new(shape: FilterValueList, required: true, location_name: "Values"))
Filter.struct_class = Types::Filter
FilterList.member = Shapes::ShapeRef.new(shape: Filter)
FilterValueList.member = Shapes::ShapeRef.new(shape: String)
IBMDb2Settings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
IBMDb2Settings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
IBMDb2Settings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
IBMDb2Settings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
IBMDb2Settings.add_member(:set_data_capture_changes, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "SetDataCaptureChanges"))
IBMDb2Settings.add_member(:current_lsn, Shapes::ShapeRef.new(shape: String, location_name: "CurrentLsn"))
IBMDb2Settings.add_member(:max_k_bytes_per_read, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxKBytesPerRead"))
IBMDb2Settings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
IBMDb2Settings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
IBMDb2Settings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
IBMDb2Settings.struct_class = Types::IBMDb2Settings
ImportCertificateMessage.add_member(:certificate_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "CertificateIdentifier"))
ImportCertificateMessage.add_member(:certificate_pem, Shapes::ShapeRef.new(shape: String, location_name: "CertificatePem"))
ImportCertificateMessage.add_member(:certificate_wallet, Shapes::ShapeRef.new(shape: CertificateWallet, location_name: "CertificateWallet"))
ImportCertificateMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
ImportCertificateMessage.struct_class = Types::ImportCertificateMessage
ImportCertificateResponse.add_member(:certificate, Shapes::ShapeRef.new(shape: Certificate, location_name: "Certificate"))
ImportCertificateResponse.struct_class = Types::ImportCertificateResponse
IncludeTestList.member = Shapes::ShapeRef.new(shape: String)
IndividualAssessmentNameList.member = Shapes::ShapeRef.new(shape: String)
InsufficientResourceCapacityFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
InsufficientResourceCapacityFault.struct_class = Types::InsufficientResourceCapacityFault
InvalidCertificateFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
InvalidCertificateFault.struct_class = Types::InvalidCertificateFault
InvalidResourceStateFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
InvalidResourceStateFault.struct_class = Types::InvalidResourceStateFault
InvalidSubnet.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
InvalidSubnet.struct_class = Types::InvalidSubnet
KMSAccessDeniedFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSAccessDeniedFault.struct_class = Types::KMSAccessDeniedFault
KMSDisabledFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSDisabledFault.struct_class = Types::KMSDisabledFault
KMSFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSFault.struct_class = Types::KMSFault
KMSInvalidStateFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSInvalidStateFault.struct_class = Types::KMSInvalidStateFault
KMSKeyNotAccessibleFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSKeyNotAccessibleFault.struct_class = Types::KMSKeyNotAccessibleFault
KMSNotFoundFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSNotFoundFault.struct_class = Types::KMSNotFoundFault
KMSThrottlingFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
KMSThrottlingFault.struct_class = Types::KMSThrottlingFault
KafkaSettings.add_member(:broker, Shapes::ShapeRef.new(shape: String, location_name: "Broker"))
KafkaSettings.add_member(:topic, Shapes::ShapeRef.new(shape: String, location_name: "Topic"))
KafkaSettings.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatValue, location_name: "MessageFormat"))
KafkaSettings.add_member(:include_transaction_details, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeTransactionDetails"))
KafkaSettings.add_member(:include_partition_value, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludePartitionValue"))
KafkaSettings.add_member(:partition_include_schema_table, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "PartitionIncludeSchemaTable"))
KafkaSettings.add_member(:include_table_alter_operations, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeTableAlterOperations"))
KafkaSettings.add_member(:include_control_details, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeControlDetails"))
KafkaSettings.add_member(:message_max_bytes, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MessageMaxBytes"))
KafkaSettings.add_member(:include_null_and_empty, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeNullAndEmpty"))
KafkaSettings.struct_class = Types::KafkaSettings
KeyList.member = Shapes::ShapeRef.new(shape: String)
KinesisSettings.add_member(:stream_arn, Shapes::ShapeRef.new(shape: String, location_name: "StreamArn"))
KinesisSettings.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatValue, location_name: "MessageFormat"))
KinesisSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
KinesisSettings.add_member(:include_transaction_details, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeTransactionDetails"))
KinesisSettings.add_member(:include_partition_value, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludePartitionValue"))
KinesisSettings.add_member(:partition_include_schema_table, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "PartitionIncludeSchemaTable"))
KinesisSettings.add_member(:include_table_alter_operations, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeTableAlterOperations"))
KinesisSettings.add_member(:include_control_details, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeControlDetails"))
KinesisSettings.add_member(:include_null_and_empty, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeNullAndEmpty"))
KinesisSettings.struct_class = Types::KinesisSettings
ListTagsForResourceMessage.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResourceArn"))
ListTagsForResourceMessage.struct_class = Types::ListTagsForResourceMessage
ListTagsForResourceResponse.add_member(:tag_list, Shapes::ShapeRef.new(shape: TagList, location_name: "TagList"))
ListTagsForResourceResponse.struct_class = Types::ListTagsForResourceResponse
MicrosoftSQLServerSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
MicrosoftSQLServerSettings.add_member(:bcp_packet_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "BcpPacketSize"))
MicrosoftSQLServerSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
MicrosoftSQLServerSettings.add_member(:control_tables_file_group, Shapes::ShapeRef.new(shape: String, location_name: "ControlTablesFileGroup"))
MicrosoftSQLServerSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
MicrosoftSQLServerSettings.add_member(:read_backup_only, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ReadBackupOnly"))
MicrosoftSQLServerSettings.add_member(:safeguard_policy, Shapes::ShapeRef.new(shape: SafeguardPolicy, location_name: "SafeguardPolicy"))
MicrosoftSQLServerSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
MicrosoftSQLServerSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
MicrosoftSQLServerSettings.add_member(:use_bcp_full_load, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "UseBcpFullLoad"))
MicrosoftSQLServerSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
MicrosoftSQLServerSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
MicrosoftSQLServerSettings.struct_class = Types::MicrosoftSQLServerSettings
ModifyEndpointMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
ModifyEndpointMessage.add_member(:endpoint_identifier, Shapes::ShapeRef.new(shape: String, location_name: "EndpointIdentifier"))
ModifyEndpointMessage.add_member(:endpoint_type, Shapes::ShapeRef.new(shape: ReplicationEndpointTypeValue, location_name: "EndpointType"))
ModifyEndpointMessage.add_member(:engine_name, Shapes::ShapeRef.new(shape: String, location_name: "EngineName"))
ModifyEndpointMessage.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
ModifyEndpointMessage.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
ModifyEndpointMessage.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
ModifyEndpointMessage.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
ModifyEndpointMessage.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
ModifyEndpointMessage.add_member(:extra_connection_attributes, Shapes::ShapeRef.new(shape: String, location_name: "ExtraConnectionAttributes"))
ModifyEndpointMessage.add_member(:certificate_arn, Shapes::ShapeRef.new(shape: String, location_name: "CertificateArn"))
ModifyEndpointMessage.add_member(:ssl_mode, Shapes::ShapeRef.new(shape: DmsSslModeValue, location_name: "SslMode"))
ModifyEndpointMessage.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
ModifyEndpointMessage.add_member(:external_table_definition, Shapes::ShapeRef.new(shape: String, location_name: "ExternalTableDefinition"))
ModifyEndpointMessage.add_member(:dynamo_db_settings, Shapes::ShapeRef.new(shape: DynamoDbSettings, location_name: "DynamoDbSettings"))
ModifyEndpointMessage.add_member(:s3_settings, Shapes::ShapeRef.new(shape: S3Settings, location_name: "S3Settings"))
ModifyEndpointMessage.add_member(:dms_transfer_settings, Shapes::ShapeRef.new(shape: DmsTransferSettings, location_name: "DmsTransferSettings"))
ModifyEndpointMessage.add_member(:mongo_db_settings, Shapes::ShapeRef.new(shape: MongoDbSettings, location_name: "MongoDbSettings"))
ModifyEndpointMessage.add_member(:kinesis_settings, Shapes::ShapeRef.new(shape: KinesisSettings, location_name: "KinesisSettings"))
ModifyEndpointMessage.add_member(:kafka_settings, Shapes::ShapeRef.new(shape: KafkaSettings, location_name: "KafkaSettings"))
ModifyEndpointMessage.add_member(:elasticsearch_settings, Shapes::ShapeRef.new(shape: ElasticsearchSettings, location_name: "ElasticsearchSettings"))
ModifyEndpointMessage.add_member(:neptune_settings, Shapes::ShapeRef.new(shape: NeptuneSettings, location_name: "NeptuneSettings"))
ModifyEndpointMessage.add_member(:redshift_settings, Shapes::ShapeRef.new(shape: RedshiftSettings, location_name: "RedshiftSettings"))
ModifyEndpointMessage.add_member(:postgre_sql_settings, Shapes::ShapeRef.new(shape: PostgreSQLSettings, location_name: "PostgreSQLSettings"))
ModifyEndpointMessage.add_member(:my_sql_settings, Shapes::ShapeRef.new(shape: MySQLSettings, location_name: "MySQLSettings"))
ModifyEndpointMessage.add_member(:oracle_settings, Shapes::ShapeRef.new(shape: OracleSettings, location_name: "OracleSettings"))
ModifyEndpointMessage.add_member(:sybase_settings, Shapes::ShapeRef.new(shape: SybaseSettings, location_name: "SybaseSettings"))
ModifyEndpointMessage.add_member(:microsoft_sql_server_settings, Shapes::ShapeRef.new(shape: MicrosoftSQLServerSettings, location_name: "MicrosoftSQLServerSettings"))
ModifyEndpointMessage.add_member(:ibm_db_2_settings, Shapes::ShapeRef.new(shape: IBMDb2Settings, location_name: "IBMDb2Settings"))
ModifyEndpointMessage.add_member(:doc_db_settings, Shapes::ShapeRef.new(shape: DocDbSettings, location_name: "DocDbSettings"))
ModifyEndpointMessage.struct_class = Types::ModifyEndpointMessage
ModifyEndpointResponse.add_member(:endpoint, Shapes::ShapeRef.new(shape: Endpoint, location_name: "Endpoint"))
ModifyEndpointResponse.struct_class = Types::ModifyEndpointResponse
ModifyEventSubscriptionMessage.add_member(:subscription_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SubscriptionName"))
ModifyEventSubscriptionMessage.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: String, location_name: "SnsTopicArn"))
ModifyEventSubscriptionMessage.add_member(:source_type, Shapes::ShapeRef.new(shape: String, location_name: "SourceType"))
ModifyEventSubscriptionMessage.add_member(:event_categories, Shapes::ShapeRef.new(shape: EventCategoriesList, location_name: "EventCategories"))
ModifyEventSubscriptionMessage.add_member(:enabled, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "Enabled"))
ModifyEventSubscriptionMessage.struct_class = Types::ModifyEventSubscriptionMessage
ModifyEventSubscriptionResponse.add_member(:event_subscription, Shapes::ShapeRef.new(shape: EventSubscription, location_name: "EventSubscription"))
ModifyEventSubscriptionResponse.struct_class = Types::ModifyEventSubscriptionResponse
ModifyReplicationInstanceMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
ModifyReplicationInstanceMessage.add_member(:allocated_storage, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "AllocatedStorage"))
ModifyReplicationInstanceMessage.add_member(:apply_immediately, Shapes::ShapeRef.new(shape: Boolean, location_name: "ApplyImmediately"))
ModifyReplicationInstanceMessage.add_member(:replication_instance_class, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceClass"))
ModifyReplicationInstanceMessage.add_member(:vpc_security_group_ids, Shapes::ShapeRef.new(shape: VpcSecurityGroupIdList, location_name: "VpcSecurityGroupIds"))
ModifyReplicationInstanceMessage.add_member(:preferred_maintenance_window, Shapes::ShapeRef.new(shape: String, location_name: "PreferredMaintenanceWindow"))
ModifyReplicationInstanceMessage.add_member(:multi_az, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "MultiAZ"))
ModifyReplicationInstanceMessage.add_member(:engine_version, Shapes::ShapeRef.new(shape: String, location_name: "EngineVersion"))
ModifyReplicationInstanceMessage.add_member(:allow_major_version_upgrade, Shapes::ShapeRef.new(shape: Boolean, location_name: "AllowMajorVersionUpgrade"))
ModifyReplicationInstanceMessage.add_member(:auto_minor_version_upgrade, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AutoMinorVersionUpgrade"))
ModifyReplicationInstanceMessage.add_member(:replication_instance_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceIdentifier"))
ModifyReplicationInstanceMessage.struct_class = Types::ModifyReplicationInstanceMessage
ModifyReplicationInstanceResponse.add_member(:replication_instance, Shapes::ShapeRef.new(shape: ReplicationInstance, location_name: "ReplicationInstance"))
ModifyReplicationInstanceResponse.struct_class = Types::ModifyReplicationInstanceResponse
ModifyReplicationSubnetGroupMessage.add_member(:replication_subnet_group_identifier, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationSubnetGroupIdentifier"))
ModifyReplicationSubnetGroupMessage.add_member(:replication_subnet_group_description, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationSubnetGroupDescription"))
ModifyReplicationSubnetGroupMessage.add_member(:subnet_ids, Shapes::ShapeRef.new(shape: SubnetIdentifierList, required: true, location_name: "SubnetIds"))
ModifyReplicationSubnetGroupMessage.struct_class = Types::ModifyReplicationSubnetGroupMessage
ModifyReplicationSubnetGroupResponse.add_member(:replication_subnet_group, Shapes::ShapeRef.new(shape: ReplicationSubnetGroup, location_name: "ReplicationSubnetGroup"))
ModifyReplicationSubnetGroupResponse.struct_class = Types::ModifyReplicationSubnetGroupResponse
ModifyReplicationTaskMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
ModifyReplicationTaskMessage.add_member(:replication_task_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskIdentifier"))
ModifyReplicationTaskMessage.add_member(:migration_type, Shapes::ShapeRef.new(shape: MigrationTypeValue, location_name: "MigrationType"))
ModifyReplicationTaskMessage.add_member(:table_mappings, Shapes::ShapeRef.new(shape: String, location_name: "TableMappings"))
ModifyReplicationTaskMessage.add_member(:replication_task_settings, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskSettings"))
ModifyReplicationTaskMessage.add_member(:cdc_start_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "CdcStartTime"))
ModifyReplicationTaskMessage.add_member(:cdc_start_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStartPosition"))
ModifyReplicationTaskMessage.add_member(:cdc_stop_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStopPosition"))
ModifyReplicationTaskMessage.add_member(:task_data, Shapes::ShapeRef.new(shape: String, location_name: "TaskData"))
ModifyReplicationTaskMessage.struct_class = Types::ModifyReplicationTaskMessage
ModifyReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
ModifyReplicationTaskResponse.struct_class = Types::ModifyReplicationTaskResponse
MongoDbSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
MongoDbSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
MongoDbSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
MongoDbSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
MongoDbSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
MongoDbSettings.add_member(:auth_type, Shapes::ShapeRef.new(shape: AuthTypeValue, location_name: "AuthType"))
MongoDbSettings.add_member(:auth_mechanism, Shapes::ShapeRef.new(shape: AuthMechanismValue, location_name: "AuthMechanism"))
MongoDbSettings.add_member(:nesting_level, Shapes::ShapeRef.new(shape: NestingLevelValue, location_name: "NestingLevel"))
MongoDbSettings.add_member(:extract_doc_id, Shapes::ShapeRef.new(shape: String, location_name: "ExtractDocId"))
MongoDbSettings.add_member(:docs_to_investigate, Shapes::ShapeRef.new(shape: String, location_name: "DocsToInvestigate"))
MongoDbSettings.add_member(:auth_source, Shapes::ShapeRef.new(shape: String, location_name: "AuthSource"))
MongoDbSettings.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
MongoDbSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
MongoDbSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
MongoDbSettings.struct_class = Types::MongoDbSettings
MoveReplicationTaskMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
MoveReplicationTaskMessage.add_member(:target_replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TargetReplicationInstanceArn"))
MoveReplicationTaskMessage.struct_class = Types::MoveReplicationTaskMessage
MoveReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
MoveReplicationTaskResponse.struct_class = Types::MoveReplicationTaskResponse
MySQLSettings.add_member(:after_connect_script, Shapes::ShapeRef.new(shape: String, location_name: "AfterConnectScript"))
MySQLSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
MySQLSettings.add_member(:events_poll_interval, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "EventsPollInterval"))
MySQLSettings.add_member(:target_db_type, Shapes::ShapeRef.new(shape: TargetDbType, location_name: "TargetDbType"))
MySQLSettings.add_member(:max_file_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxFileSize"))
MySQLSettings.add_member(:parallel_load_threads, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ParallelLoadThreads"))
MySQLSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
MySQLSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
MySQLSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
MySQLSettings.add_member(:server_timezone, Shapes::ShapeRef.new(shape: String, location_name: "ServerTimezone"))
MySQLSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
MySQLSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
MySQLSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
MySQLSettings.struct_class = Types::MySQLSettings
NeptuneSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
NeptuneSettings.add_member(:s3_bucket_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "S3BucketName"))
NeptuneSettings.add_member(:s3_bucket_folder, Shapes::ShapeRef.new(shape: String, required: true, location_name: "S3BucketFolder"))
NeptuneSettings.add_member(:error_retry_duration, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ErrorRetryDuration"))
NeptuneSettings.add_member(:max_file_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxFileSize"))
NeptuneSettings.add_member(:max_retry_count, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxRetryCount"))
NeptuneSettings.add_member(:iam_auth_enabled, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IamAuthEnabled"))
NeptuneSettings.struct_class = Types::NeptuneSettings
OracleSettings.add_member(:add_supplemental_logging, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AddSupplementalLogging"))
OracleSettings.add_member(:archived_log_dest_id, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ArchivedLogDestId"))
OracleSettings.add_member(:additional_archived_log_dest_id, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "AdditionalArchivedLogDestId"))
OracleSettings.add_member(:allow_select_nested_tables, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AllowSelectNestedTables"))
OracleSettings.add_member(:parallel_asm_read_threads, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ParallelAsmReadThreads"))
OracleSettings.add_member(:read_ahead_blocks, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ReadAheadBlocks"))
OracleSettings.add_member(:access_alternate_directly, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AccessAlternateDirectly"))
OracleSettings.add_member(:use_alternate_folder_for_online, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "UseAlternateFolderForOnline"))
OracleSettings.add_member(:oracle_path_prefix, Shapes::ShapeRef.new(shape: String, location_name: "OraclePathPrefix"))
OracleSettings.add_member(:use_path_prefix, Shapes::ShapeRef.new(shape: String, location_name: "UsePathPrefix"))
OracleSettings.add_member(:replace_path_prefix, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ReplacePathPrefix"))
OracleSettings.add_member(:enable_homogenous_tablespace, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "EnableHomogenousTablespace"))
OracleSettings.add_member(:direct_path_no_log, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "DirectPathNoLog"))
OracleSettings.add_member(:archived_logs_only, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ArchivedLogsOnly"))
OracleSettings.add_member(:asm_password, Shapes::ShapeRef.new(shape: SecretString, location_name: "AsmPassword"))
OracleSettings.add_member(:asm_server, Shapes::ShapeRef.new(shape: String, location_name: "AsmServer"))
OracleSettings.add_member(:asm_user, Shapes::ShapeRef.new(shape: String, location_name: "AsmUser"))
OracleSettings.add_member(:char_length_semantics, Shapes::ShapeRef.new(shape: CharLengthSemantics, location_name: "CharLengthSemantics"))
OracleSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
OracleSettings.add_member(:direct_path_parallel_load, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "DirectPathParallelLoad"))
OracleSettings.add_member(:fail_tasks_on_lob_truncation, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "FailTasksOnLobTruncation"))
OracleSettings.add_member(:number_datatype_scale, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "NumberDatatypeScale"))
OracleSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
OracleSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
OracleSettings.add_member(:read_table_space_name, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ReadTableSpaceName"))
OracleSettings.add_member(:retry_interval, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "RetryInterval"))
OracleSettings.add_member(:security_db_encryption, Shapes::ShapeRef.new(shape: SecretString, location_name: "SecurityDbEncryption"))
OracleSettings.add_member(:security_db_encryption_name, Shapes::ShapeRef.new(shape: String, location_name: "SecurityDbEncryptionName"))
OracleSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
OracleSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
OracleSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
OracleSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
OracleSettings.add_member(:secrets_manager_oracle_asm_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerOracleAsmAccessRoleArn"))
OracleSettings.add_member(:secrets_manager_oracle_asm_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerOracleAsmSecretId"))
OracleSettings.struct_class = Types::OracleSettings
OrderableReplicationInstance.add_member(:engine_version, Shapes::ShapeRef.new(shape: String, location_name: "EngineVersion"))
OrderableReplicationInstance.add_member(:replication_instance_class, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceClass"))
OrderableReplicationInstance.add_member(:storage_type, Shapes::ShapeRef.new(shape: String, location_name: "StorageType"))
OrderableReplicationInstance.add_member(:min_allocated_storage, Shapes::ShapeRef.new(shape: Integer, location_name: "MinAllocatedStorage"))
OrderableReplicationInstance.add_member(:max_allocated_storage, Shapes::ShapeRef.new(shape: Integer, location_name: "MaxAllocatedStorage"))
OrderableReplicationInstance.add_member(:default_allocated_storage, Shapes::ShapeRef.new(shape: Integer, location_name: "DefaultAllocatedStorage"))
OrderableReplicationInstance.add_member(:included_allocated_storage, Shapes::ShapeRef.new(shape: Integer, location_name: "IncludedAllocatedStorage"))
OrderableReplicationInstance.add_member(:availability_zones, Shapes::ShapeRef.new(shape: AvailabilityZonesList, location_name: "AvailabilityZones"))
OrderableReplicationInstance.add_member(:release_status, Shapes::ShapeRef.new(shape: ReleaseStatusValues, location_name: "ReleaseStatus"))
OrderableReplicationInstance.struct_class = Types::OrderableReplicationInstance
OrderableReplicationInstanceList.member = Shapes::ShapeRef.new(shape: OrderableReplicationInstance)
PendingMaintenanceAction.add_member(:action, Shapes::ShapeRef.new(shape: String, location_name: "Action"))
PendingMaintenanceAction.add_member(:auto_applied_after_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "AutoAppliedAfterDate"))
PendingMaintenanceAction.add_member(:forced_apply_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ForcedApplyDate"))
PendingMaintenanceAction.add_member(:opt_in_status, Shapes::ShapeRef.new(shape: String, location_name: "OptInStatus"))
PendingMaintenanceAction.add_member(:current_apply_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "CurrentApplyDate"))
PendingMaintenanceAction.add_member(:description, Shapes::ShapeRef.new(shape: String, location_name: "Description"))
PendingMaintenanceAction.struct_class = Types::PendingMaintenanceAction
PendingMaintenanceActionDetails.member = Shapes::ShapeRef.new(shape: PendingMaintenanceAction)
PendingMaintenanceActions.member = Shapes::ShapeRef.new(shape: ResourcePendingMaintenanceActions)
PostgreSQLSettings.add_member(:after_connect_script, Shapes::ShapeRef.new(shape: String, location_name: "AfterConnectScript"))
PostgreSQLSettings.add_member(:capture_ddls, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CaptureDdls"))
PostgreSQLSettings.add_member(:max_file_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxFileSize"))
PostgreSQLSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
PostgreSQLSettings.add_member(:ddl_artifacts_schema, Shapes::ShapeRef.new(shape: String, location_name: "DdlArtifactsSchema"))
PostgreSQLSettings.add_member(:execute_timeout, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ExecuteTimeout"))
PostgreSQLSettings.add_member(:fail_tasks_on_lob_truncation, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "FailTasksOnLobTruncation"))
PostgreSQLSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
PostgreSQLSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
PostgreSQLSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
PostgreSQLSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
PostgreSQLSettings.add_member(:slot_name, Shapes::ShapeRef.new(shape: String, location_name: "SlotName"))
PostgreSQLSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
PostgreSQLSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
PostgreSQLSettings.struct_class = Types::PostgreSQLSettings
RebootReplicationInstanceMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
RebootReplicationInstanceMessage.add_member(:force_failover, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ForceFailover"))
RebootReplicationInstanceMessage.struct_class = Types::RebootReplicationInstanceMessage
RebootReplicationInstanceResponse.add_member(:replication_instance, Shapes::ShapeRef.new(shape: ReplicationInstance, location_name: "ReplicationInstance"))
RebootReplicationInstanceResponse.struct_class = Types::RebootReplicationInstanceResponse
RedshiftSettings.add_member(:accept_any_date, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "AcceptAnyDate"))
RedshiftSettings.add_member(:after_connect_script, Shapes::ShapeRef.new(shape: String, location_name: "AfterConnectScript"))
RedshiftSettings.add_member(:bucket_folder, Shapes::ShapeRef.new(shape: String, location_name: "BucketFolder"))
RedshiftSettings.add_member(:bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "BucketName"))
RedshiftSettings.add_member(:case_sensitive_names, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CaseSensitiveNames"))
RedshiftSettings.add_member(:comp_update, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CompUpdate"))
RedshiftSettings.add_member(:connection_timeout, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "ConnectionTimeout"))
RedshiftSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
RedshiftSettings.add_member(:date_format, Shapes::ShapeRef.new(shape: String, location_name: "DateFormat"))
RedshiftSettings.add_member(:empty_as_null, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "EmptyAsNull"))
RedshiftSettings.add_member(:encryption_mode, Shapes::ShapeRef.new(shape: EncryptionModeValue, location_name: "EncryptionMode"))
RedshiftSettings.add_member(:explicit_ids, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ExplicitIds"))
RedshiftSettings.add_member(:file_transfer_upload_streams, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "FileTransferUploadStreams"))
RedshiftSettings.add_member(:load_timeout, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "LoadTimeout"))
RedshiftSettings.add_member(:max_file_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "MaxFileSize"))
RedshiftSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
RedshiftSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
RedshiftSettings.add_member(:remove_quotes, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "RemoveQuotes"))
RedshiftSettings.add_member(:replace_invalid_chars, Shapes::ShapeRef.new(shape: String, location_name: "ReplaceInvalidChars"))
RedshiftSettings.add_member(:replace_chars, Shapes::ShapeRef.new(shape: String, location_name: "ReplaceChars"))
RedshiftSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
RedshiftSettings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
RedshiftSettings.add_member(:server_side_encryption_kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "ServerSideEncryptionKmsKeyId"))
RedshiftSettings.add_member(:time_format, Shapes::ShapeRef.new(shape: String, location_name: "TimeFormat"))
RedshiftSettings.add_member(:trim_blanks, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "TrimBlanks"))
RedshiftSettings.add_member(:truncate_columns, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "TruncateColumns"))
RedshiftSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
RedshiftSettings.add_member(:write_buffer_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "WriteBufferSize"))
RedshiftSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
RedshiftSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
RedshiftSettings.struct_class = Types::RedshiftSettings
RefreshSchemasMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
RefreshSchemasMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
RefreshSchemasMessage.struct_class = Types::RefreshSchemasMessage
RefreshSchemasResponse.add_member(:refresh_schemas_status, Shapes::ShapeRef.new(shape: RefreshSchemasStatus, location_name: "RefreshSchemasStatus"))
RefreshSchemasResponse.struct_class = Types::RefreshSchemasResponse
RefreshSchemasStatus.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, location_name: "EndpointArn"))
RefreshSchemasStatus.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
RefreshSchemasStatus.add_member(:status, Shapes::ShapeRef.new(shape: RefreshSchemasStatusTypeValue, location_name: "Status"))
RefreshSchemasStatus.add_member(:last_refresh_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "LastRefreshDate"))
RefreshSchemasStatus.add_member(:last_failure_message, Shapes::ShapeRef.new(shape: String, location_name: "LastFailureMessage"))
RefreshSchemasStatus.struct_class = Types::RefreshSchemasStatus
ReloadTablesMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
ReloadTablesMessage.add_member(:tables_to_reload, Shapes::ShapeRef.new(shape: TableListToReload, required: true, location_name: "TablesToReload"))
ReloadTablesMessage.add_member(:reload_option, Shapes::ShapeRef.new(shape: ReloadOptionValue, location_name: "ReloadOption"))
ReloadTablesMessage.struct_class = Types::ReloadTablesMessage
ReloadTablesResponse.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
ReloadTablesResponse.struct_class = Types::ReloadTablesResponse
RemoveTagsFromResourceMessage.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResourceArn"))
RemoveTagsFromResourceMessage.add_member(:tag_keys, Shapes::ShapeRef.new(shape: KeyList, required: true, location_name: "TagKeys"))
RemoveTagsFromResourceMessage.struct_class = Types::RemoveTagsFromResourceMessage
RemoveTagsFromResourceResponse.struct_class = Types::RemoveTagsFromResourceResponse
ReplicationInstance.add_member(:replication_instance_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceIdentifier"))
ReplicationInstance.add_member(:replication_instance_class, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceClass"))
ReplicationInstance.add_member(:replication_instance_status, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceStatus"))
ReplicationInstance.add_member(:allocated_storage, Shapes::ShapeRef.new(shape: Integer, location_name: "AllocatedStorage"))
ReplicationInstance.add_member(:instance_create_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "InstanceCreateTime"))
ReplicationInstance.add_member(:vpc_security_groups, Shapes::ShapeRef.new(shape: VpcSecurityGroupMembershipList, location_name: "VpcSecurityGroups"))
ReplicationInstance.add_member(:availability_zone, Shapes::ShapeRef.new(shape: String, location_name: "AvailabilityZone"))
ReplicationInstance.add_member(:replication_subnet_group, Shapes::ShapeRef.new(shape: ReplicationSubnetGroup, location_name: "ReplicationSubnetGroup"))
ReplicationInstance.add_member(:preferred_maintenance_window, Shapes::ShapeRef.new(shape: String, location_name: "PreferredMaintenanceWindow"))
ReplicationInstance.add_member(:pending_modified_values, Shapes::ShapeRef.new(shape: ReplicationPendingModifiedValues, location_name: "PendingModifiedValues"))
ReplicationInstance.add_member(:multi_az, Shapes::ShapeRef.new(shape: Boolean, location_name: "MultiAZ"))
ReplicationInstance.add_member(:engine_version, Shapes::ShapeRef.new(shape: String, location_name: "EngineVersion"))
ReplicationInstance.add_member(:auto_minor_version_upgrade, Shapes::ShapeRef.new(shape: Boolean, location_name: "AutoMinorVersionUpgrade"))
ReplicationInstance.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
ReplicationInstance.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
ReplicationInstance.add_member(:replication_instance_public_ip_address, Shapes::ShapeRef.new(shape: String, deprecated: true, location_name: "ReplicationInstancePublicIpAddress"))
ReplicationInstance.add_member(:replication_instance_private_ip_address, Shapes::ShapeRef.new(shape: String, deprecated: true, location_name: "ReplicationInstancePrivateIpAddress"))
ReplicationInstance.add_member(:replication_instance_public_ip_addresses, Shapes::ShapeRef.new(shape: ReplicationInstancePublicIpAddressList, location_name: "ReplicationInstancePublicIpAddresses"))
ReplicationInstance.add_member(:replication_instance_private_ip_addresses, Shapes::ShapeRef.new(shape: ReplicationInstancePrivateIpAddressList, location_name: "ReplicationInstancePrivateIpAddresses"))
ReplicationInstance.add_member(:publicly_accessible, Shapes::ShapeRef.new(shape: Boolean, location_name: "PubliclyAccessible"))
ReplicationInstance.add_member(:secondary_availability_zone, Shapes::ShapeRef.new(shape: String, location_name: "SecondaryAvailabilityZone"))
ReplicationInstance.add_member(:free_until, Shapes::ShapeRef.new(shape: TStamp, location_name: "FreeUntil"))
ReplicationInstance.add_member(:dns_name_servers, Shapes::ShapeRef.new(shape: String, location_name: "DnsNameServers"))
ReplicationInstance.struct_class = Types::ReplicationInstance
ReplicationInstanceList.member = Shapes::ShapeRef.new(shape: ReplicationInstance)
ReplicationInstancePrivateIpAddressList.member = Shapes::ShapeRef.new(shape: String)
ReplicationInstancePublicIpAddressList.member = Shapes::ShapeRef.new(shape: String)
ReplicationInstanceTaskLog.add_member(:replication_task_name, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskName"))
ReplicationInstanceTaskLog.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
ReplicationInstanceTaskLog.add_member(:replication_instance_task_log_size, Shapes::ShapeRef.new(shape: Long, location_name: "ReplicationInstanceTaskLogSize"))
ReplicationInstanceTaskLog.struct_class = Types::ReplicationInstanceTaskLog
ReplicationInstanceTaskLogsList.member = Shapes::ShapeRef.new(shape: ReplicationInstanceTaskLog)
ReplicationPendingModifiedValues.add_member(:replication_instance_class, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceClass"))
ReplicationPendingModifiedValues.add_member(:allocated_storage, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "AllocatedStorage"))
ReplicationPendingModifiedValues.add_member(:multi_az, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "MultiAZ"))
ReplicationPendingModifiedValues.add_member(:engine_version, Shapes::ShapeRef.new(shape: String, location_name: "EngineVersion"))
ReplicationPendingModifiedValues.struct_class = Types::ReplicationPendingModifiedValues
ReplicationSubnetGroup.add_member(:replication_subnet_group_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationSubnetGroupIdentifier"))
ReplicationSubnetGroup.add_member(:replication_subnet_group_description, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationSubnetGroupDescription"))
ReplicationSubnetGroup.add_member(:vpc_id, Shapes::ShapeRef.new(shape: String, location_name: "VpcId"))
ReplicationSubnetGroup.add_member(:subnet_group_status, Shapes::ShapeRef.new(shape: String, location_name: "SubnetGroupStatus"))
ReplicationSubnetGroup.add_member(:subnets, Shapes::ShapeRef.new(shape: SubnetList, location_name: "Subnets"))
ReplicationSubnetGroup.struct_class = Types::ReplicationSubnetGroup
ReplicationSubnetGroupDoesNotCoverEnoughAZs.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
ReplicationSubnetGroupDoesNotCoverEnoughAZs.struct_class = Types::ReplicationSubnetGroupDoesNotCoverEnoughAZs
ReplicationSubnetGroups.member = Shapes::ShapeRef.new(shape: ReplicationSubnetGroup)
ReplicationTask.add_member(:replication_task_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskIdentifier"))
ReplicationTask.add_member(:source_endpoint_arn, Shapes::ShapeRef.new(shape: String, location_name: "SourceEndpointArn"))
ReplicationTask.add_member(:target_endpoint_arn, Shapes::ShapeRef.new(shape: String, location_name: "TargetEndpointArn"))
ReplicationTask.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceArn"))
ReplicationTask.add_member(:migration_type, Shapes::ShapeRef.new(shape: MigrationTypeValue, location_name: "MigrationType"))
ReplicationTask.add_member(:table_mappings, Shapes::ShapeRef.new(shape: String, location_name: "TableMappings"))
ReplicationTask.add_member(:replication_task_settings, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskSettings"))
ReplicationTask.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
ReplicationTask.add_member(:last_failure_message, Shapes::ShapeRef.new(shape: String, location_name: "LastFailureMessage"))
ReplicationTask.add_member(:stop_reason, Shapes::ShapeRef.new(shape: String, location_name: "StopReason"))
ReplicationTask.add_member(:replication_task_creation_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ReplicationTaskCreationDate"))
ReplicationTask.add_member(:replication_task_start_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ReplicationTaskStartDate"))
ReplicationTask.add_member(:cdc_start_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStartPosition"))
ReplicationTask.add_member(:cdc_stop_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStopPosition"))
ReplicationTask.add_member(:recovery_checkpoint, Shapes::ShapeRef.new(shape: String, location_name: "RecoveryCheckpoint"))
ReplicationTask.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
ReplicationTask.add_member(:replication_task_stats, Shapes::ShapeRef.new(shape: ReplicationTaskStats, location_name: "ReplicationTaskStats"))
ReplicationTask.add_member(:task_data, Shapes::ShapeRef.new(shape: String, location_name: "TaskData"))
ReplicationTask.add_member(:target_replication_instance_arn, Shapes::ShapeRef.new(shape: String, location_name: "TargetReplicationInstanceArn"))
ReplicationTask.struct_class = Types::ReplicationTask
ReplicationTaskAssessmentResult.add_member(:replication_task_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskIdentifier"))
ReplicationTaskAssessmentResult.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
ReplicationTaskAssessmentResult.add_member(:replication_task_last_assessment_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ReplicationTaskLastAssessmentDate"))
ReplicationTaskAssessmentResult.add_member(:assessment_status, Shapes::ShapeRef.new(shape: String, location_name: "AssessmentStatus"))
ReplicationTaskAssessmentResult.add_member(:assessment_results_file, Shapes::ShapeRef.new(shape: String, location_name: "AssessmentResultsFile"))
ReplicationTaskAssessmentResult.add_member(:assessment_results, Shapes::ShapeRef.new(shape: String, location_name: "AssessmentResults"))
ReplicationTaskAssessmentResult.add_member(:s3_object_url, Shapes::ShapeRef.new(shape: String, location_name: "S3ObjectUrl"))
ReplicationTaskAssessmentResult.struct_class = Types::ReplicationTaskAssessmentResult
ReplicationTaskAssessmentResultList.member = Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentResult)
ReplicationTaskAssessmentRun.add_member(:replication_task_assessment_run_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskAssessmentRunArn"))
ReplicationTaskAssessmentRun.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskArn"))
ReplicationTaskAssessmentRun.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
ReplicationTaskAssessmentRun.add_member(:replication_task_assessment_run_creation_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ReplicationTaskAssessmentRunCreationDate"))
ReplicationTaskAssessmentRun.add_member(:assessment_progress, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRunProgress, location_name: "AssessmentProgress"))
ReplicationTaskAssessmentRun.add_member(:last_failure_message, Shapes::ShapeRef.new(shape: String, location_name: "LastFailureMessage"))
ReplicationTaskAssessmentRun.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
ReplicationTaskAssessmentRun.add_member(:result_location_bucket, Shapes::ShapeRef.new(shape: String, location_name: "ResultLocationBucket"))
ReplicationTaskAssessmentRun.add_member(:result_location_folder, Shapes::ShapeRef.new(shape: String, location_name: "ResultLocationFolder"))
ReplicationTaskAssessmentRun.add_member(:result_encryption_mode, Shapes::ShapeRef.new(shape: String, location_name: "ResultEncryptionMode"))
ReplicationTaskAssessmentRun.add_member(:result_kms_key_arn, Shapes::ShapeRef.new(shape: String, location_name: "ResultKmsKeyArn"))
ReplicationTaskAssessmentRun.add_member(:assessment_run_name, Shapes::ShapeRef.new(shape: String, location_name: "AssessmentRunName"))
ReplicationTaskAssessmentRun.struct_class = Types::ReplicationTaskAssessmentRun
ReplicationTaskAssessmentRunList.member = Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRun)
ReplicationTaskAssessmentRunProgress.add_member(:individual_assessment_count, Shapes::ShapeRef.new(shape: Integer, location_name: "IndividualAssessmentCount"))
ReplicationTaskAssessmentRunProgress.add_member(:individual_assessment_completed_count, Shapes::ShapeRef.new(shape: Integer, location_name: "IndividualAssessmentCompletedCount"))
ReplicationTaskAssessmentRunProgress.struct_class = Types::ReplicationTaskAssessmentRunProgress
ReplicationTaskIndividualAssessment.add_member(:replication_task_individual_assessment_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskIndividualAssessmentArn"))
ReplicationTaskIndividualAssessment.add_member(:replication_task_assessment_run_arn, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationTaskAssessmentRunArn"))
ReplicationTaskIndividualAssessment.add_member(:individual_assessment_name, Shapes::ShapeRef.new(shape: String, location_name: "IndividualAssessmentName"))
ReplicationTaskIndividualAssessment.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
ReplicationTaskIndividualAssessment.add_member(:replication_task_individual_assessment_start_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "ReplicationTaskIndividualAssessmentStartDate"))
ReplicationTaskIndividualAssessment.struct_class = Types::ReplicationTaskIndividualAssessment
ReplicationTaskIndividualAssessmentList.member = Shapes::ShapeRef.new(shape: ReplicationTaskIndividualAssessment)
ReplicationTaskList.member = Shapes::ShapeRef.new(shape: ReplicationTask)
ReplicationTaskStats.add_member(:full_load_progress_percent, Shapes::ShapeRef.new(shape: Integer, location_name: "FullLoadProgressPercent"))
ReplicationTaskStats.add_member(:elapsed_time_millis, Shapes::ShapeRef.new(shape: Long, location_name: "ElapsedTimeMillis"))
ReplicationTaskStats.add_member(:tables_loaded, Shapes::ShapeRef.new(shape: Integer, location_name: "TablesLoaded"))
ReplicationTaskStats.add_member(:tables_loading, Shapes::ShapeRef.new(shape: Integer, location_name: "TablesLoading"))
ReplicationTaskStats.add_member(:tables_queued, Shapes::ShapeRef.new(shape: Integer, location_name: "TablesQueued"))
ReplicationTaskStats.add_member(:tables_errored, Shapes::ShapeRef.new(shape: Integer, location_name: "TablesErrored"))
ReplicationTaskStats.add_member(:fresh_start_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "FreshStartDate"))
ReplicationTaskStats.add_member(:start_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "StartDate"))
ReplicationTaskStats.add_member(:stop_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "StopDate"))
ReplicationTaskStats.add_member(:full_load_start_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "FullLoadStartDate"))
ReplicationTaskStats.add_member(:full_load_finish_date, Shapes::ShapeRef.new(shape: TStamp, location_name: "FullLoadFinishDate"))
ReplicationTaskStats.struct_class = Types::ReplicationTaskStats
ResourceAlreadyExistsFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
ResourceAlreadyExistsFault.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, location_name: "resourceArn"))
ResourceAlreadyExistsFault.struct_class = Types::ResourceAlreadyExistsFault
ResourceNotFoundFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
ResourceNotFoundFault.struct_class = Types::ResourceNotFoundFault
ResourcePendingMaintenanceActions.add_member(:resource_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ResourceIdentifier"))
ResourcePendingMaintenanceActions.add_member(:pending_maintenance_action_details, Shapes::ShapeRef.new(shape: PendingMaintenanceActionDetails, location_name: "PendingMaintenanceActionDetails"))
ResourcePendingMaintenanceActions.struct_class = Types::ResourcePendingMaintenanceActions
ResourceQuotaExceededFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
ResourceQuotaExceededFault.struct_class = Types::ResourceQuotaExceededFault
S3AccessDeniedFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
S3AccessDeniedFault.struct_class = Types::S3AccessDeniedFault
S3ResourceNotFoundFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
S3ResourceNotFoundFault.struct_class = Types::S3ResourceNotFoundFault
S3Settings.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "ServiceAccessRoleArn"))
S3Settings.add_member(:external_table_definition, Shapes::ShapeRef.new(shape: String, location_name: "ExternalTableDefinition"))
S3Settings.add_member(:csv_row_delimiter, Shapes::ShapeRef.new(shape: String, location_name: "CsvRowDelimiter"))
S3Settings.add_member(:csv_delimiter, Shapes::ShapeRef.new(shape: String, location_name: "CsvDelimiter"))
S3Settings.add_member(:bucket_folder, Shapes::ShapeRef.new(shape: String, location_name: "BucketFolder"))
S3Settings.add_member(:bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "BucketName"))
S3Settings.add_member(:compression_type, Shapes::ShapeRef.new(shape: CompressionTypeValue, location_name: "CompressionType"))
S3Settings.add_member(:encryption_mode, Shapes::ShapeRef.new(shape: EncryptionModeValue, location_name: "EncryptionMode"))
S3Settings.add_member(:server_side_encryption_kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "ServerSideEncryptionKmsKeyId"))
S3Settings.add_member(:data_format, Shapes::ShapeRef.new(shape: DataFormatValue, location_name: "DataFormat"))
S3Settings.add_member(:encoding_type, Shapes::ShapeRef.new(shape: EncodingTypeValue, location_name: "EncodingType"))
S3Settings.add_member(:dict_page_size_limit, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "DictPageSizeLimit"))
S3Settings.add_member(:row_group_length, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "RowGroupLength"))
S3Settings.add_member(:data_page_size, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "DataPageSize"))
S3Settings.add_member(:parquet_version, Shapes::ShapeRef.new(shape: ParquetVersionValue, location_name: "ParquetVersion"))
S3Settings.add_member(:enable_statistics, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "EnableStatistics"))
S3Settings.add_member(:include_op_for_full_load, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "IncludeOpForFullLoad"))
S3Settings.add_member(:cdc_inserts_only, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CdcInsertsOnly"))
S3Settings.add_member(:timestamp_column_name, Shapes::ShapeRef.new(shape: String, location_name: "TimestampColumnName"))
S3Settings.add_member(:parquet_timestamp_in_millisecond, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "ParquetTimestampInMillisecond"))
S3Settings.add_member(:cdc_inserts_and_updates, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CdcInsertsAndUpdates"))
S3Settings.add_member(:date_partition_enabled, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "DatePartitionEnabled"))
S3Settings.add_member(:date_partition_sequence, Shapes::ShapeRef.new(shape: DatePartitionSequenceValue, location_name: "DatePartitionSequence"))
S3Settings.add_member(:date_partition_delimiter, Shapes::ShapeRef.new(shape: DatePartitionDelimiterValue, location_name: "DatePartitionDelimiter"))
S3Settings.add_member(:use_csv_no_sup_value, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "UseCsvNoSupValue"))
S3Settings.add_member(:csv_no_sup_value, Shapes::ShapeRef.new(shape: String, location_name: "CsvNoSupValue"))
S3Settings.add_member(:preserve_transactions, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "PreserveTransactions"))
S3Settings.add_member(:cdc_path, Shapes::ShapeRef.new(shape: String, location_name: "CdcPath"))
S3Settings.struct_class = Types::S3Settings
SNSInvalidTopicFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
SNSInvalidTopicFault.struct_class = Types::SNSInvalidTopicFault
SNSNoAuthorizationFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
SNSNoAuthorizationFault.struct_class = Types::SNSNoAuthorizationFault
SchemaList.member = Shapes::ShapeRef.new(shape: String)
SourceIdsList.member = Shapes::ShapeRef.new(shape: String)
StartReplicationTaskAssessmentMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
StartReplicationTaskAssessmentMessage.struct_class = Types::StartReplicationTaskAssessmentMessage
StartReplicationTaskAssessmentResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
StartReplicationTaskAssessmentResponse.struct_class = Types::StartReplicationTaskAssessmentResponse
StartReplicationTaskAssessmentRunMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
StartReplicationTaskAssessmentRunMessage.add_member(:service_access_role_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceAccessRoleArn"))
StartReplicationTaskAssessmentRunMessage.add_member(:result_location_bucket, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResultLocationBucket"))
StartReplicationTaskAssessmentRunMessage.add_member(:result_location_folder, Shapes::ShapeRef.new(shape: String, location_name: "ResultLocationFolder"))
StartReplicationTaskAssessmentRunMessage.add_member(:result_encryption_mode, Shapes::ShapeRef.new(shape: String, location_name: "ResultEncryptionMode"))
StartReplicationTaskAssessmentRunMessage.add_member(:result_kms_key_arn, Shapes::ShapeRef.new(shape: String, location_name: "ResultKmsKeyArn"))
StartReplicationTaskAssessmentRunMessage.add_member(:assessment_run_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "AssessmentRunName"))
StartReplicationTaskAssessmentRunMessage.add_member(:include_only, Shapes::ShapeRef.new(shape: IncludeTestList, location_name: "IncludeOnly"))
StartReplicationTaskAssessmentRunMessage.add_member(:exclude, Shapes::ShapeRef.new(shape: ExcludeTestList, location_name: "Exclude"))
StartReplicationTaskAssessmentRunMessage.struct_class = Types::StartReplicationTaskAssessmentRunMessage
StartReplicationTaskAssessmentRunResponse.add_member(:replication_task_assessment_run, Shapes::ShapeRef.new(shape: ReplicationTaskAssessmentRun, location_name: "ReplicationTaskAssessmentRun"))
StartReplicationTaskAssessmentRunResponse.struct_class = Types::StartReplicationTaskAssessmentRunResponse
StartReplicationTaskMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
StartReplicationTaskMessage.add_member(:start_replication_task_type, Shapes::ShapeRef.new(shape: StartReplicationTaskTypeValue, required: true, location_name: "StartReplicationTaskType"))
StartReplicationTaskMessage.add_member(:cdc_start_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "CdcStartTime"))
StartReplicationTaskMessage.add_member(:cdc_start_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStartPosition"))
StartReplicationTaskMessage.add_member(:cdc_stop_position, Shapes::ShapeRef.new(shape: String, location_name: "CdcStopPosition"))
StartReplicationTaskMessage.struct_class = Types::StartReplicationTaskMessage
StartReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
StartReplicationTaskResponse.struct_class = Types::StartReplicationTaskResponse
StopReplicationTaskMessage.add_member(:replication_task_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationTaskArn"))
StopReplicationTaskMessage.struct_class = Types::StopReplicationTaskMessage
StopReplicationTaskResponse.add_member(:replication_task, Shapes::ShapeRef.new(shape: ReplicationTask, location_name: "ReplicationTask"))
StopReplicationTaskResponse.struct_class = Types::StopReplicationTaskResponse
StorageQuotaExceededFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
StorageQuotaExceededFault.struct_class = Types::StorageQuotaExceededFault
Subnet.add_member(:subnet_identifier, Shapes::ShapeRef.new(shape: String, location_name: "SubnetIdentifier"))
Subnet.add_member(:subnet_availability_zone, Shapes::ShapeRef.new(shape: AvailabilityZone, location_name: "SubnetAvailabilityZone"))
Subnet.add_member(:subnet_status, Shapes::ShapeRef.new(shape: String, location_name: "SubnetStatus"))
Subnet.struct_class = Types::Subnet
SubnetAlreadyInUse.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
SubnetAlreadyInUse.struct_class = Types::SubnetAlreadyInUse
SubnetIdentifierList.member = Shapes::ShapeRef.new(shape: String)
SubnetList.member = Shapes::ShapeRef.new(shape: Subnet)
SupportedEndpointType.add_member(:engine_name, Shapes::ShapeRef.new(shape: String, location_name: "EngineName"))
SupportedEndpointType.add_member(:supports_cdc, Shapes::ShapeRef.new(shape: Boolean, location_name: "SupportsCDC"))
SupportedEndpointType.add_member(:endpoint_type, Shapes::ShapeRef.new(shape: ReplicationEndpointTypeValue, location_name: "EndpointType"))
SupportedEndpointType.add_member(:replication_instance_engine_minimum_version, Shapes::ShapeRef.new(shape: String, location_name: "ReplicationInstanceEngineMinimumVersion"))
SupportedEndpointType.add_member(:engine_display_name, Shapes::ShapeRef.new(shape: String, location_name: "EngineDisplayName"))
SupportedEndpointType.struct_class = Types::SupportedEndpointType
SupportedEndpointTypeList.member = Shapes::ShapeRef.new(shape: SupportedEndpointType)
SybaseSettings.add_member(:database_name, Shapes::ShapeRef.new(shape: String, location_name: "DatabaseName"))
SybaseSettings.add_member(:password, Shapes::ShapeRef.new(shape: SecretString, location_name: "Password"))
SybaseSettings.add_member(:port, Shapes::ShapeRef.new(shape: IntegerOptional, location_name: "Port"))
SybaseSettings.add_member(:server_name, Shapes::ShapeRef.new(shape: String, location_name: "ServerName"))
SybaseSettings.add_member(:username, Shapes::ShapeRef.new(shape: String, location_name: "Username"))
SybaseSettings.add_member(:secrets_manager_access_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerAccessRoleArn"))
SybaseSettings.add_member(:secrets_manager_secret_id, Shapes::ShapeRef.new(shape: String, location_name: "SecretsManagerSecretId"))
SybaseSettings.struct_class = Types::SybaseSettings
TableListToReload.member = Shapes::ShapeRef.new(shape: TableToReload)
TableStatistics.add_member(:schema_name, Shapes::ShapeRef.new(shape: String, location_name: "SchemaName"))
TableStatistics.add_member(:table_name, Shapes::ShapeRef.new(shape: String, location_name: "TableName"))
TableStatistics.add_member(:inserts, Shapes::ShapeRef.new(shape: Long, location_name: "Inserts"))
TableStatistics.add_member(:deletes, Shapes::ShapeRef.new(shape: Long, location_name: "Deletes"))
TableStatistics.add_member(:updates, Shapes::ShapeRef.new(shape: Long, location_name: "Updates"))
TableStatistics.add_member(:ddls, Shapes::ShapeRef.new(shape: Long, location_name: "Ddls"))
TableStatistics.add_member(:full_load_rows, Shapes::ShapeRef.new(shape: Long, location_name: "FullLoadRows"))
TableStatistics.add_member(:full_load_condtnl_chk_failed_rows, Shapes::ShapeRef.new(shape: Long, location_name: "FullLoadCondtnlChkFailedRows"))
TableStatistics.add_member(:full_load_error_rows, Shapes::ShapeRef.new(shape: Long, location_name: "FullLoadErrorRows"))
TableStatistics.add_member(:full_load_start_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "FullLoadStartTime"))
TableStatistics.add_member(:full_load_end_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "FullLoadEndTime"))
TableStatistics.add_member(:full_load_reloaded, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "FullLoadReloaded"))
TableStatistics.add_member(:last_update_time, Shapes::ShapeRef.new(shape: TStamp, location_name: "LastUpdateTime"))
TableStatistics.add_member(:table_state, Shapes::ShapeRef.new(shape: String, location_name: "TableState"))
TableStatistics.add_member(:validation_pending_records, Shapes::ShapeRef.new(shape: Long, location_name: "ValidationPendingRecords"))
TableStatistics.add_member(:validation_failed_records, Shapes::ShapeRef.new(shape: Long, location_name: "ValidationFailedRecords"))
TableStatistics.add_member(:validation_suspended_records, Shapes::ShapeRef.new(shape: Long, location_name: "ValidationSuspendedRecords"))
TableStatistics.add_member(:validation_state, Shapes::ShapeRef.new(shape: String, location_name: "ValidationState"))
TableStatistics.add_member(:validation_state_details, Shapes::ShapeRef.new(shape: String, location_name: "ValidationStateDetails"))
TableStatistics.struct_class = Types::TableStatistics
TableStatisticsList.member = Shapes::ShapeRef.new(shape: TableStatistics)
TableToReload.add_member(:schema_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "SchemaName"))
TableToReload.add_member(:table_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TableName"))
TableToReload.struct_class = Types::TableToReload
Tag.add_member(:key, Shapes::ShapeRef.new(shape: String, location_name: "Key"))
Tag.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
Tag.struct_class = Types::Tag
TagList.member = Shapes::ShapeRef.new(shape: Tag)
TestConnectionMessage.add_member(:replication_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ReplicationInstanceArn"))
TestConnectionMessage.add_member(:endpoint_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "EndpointArn"))
TestConnectionMessage.struct_class = Types::TestConnectionMessage
TestConnectionResponse.add_member(:connection, Shapes::ShapeRef.new(shape: Connection, location_name: "Connection"))
TestConnectionResponse.struct_class = Types::TestConnectionResponse
UpgradeDependencyFailureFault.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
UpgradeDependencyFailureFault.struct_class = Types::UpgradeDependencyFailureFault
VpcSecurityGroupIdList.member = Shapes::ShapeRef.new(shape: String)
VpcSecurityGroupMembership.add_member(:vpc_security_group_id, Shapes::ShapeRef.new(shape: String, location_name: "VpcSecurityGroupId"))
VpcSecurityGroupMembership.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "Status"))
VpcSecurityGroupMembership.struct_class = Types::VpcSecurityGroupMembership
VpcSecurityGroupMembershipList.member = Shapes::ShapeRef.new(shape: VpcSecurityGroupMembership)
# @api private
API = Seahorse::Model::Api.new.tap do |api|
api.version = "2016-01-01"
api.metadata = {
"apiVersion" => "2016-01-01",
"endpointPrefix" => "dms",
"jsonVersion" => "1.1",
"protocol" => "json",
"serviceFullName" => "AWS Database Migration Service",
"serviceId" => "Database Migration Service",
"signatureVersion" => "v4",
"targetPrefix" => "AmazonDMSv20160101",
"uid" => "dms-2016-01-01",
}
api.add_operation(:add_tags_to_resource, Seahorse::Model::Operation.new.tap do |o|
o.name = "AddTagsToResource"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: AddTagsToResourceMessage)
o.output = Shapes::ShapeRef.new(shape: AddTagsToResourceResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:apply_pending_maintenance_action, Seahorse::Model::Operation.new.tap do |o|
o.name = "ApplyPendingMaintenanceAction"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ApplyPendingMaintenanceActionMessage)
o.output = Shapes::ShapeRef.new(shape: ApplyPendingMaintenanceActionResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:cancel_replication_task_assessment_run, Seahorse::Model::Operation.new.tap do |o|
o.name = "CancelReplicationTaskAssessmentRun"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CancelReplicationTaskAssessmentRunMessage)
o.output = Shapes::ShapeRef.new(shape: CancelReplicationTaskAssessmentRunResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:create_endpoint, Seahorse::Model::Operation.new.tap do |o|
o.name = "CreateEndpoint"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CreateEndpointMessage)
o.output = Shapes::ShapeRef.new(shape: CreateEndpointResponse)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: S3AccessDeniedFault)
end)
api.add_operation(:create_event_subscription, Seahorse::Model::Operation.new.tap do |o|
o.name = "CreateEventSubscription"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CreateEventSubscriptionMessage)
o.output = Shapes::ShapeRef.new(shape: CreateEventSubscriptionResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: SNSInvalidTopicFault)
o.errors << Shapes::ShapeRef.new(shape: SNSNoAuthorizationFault)
o.errors << Shapes::ShapeRef.new(shape: KMSAccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: KMSDisabledFault)
o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateFault)
o.errors << Shapes::ShapeRef.new(shape: KMSNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: KMSThrottlingFault)
end)
api.add_operation(:create_replication_instance, Seahorse::Model::Operation.new.tap do |o|
o.name = "CreateReplicationInstance"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CreateReplicationInstanceMessage)
o.output = Shapes::ShapeRef.new(shape: CreateReplicationInstanceResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: InsufficientResourceCapacityFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: StorageQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ReplicationSubnetGroupDoesNotCoverEnoughAZs)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidSubnet)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
end)
api.add_operation(:create_replication_subnet_group, Seahorse::Model::Operation.new.tap do |o|
o.name = "CreateReplicationSubnetGroup"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CreateReplicationSubnetGroupMessage)
o.output = Shapes::ShapeRef.new(shape: CreateReplicationSubnetGroupResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: ReplicationSubnetGroupDoesNotCoverEnoughAZs)
o.errors << Shapes::ShapeRef.new(shape: InvalidSubnet)
end)
api.add_operation(:create_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "CreateReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: CreateReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: CreateReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
end)
api.add_operation(:delete_certificate, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteCertificate"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteCertificateMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteCertificateResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:delete_connection, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteConnection"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteConnectionMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteConnectionResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:delete_endpoint, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteEndpoint"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteEndpointMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteEndpointResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:delete_event_subscription, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteEventSubscription"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteEventSubscriptionMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteEventSubscriptionResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:delete_replication_instance, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteReplicationInstance"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteReplicationInstanceMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteReplicationInstanceResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:delete_replication_subnet_group, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteReplicationSubnetGroup"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteReplicationSubnetGroupMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteReplicationSubnetGroupResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:delete_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:delete_replication_task_assessment_run, Seahorse::Model::Operation.new.tap do |o|
o.name = "DeleteReplicationTaskAssessmentRun"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DeleteReplicationTaskAssessmentRunMessage)
o.output = Shapes::ShapeRef.new(shape: DeleteReplicationTaskAssessmentRunResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:describe_account_attributes, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeAccountAttributes"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeAccountAttributesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeAccountAttributesResponse)
end)
api.add_operation(:describe_applicable_individual_assessments, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeApplicableIndividualAssessments"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeApplicableIndividualAssessmentsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeApplicableIndividualAssessmentsResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_certificates, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeCertificates"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeCertificatesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeCertificatesResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_connections, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeConnections"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeConnectionsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeConnectionsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_endpoint_types, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeEndpointTypes"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeEndpointTypesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeEndpointTypesResponse)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_endpoints, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeEndpoints"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeEndpointsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeEndpointsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_event_categories, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeEventCategories"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeEventCategoriesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeEventCategoriesResponse)
end)
api.add_operation(:describe_event_subscriptions, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeEventSubscriptions"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeEventSubscriptionsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeEventSubscriptionsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_events, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeEvents"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeEventsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeEventsResponse)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_orderable_replication_instances, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeOrderableReplicationInstances"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeOrderableReplicationInstancesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeOrderableReplicationInstancesResponse)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_pending_maintenance_actions, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribePendingMaintenanceActions"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribePendingMaintenanceActionsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribePendingMaintenanceActionsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_refresh_schemas_status, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeRefreshSchemasStatus"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeRefreshSchemasStatusMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeRefreshSchemasStatusResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:describe_replication_instance_task_logs, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationInstanceTaskLogs"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationInstanceTaskLogsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationInstanceTaskLogsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_instances, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationInstances"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationInstancesMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationInstancesResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_subnet_groups, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationSubnetGroups"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationSubnetGroupsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationSubnetGroupsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_task_assessment_results, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationTaskAssessmentResults"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationTaskAssessmentResultsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationTaskAssessmentResultsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_task_assessment_runs, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationTaskAssessmentRuns"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationTaskAssessmentRunsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationTaskAssessmentRunsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_task_individual_assessments, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationTaskIndividualAssessments"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationTaskIndividualAssessmentsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationTaskIndividualAssessmentsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_replication_tasks, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeReplicationTasks"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeReplicationTasksMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeReplicationTasksResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_schemas, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeSchemas"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeSchemasMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeSchemasResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:describe_table_statistics, Seahorse::Model::Operation.new.tap do |o|
o.name = "DescribeTableStatistics"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: DescribeTableStatisticsMessage)
o.output = Shapes::ShapeRef.new(shape: DescribeTableStatisticsResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o[:pager] = Aws::Pager.new(
limit_key: "max_records",
tokens: {
"marker" => "marker"
}
)
end)
api.add_operation(:import_certificate, Seahorse::Model::Operation.new.tap do |o|
o.name = "ImportCertificate"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ImportCertificateMessage)
o.output = Shapes::ShapeRef.new(shape: ImportCertificateResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidCertificateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
end)
api.add_operation(:list_tags_for_resource, Seahorse::Model::Operation.new.tap do |o|
o.name = "ListTagsForResource"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ListTagsForResourceMessage)
o.output = Shapes::ShapeRef.new(shape: ListTagsForResourceResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:modify_endpoint, Seahorse::Model::Operation.new.tap do |o|
o.name = "ModifyEndpoint"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ModifyEndpointMessage)
o.output = Shapes::ShapeRef.new(shape: ModifyEndpointResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
end)
api.add_operation(:modify_event_subscription, Seahorse::Model::Operation.new.tap do |o|
o.name = "ModifyEventSubscription"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ModifyEventSubscriptionMessage)
o.output = Shapes::ShapeRef.new(shape: ModifyEventSubscriptionResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: SNSInvalidTopicFault)
o.errors << Shapes::ShapeRef.new(shape: SNSNoAuthorizationFault)
o.errors << Shapes::ShapeRef.new(shape: KMSAccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: KMSDisabledFault)
o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateFault)
o.errors << Shapes::ShapeRef.new(shape: KMSNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: KMSThrottlingFault)
end)
api.add_operation(:modify_replication_instance, Seahorse::Model::Operation.new.tap do |o|
o.name = "ModifyReplicationInstance"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ModifyReplicationInstanceMessage)
o.output = Shapes::ShapeRef.new(shape: ModifyReplicationInstanceResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InsufficientResourceCapacityFault)
o.errors << Shapes::ShapeRef.new(shape: StorageQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: UpgradeDependencyFailureFault)
end)
api.add_operation(:modify_replication_subnet_group, Seahorse::Model::Operation.new.tap do |o|
o.name = "ModifyReplicationSubnetGroup"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ModifyReplicationSubnetGroupMessage)
o.output = Shapes::ShapeRef.new(shape: ModifyReplicationSubnetGroupResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
o.errors << Shapes::ShapeRef.new(shape: SubnetAlreadyInUse)
o.errors << Shapes::ShapeRef.new(shape: ReplicationSubnetGroupDoesNotCoverEnoughAZs)
o.errors << Shapes::ShapeRef.new(shape: InvalidSubnet)
end)
api.add_operation(:modify_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "ModifyReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ModifyReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: ModifyReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
end)
api.add_operation(:move_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "MoveReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: MoveReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: MoveReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:reboot_replication_instance, Seahorse::Model::Operation.new.tap do |o|
o.name = "RebootReplicationInstance"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: RebootReplicationInstanceMessage)
o.output = Shapes::ShapeRef.new(shape: RebootReplicationInstanceResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:refresh_schemas, Seahorse::Model::Operation.new.tap do |o|
o.name = "RefreshSchemas"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: RefreshSchemasMessage)
o.output = Shapes::ShapeRef.new(shape: RefreshSchemasResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
end)
api.add_operation(:reload_tables, Seahorse::Model::Operation.new.tap do |o|
o.name = "ReloadTables"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: ReloadTablesMessage)
o.output = Shapes::ShapeRef.new(shape: ReloadTablesResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:remove_tags_from_resource, Seahorse::Model::Operation.new.tap do |o|
o.name = "RemoveTagsFromResource"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: RemoveTagsFromResourceMessage)
o.output = Shapes::ShapeRef.new(shape: RemoveTagsFromResourceResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:start_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "StartReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: StartReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: StartReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
end)
api.add_operation(:start_replication_task_assessment, Seahorse::Model::Operation.new.tap do |o|
o.name = "StartReplicationTaskAssessment"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: StartReplicationTaskAssessmentMessage)
o.output = Shapes::ShapeRef.new(shape: StartReplicationTaskAssessmentResponse)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
end)
api.add_operation(:start_replication_task_assessment_run, Seahorse::Model::Operation.new.tap do |o|
o.name = "StartReplicationTaskAssessmentRun"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: StartReplicationTaskAssessmentRunMessage)
o.output = Shapes::ShapeRef.new(shape: StartReplicationTaskAssessmentRunResponse)
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: KMSAccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: KMSDisabledFault)
o.errors << Shapes::ShapeRef.new(shape: KMSFault)
o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateFault)
o.errors << Shapes::ShapeRef.new(shape: KMSNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: S3AccessDeniedFault)
o.errors << Shapes::ShapeRef.new(shape: S3ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsFault)
end)
api.add_operation(:stop_replication_task, Seahorse::Model::Operation.new.tap do |o|
o.name = "StopReplicationTask"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: StopReplicationTaskMessage)
o.output = Shapes::ShapeRef.new(shape: StopReplicationTaskResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
end)
api.add_operation(:test_connection, Seahorse::Model::Operation.new.tap do |o|
o.name = "TestConnection"
o.http_method = "POST"
o.http_request_uri = "/"
o.input = Shapes::ShapeRef.new(shape: TestConnectionMessage)
o.output = Shapes::ShapeRef.new(shape: TestConnectionResponse)
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundFault)
o.errors << Shapes::ShapeRef.new(shape: InvalidResourceStateFault)
o.errors << Shapes::ShapeRef.new(shape: KMSKeyNotAccessibleFault)
o.errors << Shapes::ShapeRef.new(shape: ResourceQuotaExceededFault)
end)
end
end
end
| 82.233886 | 234 | 0.791822 |
08ffc3c3a5300440d165b450adc58f2bfd92174b | 3,301 | # frozen_string_literal: true
require 'spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/inject_enterprise_edition_module'
describe RuboCop::Cop::InjectEnterpriseEditionModule do
include CopHelper
subject(:cop) { described_class.new }
it 'flags the use of `prepend EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
prepend EE::Foo
^^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'flags the use of `prepend ::EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
prepend ::EE::Foo
^^^^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'flags the use of `include EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
include EE::Foo
^^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'flags the use of `include ::EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
include ::EE::Foo
^^^^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'flags the use of `extend EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
extend EE::Foo
^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'flags the use of `extend ::EE` in the middle of a file' do
expect_offense(<<~SOURCE)
class Foo
extend ::EE::Foo
^^^^^^^^^^^^^^^^ Injecting EE modules must be done on the last line of this file, outside of any class or module definitions
end
SOURCE
end
it 'does not flag prepending of regular modules' do
expect_no_offenses(<<~SOURCE)
class Foo
prepend Foo
end
SOURCE
end
it 'does not flag including of regular modules' do
expect_no_offenses(<<~SOURCE)
class Foo
include Foo
end
SOURCE
end
it 'does not flag extending using regular modules' do
expect_no_offenses(<<~SOURCE)
class Foo
extend Foo
end
SOURCE
end
it 'does not flag the use of `prepend EE` on the last line' do
expect_no_offenses(<<~SOURCE)
class Foo
end
Foo.prepend(EE::Foo)
SOURCE
end
it 'does not flag the use of `include EE` on the last line' do
expect_no_offenses(<<~SOURCE)
class Foo
end
Foo.include(EE::Foo)
SOURCE
end
it 'does not flag the use of `extend EE` on the last line' do
expect_no_offenses(<<~SOURCE)
class Foo
end
Foo.extend(EE::Foo)
SOURCE
end
it 'autocorrects offenses by just disabling the Cop' do
source = <<~SOURCE
class Foo
prepend EE::Foo
include Bar
end
SOURCE
expect(autocorrect_source(source)).to eq(<<~SOURCE)
class Foo
prepend EE::Foo # rubocop: disable Cop/InjectEnterpriseEditionModule
include Bar
end
SOURCE
end
end
| 24.634328 | 131 | 0.651318 |
ff880cdac44409c0ba07d0d3cfb43b1aa7d61516 | 523 | class SubscriptionNotifier < ActionMailer::ARMailer
# send an email alert to the subscriber
def email_alert(subscription, html, plaintext, email_promo)
@from = "Communications of the ACM <[email protected]>"
@subject = "CACM Content Alert: #{Date.today.to_s :date}"
@recipients = subscription.email
@body[:alerts] = subscription.subscribables
@body[:html] = html
@body[:plaintext] = plaintext
@body[:email_promo] = email_promo
end
end | 43.583333 | 81 | 0.650096 |
1db7f56172abd6329aa849fe2e390436a897936b | 186 | class CreateDefinitions < ActiveRecord::Migration[5.0]
def change
create_table :definitions do |t|
t.references :rfp, foreign_key: true
t.timestamps
end
end
end
| 18.6 | 54 | 0.693548 |
2649049f524ecc60f7009459b133a3a4b84122d9 | 5,518 | # frozen_string_literal: true
# Statistics about AMO decision reviews
class ClaimReviewAsyncStatsReporter
include Reporter
attr_reader :stats
def initialize(start_date: Constants::DATES["AMA_ACTIVATION"].to_date, end_date: Time.zone.tomorrow)
@start_date = start_date
@end_date = end_date
@stats = build
end
# rubocop:disable Metrics/MethodLength
def as_csv
CSV.generate do |csv|
csv << %w[
type
total
in_progress
cancelled
processed
established_within_seven_days
established_within_seven_days_percent
median
avg
max
min
]
stats.each do |type, stat|
csv << [
type,
stat[:total],
stat[:in_progress],
stat[:canceled],
stat[:processed],
stat[:established_within_seven_days],
stat[:established_within_seven_days_percent],
seconds_to_hms(stat[:median].to_i),
seconds_to_hms(stat[:avg].to_i),
seconds_to_hms(stat[:max].to_i),
seconds_to_hms(stat[:min].to_i)
]
end
end
end
# rubocop:enable Metrics/MethodLength
private
attr_reader :start_date, :end_date
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
def build
{
supplemental_claims: {
total: supplemental_claims.count,
expired: supplemental_claims.expired_without_processing.count,
in_progress: supplemental_claims.processable.count,
canceled: supplemental_claims.canceled.count,
processed: supplemental_claims.processed.count,
established_within_seven_days: established_within_seven_days(supplemental_claims_completion_times),
established_within_seven_days_percent: percent_established_within_seven_days(
supplemental_claims_completion_times, supplemental_claims.count
),
median: median(supplemental_claims_completion_times),
avg: average(supplemental_claims_completion_times),
max: supplemental_claims_completion_times.max,
min: supplemental_claims_completion_times.min
},
higher_level_reviews: {
total: higher_level_reviews.count,
expired: higher_level_reviews.expired_without_processing.count,
in_progress: higher_level_reviews.processable.count,
canceled: higher_level_reviews.canceled.count,
processed: higher_level_reviews.processed.count,
established_within_seven_days: established_within_seven_days(higher_level_reviews_completion_times),
established_within_seven_days_percent: percent_established_within_seven_days(
higher_level_reviews_completion_times, higher_level_reviews.count
),
median: median(higher_level_reviews_completion_times),
avg: average(higher_level_reviews_completion_times),
max: higher_level_reviews_completion_times.max,
min: higher_level_reviews_completion_times.min
},
request_issues_updates: {
total: request_issues_updates.count,
expired: request_issues_updates.expired_without_processing.count,
in_progress: request_issues_updates.processable.count,
canceled: request_issues_updates.canceled.count,
processed: request_issues_updates.processed.count,
established_within_seven_days: established_within_seven_days(request_issues_updates_completion_times),
established_within_seven_days_percent: percent_established_within_seven_days(
request_issues_updates_completion_times, request_issues_updates.count
),
median: median(request_issues_updates_completion_times),
avg: average(request_issues_updates_completion_times),
max: request_issues_updates_completion_times.max,
min: request_issues_updates_completion_times.min
}
}
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength
def established_within_seven_days(completion_times)
completion_times.select { |span| span.fdiv(86_400).to_i < 7 }.count
end
def percent_established_within_seven_days(completion_times, total)
percent(established_within_seven_days(completion_times), total)
end
def completion_times(claims)
claims.reject(&:canceled?).select(&:processed?).map do |claim|
processed_at = claim[claim.class.processed_at_column]
submitted_at = claim[claim.class.submitted_at_column]
processed_at - submitted_at
end
end
def supplemental_claims_completion_times
@supplemental_claims_completion_times ||= completion_times(supplemental_claims)
end
def higher_level_reviews_completion_times
@higher_level_reviews_completion_times ||= completion_times(higher_level_reviews)
end
def request_issues_updates_completion_times
@request_issues_updates_completion_times ||= completion_times(request_issues_updates)
end
def supplemental_claims
@supplemental_claims ||= begin
SupplementalClaim
.where("establishment_submitted_at >= ? AND establishment_submitted_at <= ?", start_date, end_date)
end
end
def higher_level_reviews
@higher_level_reviews ||= begin
HigherLevelReview
.where("establishment_submitted_at >= ? AND establishment_submitted_at <= ?", start_date, end_date)
end
end
def request_issues_updates
@request_issues_updates ||= begin
RequestIssuesUpdate.where("submitted_at >= ? AND submitted_at <= ?", start_date, end_date)
end
end
end
| 35.146497 | 110 | 0.734868 |
ff8113f2cf30140de59dc8cac3192c6ea4ac5a15 | 519 | require 'spec_helper'
pod = Puppet::Type.type(:rkt_pod)
describe pod do
let :params do
[
:uuid,
:provider,
]
end
let :properties do
[
:app,
:image_name,
:ensure,
]
end
it 'should have expected properties' do
properties.each do |property|
expect(pod.properties.map(&:name)).to be_include(property)
end
end
it 'should have expected parameters' do
params.each do |param|
expect(pod.parameters).to be_include(param)
end
end
end
| 15.727273 | 64 | 0.61657 |
7a03e6fb24fe52816a617ff9fa4d7d4514ebefdc | 534 | class UpdatePeriodicReportWorker
include Sidekiq::Worker
sidekiq_options queue: 'messaging', retry: 0, backtrace: false
# attrs:
# token
# read_at
def perform(attrs)
report = PeriodicReport.find_by(token: attrs['token'])
return if report.nil? || report.read?
if report.created_at < Time.zone.now - 5.seconds
report.update!(read_at: attrs['read_at'])
else
logger.info "Too fast read #{report.id} #{attrs}"
end
rescue => e
logger.warn "#{e.class} #{e.message} #{attrs}"
end
end
| 25.428571 | 64 | 0.659176 |
26a0ce2c536c623c9a704271d26d63a8be383ee6 | 121 | class AddPhotoToProducts < ActiveRecord::Migration[5.2]
def change
add_column :products, :photo, :string
end
end
| 20.166667 | 55 | 0.743802 |
1afd006e2401c180282fd25dca51c9b84b5d2ac1 | 1,804 | require 'ci/common'
def hdfs_namenode_version
ENV['FLAVOR_VERSION'] || 'latest'
end
def hdfs_namenode_rootdir
"#{ENV['INTEGRATIONS_DIR']}/hdfs_namenode_#{hdfs_namenode_version}"
end
namespace :ci do
namespace :hdfs_namenode do |flavor|
task before_install: ['ci:common:before_install']
task :install do
Rake::Task['ci:common:install'].invoke('hdfs_namenode')
# sample docker usage
# sh %(docker create -p XXX:YYY --name hdfs_namenode source/hdfs_namenode:hdfs_namenode_version)
# sh %(docker start hdfs_namenode)
end
task before_script: ['ci:common:before_script']
task script: ['ci:common:script'] do
this_provides = [
'hdfs_namenode'
]
Rake::Task['ci:common:run_tests'].invoke(this_provides)
end
task before_cache: ['ci:common:before_cache']
task cleanup: ['ci:common:cleanup']
# sample cleanup task
# task cleanup: ['ci:common:cleanup'] do
# sh %(docker stop hdfs_namenode)
# sh %(docker rm hdfs_namenode)
# end
task :execute do
exception = nil
begin
%w(before_install install before_script).each do |u|
Rake::Task["#{flavor.scope.path}:#{u}"].invoke
end
if !ENV['SKIP_TEST']
Rake::Task["#{flavor.scope.path}:script"].invoke
else
puts 'Skipping tests'.yellow
end
Rake::Task["#{flavor.scope.path}:before_cache"].invoke
rescue => e
exception = e
puts "Failed task: #{e.class} #{e.message}".red
end
if ENV['SKIP_CLEANUP']
puts 'Skipping cleanup, disposable environments are great'.yellow
else
puts 'Cleaning up'
Rake::Task["#{flavor.scope.path}:cleanup"].invoke
end
raise exception if exception
end
end
end
| 27.333333 | 102 | 0.633038 |
083cd43e8cf4296eedd0dc6638c174d2635ecf43 | 12,713 | #==============================================================================
# ■ Add-On 物品选择框扩展 by 老鹰(http://oneeyedeagle.lofter.com/)
# ※ 本插件需要放置在【对话框扩展 by老鹰】之下
#==============================================================================
$imported ||= {}
$imported["EAGLE-ItemChoiceEX"] = true
#=============================================================================
# - 2021.7.15.9 追加一个帮助窗口
#==============================================================================
# - 在对话框中利用 \keyitem[param] 对物品选择框进行部分参数设置:
# type → 【默认】物品选择范围的类型index(见 index → 物品种类的符号数组 的映射)
# o → 物品选择框的显示原点类型(九宫格小键盘)(默认7)(嵌入时固定为7)
# x/y → 直接指定坐标(默认nil)
# do → 物品选择框的显示位置类型(覆盖x/y)(默认-10无效)
# (0为嵌入;1~9对话框外边界的九宫格位置;-1~-9屏幕外框的九宫格位置)
# (当对话框关闭时,0~9的设置均无效)
# dx/dy → x/y坐标的偏移增量(默认0)
# wmin → 物品选择框的最小宽度
# w → 物品选择框的宽度(默认0不设置)(嵌入时该设置无效)
# h → 物品选择框的高度(默认0不设置)(若小于行高,则认定为行数)
# opa → 选择框的背景不透明度(默认255)(文字内容不透明度固定为255)
# (嵌入时不显示窗口背景)
# skin → 选择框皮肤类型(每次默认取对话框皮肤)(见index → windowskin名称 的映射)
#
#------------------------------------------------------------------------------
# - 在 事件脚本 中利用 $game_message.keyitem_params[sym] = value 对指定参数赋值
# 示例:
# $game_message.keyitem_params[:type] = 4
# # 物品选项框的物品范围变为4号指定范围(全部持有的普通道具和关键道具)
#------------------------------------------------------------------------------
# - 参数重置(具体见 对话框扩展 中的注释)
# $game_message.reset_params(:keyitem, code_string)
#------------------------------------------------------------------------------
# - 注意:
# ·VA默认物品选择框为4行2列,而此处改为了n行1列,
# 本插件将物品选择框的默认位置改成了o7时屏幕居中偏下位置
#==============================================================================
#==============================================================================
# ○ 【设置部分】
#==============================================================================
module MESSAGE_EX
#--------------------------------------------------------------------------
# ● 【设置】定义转义符各参数的预设值
# (对于bool型变量,0与false等价,1与true等价)
#--------------------------------------------------------------------------
KEYITEM_PARAMS_INIT = {
# \keyitem[]
:type => 0, # 所选择物品的种类
:o => 7, # 原点类型
:x => nil,
:y => nil,
:do => 0, # 显示位置类型
:dx => 0,
:dy => 0,
:wmin => Graphics.width / 3, # 最小宽度
:w => 0,
:h => 0,
:opa => 255, # 背景不透明度
:skin => nil, # 皮肤类型(nil时代表跟随对话框)
}
#--------------------------------------------------------------------------
# ● 【设置】定义 index → 选择物品类型数组 的映射
# (默认只有 :item/:weapon/:armor/:key_item 四种类型)
#--------------------------------------------------------------------------
INDEX_TO_KEYITEM_TYPE = {
0 => [:item],
1 => [:weapon],
2 => [:armor],
3 => [:key_item], # 默认类型
4 => [:item, :key_item],
}
end
#==============================================================================
# ○ 读取设置
#==============================================================================
module MESSAGE_EX
#--------------------------------------------------------------------------
# ● 获取选择物品的种类数组
#--------------------------------------------------------------------------
def self.keyitem_type(index)
INDEX_TO_KEYITEM_TYPE[index] || INDEX_TO_KEYITEM_TYPE[3]
end
end
#==============================================================================
# ○ Game_Message
#==============================================================================
class Game_Message
attr_accessor :keyitem_params
#--------------------------------------------------------------------------
# ● 获取全部可保存params的符号的数组
#--------------------------------------------------------------------------
alias eagle_keyitem_ex_params eagle_params
def eagle_params
eagle_keyitem_ex_params + [:keyitem]
end
end
#==============================================================================
# ○ Window_EagleMessage
#==============================================================================
class Window_EagleMessage
#--------------------------------------------------------------------------
# ● 设置keyitem参数
#--------------------------------------------------------------------------
def eagle_text_control_keyitem(param = "")
parse_param(game_message.keyitem_params, param, :type)
end
end
#==============================================================================
# ○ Window_KeyItem
#==============================================================================
class Window_EagleKeyItem < Window_ItemList
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(message_window)
@message_window = message_window
super(0, 0, Graphics.width, fitting_height(4))
self.openness = 0
deactivate
set_handler(:ok, method(:on_ok))
set_handler(:cancel, method(:on_cancel))
end
#--------------------------------------------------------------------------
# ● 开始输入的处理
#--------------------------------------------------------------------------
def start
reset_width_min
update_category
update_size
refresh
update_placement
update_params_ex
select(0)
hide
#open
#activate
end
#--------------------------------------------------------------------------
# ● 获取列数
#--------------------------------------------------------------------------
def col_max
return 1
end
#--------------------------------------------------------------------------
# ● 重设最小宽度
#--------------------------------------------------------------------------
def reset_width_min
return if self.width == $game_message.keyitem_params[:wmin]
self.width = $game_message.keyitem_params[:wmin]
self.height = fitting_height(1)
create_contents
end
#--------------------------------------------------------------------------
# ● 更新物品种类
#--------------------------------------------------------------------------
def update_category
@categories = MESSAGE_EX.keyitem_type($game_message.keyitem_params[:type])
end
#--------------------------------------------------------------------------
# ● 查询列表中是否含有此物品
#--------------------------------------------------------------------------
def include?(item)
@categories.each do |c|
case c
when :item; return true if item.is_a?(RPG::Item) && !item.key_item?
when :weapon; return true if item.is_a?(RPG::Weapon)
when :armor; return true if item.is_a?(RPG::Armor)
when :key_item; return true if item.is_a?(RPG::Item) && item.key_item?
end
end
return false
end
#--------------------------------------------------------------------------
# ● 查询此物品是否可用
#--------------------------------------------------------------------------
def enable?(item)
true#$game_party.usable?(item)
end
#--------------------------------------------------------------------------
# ● 检查高度参数
#--------------------------------------------------------------------------
def eagle_check_param_h(h)
return 0 if h <= 0
# 如果h小于行高,则判定其为行数
return line_height * h if h < line_height
return h
end
#--------------------------------------------------------------------------
# ● 更新窗口的大小
#--------------------------------------------------------------------------
def update_size
self.width = $game_message.keyitem_params[:w] if $game_message.keyitem_params[:w] > self.width
h = eagle_check_param_h($game_message.keyitem_params[:h])
self.height = h + standard_padding * 2 if h > 0
# 处理嵌入的特殊情况
@flag_in_msg_window = @message_window.open? && $game_message.keyitem_params[:do] == 0
new_w = self.width
if @flag_in_msg_window
# 嵌入时对话框所需宽度最小值(不含边界)
width_min = self.width - standard_padding * 2
# 对话框实际能提供的宽度(文字区域宽度)
win_w = @message_window.eagle_charas_w
d = width_min - win_w
if d > 0
if @message_window.eagle_add_w_by_child_window?
$game_message.child_window_w_des = d # 扩展对话框的宽度
else
@flag_in_msg_window = false
end
else # 宽度 = 文字区域宽度
new_w = win_w + standard_padding * 2
end
win_h = @message_window.height - @message_window.eagle_charas_h
d = self.height - win_h
d += standard_padding if @message_window.eagle_charas_h > 0
if d > 0
if @message_window.eagle_add_h_by_child_window?
$game_message.child_window_h_des = d # 扩展对话框的高度
else
@flag_in_msg_window = false
end
end
end
self.width = new_w if @flag_in_msg_window
end
#--------------------------------------------------------------------------
# ● 更新窗口的位置
#--------------------------------------------------------------------------
def update_placement
self.x = (Graphics.width - width) / 2 # 默认位置
self.y = Graphics.height - 100 - height
self.x = $game_message.keyitem_params[:x] if $game_message.keyitem_params[:x]
self.y = $game_message.keyitem_params[:y] if $game_message.keyitem_params[:y]
o = $game_message.keyitem_params[:o]
if (d_o = $game_message.keyitem_params[:do]) < 0 # 相对于屏幕
MESSAGE_EX.reset_xy_dorigin(self, nil, d_o)
elsif @message_window.open?
if d_o == 0 # 嵌入对话框
if @flag_in_msg_window
self.x = @message_window.eagle_charas_x0 - standard_padding
self.y = @message_window.eagle_charas_y0 + @message_window.eagle_charas_h
self.y -= standard_padding if @message_window.eagle_charas_h == 0
o = 7
end
else
MESSAGE_EX.reset_xy_dorigin(self, @message_window, d_o)
end
end
MESSAGE_EX.reset_xy_origin(self, o)
self.x += $game_message.keyitem_params[:dx]
self.y += $game_message.keyitem_params[:dy]
self.z = @message_window.z + 10
end
#--------------------------------------------------------------------------
# ● 更新其他属性
#--------------------------------------------------------------------------
def update_params_ex
skin = @message_window.get_cur_windowskin_index($game_message.keyitem_params[:skin])
self.windowskin = MESSAGE_EX.windowskin(skin)
self.opacity = $game_message.keyitem_params[:opa]
self.contents_opacity = 255
if @flag_in_msg_window # 如果嵌入,则不执行打开
self.opacity = 0
self.openness = 255
end
end
#--------------------------------------------------------------------------
# ● 更新(覆盖)
#--------------------------------------------------------------------------
def update
super
update_placement if @message_window.open? && $game_message.keyitem_params[:do] == 0
end
#--------------------------------------------------------------------------
# ● 确定时的处理
#--------------------------------------------------------------------------
def on_ok
result = item ? item.id : 0
$game_variables[$game_message.item_choice_variable_id] = result
close
end
#--------------------------------------------------------------------------
# ● 取消时的处理
#--------------------------------------------------------------------------
def on_cancel
$game_variables[$game_message.item_choice_variable_id] = 0
close
end
end
#==============================================================================
# ○ 追加一个帮助窗口
#==============================================================================
class Window_EagleKeyItem
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
alias eagle_keyitem_help_init initialize
def initialize(message_window)
eagle_keyitem_help_init(message_window)
self.help_window = Window_Help.new(2)
@help_window.openness = 0
end
#--------------------------------------------------------------------------
# ● 打开
#--------------------------------------------------------------------------
def open
if @help_window
if self.y < Graphics.height / 2
@help_window.y = Graphics.height - @help_window.height
else
@help_window.y = 0
end
@help_window.open
end
super
end
#--------------------------------------------------------------------------
# ● 关闭
#--------------------------------------------------------------------------
def close
@help_window.close if @help_window
super
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
alias eagle_keyitem_help_update update
def update
eagle_keyitem_help_update
@help_window.update if @help_window
end
end
| 37.391176 | 98 | 0.389444 |
e22696d60f91ee20216f9d2771323fe7af5af1ca | 34,515 | # This file was automatically generated, any manual changes will be lost the
# next time this file is generated.
#
# Platform: rbx 2.2.3.n18
RubyLint.registry.register('IRB') do |defs|
defs.define_constant('IRB') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('CurrentContext')
klass.define_method('Inspector') do |method|
method.define_argument('inspect')
method.define_optional_argument('init')
end
klass.define_method('conf')
klass.define_method('delete_caller')
klass.define_method('init_config') do |method|
method.define_argument('ap_path')
end
klass.define_method('init_error')
klass.define_method('irb_abort') do |method|
method.define_argument('irb')
method.define_optional_argument('exception')
end
klass.define_method('irb_at_exit')
klass.define_method('irb_exit') do |method|
method.define_argument('irb')
method.define_argument('ret')
end
klass.define_method('load_modules')
klass.define_method('parse_opts')
klass.define_method('rc_file') do |method|
method.define_optional_argument('ext')
end
klass.define_method('rc_file_generators')
klass.define_method('run_config')
klass.define_method('setup') do |method|
method.define_argument('ap_path')
end
klass.define_method('start') do |method|
method.define_optional_argument('ap_path')
end
klass.define_method('version')
end
defs.define_constant('IRB::Abort') do |klass|
klass.inherits(defs.constant_proxy('Exception', RubyLint.registry))
end
defs.define_constant('IRB::Context') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('__inspect__')
klass.define_instance_method('__to_s__')
klass.define_instance_method('ap_name')
klass.define_instance_method('ap_name=')
klass.define_instance_method('auto_indent_mode')
klass.define_instance_method('auto_indent_mode=')
klass.define_instance_method('back_trace_limit')
klass.define_instance_method('back_trace_limit=')
klass.define_instance_method('debug?')
klass.define_instance_method('debug_level')
klass.define_instance_method('debug_level=') do |method|
method.define_argument('value')
end
klass.define_instance_method('echo')
klass.define_instance_method('echo=')
klass.define_instance_method('echo?')
klass.define_instance_method('eval_history=') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('evaluate') do |method|
method.define_argument('line')
method.define_argument('line_no')
end
klass.define_instance_method('exit') do |method|
method.define_optional_argument('ret')
end
klass.define_instance_method('file_input?')
klass.define_instance_method('ignore_eof')
klass.define_instance_method('ignore_eof=')
klass.define_instance_method('ignore_eof?')
klass.define_instance_method('ignore_sigint')
klass.define_instance_method('ignore_sigint=')
klass.define_instance_method('ignore_sigint?')
klass.define_instance_method('initialize') do |method|
method.define_argument('irb')
method.define_optional_argument('workspace')
method.define_optional_argument('input_method')
method.define_optional_argument('output_method')
method.returns { |object| object.instance }
end
klass.define_instance_method('inspect')
klass.define_instance_method('inspect?')
klass.define_instance_method('inspect_last_value')
klass.define_instance_method('inspect_mode')
klass.define_instance_method('inspect_mode=') do |method|
method.define_argument('opt')
end
klass.define_instance_method('io')
klass.define_instance_method('io=')
klass.define_instance_method('irb')
klass.define_instance_method('irb=')
klass.define_instance_method('irb_name')
klass.define_instance_method('irb_name=')
klass.define_instance_method('irb_path')
klass.define_instance_method('irb_path=')
klass.define_instance_method('last_value')
klass.define_instance_method('load_modules')
klass.define_instance_method('load_modules=')
klass.define_instance_method('main')
klass.define_instance_method('math_mode=') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('prompt_c')
klass.define_instance_method('prompt_c=')
klass.define_instance_method('prompt_i')
klass.define_instance_method('prompt_i=')
klass.define_instance_method('prompt_mode')
klass.define_instance_method('prompt_mode=') do |method|
method.define_argument('mode')
end
klass.define_instance_method('prompt_n')
klass.define_instance_method('prompt_n=')
klass.define_instance_method('prompt_s')
klass.define_instance_method('prompt_s=')
klass.define_instance_method('prompting?')
klass.define_instance_method('rc')
klass.define_instance_method('rc=')
klass.define_instance_method('rc?')
klass.define_instance_method('return_format')
klass.define_instance_method('return_format=')
klass.define_instance_method('save_history=') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('set_last_value') do |method|
method.define_argument('value')
end
klass.define_instance_method('thread')
klass.define_instance_method('to_s')
klass.define_instance_method('use_loader=') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('use_readline')
klass.define_instance_method('use_readline=') do |method|
method.define_argument('opt')
end
klass.define_instance_method('use_readline?')
klass.define_instance_method('use_tracer=') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('verbose')
klass.define_instance_method('verbose=')
klass.define_instance_method('verbose?')
klass.define_instance_method('workspace')
klass.define_instance_method('workspace=')
klass.define_instance_method('workspace_home')
end
defs.define_constant('IRB::Context::IDNAME_IVARS') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::Context::NOPRINTING_IVARS') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::Context::NO_INSPECTING_IVARS') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::ContextExtender') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('def_extend_command') do |method|
method.define_argument('cmd_name')
method.define_argument('load_file')
method.define_rest_argument('aliases')
end
klass.define_method('install_extend_commands')
end
defs.define_constant('IRB::DefaultEncodings') do |klass|
klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
klass.define_method('[]') do |method|
method.define_rest_argument('args')
end
klass.define_method('new') do |method|
method.define_rest_argument('args')
method.returns { |object| object.instance }
end
klass.define_instance_method('external')
klass.define_instance_method('external=')
klass.define_instance_method('internal')
klass.define_instance_method('internal=')
end
defs.define_constant('IRB::DefaultEncodings::Enumerator') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
klass.define_instance_method('each') do |method|
method.define_rest_argument('args')
end
klass.define_instance_method('each_with_index')
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('receiver_or_size')
method.define_optional_argument('method_name')
method.define_rest_argument('method_args')
method.returns { |object| object.instance }
end
klass.define_instance_method('next')
klass.define_instance_method('next_values')
klass.define_instance_method('peek')
klass.define_instance_method('peek_values')
klass.define_instance_method('rewind')
klass.define_instance_method('size')
klass.define_instance_method('with_index') do |method|
method.define_optional_argument('offset')
end
end
defs.define_constant('IRB::DefaultEncodings::Group') do |klass|
klass.inherits(defs.constant_proxy('Rubinius::FFI::Struct', RubyLint.registry))
klass.define_instance_method('gid')
klass.define_instance_method('mem')
klass.define_instance_method('name')
klass.define_instance_method('passwd')
end
defs.define_constant('IRB::DefaultEncodings::Passwd') do |klass|
klass.inherits(defs.constant_proxy('Rubinius::FFI::Struct', RubyLint.registry))
klass.define_instance_method('dir')
klass.define_instance_method('gecos')
klass.define_instance_method('gid')
klass.define_instance_method('name')
klass.define_instance_method('passwd')
klass.define_instance_method('shell')
klass.define_instance_method('uid')
end
defs.define_constant('IRB::DefaultEncodings::STRUCT_ATTRS') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::DefaultEncodings::SortedElement') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('<=>') do |method|
method.define_argument('other')
end
klass.define_instance_method('initialize') do |method|
method.define_argument('val')
method.define_argument('sort_id')
method.returns { |object| object.instance }
end
klass.define_instance_method('sort_id')
klass.define_instance_method('value')
end
defs.define_constant('IRB::DefaultEncodings::Tms') do |klass|
klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
klass.define_method('[]') do |method|
method.define_rest_argument('args')
end
klass.define_method('new') do |method|
method.define_rest_argument('args')
method.returns { |object| object.instance }
end
klass.define_instance_method('cstime')
klass.define_instance_method('cstime=')
klass.define_instance_method('cutime')
klass.define_instance_method('cutime=')
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('utime')
method.define_optional_argument('stime')
method.define_optional_argument('cutime')
method.define_optional_argument('cstime')
method.define_optional_argument('tutime')
method.define_optional_argument('tstime')
method.returns { |object| object.instance }
end
klass.define_instance_method('stime')
klass.define_instance_method('stime=')
klass.define_instance_method('tstime')
klass.define_instance_method('tstime=')
klass.define_instance_method('tutime')
klass.define_instance_method('tutime=')
klass.define_instance_method('utime')
klass.define_instance_method('utime=')
end
defs.define_constant('IRB::ExtendCommandBundle') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('def_extend_command') do |method|
method.define_argument('cmd_name')
method.define_argument('cmd_class')
method.define_optional_argument('load_file')
method.define_rest_argument('aliases')
end
klass.define_method('extend_object') do |method|
method.define_argument('obj')
end
klass.define_method('install_extend_commands')
klass.define_method('irb_original_method_name') do |method|
method.define_argument('method_name')
end
klass.define_instance_method('install_alias_method') do |method|
method.define_argument('to')
method.define_argument('from')
method.define_optional_argument('override')
end
klass.define_instance_method('irb') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_change_workspace') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_context')
klass.define_instance_method('irb_current_working_workspace') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_exit') do |method|
method.define_optional_argument('ret')
end
klass.define_instance_method('irb_fg') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_help') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_jobs') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_kill') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_load') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_pop_workspace') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_push_workspace') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_require') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_source') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
klass.define_instance_method('irb_workspaces') do |method|
method.define_rest_argument('opts')
method.define_block_argument('b')
end
end
defs.define_constant('IRB::ExtendCommandBundle::NO_OVERRIDE') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::ExtendCommandBundle::OVERRIDE_ALL') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::FEATURE_IOPT_CHANGE_VERSION') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::FileInputMethod') do |klass|
klass.inherits(defs.constant_proxy('IRB::InputMethod', RubyLint.registry))
klass.define_instance_method('encoding')
klass.define_instance_method('eof?')
klass.define_instance_method('file_name')
klass.define_instance_method('gets')
klass.define_instance_method('initialize') do |method|
method.define_argument('file')
method.returns { |object| object.instance }
end
end
defs.define_constant('IRB::IRBRC_EXT') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::InputMethod') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('file_name')
klass.define_instance_method('gets')
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('file')
method.returns { |object| object.instance }
end
klass.define_instance_method('prompt')
klass.define_instance_method('prompt=')
klass.define_instance_method('readable_after_eof?')
end
defs.define_constant('IRB::Inspector') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('def_inspector') do |method|
method.define_argument('key')
method.define_optional_argument('arg')
method.define_block_argument('block')
end
klass.define_method('keys_with_inspector') do |method|
method.define_argument('inspector')
end
klass.define_instance_method('init')
klass.define_instance_method('initialize') do |method|
method.define_argument('inspect_proc')
method.define_optional_argument('init_proc')
method.returns { |object| object.instance }
end
klass.define_instance_method('inspect_value') do |method|
method.define_argument('v')
end
end
defs.define_constant('IRB::Inspector::INSPECTORS') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::Irb') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('context')
klass.define_instance_method('eval_input')
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('workspace')
method.define_optional_argument('input_method')
method.define_optional_argument('output_method')
method.returns { |object| object.instance }
end
klass.define_instance_method('inspect')
klass.define_instance_method('output_value')
klass.define_instance_method('prompt') do |method|
method.define_argument('prompt')
method.define_argument('ltype')
method.define_argument('indent')
method.define_argument('line_no')
end
klass.define_instance_method('scanner')
klass.define_instance_method('scanner=')
klass.define_instance_method('signal_handle')
klass.define_instance_method('signal_status') do |method|
method.define_argument('status')
end
klass.define_instance_method('suspend_context') do |method|
method.define_argument('context')
end
klass.define_instance_method('suspend_input_method') do |method|
method.define_argument('input_method')
end
klass.define_instance_method('suspend_name') do |method|
method.define_optional_argument('path')
method.define_optional_argument('name')
end
klass.define_instance_method('suspend_workspace') do |method|
method.define_argument('workspace')
end
end
defs.define_constant('IRB::Locale') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('String') do |method|
method.define_argument('mes')
end
klass.define_instance_method('encoding')
klass.define_instance_method('find') do |method|
method.define_argument('file')
method.define_optional_argument('paths')
end
klass.define_instance_method('format') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('gets') do |method|
method.define_rest_argument('rs')
end
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('locale')
method.returns { |object| object.instance }
end
klass.define_instance_method('lang')
klass.define_instance_method('load') do |method|
method.define_argument('file')
method.define_optional_argument('priv')
end
klass.define_instance_method('modifieer')
klass.define_instance_method('print') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('printf') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('puts') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('readline') do |method|
method.define_rest_argument('rs')
end
klass.define_instance_method('require') do |method|
method.define_argument('file')
method.define_optional_argument('priv')
end
klass.define_instance_method('territory')
end
defs.define_constant('IRB::Locale::LOCALE_DIR') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::Locale::LOCALE_NAME_RE') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::MagicFile') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('open') do |method|
method.define_argument('path')
end
end
defs.define_constant('IRB::MethodExtender') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('def_post_proc') do |method|
method.define_argument('base_method')
method.define_argument('extend_method')
end
klass.define_instance_method('def_pre_proc') do |method|
method.define_argument('base_method')
method.define_argument('extend_method')
end
klass.define_instance_method('new_alias_name') do |method|
method.define_argument('name')
method.define_optional_argument('prefix')
method.define_optional_argument('postfix')
end
end
defs.define_constant('IRB::Notifier') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('def_notifier') do |method|
method.define_optional_argument('prefix')
method.define_optional_argument('output_method')
end
klass.define_method('included') do |method|
method.define_argument('mod')
end
klass.define_instance_method('Fail') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
klass.define_instance_method('Raise') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
end
defs.define_constant('IRB::Notifier::AbstractNotifier') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('exec_if')
klass.define_instance_method('initialize') do |method|
method.define_argument('prefix')
method.define_argument('base_notifier')
method.returns { |object| object.instance }
end
klass.define_instance_method('notify?')
klass.define_instance_method('pp') do |method|
method.define_rest_argument('objs')
end
klass.define_instance_method('ppx') do |method|
method.define_argument('prefix')
method.define_rest_argument('objs')
end
klass.define_instance_method('prefix')
klass.define_instance_method('print') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('printf') do |method|
method.define_argument('format')
method.define_rest_argument('opts')
end
klass.define_instance_method('printn') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('puts') do |method|
method.define_rest_argument('objs')
end
end
defs.define_constant('IRB::Notifier::CompositeNotifier') do |klass|
klass.inherits(defs.constant_proxy('IRB::Notifier::AbstractNotifier', RubyLint.registry))
klass.define_instance_method('def_notifier') do |method|
method.define_argument('level')
method.define_optional_argument('prefix')
end
klass.define_instance_method('initialize') do |method|
method.define_argument('prefix')
method.define_argument('base_notifier')
method.returns { |object| object.instance }
end
klass.define_instance_method('level')
klass.define_instance_method('level=') do |method|
method.define_argument('value')
end
klass.define_instance_method('level_notifier')
klass.define_instance_method('level_notifier=') do |method|
method.define_argument('value')
end
klass.define_instance_method('notifiers')
end
defs.define_constant('IRB::Notifier::D_NOMSG') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::Notifier::ErrUndefinedNotifier') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::Notifier::ErrUnrecognizedLevel') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::Notifier::LeveledNotifier') do |klass|
klass.inherits(defs.constant_proxy('IRB::Notifier::AbstractNotifier', RubyLint.registry))
klass.inherits(defs.constant_proxy('Comparable', RubyLint.registry))
klass.define_instance_method('<=>') do |method|
method.define_argument('other')
end
klass.define_instance_method('initialize') do |method|
method.define_argument('base')
method.define_argument('level')
method.define_argument('prefix')
method.returns { |object| object.instance }
end
klass.define_instance_method('level')
klass.define_instance_method('notify?')
end
defs.define_constant('IRB::Notifier::NoMsgNotifier') do |klass|
klass.inherits(defs.constant_proxy('IRB::Notifier::LeveledNotifier', RubyLint.registry))
klass.define_instance_method('initialize')
klass.define_instance_method('notify?')
end
defs.define_constant('IRB::OutputMethod') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('included') do |method|
method.define_argument('mod')
end
klass.define_instance_method('Fail') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
klass.define_instance_method('Raise') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
klass.define_instance_method('parse_printf_format') do |method|
method.define_argument('format')
method.define_argument('opts')
end
klass.define_instance_method('pp') do |method|
method.define_rest_argument('objs')
end
klass.define_instance_method('ppx') do |method|
method.define_argument('prefix')
method.define_rest_argument('objs')
end
klass.define_instance_method('print') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('printf') do |method|
method.define_argument('format')
method.define_rest_argument('opts')
end
klass.define_instance_method('printn') do |method|
method.define_rest_argument('opts')
end
klass.define_instance_method('puts') do |method|
method.define_rest_argument('objs')
end
end
defs.define_constant('IRB::OutputMethod::NotImplementedError') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::ReadlineInputMethod') do |klass|
klass.inherits(defs.constant_proxy('IRB::InputMethod', RubyLint.registry))
klass.inherits(defs.constant_proxy('Readline', RubyLint.registry))
klass.define_instance_method('encoding')
klass.define_instance_method('eof?')
klass.define_instance_method('gets')
klass.define_instance_method('initialize')
klass.define_instance_method('line') do |method|
method.define_argument('line_no')
end
klass.define_instance_method('readable_after_eof?')
end
defs.define_constant('IRB::ReadlineInputMethod::FILENAME_COMPLETION_PROC') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('call')
end
defs.define_constant('IRB::ReadlineInputMethod::HISTORY') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('<<')
klass.define_method('[]')
klass.define_method('[]=')
klass.define_method('clear')
klass.define_method('delete_at')
klass.define_method('each')
klass.define_method('empty?')
klass.define_method('length')
klass.define_method('pop')
klass.define_method('push')
klass.define_method('shift')
klass.define_method('size')
klass.define_method('to_s')
end
defs.define_constant('IRB::ReadlineInputMethod::USERNAME_COMPLETION_PROC') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('call')
end
defs.define_constant('IRB::ReadlineInputMethod::VERSION') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::SLex') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_method('included') do |method|
method.define_argument('mod')
end
klass.define_instance_method('Fail') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
klass.define_instance_method('Raise') do |method|
method.define_optional_argument('err')
method.define_rest_argument('rest')
end
klass.define_instance_method('create') do |method|
method.define_argument('token')
method.define_optional_argument('preproc')
method.define_optional_argument('postproc')
end
klass.define_instance_method('def_rule') do |method|
method.define_argument('token')
method.define_optional_argument('preproc')
method.define_optional_argument('postproc')
method.define_block_argument('block')
end
klass.define_instance_method('def_rules') do |method|
method.define_rest_argument('tokens')
method.define_block_argument('block')
end
klass.define_instance_method('initialize')
klass.define_instance_method('inspect')
klass.define_instance_method('match') do |method|
method.define_argument('token')
end
klass.define_instance_method('postproc') do |method|
method.define_argument('token')
end
klass.define_instance_method('preproc') do |method|
method.define_argument('token')
method.define_argument('proc')
end
klass.define_instance_method('search') do |method|
method.define_argument('token')
end
end
defs.define_constant('IRB::SLex::DOUT') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::SLex::D_DEBUG') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::SLex::D_DETAIL') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::SLex::D_WARN') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::SLex::ErrNodeAlreadyExists') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::SLex::ErrNodeNothing') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::SLex::Node') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('create_subnode') do |method|
method.define_argument('chrs')
method.define_optional_argument('preproc')
method.define_optional_argument('postproc')
end
klass.define_instance_method('initialize') do |method|
method.define_optional_argument('preproc')
method.define_optional_argument('postproc')
method.returns { |object| object.instance }
end
klass.define_instance_method('match') do |method|
method.define_argument('chrs')
method.define_optional_argument('op')
end
klass.define_instance_method('match_io') do |method|
method.define_argument('io')
method.define_optional_argument('op')
end
klass.define_instance_method('postproc')
klass.define_instance_method('postproc=')
klass.define_instance_method('preproc')
klass.define_instance_method('preproc=')
klass.define_instance_method('search') do |method|
method.define_argument('chrs')
method.define_optional_argument('opt')
end
end
defs.define_constant('IRB::STDIN_FILE_NAME') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
end
defs.define_constant('IRB::StdioInputMethod') do |klass|
klass.inherits(defs.constant_proxy('IRB::InputMethod', RubyLint.registry))
klass.define_instance_method('encoding')
klass.define_instance_method('eof?')
klass.define_instance_method('gets')
klass.define_instance_method('initialize')
klass.define_instance_method('line') do |method|
method.define_argument('line_no')
end
klass.define_instance_method('readable_after_eof?')
end
defs.define_constant('IRB::StdioOutputMethod') do |klass|
klass.inherits(defs.constant_proxy('IRB::OutputMethod', RubyLint.registry))
klass.define_instance_method('print') do |method|
method.define_rest_argument('opts')
end
end
defs.define_constant('IRB::StdioOutputMethod::NotImplementedError') do |klass|
klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
end
defs.define_constant('IRB::WorkSpace') do |klass|
klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
klass.define_instance_method('binding')
klass.define_instance_method('evaluate') do |method|
method.define_argument('context')
method.define_argument('statements')
method.define_optional_argument('file')
method.define_optional_argument('line')
end
klass.define_instance_method('filter_backtrace') do |method|
method.define_argument('bt')
end
klass.define_instance_method('initialize') do |method|
method.define_rest_argument('main')
method.returns { |object| object.instance }
end
klass.define_instance_method('main')
end
end
| 27.902183 | 93 | 0.723656 |
33d7ab5df98587b7129b268451c15536c76dec73 | 1,766 | Reliveradio::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :null_store
config.after_initialize do
# Set Time.now to September 1, 2008 10:05:00 AM (at this instant), but allow it to move forward
t = Time.parse("2013-11-09 16:45:00")
Timecop.freeze(t)
end
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
| 39.244444 | 99 | 0.772933 |
7ae7916baccca70ed94b4a20572773a86af7e669 | 1,828 | # -*- encoding: utf-8 -*-
# stub: rubyzip 1.2.2 ruby lib
Gem::Specification.new do |s|
s.name = "rubyzip".freeze
s.version = "1.2.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Alexander Simonov".freeze]
s.date = "2018-08-31"
s.email = ["[email protected]".freeze]
s.homepage = "http://github.com/rubyzip/rubyzip".freeze
s.licenses = ["BSD 2-Clause".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2".freeze)
s.rubygems_version = "3.1.0.pre1".freeze
s.summary = "rubyzip is a ruby module for reading and writing zip files".freeze
s.installed_by_version = "3.1.0.pre1" if s.respond_to? :installed_by_version
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<rake>.freeze, ["~> 10.3"])
s.add_development_dependency(%q<pry>.freeze, ["~> 0.10"])
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.4"])
s.add_development_dependency(%q<coveralls>.freeze, ["~> 0.7"])
s.add_development_dependency(%q<rubocop>.freeze, ["~> 0.49.1"])
else
s.add_dependency(%q<rake>.freeze, ["~> 10.3"])
s.add_dependency(%q<pry>.freeze, ["~> 0.10"])
s.add_dependency(%q<minitest>.freeze, ["~> 5.4"])
s.add_dependency(%q<coveralls>.freeze, ["~> 0.7"])
s.add_dependency(%q<rubocop>.freeze, ["~> 0.49.1"])
end
else
s.add_dependency(%q<rake>.freeze, ["~> 10.3"])
s.add_dependency(%q<pry>.freeze, ["~> 0.10"])
s.add_dependency(%q<minitest>.freeze, ["~> 5.4"])
s.add_dependency(%q<coveralls>.freeze, ["~> 0.7"])
s.add_dependency(%q<rubocop>.freeze, ["~> 0.49.1"])
end
end
| 40.622222 | 112 | 0.644967 |
bb12b2d3b2cc9828e61c34c2e704174bbfe1096d | 189 | require 'heb412_gen/concerns/models/campoplantillahcr'
module Heb412Gen
class Campoplantillahcr < ActiveRecord::Base
include Heb412Gen::Concerns::Models::Campoplantillahcr
end
end
| 23.625 | 58 | 0.814815 |
012e3beced4d7039caa4c4da02afb0001e80ac27 | 1,802 | # -*- encoding: utf-8 -*-
# stub: rb-fsevent 0.10.2 ruby lib
Gem::Specification.new do |s|
s.name = "rb-fsevent".freeze
s.version = "0.10.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "source_code_uri" => "https://github.com/thibaudgg/rb-fsevent" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Thibaud Guillaume-Gentil".freeze, "Travis Tilley".freeze]
s.date = "2017-07-01"
s.description = "FSEvents API with Signals catching (without RubyCocoa)".freeze
s.email = ["[email protected]".freeze, "[email protected]".freeze]
s.homepage = "http://rubygems.org/gems/rb-fsevent".freeze
s.licenses = ["MIT".freeze]
s.rubygems_version = "2.5.2".freeze
s.summary = "Very simple & usable FSEvents API".freeze
s.installed_by_version = "2.5.2" if s.respond_to? :installed_by_version
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.6"])
s.add_development_dependency(%q<guard-rspec>.freeze, ["~> 4.2"])
s.add_development_dependency(%q<rake>.freeze, ["~> 12.0"])
else
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
s.add_dependency(%q<rspec>.freeze, ["~> 3.6"])
s.add_dependency(%q<guard-rspec>.freeze, ["~> 4.2"])
s.add_dependency(%q<rake>.freeze, ["~> 12.0"])
end
else
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
s.add_dependency(%q<rspec>.freeze, ["~> 3.6"])
s.add_dependency(%q<guard-rspec>.freeze, ["~> 4.2"])
s.add_dependency(%q<rake>.freeze, ["~> 12.0"])
end
end
| 41.906977 | 112 | 0.656493 |
f81a16eaa1a359871c7e2d60e22078b6927dae4f | 1,804 | require 'test/unit'
require File.dirname(__FILE__) + '/template_handler_test_mocks'
require File.dirname(__FILE__) + '/../lib/prawnto'
require File.dirname(__FILE__) + '/../init'
#TODO: ruby1.9: pull same testing scheme from Raw once we're on 1.9
class BaseTemplateHandlerTest < Test::Unit::TestCase
include TemplateHandlerTestMocks
def setup
@view = ActionView.new
@handler = Prawnto::TemplateHandler::Base.new(@view)
@controller = @view.controller
end
def test_prawnto_options_dsl_hash
@y = 3231; @x = 5322
@controller.prawnto :dsl=> {'x'=>:@x, :y=>'@y'}
@handler.pull_prawnto_options
source = @handler.build_source_to_establish_locals(Template.new(""))
assert_equal @x, eval(source + "\nx")
assert_equal @y, eval(source + "\ny")
end
def test_prawnto_options_dsl_array
@y = 3231; @x = 5322
@controller.prawnto :dsl=> ['x', :@y]
@handler.pull_prawnto_options
source = @handler.build_source_to_establish_locals(Template.new(""))
assert_equal @x, eval(source + "\nx")
assert_equal @y, eval(source + "\ny")
end
def test_headers_disposition_inline_and_filename
@controller.prawnto :filename=>'xxx.pdf', :inline=>true
@handler.pull_prawnto_options
@handler.set_disposition
assert_equal 'inline;filename=xxx.pdf', @view.headers['Content-Disposition']
end
def test_headers_disposition_attachment_and_filename
@controller.prawnto :filename=>'xxx.pdf', :inline=>false
@handler.pull_prawnto_options
@handler.set_disposition
assert_equal 'attachment;filename=xxx.pdf', @view.headers['Content-Disposition']
end
def test_headers_disposition_default
@handler.pull_prawnto_options
@handler.set_disposition
assert_equal 'inline', @view.headers['Content-Disposition']
end
end
| 30.576271 | 84 | 0.721729 |
0882a22fdd10b4111bf2804e598e2bcbd24c90ea | 4,606 | # -*- encoding : ascii-8bit -*-
require 'digest'
require 'digest/sha3'
require 'openssl'
require 'rlp'
module Web3::Eth::Abi
module Utils
extend self
include Constant
##
# Not the keccak in sha3, although it's underlying lib named SHA3
#
def keccak256(x)
Digest::SHA3.new(256).digest(x)
end
def keccak512(x)
Digest::SHA3.new(512).digest(x)
end
def keccak256_rlp(x)
keccak256 RLP.encode(x)
end
def sha256(x)
Digest::SHA256.digest x
end
def double_sha256(x)
sha256 sha256(x)
end
def ripemd160(x)
Digest::RMD160.digest x
end
def hash160(x)
ripemd160 sha256(x)
end
def hash160_hex(x)
encode_hex hash160(x)
end
def mod_exp(x, y, n)
x.to_bn.mod_exp(y, n).to_i
end
def mod_mul(x, y, n)
x.to_bn.mod_mul(y, n).to_i
end
def to_signed(i)
i > Constant::INT_MAX ? (i-Constant::TT256) : i
end
def base58_check_to_bytes(s)
leadingzbytes = s.match(/\A1*/)[0]
data = Constant::BYTE_ZERO * leadingzbytes.size + BaseConvert.convert(s, 58, 256)
raise ChecksumError, "double sha256 checksum doesn't match" unless double_sha256(data[0...-4])[0,4] == data[-4..-1]
data[1...-4]
end
def bytes_to_base58_check(bytes, magicbyte=0)
bs = "#{magicbyte.chr}#{bytes}"
leadingzbytes = bs.match(/\A#{Constant::BYTE_ZERO}*/)[0]
checksum = double_sha256(bs)[0,4]
'1'*leadingzbytes.size + BaseConvert.convert("#{bs}#{checksum}", 256, 58)
end
def ceil32(x)
x % 32 == 0 ? x : (x + 32 - x%32)
end
def encode_hex(b)
RLP::Utils.encode_hex b
end
def decode_hex(s)
RLP::Utils.decode_hex s
end
def big_endian_to_int(s)
RLP::Sedes.big_endian_int.deserialize s.sub(/\A(\x00)+/, '')
end
def int_to_big_endian(n)
RLP::Sedes.big_endian_int.serialize n
end
def lpad(x, symbol, l)
return x if x.size >= l
symbol * (l - x.size) + x
end
def rpad(x, symbol, l)
return x if x.size >= l
x + symbol * (l - x.size)
end
def zpad(x, l)
lpad x, BYTE_ZERO, l
end
def zunpad(x)
x.sub /\A\x00+/, ''
end
def zpad_int(n, l=32)
zpad encode_int(n), l
end
def zpad_hex(s, l=32)
zpad decode_hex(s), l
end
def int_to_addr(x)
zpad_int x, 20
end
def encode_int(n)
raise ArgumentError, "Integer invalid or out of range: #{n}" unless n.is_a?(Integer) && n >= 0 && n <= UINT_MAX
int_to_big_endian n
end
def decode_int(v)
raise ArgumentError, "No leading zero bytes allowed for integers" if v.size > 0 && (v[0] == Constant::BYTE_ZERO || v[0] == 0)
big_endian_to_int v
end
def bytearray_to_int(arr)
o = 0
arr.each {|x| o = (o << 8) + x }
o
end
def int_array_to_bytes(arr)
arr.pack('C*')
end
def bytes_to_int_array(bytes)
bytes.unpack('C*')
end
def coerce_to_int(x)
if x.is_a?(Numeric)
x
elsif x.size == 40
big_endian_to_int decode_hex(x)
else
big_endian_to_int x
end
end
def coerce_to_bytes(x)
if x.is_a?(Numeric)
int_to_big_endian x
elsif x.size == 40
decode_hex(x)
else
x
end
end
def coerce_addr_to_hex(x)
if x.is_a?(Numeric)
encode_hex zpad(int_to_big_endian(x), 20)
elsif x.size == 40 || x.size == 0
x
else
encode_hex zpad(x, 20)[-20..-1]
end
end
def normalize_address(x, allow_blank: false)
address = Address.new(x)
raise ValueError, "address is blank" if !allow_blank && address.blank?
address.to_bytes
end
def mk_contract_address(sender, nonce)
keccak256_rlp([normalize_address(sender), nonce])[12..-1]
end
def mk_metropolis_contract_address(sender, initcode)
keccak256(normalize_address(sender) + initcode)[12..-1]
end
def parse_int_or_hex(s)
if s.is_a?(Numeric)
s
elsif s[0,2] == '0x'
big_endian_to_int decode_hex(normalize_hex_without_prefix(s))
else
s.to_i
end
end
def normalize_hex_without_prefix(s)
if s[0,2] == '0x'
(s.size % 2 == 1 ? '0' : '') + s[2..-1]
else
s
end
end
def function_signature method_name, arg_types
"#{method_name}(#{arg_types.join(',')})"
end
def signature_hash signature, length=64
encode_hex(keccak256(signature))[0...length]
end
end
end
| 20.471111 | 131 | 0.580764 |
1da84292c56c90d47c0fcc964b8e475b72802619 | 3,772 | require 'rubygems'
require 'active_record'
class RequestLogAnalyzer::Database
autoload :Connection, 'request_log_analyzer/database/connection'
autoload :Base, 'request_log_analyzer/database/base'
autoload :Request, 'request_log_analyzer/database/request'
autoload :Source, 'request_log_analyzer/database/source'
autoload :Warning, 'request_log_analyzer/database/warning'
include RequestLogAnalyzer::Database::Connection
attr_accessor :file_format
attr_reader :line_classes
def initialize(connection_identifier = nil)
@line_classes = []
RequestLogAnalyzer::Database::Base.database = self
connect(connection_identifier)
end
# Returns the ORM class for the provided line type
def get_class(line_type)
line_type = line_type.name if line_type.respond_to?(:name)
Object.const_get("#{line_type}_line".camelize)
end
def default_classes
[RequestLogAnalyzer::Database::Request, RequestLogAnalyzer::Database::Source, RequestLogAnalyzer::Database::Warning]
end
# Loads the ORM classes by inspecting the tables in the current database
def load_database_schema!
connection.tables.map do |table|
case table.to_sym
when :warnings then RequestLogAnalyzer::Database::Warning
when :sources then RequestLogAnalyzer::Database::Source
when :requests then RequestLogAnalyzer::Database::Request
else load_activerecord_class(table)
end
end
end
# Returns an array of all the ActiveRecord-bases ORM classes for this database
def orm_classes
default_classes + line_classes
end
# Loads an ActiveRecord-based class that correspond to the given parameter, which can either be
# a table name or a LineDefinition instance.
def load_activerecord_class(linedefinition_or_table)
case linedefinition_or_table
when String, Symbol
klass_name = linedefinition_or_table.to_s.singularize.camelize
klass = RequestLogAnalyzer::Database::Base.subclass_from_table(linedefinition_or_table)
when RequestLogAnalyzer::LineDefinition
klass_name = "#{linedefinition_or_table.name}_line".camelize
klass = RequestLogAnalyzer::Database::Base.subclass_from_line_definition(linedefinition_or_table)
end
Object.const_set(klass_name, klass)
klass = Object.const_get(klass_name)
@line_classes << klass
return klass
end
def fileformat_classes
raise "No file_format provided!" unless file_format
line_classes = file_format.line_definitions.map { |(name, definition)| load_activerecord_class(definition) }
return default_classes + line_classes
end
# Creates the database schema and related ActiveRecord::Base subclasses that correspond to the
# file format definition. These ORM classes will later be used to create records in the database.
def create_database_schema!
fileformat_classes.each { |klass| klass.create_table! }
end
# Drops the table of all the ORM classes, and unregisters the classes
def drop_database_schema!
file_format ? fileformat_classes.map(&:drop_table!) : orm_classes.map(&:drop_table!)
remove_orm_classes!
end
# Registers the default ORM classes in the default namespace
def register_default_orm_classes!
Object.const_set('Request', RequestLogAnalyzer::Database::Request)
Object.const_set('Source', RequestLogAnalyzer::Database::Source)
Object.const_set('Warning', RequestLogAnalyzer::Database::Warning)
end
# Unregisters every ORM class constant
def remove_orm_classes!
orm_classes.each do |klass|
if klass.respond_to?(:name) && !klass.name.blank?
klass_name = klass.name.split('::').last
Object.send(:remove_const, klass_name) if Object.const_defined?(klass_name)
end
end
end
end
| 35.92381 | 120 | 0.757688 |
621f86c0efb234979297a61e4921e65190c7fe75 | 5,803 | ##
# Copyright (c) 2016, salesforce.com, inc.
# All rights reserved.
# Licensed under the BSD 3-Clause license.
# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
##
##
# A single vulnerability found as part of a {Test}
class Vulnerability
include DataMapper::Resource
property :id, Serial #@return [Integer] Primary Key
property :test_id, Integer #@return [Integer] ID of {Test} the Vulnerability belongs to
property :vulntype, Integer #@return [Integer] ID of {VulnType} this Vulnerability uses. 0 = Custom vulnerability
property :custom, String, :length => 100 #@return [String] Name of Vulnerability class if custom vulnerability
property :created_at, DateTime #@return [DateTime] Date/Time Vulnerability created (DM Handled)
property :updated_at, DateTime #@return [DateTime] Date/Time Vulnerability last updated (DM Handled)
property :verified, Boolean, :default => true #@return [Boolean] True if this vuln is verified
property :falsepos, Boolean, :default => false #@return [Boolean] True if this vuln is marked as a false positive
property :priorityOverride, Integer #@return [Integer] Priority of this vulnerability (overrides VulnType priority)
property :cweOverride, Integer #@return [Integer] CWE mapping of this vulnerability (overrides VulnType cwe_mapping)
property :starred, Boolean, :default => false #@return [Boolean] True if this Vulnerability is starred (flagged as worth saving/teaching from)
belongs_to :test #@return [Test] Test this Vulnerability belongs to
has n, :sections
##
# Get the {VulnType} object that this Vulnerability uses
## @return [VulnType]
def vtobj
return VulnType.get(self.vulntype)
end
##
# Get Vulnerability type name (e.g. Stored XSS).
# Returns VulnType label if not custom, otherwise custom Vulnerability name. If the VulnType has no label, return the VulnType name
# @return [String] Vulnerability type name
def type_str
return custom if vulntype == 0
vt = VulnType.get(vulntype)
return (vt.label.nil? || vt.label.strip.empty?) ? vt.name : vt.label
end
##
# Get HTML for icon representing status (verified, unverified, false positive) of this Vulnerability
# @return [String] HTML for status icon
def status_icon
return '<i class="fa fa-check" rel="tooltip" title="Vuln Verified" style="color:#009933;"></i>' if (verified && !falsepos)
return '<i class="fa fa-question" rel="tooltip" title="UNVERIFIED Vuln" style="color:#B40404;"></i>' if !verified
return '<i class="fa fa-bug" rel="tooltip" title="False Positive" style="color:#8A6D3B;"></i>' if falsepos
end
##
# Get HTML for formatted status text (verified, unverified, false positive) of this Vulnerability
# @return [String] HTML for status text
def status_text
return '<span style="color:#009933;">Verified Vuln</span>' if (verified && !falsepos)
return '<span style="color:#B40404;">Unverified Vuln</span>' if !verified
return '<span style="color:#8A6D3B;">False Positive</span>' if falsepos
end
##
# Get HTML of Vulnerability type description to use in generated reports
# @return [String] HTML description of Vulnerability type
def type_html
return nil if(vulntype == 0)
vt = VulnType.get(vulntype)
return vt.html
end
##
# Get locations this vulnerability was found in. Locations are any URL or FILE sections on the Vulnerability
# @return [Array<String>] Vulnerability locations
def descriptor
dses = []
self.sections.each do |s|
dses << Rack::Utils.escape_html(s.body) if s.type == SECT_TYPE::URL || s.type == SECT_TYPE::FILE
end
dses.join ", "
end
##
# Get priority of this vulnerability - either {VulnType}'s priority or overridden priority level for this Vulnerability.
# @return [VULN_PRIORITY]
def vuln_priority
vtPri = VulnType.get(vulntype).priority unless vulntype == 0
return priorityOverride if(!priorityOverride.nil?)
return VULN_PRIORITY::NONE if ((vulntype == 0 && priorityOverride.nil?) || vtPri.nil?)
return vtPri
end
##
# Get cwe_mapping of this vulnerability - either {VulnType}'s or overridden cwe_mapping on this Vulnerability
# @return [Integer] CWE mapping
def cwe_mapping
if(self.vulntype == 0 || !self.cweOverride.nil?)
return self.cweOverride
else
return self.vtobj.cwe_mapping
end
end
##
# @return [String] Link to CWE definition on Mitre's website if CWE-mapping exists
def cwe_link
if(self.cwe_mapping.nil? || self.cwe_mapping <= 0)
return nil
else
return "https://cwe.mitre.org/data/definitions/#{self.cwe_mapping}.html"
end
end
##
# Get vulns on {Test}s that are on apps with any of the given flags and match given parameters.
# This method passes through to Vulnerability.all with additional parameters to properly filter by flag
# @param selectedFlags [Array] Array of flag IDs to filter by
# @param params [Hash] Additional params to pass to Vulnerability.all
# @return [Array<Vulnerability>] Matching Vulnerability objects
def self.allWithFlags(selectedFlags, params={})
if(selectedFlags.include?(-1))
return all(params)
else
return all({Vulnerability.test.application.flags.id => selectedFlags}.merge(params))
end
end
##
# Count Vulnerability objects that have the given flags and match given parameters.
# This method passes through to Vulnerability.count with additional parameters to properly filter by flag
# @param selectedFlags [Array<Integer>] Flags to filter by
# @param params [Hash] Additional params to pass to Vulnerability.count
# @return [Array<Vulnerability>] Number of matching Vulnerability objects
def self.countWithFlags(selectedFlags, params={})
return allWithFlags(selectedFlags, params.merge({:fields => [:id]})).size
end
end | 41.156028 | 146 | 0.733241 |
1c2250aa3f6236d0afed0f14c9087f138b8d9b1a | 845 | require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = 'ABI31_0_0EXFaceDetector'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = package['license']
s.author = package['author']
s.homepage = package['homepage']
s.platform = :ios, '10.0'
s.source = { git: 'https://github.com/expo/expo.git' }
s.source_files = 'ABI31_0_0EXFaceDetector/**/*.{h,m}'
s.preserve_paths = 'ABI31_0_0EXFaceDetector/**/*.{h,m}'
s.requires_arc = true
s.dependency 'ABI31_0_0EXCore'
s.dependency 'ABI31_0_0EXFaceDetectorInterface'
s.dependency 'Firebase/Core'
s.dependency 'Firebase/MLVision'
s.dependency 'Firebase/MLVisionFaceModel'
end
| 30.178571 | 67 | 0.649704 |
6169c1276f268d8fb28b9ccf12ef88a30a073d56 | 660 | require 'rails_helper'
RSpec.describe PostFollowPolicy do
let(:user) { token_for build(:user) }
let(:follow) { build(:post_follow, user: user.resource_owner) }
let(:other) { build(:post_follow) }
subject { described_class }
permissions :update? do
it('should not allow users') { should_not permit(user, follow) }
it('should not allow anons') { should_not permit(nil, follow) }
end
permissions :create?, :destroy? do
it('should not allow anons') { should_not permit(nil, follow) }
it('should allow for yourself') { should permit(user, follow) }
it('should not allow for others') { should_not permit(user, other) }
end
end
| 33 | 72 | 0.692424 |
bbd26b497f8959bc7a74f4f4e7d29dd4a81d8b95 | 9,393 | require 'net/ssh'
require 'tempfile'
require 'tmpdir'
require 'stringio'
module GitHosting
TEMP_DATA_DIR = "/tmp/redmine_git_hosting" # In case settings not migrated (normally from settings)
SCRIPT_DIR = "" # In case settings not migrated (normally from settings)
SCRIPT_PARENT = "bin"
# Used to register errors when pulling and pushing the conf file
class GitHostingException < StandardError
end
@@logger = nil
def self.logger
@@logger ||= MyLogger.new
end
@@web_user = nil
def self.web_user
if @@web_user.nil?
@@web_user = (%x[whoami]).chomp.strip
end
return @@web_user
end
def self.web_user=(setuser)
@@web_user = setuser
end
def self.git_user
Setting.plugin_openproject_revisions_git['gitolite_user']
end
@@mirror_pubkey = nil
def self.mirror_push_public_key
if @@mirror_pubkey.nil?
%x[cat '#{Setting.plugin_openproject_revisions_git['gitolite_ssh_private_key']}' | #{GitHosting.git_user_runner} 'cat > ~/.ssh/gitolite_admin_id_rsa ' ]
%x[cat '#{Setting.plugin_openproject_revisions_git['gitolite_ssh_public_key']}' | #{GitHosting.git_user_runner} 'cat > ~/.ssh/gitolite_admin_id_rsa.pub ' ]
%x[ #{GitHosting.git_user_runner} 'chmod 600 ~/.ssh/gitolite_admin_id_rsa' ]
%x[ #{GitHosting.git_user_runner} 'chmod 644 ~/.ssh/gitolite_admin_id_rsa.pub' ]
pubk = ( %x[cat '#{Setting.plugin_openproject_revisions_git['gitolite_ssh_public_key']}' ] ).chomp.strip
git_user_dir = ( %x[ #{GitHosting.git_user_runner} "cd ~ ; pwd" ] ).chomp.strip
%x[ #{GitHosting.git_user_runner} 'echo "#{pubk}" > ~/.ssh/gitolite_admin_id_rsa.pub ' ]
%x[ echo '#!/bin/sh' | #{GitHosting.git_user_runner} 'cat > ~/.ssh/run_gitolite_admin_ssh']
%x[ echo 'exec ssh -o BatchMode=yes -o StrictHostKeyChecking=no -i #{git_user_dir}/.ssh/gitolite_admin_id_rsa "$@"' | #{GitHosting.git_user_runner} "cat >> ~/.ssh/run_gitolite_admin_ssh" ]
%x[ #{GitHosting.git_user_runner} 'chmod 644 ~/.ssh/gitolite_admin_id_rsa.pub' ]
%x[ #{GitHosting.git_user_runner} 'chmod 600 ~/.ssh/gitolite_admin_id_rsa']
%x[ #{GitHosting.git_user_runner} 'chmod 700 ~/.ssh/run_gitolite_admin_ssh']
@@mirror_pubkey = pubk.split(/[\t ]+/)[0].to_s + " " + pubk.split(/[\t ]+/)[1].to_s
end
@@mirror_pubkey
end
@@git_hosting_tmp_dir = nil
@@previous_git_tmp_dir = nil
def self.get_tmp_dir
tmp_dir = (Setting.plugin_openproject_revisions_git['gitTempDataDir'] || TEMP_DATA_DIR)
if (@@previous_git_tmp_dir != tmp_dir)
@@previous_git_tmp_dir = tmp_dir
@@git_hosting_tmp_dir = File.join(tmp_dir,git_user) + "/"
end
if !File.directory?(@@git_hosting_tmp_dir)
%x[mkdir -p "#{@@git_hosting_tmp_dir}"]
%x[chmod 700 "#{@@git_hosting_tmp_dir}"]
%x[chown #{web_user} "#{@@git_hosting_tmp_dir}"]
end
return @@git_hosting_tmp_dir
end
@@git_hosting_bin_dir = nil
@@previous_git_script_dir = nil
def self.get_bin_dir
script_dir = Setting.plugin_openproject_revisions_git['gitScriptDir'] || SCRIPT_DIR
if @@previous_git_script_dir != script_dir
@@previous_git_script_dir = script_dir
@@git_bin_dir_writeable = nil
# Directory for binaries includes 'SCRIPT_PARENT' at the end.
# Further, absolute path adds additional 'git_user' component for multi-gitolite installations.
if script_dir[0,1] == "/"
@@git_hosting_bin_dir = File.join(script_dir, git_user, SCRIPT_PARENT) + "/"
else
@@git_hosting_bin_dir = File.join(Gem.loaded_specs['openproject-revisions_git'].full_gem_path.to_s, script_dir, SCRIPT_PARENT).to_s+"/"
end
end
if !File.directory?(@@git_hosting_bin_dir)
logger.info "Creating bin directory: #{@@git_hosting_bin_dir}, Owner #{web_user}"
%x[mkdir -p "#{@@git_hosting_bin_dir}"]
%x[chmod 750 "#{@@git_hosting_bin_dir}"]
%x[chown #{web_user} "#{@@git_hosting_bin_dir}"]
if !File.directory?(@@git_hosting_bin_dir)
logger.error "Cannot create bin directory: #{@@git_hosting_bin_dir}"
end
end
return @@git_hosting_bin_dir
end
@@git_bin_dir_writeable = nil
def self.bin_dir_writeable?(*option)
@@git_bin_dir_writeable = nil if option.length > 0 && option[0] == :reset
if @@git_bin_dir_writeable == nil
mybindir = get_bin_dir
mytestfile = "#{mybindir}/writecheck"
if (!File.directory?(mybindir))
@@git_bin_dir_writeable = false
else
%x[touch "#{mytestfile}"]
if (!File.exists?("#{mytestfile}"))
@@git_bin_dir_writeable = false
else
%x[rm "#{mytestfile}"]
@@git_bin_dir_writeable = true
end
end
end
@@git_bin_dir_writeable
end
def self.git_exec_path
return File.join(get_bin_dir, "run_git_as_git_user")
end
def self.gitolite_ssh_path
return File.join(get_bin_dir, "gitolite_admin_ssh")
end
def self.git_user_runner_path
return File.join(get_bin_dir, "run_as_git_user")
end
def self.git_exec
if !File.exists?(git_exec_path())
update_git_exec
end
return git_exec_path()
end
def self.gitolite_ssh
if !File.exists?(gitolite_ssh_path())
update_git_exec
end
return gitolite_ssh_path()
end
def self.git_user_runner
if !File.exists?(git_user_runner_path())
update_git_exec
end
return git_user_runner_path()
end
def self.update_git_exec
logger.info "Setting up #{get_bin_dir}"
gitolite_key=Setting.plugin_openproject_revisions_git['gitolite_ssh_private_key']
File.open(gitolite_ssh_path(), "w") do |f|
f.puts "#!/bin/sh"
f.puts "exec ssh -o BatchMode=yes -o StrictHostKeyChecking=no -i #{gitolite_key} \"$@\""
end if !File.exists?(gitolite_ssh_path())
##############################################################################################################################
# So... older versions of sudo are completely different than newer versions of sudo
# Try running sudo -i [user] 'ls -l' on sudo > 1.7.4 and you get an error that command 'ls -l' doesn't exist
# do it on version < 1.7.3 and it runs just fine. Different levels of escaping are necessary depending on which
# version of sudo you are using... which just completely CRAZY, but I don't know how to avoid it
#
# Note: I don't know whether the switch is at 1.7.3 or 1.7.4, the switch is between ubuntu 10.10 which uses 1.7.2
# and ubuntu 11.04 which uses 1.7.4. I have tested that the latest 1.8.1p2 seems to have identical behavior to 1.7.4
##############################################################################################################################
sudo_version_str=%x[ sudo -V 2>&1 | head -n1 | sed 's/^.* //g' | sed 's/[a-z].*$//g' ]
split_version = sudo_version_str.split(/\./)
sudo_version = 100*100*(split_version[0].to_i) + 100*(split_version[1].to_i) + split_version[2].to_i
sudo_version_switch = (100*100*1) + (100 * 7) + 3
File.open(git_exec_path(), "w") do |f|
f.puts '#!/bin/sh'
f.puts "if [ \"\$(whoami)\" = \"#{git_user}\" ] ; then"
f.puts ' cmd=$(printf "\\"%s\\" " "$@")'
f.puts ' cd ~'
f.puts ' eval "git $cmd"'
f.puts "else"
if sudo_version < sudo_version_switch
f.puts ' cmd=$(printf "\\\\\\"%s\\\\\\" " "$@")'
f.puts " sudo -u #{git_user} -i eval \"git $cmd\""
else
f.puts ' cmd=$(printf "\\"%s\\" " "$@")'
f.puts " sudo -u #{git_user} -i eval \"git $cmd\""
end
f.puts 'fi'
end if !File.exists?(git_exec_path())
# use perl script for git_user_runner so we can
# escape output more easily
File.open(git_user_runner_path(), "w") do |f|
f.puts '#!/usr/bin/perl'
f.puts ''
f.puts 'my $command = join(" ", @ARGV);'
f.puts ''
f.puts 'my $user = `whoami`;'
f.puts 'chomp $user;'
f.puts 'if ($user eq "' + git_user + '")'
f.puts '{'
f.puts ' exec("cd ~ ; $command");'
f.puts '}'
f.puts 'else'
f.puts '{'
f.puts ' $command =~ s/\\\\/\\\\\\\\/g;'
# Previous line turns \; => \\;
# If old sudo, turn \\; => "\\;" to protect ';' from loss as command separator during eval
if sudo_version < sudo_version_switch
f.puts ' $command =~ s/(\\\\\\\\;)/"$1"/g;'
f.puts " $command =~ s/'/\\\\\\\\'/g;"
end
f.puts ' $command =~ s/"/\\\\"/g;'
f.puts ' exec("sudo -u ' + git_user + ' -i eval \"$command\"");'
f.puts '}'
end if !File.exists?(git_user_runner_path())
File.chmod(0550, git_exec_path())
File.chmod(0550, gitolite_ssh_path())
File.chmod(0550, git_user_runner_path())
%x[chown #{web_user} -R "#{get_bin_dir}"]
end
class MyLogger
# Prefix to error messages
ERROR_PREFIX = "***> "
# For errors, add our prefix to all messages
def error(*progname, &block)
if block_given?
Rails.logger.error(*progname) { "#{ERROR_PREFIX}#{yield}".gsub(/\n/,"\n#{ERROR_PREFIX}") }
else
Rails.logger.error "#{ERROR_PREFIX}#{progname}".gsub(/\n/,"\n#{ERROR_PREFIX}")
end
end
# Handle everything else with base object
def method_missing(m, *args, &block)
Rails.logger.send m, *args, &block
end
end
end
| 37.722892 | 202 | 0.617694 |
91d6ccf13f60ddabf126a7e0df96f63a4ede4174 | 430 | require 'formula'
class BoostBcp < Formula
homepage 'http://www.boost.org/doc/tools/bcp/'
url 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
sha1 'cef9a0cc7084b1d639e06cd3bc34e4251524c840'
head 'http://svn.boost.org/svn/boost/trunk/'
depends_on 'boost-build' => :build
def install
cd 'tools/bcp' do
system "b2"
prefix.install "../../dist/bin"
end
end
end
| 22.631579 | 89 | 0.693023 |
b9a65405f7b7028480da0babaffc65c3da16c53d | 32 | module Manager::UsersHelper
end
| 10.666667 | 27 | 0.84375 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.