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
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/create_snapshot.rb
lib/fog/cloudsigma/requests/create_snapshot.rb
module Fog module Compute class CloudSigma class Real def create_snapshot(data) create_request("snapshots/", data) end end class Mock def create_snapshot(data) uuid = self.class.random_uuid defaults = {'uuid' => uuid, ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/update_server.rb
lib/fog/cloudsigma/requests/update_server.rb
require 'set' module Fog module Compute class CloudSigma class Real def update_server(server_id, data) update_request("servers/#{server_id}/", data) end end class Mock def update_server(server_id, data) mock_update(data, :servers, 200, server_id) do ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/clone_server.rb
lib/fog/cloudsigma/requests/clone_server.rb
module Fog module Compute class CloudSigma class Real def clone_server(server_id, clone_params={}) request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => :clone}, :body => clone_params, :...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/delete_volume.rb
lib/fog/cloudsigma/requests/delete_volume.rb
module Fog module Compute class CloudSigma class Real def delete_volume(vol_id) delete_request("drives/#{vol_id}/") end end class Mock def delete_volume(vol_id) mock_delete(:volumes, 204, vol_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/close_vnc.rb
lib/fog/cloudsigma/requests/close_vnc.rb
module Fog module Compute class CloudSigma class Real def close_vnc(server_id) request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => :close_vnc}, :expects => [200, 202]) end end class...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_vlan.rb
lib/fog/cloudsigma/requests/get_vlan.rb
module Fog module Compute class CloudSigma class Real def get_vlan(vlan) get_request("vlans/#{vlan}/") end end class Mock def get_vlan(vlan) mock_get(:vlans, 200, vlan) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/update_vlan.rb
lib/fog/cloudsigma/requests/update_vlan.rb
require 'set' module Fog module Compute class CloudSigma class Real def update_vlan(vlan_id, data) update_request("vlans/#{vlan_id}/", data) end end class Mock def update_vlan(vlan_id, data) mock_update(data, :vlans, 200, vlan_id) end e...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/calculate_subscription_price.rb
lib/fog/cloudsigma/requests/calculate_subscription_price.rb
module Fog module Compute class CloudSigma class Real def calculate_subscription_price(data) create_request("subscriptioncalculator/", data) end end class Mock def calculate_subscription_price(data) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/start_server.rb
lib/fog/cloudsigma/requests/start_server.rb
module Fog module Compute class CloudSigma class Real def start_server(server_id, start_params={}) request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => :start}.merge!(start_params), :expects => [200, 202...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/delete_snapshot.rb
lib/fog/cloudsigma/requests/delete_snapshot.rb
module Fog module Compute class CloudSigma class Real def delete_snapshot(snap_id) delete_request("snapshots/#{snap_id}/") end end class Mock def delete_snapshot(snap_id) mock_delete(:snapshots, 204, snap_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/stop_server.rb
lib/fog/cloudsigma/requests/stop_server.rb
module Fog module Compute class CloudSigma class Real def stop_server(server_id, graceful_acpi = false) action = graceful_acpi ? :shutdown : :stop request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => action}, ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/open_vnc.rb
lib/fog/cloudsigma/requests/open_vnc.rb
module Fog module Compute class CloudSigma class Real def open_vnc(server_id) request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => :open_vnc}, :expects => [200, 202]) end end class M...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/list_ips.rb
lib/fog/cloudsigma/requests/list_ips.rb
module Fog module Compute class CloudSigma class Real def list_ips list_request('ips/detail/') end end class Mock def list_ips mock_list(:ips, 200) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_server.rb
lib/fog/cloudsigma/requests/get_server.rb
module Fog module Compute class CloudSigma class Real def get_server(server_id) get_request("servers/#{server_id}/") end end class Mock def get_server(server_id) mock_get(:servers, 200, server_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/list_fwpolicies.rb
lib/fog/cloudsigma/requests/list_fwpolicies.rb
module Fog module Compute class CloudSigma class Real def list_fwpolicies list_request('fwpolicies/detail/') end end class Mock def list_fwpolicies Fog::Mock.not_implemented end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/update_volume.rb
lib/fog/cloudsigma/requests/update_volume.rb
module Fog module Compute class CloudSigma class Real def update_volume(vol_id, data) update_request("drives/#{vol_id}/", data) end end class Mock def update_volume(vol_id, data) mock_update(data, :volumes, 200, vol_id) end end end ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_current_usage.rb
lib/fog/cloudsigma/requests/get_current_usage.rb
module Fog module Compute class CloudSigma class Real def get_current_usage get_request("currentusage/") end end class Mock def get_current_usage end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_pricing.rb
lib/fog/cloudsigma/requests/get_pricing.rb
module Fog module Compute class CloudSigma class Real def get_pricing(currency=nil, subscription=false) query = {:limit => 0} if currency query[:currency] = currency end if subscription query[:level] = 0 end request(...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/list_subscriptions.rb
lib/fog/cloudsigma/requests/list_subscriptions.rb
module Fog module Compute class CloudSigma class Real def list_subscriptions list_request('subscriptions/') end end class Mock def list_subscriptions mock_list(:subscriptions, 200) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/create_volume.rb
lib/fog/cloudsigma/requests/create_volume.rb
module Fog module Compute class CloudSigma class Real def create_volume(data) create_request("drives/", data) end end class Mock def create_volume(data) uuid = self.class.random_uuid defaults = {'uuid' => uuid, 'status...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_profile.rb
lib/fog/cloudsigma/requests/get_profile.rb
module Fog module Compute class CloudSigma class Real def get_profile get_request("profile/") end end class Mock def get_profile mock_get(:profile, 200) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/create_subscription.rb
lib/fog/cloudsigma/requests/create_subscription.rb
module Fog module Compute class CloudSigma class Real def create_subscription(data) create_request("subscriptions/", data) end end class Mock def create_subscription(data) if data[:period] != '1 month' || data[:start_time] || data[:end_time] ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_subscription.rb
lib/fog/cloudsigma/requests/get_subscription.rb
module Fog module Compute class CloudSigma class Real def get_subscription(sub_id) get_request("subscriptions/#{sub_id}/") end end class Mock def get_subscription(sub_id) mock_get(:subscriptions, 200, sub_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_balance.rb
lib/fog/cloudsigma/requests/get_balance.rb
module Fog module Compute class CloudSigma class Real def get_balance get_request("balance/") end end class Mock def get_balance mock_get(:balance, 200) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/create_server.rb
lib/fog/cloudsigma/requests/create_server.rb
module Fog module Compute class CloudSigma class Real def create_server(data) create_request("servers/", data) end end class Mock def create_server(data) uuid = self.class.random_uuid defaults = {'uuid' => uuid, 'statu...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/list_snapshots.rb
lib/fog/cloudsigma/requests/list_snapshots.rb
module Fog module Compute class CloudSigma class Real def list_snapshots list_request('snapshots/detail/') end end class Mock def list_snapshots mock_list(:snapshots, 200) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_snapshot.rb
lib/fog/cloudsigma/requests/get_snapshot.rb
module Fog module Compute class CloudSigma class Real def get_snapshot(snap_id) get_request("snapshots/#{snap_id}/") end end class Mock def get_snapshot(snap_id) mock_get(:snapshots, 200, snap_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/requests/get_volume.rb
lib/fog/cloudsigma/requests/get_volume.rb
module Fog module Compute class CloudSigma class Real def get_volume(vol_id) get_request("drives/#{vol_id}/") end end class Mock def get_volume(vol_id) mock_get(:volumes, 200, vol_id) end end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/lib_volume.rb
lib/fog/cloudsigma/models/lib_volume.rb
require 'fog/core/model' module Fog module Compute class CloudSigma class LibVolume < Fog::Model identity :uuid attribute :mounted_on attribute :licenses attribute :meta attribute :owner attribute :affinities attribute :image_format, :type => :string...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/subscription.rb
lib/fog/cloudsigma/models/subscription.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class Subscription < Fog::CloudSigma::CloudsigmaModel identity :id attribute :status, :type => :string attribute :uuid, :type => :string attribute :resource, :type => :string attribute ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/nic.rb
lib/fog/cloudsigma/models/nic.rb
require 'fog/core/model' require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/ipconf' module Fog module Compute class CloudSigma class Nic < Fog::CloudSigma::CloudsigmaModel attribute :boot_order attribute :mac, :type => :string attribute :model, :type => :string ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/ips.rb
lib/fog/cloudsigma/models/ips.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/ip' module Fog module Compute class CloudSigma class Ips < Fog::Collection model Fog::Compute::CloudSigma::IP def all resp = service.list_ips data = resp.body['objects'] load(data) end ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/servers.rb
lib/fog/cloudsigma/models/servers.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/server' module Fog module Compute class CloudSigma class Servers < Fog::Collection model Fog::Compute::CloudSigma::Server def all resp = service.list_servers data = resp.body['objects'] load(data) ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/snapshots.rb
lib/fog/cloudsigma/models/snapshots.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/snapshot' module Fog module Compute class CloudSigma class Snapshots < Fog::Collection model Fog::Compute::CloudSigma::Snapshot def all resp = service.list_snapshots data = resp.body['objects'] load(...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/lib_volumes.rb
lib/fog/cloudsigma/models/lib_volumes.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/lib_volume' module Fog module Compute class CloudSigma class LibVolumes < Fog::Collection model Fog::Compute::CloudSigma::LibVolume def all resp = service.list_lib_volumes data = resp.body['objects'] ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/vlan.rb
lib/fog/cloudsigma/models/vlan.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class VLAN < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :tags attribute :servers attribute :meta attribute :owner attribute :resource_uri, :type => :string ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/balance.rb
lib/fog/cloudsigma/models/balance.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class Balance < Fog::CloudSigma::CloudsigmaModel attribute :balance, :type => :float attribute :currency, :type => :string end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/ip.rb
lib/fog/cloudsigma/models/ip.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class IP < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :tags, :type => :array attribute :nameservers, :type => :array attribute :server, :type => :string attribute :netmask...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/price_record.rb
lib/fog/cloudsigma/models/price_record.rb
require 'fog/cloudsigma/nested_model' require 'bigdecimal' module Fog module Compute class CloudSigma class PriceRecord < Fog::CloudSigma::CloudsigmaModel attribute :resource, :type => :string attribute :multiplier, :type => :integer attribute :price, :type => :string attrib...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/vlans.rb
lib/fog/cloudsigma/models/vlans.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/vlan' module Fog module Compute class CloudSigma class Vlans < Fog::Collection model Fog::Compute::CloudSigma::VLAN def all resp = service.list_vlans data = resp.body['objects'] load(data) en...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/mountpoint.rb
lib/fog/cloudsigma/models/mountpoint.rb
require 'fog/core/model' module Fog module Compute class CloudSigma class MountPoint < Fog::Model attribute :device, :type => 'string' attribute :dev_channel, :type => 'string' attribute :drive attribute :boot_order, :type => 'integer' def drive drive = at...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/fwpolicy.rb
lib/fog/cloudsigma/models/fwpolicy.rb
require 'fog/cloudsigma/nested_model' require 'fog/core/collection' require 'fog/cloudsigma/models/rule' module Fog module Compute class CloudSigma class FWPolicy < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :name, :type => :string attribute :meta attribute :o...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/pricing.rb
lib/fog/cloudsigma/models/pricing.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/price_record' module Fog module Compute class CloudSigma class Pricing < Fog::CloudSigma::CloudsigmaModel model_attribute :cpu, PriceRecord model_attribute :hdd, PriceRecord model_attribute :ip, PriceRecord ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/ipconf.rb
lib/fog/cloudsigma/models/ipconf.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class IPConf < Fog::CloudSigma::CloudsigmaModel attribute :ip attribute :conf, :type => :string end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/fwpolicies.rb
lib/fog/cloudsigma/models/fwpolicies.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/fwpolicy' module Fog module Compute class CloudSigma class Fwpolicies < Fog::Collection model Fog::Compute::CloudSigma::FWPolicy def all resp = service.list_fwpolicies data = resp.body['objects'] loa...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/volume.rb
lib/fog/cloudsigma/models/volume.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/snapshot' module Fog module Compute class CloudSigma class Volume < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :status, :type => :string attribute :jobs attribute :name, :type => :string ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/price_calculation.rb
lib/fog/cloudsigma/models/price_calculation.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/subscriptions' module Fog module Compute class CloudSigma class PriceCalculation < Fog::CloudSigma::CloudsigmaModel attribute :price, :type => :float model_attribute_array :subscriptions, Subscription, :aliases => 'objects...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/snapshot.rb
lib/fog/cloudsigma/models/snapshot.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/volume' module Fog module Compute class CloudSigma class Snapshot < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :allocated_size, :type => :integer attribute :drive attribute :grantees, :type ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/rule.rb
lib/fog/cloudsigma/models/rule.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class Rule < Fog::CloudSigma::CloudsigmaModel attribute :action, :type => :string attribute :comment, :type => :string attribute :direction, :type => :string attribute :dst_ip, :type => :string ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/server.rb
lib/fog/cloudsigma/models/server.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/mountpoint' require 'fog/cloudsigma/models/nic' module Fog module Compute class CloudSigma class Server < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :status, :type => :string attribute :vnc_password...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/profile.rb
lib/fog/cloudsigma/models/profile.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class Profile < Fog::CloudSigma::CloudsigmaModel identity :uuid attribute :last_name, :type => :string attribute :login_sms, :type => :boolean attribute :currency, :type => :string attr...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/subscriptions.rb
lib/fog/cloudsigma/models/subscriptions.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/subscription' module Fog module Compute class CloudSigma class Subscriptions < Fog::Collection model Fog::Compute::CloudSigma::Subscription def all resp = service.list_subscriptions data = resp.body['objects']...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/usage_record.rb
lib/fog/cloudsigma/models/usage_record.rb
require 'fog/cloudsigma/nested_model' module Fog module Compute class CloudSigma class UsageRecord < Fog::CloudSigma::CloudsigmaModel attribute :burst, :type => :integer attribute :subscribed, :type => :integer attribute :using, :type => :integer end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/current_usage.rb
lib/fog/cloudsigma/models/current_usage.rb
require 'fog/cloudsigma/nested_model' require 'fog/cloudsigma/models/usage_record' module Fog module Compute class CloudSigma class CurrentUsage < Fog::CloudSigma::CloudsigmaModel model_attribute :cpu, UsageRecord model_attribute :hdd, UsageRecord model_attribute :ip, UsageRecord ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/obj_ref.rb
lib/fog/cloudsigma/models/obj_ref.rb
require 'fog/core/model' module Fog module Compute class CloudSigma class ObjRef < Fog::Model attribute :uuid, :type => :string attribute :resource_uri, :type => :string end end end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/cloudsigma/models/volumes.rb
lib/fog/cloudsigma/models/volumes.rb
require 'fog/core/collection' require 'fog/cloudsigma/models/volume' module Fog module Compute class CloudSigma class Volumes < Fog::Collection model Fog::Compute::CloudSigma::Volume def all resp = service.list_volumes data = resp.body['objects'] load(data) ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/core.rb
lib/fog/go_grid/core.rb
require 'fog/core' require 'fog/json' module Fog module GoGrid extend Fog::Provider service(:compute, 'Compute') end end
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/compute.rb
lib/fog/go_grid/compute.rb
require 'fog/go_grid/core' module Fog module Compute class GoGrid < Fog::Service requires :go_grid_api_key, :go_grid_shared_secret recognizes :host, :path, :port, :scheme, :persistent model_path 'fog/go_grid/models/compute' model :image collection :images model ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_server_list.rb
lib/fog/go_grid/requests/compute/grid_server_list.rb
module Fog module Compute class GoGrid class Real # List servers # # ==== Parameters # * options<~Hash>: # * 'datacenter'<~String> - datacenter to limit results to # * 'isSandbox'<~String> - If true only returns Image Sandbox servers, in ['false', 'true']...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_image_get.rb
lib/fog/go_grid/requests/compute/grid_image_get.rb
module Fog module Compute class GoGrid class Real # List images # # ==== Parameters # * options<~Hash>: # * 'id'<~String> - ID of the image # * 'name'<~String> - Name of the image # * 'image'<~String> - ID(s) or Name(s) of the ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_server_delete.rb
lib/fog/go_grid/requests/compute/grid_server_delete.rb
module Fog module Compute class GoGrid class Real # Delete a server # # ==== Parameters # * 'server'<~String> - id or name of server to delete # # ==== Returns # * response<~Excon::Response>: # * body<~Array>: # TODO: docs def...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_server_get.rb
lib/fog/go_grid/requests/compute/grid_server_get.rb
module Fog module Compute class GoGrid class Real # Get one or more servers by name # # ==== Parameters # * 'server'<~String> - id or name of server(s) to lookup # # ==== Returns # * response<~Excon::Response>: # * body<~Array>: # TOD...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/support_password_get.rb
lib/fog/go_grid/requests/compute/support_password_get.rb
module Fog module Compute class GoGrid class Real # Get one or more passwords by id # # ==== Parameters # * options<~Hash>: # * 'id'<~String> - id of the password to retrieve # # ==== Returns # * response<~Excon::Response>: # * body...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_server_power.rb
lib/fog/go_grid/requests/compute/grid_server_power.rb
module Fog module Compute class GoGrid class Real # Start, Stop or Restart a server # # ==== Parameters # * 'server'<~String> - id or name of server to power # * 'power'<~String> - power operation, in ['restart', 'start', 'stop'] # # ==== Returns ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/common_lookup_list.rb
lib/fog/go_grid/requests/compute/common_lookup_list.rb
module Fog module Compute class GoGrid class Real # List options and lookups # # ==== Parameters # * 'lookup'<~String> - the lookup to be listed # * options<~Hash>: # * 'sort'<~String> - column to sort result by in ['description', 'id', 'name'] # *...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/support_password_list.rb
lib/fog/go_grid/requests/compute/support_password_list.rb
module Fog module Compute class GoGrid class Real # List passwords # # ==== Parameters # * options<~Hash>: # * 'datacenter'<~String> - datacenter to limit results to # * 'isSandbox'<~String> - If true only returns Image Sandbox servers, in ['false', 'true...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_server_add.rb
lib/fog/go_grid/requests/compute/grid_server_add.rb
module Fog module Compute class GoGrid class Real # Create a new server # # ==== Parameters # * 'name'<~String> - name of the server, 20 or fewer characters # * 'image'<~String> - image to use, in grid_image_list # * 'ip'<~String> - initial public ip for th...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_image_list.rb
lib/fog/go_grid/requests/compute/grid_image_list.rb
module Fog module Compute class GoGrid class Real # List images # # ==== Parameters # * options<~Hash>: # * 'datacenter'<~String> - datacenter to limit results to # * 'isPublic'<~String> - If true only returns public images, in ['false', 'true'] ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb
lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb
module Fog module Compute class GoGrid class Real # List load balancers # # ==== Parameters # * options<~Hash>: # * 'datacenter'<~String> - datacenter to limit results to # * 'num_items'<~Integer> - Number of items to return # * 'page'<~Integer> ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/requests/compute/grid_ip_list.rb
lib/fog/go_grid/requests/compute/grid_ip_list.rb
module Fog module Compute class GoGrid class Real # List ips # # ==== Parameters # * options<~Hash>: # * 'datacenter'<~String> - datacenter to limit results to # * 'ip.state'<~String> - state to limit results to in ip.state # * 'ip.type'<~St...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/password.rb
lib/fog/go_grid/models/compute/password.rb
require 'fog/core/model' module Fog module Compute class GoGrid class Password < Fog::Model identity :id attribute :server_id attribute :applicationtype attribute :username attribute :password_id, :aliases => 'id' attribute :password attribute :serve...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/passwords.rb
lib/fog/go_grid/models/compute/passwords.rb
require 'fog/core/collection' require 'fog/go_grid/models/compute/password' module Fog module Compute class GoGrid class Passwords < Fog::Collection model Fog::Compute::GoGrid::Password def all data = service.support_password_list.body['list'] load(data) end ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/servers.rb
lib/fog/go_grid/models/compute/servers.rb
require 'fog/core/collection' require 'fog/go_grid/models/compute/server' module Fog module Compute class GoGrid class Servers < Fog::Collection model Fog::Compute::GoGrid::Server def all data = service.grid_server_list.body['list'] load(data) end def b...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/server.rb
lib/fog/go_grid/models/compute/server.rb
require 'fog/compute/models/server' module Fog module Compute class GoGrid class BlockInstantiationError < StandardError; end class Server < Fog::Compute::Server extend Fog::Deprecation deprecate(:ip, :public_ip_address) identity :id attribute :name attribut...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/images.rb
lib/fog/go_grid/models/compute/images.rb
require 'fog/core/collection' require 'fog/go_grid/models/compute/image' module Fog module Compute class GoGrid class Images < Fog::Collection model Fog::Compute::GoGrid::Image attribute :server def all data = service.grid_image_list.body['list'] load(data) ...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/lib/fog/go_grid/models/compute/image.rb
lib/fog/go_grid/models/compute/image.rb
require 'fog/core/model' module Fog module Compute class GoGrid class Image < Fog::Model identity :id attribute :name attribute :description attribute :friendly_name, :aliases => 'friendlyName' attribute :created_at, :aliases => 'createdTime' attribute :u...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/benchs/params.rb
benchs/params.rb
require 'benchmark' def hash(options) result = "#{options.delete(:name)}" for key, value in options result << " #{key} => #{value} " end result end def optional(name, a = nil, b = nil, c = nil) result = "#{name}" options = { :a => a, :b => b, :c => c } for key, value in options result << " #{key...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/benchs/parse_vs_push.rb
benchs/parse_vs_push.rb
require 'benchmark' require 'rubygems' require 'nokogiri' class Parser < Nokogiri::XML::SAX::Document attr_reader :response def initialize reset end def reset @item = {} @response = { :items => [] } end def characters(string) @value ||= '' @value << string.strip end def start_el...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/benchs/load_times.rb
benchs/load_times.rb
require 'benchmark' $LOAD_PATH << File.dirname(__FILE__) + '/../lib' def time_in_fork(&block) read, write = IO.pipe Process.fork do write.puts Benchmark.realtime{ block.call } end Process.wait write.close read.read.tap do read.close end end class Array def avg map(&:to_f).inject(:+) / size...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
fog/fog
https://github.com/fog/fog/blob/f3e5ceacc44cd1b63daf9db9a4a5985f0802de50/benchs/fog_vs.rb
benchs/fog_vs.rb
require 'rubygems' require 'aws/s3' require 'benchmark' require 'right_aws' require File.join(File.dirname(__FILE__), '..', 'lib', 'fog') data = File.open(File.expand_path('~/.fog')).read config = YAML.load(data)[:default] fog = Fog::AWS::S3.new( :aws_access_key_id => config[:aws_access_key_id], :aws_secret_a...
ruby
MIT
f3e5ceacc44cd1b63daf9db9a4a5985f0802de50
2026-01-04T15:46:43.827334Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/week_start_test.rb
test/week_start_test.rb
require_relative "test_helper" class WeekStartTest < Minitest::Test # week starting on monday def test_week_end_of_week_mon assert_result_date :week, "2013-03-18", "2013-03-24 23:59:59", false, week_start: :mon end def test_week_start_of_week_mon assert_result_date :week, "2013-03-25", "2013-03-25 00...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/zeros_test.rb
test/zeros_test.rb
require_relative "test_helper" class ZerosTest < Minitest::Test def test_second assert_zeros :second, "2013-05-01 00:00:01 UTC", ["2013-05-01 00:00:00 UTC", "2013-05-01 00:00:01 UTC", "2013-05-01 00:00:02 UTC"], "2013-05-01 00:00:00.999 UTC", "2013-05-01 00:00:02 UTC" end def test_minute assert_zeros :m...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/format_test.rb
test/format_test.rb
require_relative "test_helper" class FormatTest < Minitest::Test def test_day create_user "2014-03-01" assert_format :day, "March 1, 2014", "%B %-e, %Y" end def test_month create_user "2014-03-01" assert_format :month, "March 2014", "%B %Y" end def test_quarter create_user "2014-03-05" ...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/column_test.rb
test/column_test.rb
require_relative "test_helper" class ColumnTest < Minitest::Test def test_string assert_empty User.group("created_at").count assert_empty User.group_by_day("created_at").count end def test_table_name assert_empty User.group("users.created_at").count assert_empty User.group_by_day("users.created_...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/database_test.rb
test/database_test.rb
require_relative "test_helper" class DatabaseTest < Minitest::Test def test_zeros_previous_scope create_user "2013-05-01" expected = { Date.parse("2013-05-01") => 0 } assert_equal expected, User.where("id = 0").group_by_day(:created_at, range: Date.parse("2013-05-01")..Date.parse("2013-05-01 23...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/basic_test.rb
test/basic_test.rb
require_relative "test_helper" class BasicTest < Minitest::Test # second def test_second_end_of_second assert_result_time :second, "2013-05-03 00:00:00 UTC", "2013-05-03 00:00:00.999" end def test_second_start_of_second assert_result_time :second, "2013-05-03 00:00:01 UTC", "2013-05-03 00:00:01.000" ...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/multiple_group_test.rb
test/multiple_group_test.rb
require_relative "test_helper" class MultipleGroupTest < Minitest::Test def test_group_before create_user "2013-05-01", 1 create_user "2013-05-02", 2 create_user "2013-05-03", 2 expected = { [1, Date.parse("2013-05-01")] => 1, [1, Date.parse("2013-05-02")] => 0, [1, Date.parse("2013...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/test_helper.rb
test/test_helper.rb
require "bundler/setup" Bundler.require(:default) require "minitest/autorun" require "active_record" ENV["TZ"] = "America/New_York" adapter = ENV["ADAPTER"] abort "No adapter specified" unless adapter if adapter != "enumerable" # must come before ActiveRecord::Base.establish_connection ActiveRecord.async_query_e...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/range_test.rb
test/range_test.rb
require_relative "test_helper" class RangeTest < Minitest::Test def test_date with_tz("Europe/Oslo") do expected = { Date.parse("2013-05-01") => 0, Date.parse("2013-05-02") => 0, Date.parse("2013-05-03") => 0 } assert_equal expected, call_method(:day, :created_at, series...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/day_start_test.rb
test/day_start_test.rb
require_relative "test_helper" class DayStartTest < Minitest::Test # day hour starts at 2 am def test_day_end_of_day assert_result_date :day, "2013-05-03", "2013-05-04 01:59:59", false, day_start: 2 end def test_day_start_of_day assert_result_date :day, "2013-05-03", "2013-05-03 02:00:00", false, day...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/enumerable_test.rb
test/enumerable_test.rb
require_relative "test_helper" class EnumerableTest < Minitest::Test def test_enumerable user_a = create_user("2014-01-21") user_b = create_user("2014-03-14") expected = { Date.parse("2014-01-01") => [user_a], Date.parse("2014-03-01") => [user_b] } assert_equal expected, [user_a, user...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/associations_test.rb
test/associations_test.rb
require_relative "test_helper" class AssociationsTest < Minitest::Test def setup super Post.delete_all end def test_works user = create_user("2014-03-01") user.posts.create!(created_at: "2014-04-01 00:00:00 UTC") expected = { Date.parse("2014-04-01") => 1 } assert_equal expecte...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/async_test.rb
test/async_test.rb
require_relative "test_helper" class AsyncTest < Minitest::Test def setup skip if enumerable? super end def test_count create_user "2013-05-01" create_user "2013-05-03" create_user "2013-05-03", 9 promise = User.group_by_day(:created_at).async_count expected = { Date.parse("201...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/permit_test.rb
test/permit_test.rb
require_relative "test_helper" class PermitTest < Minitest::Test def test_permit error = assert_raises(ArgumentError) do call_method(:day, :created_at, permit: %w(week)) end assert_equal "Unpermitted period", error.message end def test_permit_bad_period error = assert_raises(ArgumentError)...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/support/activerecord.rb
test/support/activerecord.rb
# for debugging if ENV["VERBOSE"] ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) else ActiveRecord::Migration.verbose = false end # rails does this in activerecord/lib/active_record/railtie.rb ActiveRecord.default_timezone = :utc ActiveRecord::Base.time_zone_aware_attributes = true class User < Act...
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/adapters/mysql.rb
test/adapters/mysql.rb
options = {} if ActiveRecord::VERSION::STRING.to_f == 7.1 options[:prepared_statements] = true end ActiveRecord::Base.establish_connection adapter: "mysql2", database: "groupdate_test", **options
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/adapters/redshift.rb
test/adapters/redshift.rb
ActiveRecord::Base.establish_connection(ENV.fetch("REDSHIFT_URL"))
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/adapters/enumerable.rb
test/adapters/enumerable.rb
# do nothing
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/adapters/postgresql.rb
test/adapters/postgresql.rb
ActiveRecord::Base.establish_connection adapter: "postgresql", database: "groupdate_test"
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false
ankane/groupdate
https://github.com/ankane/groupdate/blob/520f223b1b9393c6fae99de92cdf9cf0a6da2597/test/adapters/trilogy.rb
test/adapters/trilogy.rb
ActiveRecord::Base.establish_connection adapter: "trilogy", database: "groupdate_test", host: "127.0.0.1"
ruby
MIT
520f223b1b9393c6fae99de92cdf9cf0a6da2597
2026-01-04T15:48:16.889438Z
false