repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/sludge.rb
lib/ruby_warrior/units/sludge.rb
module RubyWarrior module Units class Sludge < Base def initialize add_abilities :attack!, :feel end def play_turn(turn) %i[forward left right backward].each do |direction| if turn.feel(direction).player? turn.attack!(direction) return ...
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/captive.rb
lib/ruby_warrior/units/captive.rb
module RubyWarrior module Units class Captive < Base def initialize bind end def max_health 1 end def character "C" end end end end
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/thick_sludge.rb
lib/ruby_warrior/units/thick_sludge.rb
module RubyWarrior module Units class ThickSludge < Sludge def max_health 24 end def character "S" end end end end
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/base.rb
lib/ruby_warrior/units/base.rb
module RubyWarrior module Units class Base attr_writer :health attr_accessor :position def attack_power 0 end def max_health 0 end def earn_points(points) end def health @health ||= max_health end def take_damage(amount...
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/golem.rb
lib/ruby_warrior/units/golem.rb
module RubyWarrior module Units class Golem < Base attr_writer :turn attr_accessor :max_health def play_turn(turn) @turn.call(turn) if @turn end def attack_power 3 end def character "G" end end end end
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
ryanb/ruby-warrior
https://github.com/ryanb/ruby-warrior/blob/a062c16548d8629bd084ec275beac7f9ff6bcc85/lib/ruby_warrior/units/warrior.rb
lib/ruby_warrior/units/warrior.rb
module RubyWarrior module Units class Warrior < Base attr_writer :name attr_reader :score def initialize @score = 0 # TODO make score dynamic @golem_abilities = [] end def play_turn(turn) player.play_turn(turn) end def player @player ||=...
ruby
MIT
a062c16548d8629bd084ec275beac7f9ff6bcc85
2026-01-04T15:48:10.335348Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/watchr.rb
tests/watchr.rb
ENV['FOG_MOCK'] ||= 'true' ENV['AUTOTEST'] = 'true' ENV['WATCHR'] = '1' def file2shindo(file) result = file.sub('lib/fog/', 'tests/').gsub(/\.rb$/, '_tests.rb') end def run_shindo_test(file) if File.exist? file system("shindont #{file}") else puts "FIXME: No test #{file} [#{Time.now}]" end end watc...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helper.rb
tests/helper.rb
ENV['FOG_RC'] = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__) ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default' require 'fog' require 'fog/bin' # for available_providers and registered_providers require 'ostruct' Excon.defaults.merge!(:debug_request => true, :debug_response => true) require...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/storage/helper.rb
tests/storage/helper.rb
def storage_providers { :aws => { :mocked => true }, :local => { :mocked => false }, :rackspace => { :mocked => false } } end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/storage/models/directories_tests.rb
tests/storage/models/directories_tests.rb
for provider, config in storage_providers Shindo.tests("Storage[:#{provider}] | directories", [provider.to_s]) do if !Fog.mocking? || config[:mocked] directory_attributes = { :key => 'fogdirectoriestests', }.merge!(config[:directory_attributes] || {}) collection_tests(Fog::Storage[pr...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/storage/models/directory_test.rb
tests/storage/models/directory_test.rb
for provider, config in storage_providers Shindo.tests("Storage[:#{provider}] | directory", [provider.to_s]) do if !Fog.mocking? || config[:mocked] directory_attributes = { :key => 'fogdirectorytests' }.merge!(config[:directory_attributes] || {}) model_tests(Fog::Storage[provider].di...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/storage/models/file_tests.rb
tests/storage/models/file_tests.rb
for provider, config in storage_providers Shindo.tests("Storage[:#{provider}] | file", [provider.to_s]) do if !Fog.mocking? || config[:mocked] file_attributes = { :key => 'fog_file_tests', :body => lorem_file, :public => true }.merge!(config[:file_attributes] || {}) d...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/storage/models/files_tests.rb
tests/storage/models/files_tests.rb
for provider, config in storage_providers Shindo.tests("Storage[:#{provider}] | files", [provider.to_s]) do if !Fog.mocking? || config[:mocked] file_attributes = { :key => 'fog_files_tests', :body => lorem_file }.merge!(config[:file_attributes] || {}) directory_attributes = {...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/ensure_list_tests.rb
tests/vcloud_director/ensure_list_tests.rb
Shindo.tests('Compute::VcloudDirector | ensure_list!', ['vclouddirector']) do # ensure list is not available in mocking mode unless Fog.mocking? @service = Fog::Compute::VcloudDirector.new tests('#ensure_list! for single key ensures our key has an array as a value') do tests('for key with a hash')....
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/catalog_tests.rb
tests/vcloud_director/requests/compute/catalog_tests.rb
Shindo.tests('Compute::VcloudDirector | catalog requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('#get_catalog').data_matches_schema(VcloudDirector::Compute::Schema::CATALOG_TYPE) do link = @org[:Link].find do |l...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/admin_tests.rb
tests/vcloud_director/requests/compute/admin_tests.rb
Shindo.tests('Compute::VcloudDirector | admin requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_vcloud').data_matches_schema(VcloudDirector::Compute::Schema::VCLOUD_TYPE) do @service.get_vcloud.body end @org = VcloudDirector::Compute::Helper.current_org(@service) ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/groups_tests.rb
tests/vcloud_director/requests/compute/groups_tests.rb
Shindo.tests('Compute::VcloudDirector | groups requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_groups_from_query') do pending if Fog.mocking? %w[idrecords records references].each do |format| tests(":format => #{format}") do tests('#body').data_match...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/versions_tests.rb
tests/vcloud_director/requests/compute/versions_tests.rb
Shindo.tests('Compute::VcloudDirector | versions requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_supported_versions').formats(VcloudDirector::Compute::Schema::SUPPORTED_VERSIONS_TYPE) do @versions = @service.get_supported_versions.body end tests('API 5.1 is suppo...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/edge_gateway_tests.rb
tests/vcloud_director/requests/compute/edge_gateway_tests.rb
Shindo.tests('Compute::VcloudDirector | edge gateway requests', ['vclouddirector']) do FIREWALL_RULE_ID = '9999' @dhcp_configuration = { :GatewayDhcpService => { :IsEnabled => "true", :pools => [{ :IsEnabled => "true", :Network => "testNet", :DefaultLeaseTime => "65", ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/media_tests.rb
tests/vcloud_director/requests/compute/media_tests.rb
Shindo.tests('Compute::VcloudDirector | media requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('error conditions') do tests('#post_upload_media') do tests('Invalid image_type').raises(Fog::Compute::VcloudDirector::BadRequest) do @service.post_upload_media('0000...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb
tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb
Shindo.tests('Compute::VcloudDirector | vdc_storage_profile requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) @vdc_id = VcloudDirector::Compute::Helper.first_vdc_id(@org) @vdc = @service.get_vdc(@vdc_id).body @vdc[:VdcS...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/session_tests.rb
tests/vcloud_director/requests/compute/session_tests.rb
Shindo.tests('Compute::VcloudDirector | session requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#post_login_sessions').data_matches_schema(VcloudDirector::Compute::Schema::SESSION_TYPE) do pending @service.login.body # calls post_login_sessions end tests('#get_cur...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb
tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb
Shindo.tests('Compute::VcloudDirector | ovf requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Get first vDC') do session = @service.get_current_session.body link = @org[:Link].find do |l| l[:type] == 'a...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/users_tests.rb
tests/vcloud_director/requests/compute/users_tests.rb
Shindo.tests('Compute::VcloudDirector | users requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_users_from_query') do pending if Fog.mocking? %w[idrecords records references].each do |format| tests(":format => #{format}") do tests('#body').data_matches...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/schema_helper.rb
tests/vcloud_director/requests/compute/schema_helper.rb
class VcloudDirector module Compute module Schema # Mapping of a content media type to a xsd complex type. MEDIA_TYPE_MAPPING_TYPE = { :MediaType => String, :ComplexTypeName => String, :SchemaLocation => String } # Information for one version of the API. VERS...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/organization_tests.rb
tests/vcloud_director/requests/compute/organization_tests.rb
Shindo.tests('Compute::VcloudDirector | organization requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('#get_organizations').data_matches_schema(VcloudDirector::Compute::Schema::ORG_LIST_TYPE) do @org_list = @service.get_organizations.body end tests('#get_organization')....
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/task_tests.rb
tests/vcloud_director/requests/compute/task_tests.rb
Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('error conditions') do tests('retrieve non-existent TasksList').raises(Fog::Compute::VcloudDirector::Forbidden) do @service.get_task_list('00000000-0000-0000-0000-000000000000...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/query_tests.rb
tests/vcloud_director/requests/compute/query_tests.rb
Shindo.tests('Compute::VcloudDirector | query requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new tests('retrieve a summary list of all typed queries types') do tests('#get_execute_query') do @query_list = @service.get_execute_query.body tests(':type').returns('applicatio...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/supported_systems_tests.rb
tests/vcloud_director/requests/compute/supported_systems_tests.rb
Shindo.tests('Compute::VcloudDirector | supported_systems requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new if @service.api_version.to_f >= 5.1 tests('#get_supported_systems_info').formats(VcloudDirector::Compute::Schema::SUPPORTED_OPERATING_SYSTEMS_INFO_TYPE) do @service.get...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/disk_tests.rb
tests/vcloud_director/requests/compute/disk_tests.rb
Shindo.tests('Compute::VcloudDirector | disk requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @disk_name = VcloudDirector::Compute::Helper.test_name tests('error conditions') do tests('#post_upload_disk') do tests('Invalid size').raises(Fog::Compute::VcloudDirector::BadReq...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/vdc_tests.rb
tests/vcloud_director/requests/compute/vdc_tests.rb
Shindo.tests('Compute::VcloudDirector | vdc requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('#get_vdc').data_matches_schema(VcloudDirector::Compute::Schema::VDC_TYPE) do link = @org[:Link].find do |l| l[:r...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/vm_tests.rb
tests/vcloud_director/requests/compute/vm_tests.rb
Shindo.tests('Compute::VcloudDirector | vm requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Each vDC') do @org[:Link].select do |l| l[:type] == 'application/vnd.vmware.vcloud.vdc+xml' end.each do |link...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/network_tests.rb
tests/vcloud_director/requests/compute/network_tests.rb
require 'pp' Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) do GET_NETWORK_FORMAT = { :type => String, :name => String, :href => String, :id => String, :description => Fog::Nullable::String, :is_inherited => Fog::Boolean, :gateway => Fog::Nullable::String...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/helper.rb
tests/vcloud_director/requests/compute/helper.rb
class VcloudDirector module Compute module Helper def self.test_name @test_name ||= 'fog-test-%x' % Time.now.to_i end def self.fixture(filename) File.join(File.expand_path('../../../fixtures', __FILE__), filename) end def self.current_org(service) service.ge...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/requests/compute/vapp_tests.rb
tests/vcloud_director/requests/compute/vapp_tests.rb
Shindo.tests('Compute::VcloudDirector | vapp requests', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new @org = VcloudDirector::Compute::Helper.current_org(@service) tests('Each vDC') do @org[:Link].select do |l| l[:type] == 'application/vnd.vmware.vcloud.vdc+xml' end.each do |li...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/catalog_items_tests.rb
tests/vcloud_director/models/compute/catalog_items_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | catalog_items", ['vclouddirector', 'all']) do pending if Fog.mocking? pending if catalog.nil? catalog_items = catalog.catalog_items pending if catalog_items.empty? tests("#There is one or more catal...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/vapp_template_tests.rb
tests/vcloud_director/models/compute/vapp_template_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vapp_templates", ['vclouddirector', 'all']) do # unless there is atleast one vapp we cannot run these tests pending if vdc.vapp_templates.empty? vapp_templates = vdc.vapp_templates vapp = vapp_templa...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/media_tests.rb
tests/vcloud_director/models/compute/media_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests('Compute::VcloudDirector | media', ['vclouddirector']) do pending if Fog.mocking? medias = vdc.medias media_name = VcloudDirector::Compute::Helper.test_name tests('Compute::VcloudDirector | media', ['create']) do tests('#c...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/organizations_tests.rb
tests/vcloud_director/models/compute/organizations_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | organizations", ['vclouddirector', 'all']) do organizations = vcloud_director.organizations tests("#There is at least one organization").returns(true) { organizations.size >= 1 } org = organizations.get...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/catalogs_tests.rb
tests/vcloud_director/models/compute/catalogs_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | catalogs", ['vclouddirector', 'all']) do pending if Fog.mocking? pending if organization.catalogs.empty? catalogs = organization.catalogs tests("#There is one or more catalog").returns(true) { catalog...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/vms_tests.rb
tests/vcloud_director/models/compute/vms_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vms", ['vclouddirector', 'all']) do pending if Fog.mocking? vapp = vapps.find {|v| v.vms.size >= 1} # we can't run these tests if there is no vapps with a vm in them pending unless vapp vms = vapp....
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/tasks_tests.rb
tests/vcloud_director/models/compute/tasks_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests('Compute::VcloudDirector | tasks', ['vclouddirector']) do @service = Fog::Compute::VcloudDirector.new() if Fog.mocking? # add a bunch of tasks 50.times do task_id = @service.enqueue_task( "Bogus Task", ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/vdcs_tests.rb
tests/vcloud_director/models/compute/vdcs_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vdcs", ['vclouddirector', 'all']) do tests("#There is one or more vdc").returns(true){ organization.vdcs.size >= 1 } vdcs = organization.vdcs vdc = vdcs.first tests("Compute::VcloudDirector | vdc") d...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/network_tests.rb
tests/vcloud_director/models/compute/network_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | networks", ['vclouddirector', 'all']) do # unless there is at least one network we cannot run these tests pending if organization.networks.empty? service = Fog::Compute::VcloudDirector.new networks ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb
tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) VAPP_NAME = "shindo07" NETWORK_NAME = "DevOps - Dev Network Connection" NETWORK_MODE = "POOL" CATALOG_NAME = "Public VM Templates" CATALOG_ITEM_NAME = "DEVWEB" TAGS = { :company => "acme", :environment => "testing" } Shindo.tests("Compute::VcloudDi...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/helper.rb
tests/vcloud_director/models/compute/helper.rb
require 'fog/vcloud_director/compute' def boolean?(item) [TrueClass, FalseClass].include?(item.class) end def vcloud_director @vcloud_director ||= Fog::Compute::VcloudDirector.new( :connection_options => { :ssl_verify_peer => false, :connect_timeout => 200, :read_timeout => 200 } ) end...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/models/compute/vapp_tests.rb
tests/vcloud_director/models/compute/vapp_tests.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) Shindo.tests("Compute::VcloudDirector | vapps", ['vclouddirector', 'all']) do # unless there is atleast one vapp we cannot run these tests pending if vdc.vapps.empty? vapps = vdc.vapps vapp = vapps.first tests("Compute::VcloudDirector |...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud_director/generators/compute/compose_vapp_tests.rb
tests/vcloud_director/generators/compute/compose_vapp_tests.rb
require 'fog/vcloud_director/generators/compute/compose_vapp' Shindo.tests("Compute::VcloudDirector - ComposeVapp", ['vclouddirector']) do @vapp_configuration = { :Description => 'a description', :InstantiationParams => { :DefaultStorageProfile => 'profile', :NetworkConfig => [ { ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/clodo/requests/compute/image_tests.rb
tests/clodo/requests/compute/image_tests.rb
Shindo.tests('Fog::Compute[:clodo] | image requests', ['clodo']) do ### Fog.mock! clodo = Fog::Compute[:clodo] @image_format = { 'id' => String, 'name' => String, 'status' => String, 'vps_type' => String } @image_details_format = { 'os_type' => String, 'os_bits' => String, 'os_h...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/clodo/requests/compute/server_tests.rb
tests/clodo/requests/compute/server_tests.rb
Shindo.tests('Fog::Compute[:clodo] | server requests', ['clodo']) do @ip_format = { 'primary_ip' => Fog::Boolean, 'isp' => Fog::Boolean, 'ip' => String } @server_format = { 'addresses' => { 'public' => [@ip_format] }, 'id' => String, 'imageId' => Str...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/glesys/requests/compute/ip_tests.rb
tests/glesys/requests/compute/ip_tests.rb
Shindo.tests('Fog::Compute[:glesys] | ip requests', ['glesys']) do @free_ip = nil @ips = nil tests('success') do tests("#ip_list_own()").formats(Glesys::Compute::Formats::Ips::IPLIST) do pending if Fog.mocking? Fog::Compute[:glesys].ip_list_own.body['response'] end tests("#ip_list_free...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/glesys/requests/compute/ssh_key_tests.rb
tests/glesys/requests/compute/ssh_key_tests.rb
Shindo.tests("Fog::Compute[:glesys] | ssh_key requests", ["glesys", "compute"]) do @testdescription = "My test key to be removed" @testdata = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDv+r/dCIDv+YazWsyc1WCixR+iOeaswTx1U45h6vh4/ fog-unittest@GleSYS" @testdata_malformed = "ssh-rot13 AAAAthis_is_not_an_ssh_key fog-unitt...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/glesys/requests/compute/helper.rb
tests/glesys/requests/compute/helper.rb
class Glesys module Compute module Formats module Servers LIST = { 'debug' => { 'input' => Array }, 'servers' => [{ 'serverid' => String, 'hostname' => String, 'datacenter' => String, 'platform' => String ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/glesys/requests/compute/server_tests.rb
tests/glesys/requests/compute/server_tests.rb
Shindo.tests('Fog::Compute[:glesys] | server requests', ['glesys']) do @serverid = nil @hostname = "fog-#{Time.now.to_i}" @create = ":hostname => #@hostname, :rootpassword => 'pw#{Time.now.to_i}', "+ ":datacenter => 'Falkenberg', :platform => 'VMware', :templatename => 'Debian 7.0 64-bit', "+ ":di...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/glesys/requests/compute/template_tests.rb
tests/glesys/requests/compute/template_tests.rb
Shindo.tests('Fog::Compute[:glesys] | template requests', ['glesys']) do tests('success') do tests("#template_list()").formats(Glesys::Compute::Formats::Templates::LIST) do pending if Fog.mocking? Fog::Compute[:glesys].template_list.body['response'] end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/helper.rb
tests/dreamhost/helper.rb
def test_domain 'fog-dream.com' end def do_not_delete_record "do-not-delete.#{test_domain}" end ## Cleanup # We need to have at least one record defined for the Dreamhost DNS api to work # or you will get a no_such_zone runtime error # The first record needs to be created using the Dreamhost Web panel AFAIK # def...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/dns_tests.rb
tests/dreamhost/dns_tests.rb
Shindo.tests('Fog::DNS[:dreamhost]', ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests("collections") do %w{ records zones }.each do |collection| test("it should respond to #{collection}") { service.respond_to? collection } test("it should respond to #{collection}.all") { eval("service...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/requests/dns/delete_record_tests.rb
tests/dreamhost/requests/dns/delete_record_tests.rb
Shindo.tests('Fog::DNS[:dreamhost] | delete_record request', ['dreamhost', 'dns']) do tests("success") do test("delete testing records") do name = "delete-test.#{test_domain}" type = "A" value = "1.2.3.4" comment = "test" Fog::DNS[:dreamhost].create_record(name, type, value, commen...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/requests/dns/list_records_tests.rb
tests/dreamhost/requests/dns/list_records_tests.rb
Shindo.tests('Fog::DNS[:dreamhost] | list_records request', ['dreamhost', 'dns']) do tests("success") do response = Fog::DNS[:dreamhost].list_records test("should return 200") do if response.status == 200 @records = response.body["data"] end (response.status == 200) and (response....
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/requests/dns/create_record_tests.rb
tests/dreamhost/requests/dns/create_record_tests.rb
Shindo.tests('Fog::DNS[:dreamhost] | create_record request', ['dreamhost', 'dns']) do tests("success") do test("create an A resource record without comment") do name = "foo.testing.#{test_domain}" type = "A" value = "1.2.3.4" response = Fog::DNS[:dreamhost].create_record(name, type, valu...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/models/dns/records_tests.rb
tests/dreamhost/models/dns/records_tests.rb
Shindo.tests("Fog::DNS[:dreamhost] | records", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests('#all') do records = service.records test('should be an array') { records.is_a? Array } test('should not be empty') { !records.empty? } tests('should list Fog::DNS::Dreamhost::Record') d...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/models/dns/record_tests.rb
tests/dreamhost/models/dns/record_tests.rb
Shindo.tests("Fog::DNS[:dreamhost] | record", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] record = service.records.first tests('#attributes') do tests('should have') do model_attribute_hash = record.attributes attributes = [ :name, :value, :zone, :typ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/models/dns/zone_tests.rb
tests/dreamhost/models/dns/zone_tests.rb
Shindo.tests("Fog::DNS[:dreamhost] | zone", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] zone = service.zones.first tests('#attributes') do tests('should have') do model_attribute_hash = zone.attributes attributes = [ :domain, :id, ] attributes.each do |att...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/dreamhost/models/dns/zones_tests.rb
tests/dreamhost/models/dns/zones_tests.rb
Shindo.tests("Fog::DNS[:dreamhost] | Zones Collection", ['dreamhost', 'dns']) do service = Fog::DNS[:dreamhost] tests('#all') do zones = service.zones test('should be an array') { zones.is_a? Array } test('should not be empty') { !zones.empty? } tests('should list Fog::DNS::Dreamhost::Zone') do...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/collection_helper.rb
tests/helpers/collection_helper.rb
def collection_tests(collection, params = {}, mocks_implemented = true) tests('success') do tests("#new(#{params.inspect})").succeeds do pending if Fog.mocking? && !mocks_implemented collection.new(params) end tests("#create(#{params.inspect})").succeeds do pending if Fog.mocking? && !...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/succeeds_helper.rb
tests/helpers/succeeds_helper.rb
module Shindo class Tests def succeeds test('succeeds') do !!instance_eval(&Proc.new) end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/model_helper.rb
tests/helpers/model_helper.rb
def model_tests(collection, params = {}, mocks_implemented = true) tests('success') do @instance = collection.new(params) tests("#save").succeeds do pending if Fog.mocking? && !mocks_implemented @instance.save end if block_given? yield(@instance) end tests("#destroy").suc...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/responds_to_helper.rb
tests/helpers/responds_to_helper.rb
module Shindo class Tests def responds_to(method_names) for method_name in [*method_names] tests("#respond_to?(:#{method_name})").returns(true) do @instance.respond_to?(method_name) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/schema_validator_tests.rb
tests/helpers/schema_validator_tests.rb
Shindo.tests('Fog::Schema::DataValidator', 'meta') do validator = Fog::Schema::DataValidator.new tests('#validate') do tests('returns true') do returns(true, 'when value matches schema expectation') do validator.validate({"key" => "Value"}, {"key" => String}) end returns(true, 'wh...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/formats_helper_tests.rb
tests/helpers/formats_helper_tests.rb
Shindo.tests('test_helper', 'meta') do tests('comparing welcome data against schema') do data = {:welcome => "Hello" } data_matches_schema(:welcome => String) { data } end tests('#data_matches_schema') do tests('when value matches schema expectation') do data_matches_schema({"key" => String}) ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/formats_helper.rb
tests/helpers/formats_helper.rb
require "fog/schema/data_validator" # format related hackery # allows both true.is_a?(Fog::Boolean) and false.is_a?(Fog::Boolean) # allows both nil.is_a?(Fog::Nullable::String) and ''.is_a?(Fog::Nullable::String) module Fog module Boolean; end module Nullable module Boolean; end module Integer; end mod...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/mock_helper.rb
tests/helpers/mock_helper.rb
# Use so you can run in mock mode from the command line # # FOG_MOCK=true fog if ENV["FOG_MOCK"] == "true" Fog.mock! end # if in mocked mode, fill in some fake credentials for us if Fog.mock? Fog.credentials = { :aws_access_key_id => 'aws_access_key_id', :aws_secret_access_key =>...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/compute/servers_helper.rb
tests/helpers/compute/servers_helper.rb
def servers_tests(connection, params = {}, mocks_implemented = true) collection_tests(connection.servers, params, mocks_implemented) do if !Fog.mocking? || mocks_implemented @instance.wait_for { ready? } yield if block_given? end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/compute/server_helper.rb
tests/helpers/compute/server_helper.rb
def server_tests(connection, params = {}, mocks_implemented = true) model_tests(connection.servers, params, mocks_implemented) do tests('#reload').returns(true) do pending if Fog.mocking? && !mocks_implemented @instance.wait_for { ready? } identity = @instance.identity !identity.nil? && i...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/helpers/compute/flavors_helper.rb
tests/helpers/compute/flavors_helper.rb
def flavors_tests(connection, params = {}, mocks_implemented = true) tests('success') do tests("#all").succeeds do pending if Fog.mocking? && !mocks_implemented connection.flavors.all end if !Fog.mocking? || mocks_implemented @identity = connection.flavors.first.identity end t...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/compute/helper.rb
tests/compute/helper.rb
def compute_providers { :aws => { :server_attributes => {}, :mocked => true }, :cloudstack => { :provider_attributes => { :cloudstack_host => 'http://host.foo' }, :server_attributes => {}.tap do |hash| [:zone_id, :network_ids, :template_id, :service_off...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/compute/models/flavors_tests.rb
tests/compute/models/flavors_tests.rb
for provider, config in compute_providers next if [:glesys, :ibm].include?(provider) Shindo.tests("Fog::Compute[:#{provider}] | flavors", [provider.to_s]) do provider_attributes = config[:provider_attributes] || {} provider_attributes.merge!(:provider => provider) flavors_tests(Fog::Compute.new(provi...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/compute/models/servers_tests.rb
tests/compute/models/servers_tests.rb
for provider, config in compute_providers Shindo.tests("Fog::Compute[:#{provider}] | servers", [provider.to_s]) do provider_attributes = config[:provider_attributes] || {} provider_attributes.merge!(:provider => provider) servers_tests(Fog::Compute.new(provider_attributes), (config[:server_attributes] ||...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/compute/models/server_tests.rb
tests/compute/models/server_tests.rb
for provider, config in compute_providers Shindo.tests("Fog::Compute[:#{provider}] | server", [provider.to_s]) do provider_attributes = config[:provider_attributes] || {} provider_attributes.merge!(:provider => provider) server_tests(Fog::Compute.new(provider_attributes), (config[:server_attributes] || {...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/requests/compute/disk_configure_tests.rb
tests/vcloud/requests/compute/disk_configure_tests.rb
Shindo.tests("Vcloud::Compute | disk_requests", ['vcloud']) do @xmlns = { "xmlns" => "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData", "xmlns:vcloud" => "http://www.vmware.com/vcloud/v1" } def disk_hash [{:"rasd:AddressOnParent"=>"0", :"rasd:Description"=>...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/servers_tests.rb
tests/vcloud/models/compute/servers_tests.rb
require 'fog/vcloud/models/compute/servers' Shindo.tests("Vcloud::Compute | servers", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute::Servers.new( :connection => Fog::Vcloud:...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/organizations_tests.rb
tests/vcloud/models/compute/organizations_tests.rb
require 'fog/vcloud/models/compute/organizations' Shindo.tests("Vcloud::Compute | organizations", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute.new(:vcloud_host => 'vcloud.example.c...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/organization_tests.rb
tests/vcloud/models/compute/organization_tests.rb
Shindo.tests("Vcloud::Compute | organization", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute.new( :vcloud_host => 'vcloud.example.com', :vcloud_username => 'username'...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/vdcs_tests.rb
tests/vcloud/models/compute/vdcs_tests.rb
require 'fog/vcloud/models/compute/vdcs' Shindo.tests("Vcloud::Compute | vdcs", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute::Vdcs.new( :connection => Fog::Vcloud::Comput...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/vdc_tests.rb
tests/vcloud/models/compute/vdc_tests.rb
require 'fog/vcloud/models/compute/vdcs' require 'fog/vcloud/models/compute/vdc' Shindo.tests("Vcloud::Compute | vdc", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute.new( :vc...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/network_tests.rb
tests/vcloud/models/compute/network_tests.rb
require 'fog/vcloud/models/compute/networks' Shindo.tests("Vcloud::Compute | network", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? connection = Fog::Vcloud::Compute.new( :vcloud_host => 'vcloud.example....
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/helper.rb
tests/vcloud/models/compute/helper.rb
class Vcloud module Compute module TestSupport if Fog.mocking? def self.template 'mock_template' end else def self.template template_name = ENV['VCLOUD_TEMPLATE'] raise "Specify VApp template name in VCLOUD_TEMPLATE env var" unless template_name ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/networks_tests.rb
tests/vcloud/models/compute/networks_tests.rb
require 'fog/vcloud/models/compute/networks' Shindo.tests("Vcloud::Compute | networks", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? tests("from an org perspective") do instance = Fog::Vcloud::Compute::N...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/server_tests.rb
tests/vcloud/models/compute/server_tests.rb
require 'fog/vcloud/models/compute/servers' Shindo.tests("Vcloud::Compute | server", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute.new( :vcloud_host => 'vcloud.example.com',...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/vapps_tests.rb
tests/vcloud/models/compute/vapps_tests.rb
require 'fog/vcloud/models/compute/vapps' Shindo.tests("Vcloud::Compute | vapps", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute::Vapps.new( :connection => Fog::Vcloud::Compu...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/vcloud/models/compute/vapp_tests.rb
tests/vcloud/models/compute/vapp_tests.rb
require 'fog/vcloud/models/compute/vapps' require 'fog/vcloud/models/compute/vapp' Shindo.tests("Vcloud::Compute | vapp", ['vcloud']) do Fog::Vcloud::Compute::SUPPORTED_VERSIONS.each do |version| tests("api version #{version}") do pending if Fog.mocking? instance = Fog::Vcloud::Compute.new( ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/openvz/helper.rb
tests/openvz/helper.rb
# Shortcut for Fog::Compute[:openvz] def openvz_service Fog::Compute[:openvz] end # Create a long lived server for the tests def openvz_fog_test_server server = openvz_service.servers.find { |s| s.ctid == '104' } unless server server = openvz_service.servers.create :ctid => '104' server.start s...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/openvz/models/compute/servers_tests.rb
tests/openvz/models/compute/servers_tests.rb
Shindo.tests('Fog::Compute[:openvz] | servers collection', ['openvz']) do openvz_service = Fog::Compute[:openvz] tests('The servers collection') do servers = openvz_service.servers.all server = openvz_fog_test_server test('should NOT be empty') do servers.reload !servers.empty? end ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/openvz/models/compute/server_tests.rb
tests/openvz/models/compute/server_tests.rb
Shindo.tests("Fog::Compute[:openvz] | server model", ['openvz', 'compute']) do server = openvz_fog_test_server tests('The server model should') do tests('have the action') do test('reload') { server.respond_to? 'reload' } %w{ destroy mount umount restart s...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/compute_tests.rb
tests/fogdocker/compute_tests.rb
Shindo.tests('Fog::Compute[:fogdocker]', ['fogdocker']) do compute = Fog::Compute[:fogdocker] tests("Compute collections") do %w{ servers images }.each do |collection| test("it should respond to #{collection}") { compute.respond_to? collection } end end tests("Compute requests") do %w{ api_...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/requests/compute/image_create_tests.rb
tests/fogdocker/requests/compute/image_create_tests.rb
Shindo.tests("Fog::Compute[:fogdocker] | image_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] tests("Create image") do response = compute.image_create({'fromImage' => 'mattdm/fedora', 'repo'=>'test', 'tag'=>'create_image'}) test("should be a kind of Hash") { response.kind_of? Hash} ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/requests/compute/container_commit_tests.rb
tests/fogdocker/requests/compute/container_commit_tests.rb
Shindo.tests("Fog::Compute[:fogdocker] | container_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] name_base = Time.now.to_i hash = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] ) response = {} tests("Commit Container") do r...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/requests/compute/image_search_tests.rb
tests/fogdocker/requests/compute/image_search_tests.rb
Shindo.tests("Fog::Compute[:fogdocker] | image_search request", 'fogdocker') do compute = Fog::Compute[:fogdocker] tests("Search images") do response = compute.image_search('term' => 'test') test("should be a kind of Array") { response.kind_of? Array} test("Array elements should be a kind of Hash") {...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/requests/compute/container_create_tests.rb
tests/fogdocker/requests/compute/container_create_tests.rb
Shindo.tests("Fog::Compute[:fogdocker] | container_create request", 'fogdocker') do compute = Fog::Compute[:fogdocker] name_base = Time.now.to_i tests("Create Container") do response = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] ) test("shoul...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/tests/fogdocker/requests/compute/container_delete_tests.rb
tests/fogdocker/requests/compute/container_delete_tests.rb
Shindo.tests('Fog::Compute[:fogdocker] | container_delete request', ['fogdocker']) do compute = Fog::Compute[:fogdocker] container = compute.servers.create({'Image' => 'mattdm/fedora:f19', 'Cmd' => ['/bin/bash']}) tests('The response should') do response = compute.cont...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false