Skip to content

Instantly share code, notes, and snippets.

module RequestRouter
ADMIN_REQUESTS = %w[
names
of_admin_methods
go_here
this_is_an_admin_method
]
def request(params)
package main
import "fmt"
func sum(a []int, c chan int) {
sum := 0
for _, v := range a {
sum += v
}
c <- sum // send sum to c
func run() error {
return &MyError{
time.Now(),
"it didn't work",
}
}
type Reader interface {
Read(b []byte) (n int, err error)
}
type Writer interface {
Write(b []byte) (n int, err error)
}
type ReadWriter interface {
Reader
it "File.expand_path raises because of non-absolute path" do
ENV.delete('FOG_RC')
ENV['HOME'] = '.'
if RUBY_PLATFORM == 'java'
Fog::Logger.warning("Stubbing out non-absolute path credentials test due to JRuby bug: https://github.com/jruby/jruby/issues/1163")
else
Fog.credentials_path
end
end
def self.credentials_path
@credential_path ||= begin
path = ENV["FOG_RC"] || (ENV['HOME'] && File.directory?(ENV['HOME']) && '~/.fog')
File.expand_path(path) if path
rescue
nil
end
end
Mountain West Ruby Conf
Golden Gate Ruby Conf
Ruby Nation
Gotham Ruby Conf
Windy City Rails
Madison+ Ruby
Rocky Mountain Ruby
Lone Star Ruby (next held in 2015?)
Ruby DCamp
Cascadia Ruby
  • "Fog::OpenStackCommon"
  • Been meeting weekly with Chris Johnson and Mike Hagedorn for month now give or take
  • We have a work-in-progress Keystone client
  • HP doing much of the coding
  • Kyle and I have been involved via code review
  • AFAIK, HP is testing it against devstack
  • Plan is to solidify the Keystone client first then move on to other clients
private
def authenticate
# puts "===== Fog::Identity::OpenStackCommon -> authenticate ====="
if !@openstack_management_url || @openstack_must_reauthenticate
case @openstack_auth_uri.path
when /v1(\.\d+)?/
Fog::OpenStackCommon::Authenticator.adapter = :authenticator_v1
else
Fog::OpenStackCommon::Authenticator.adapter = :authenticator_v2
module Fog
module Openstack
module Rackspace
class Identity < Fog::Service
US_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0'
UK_ENDPOINT = 'https://lon.identity.api.rackspacecloud.com/v2.0'
requires :rackspace_username, :rackspace_api_key
recognizes :rackspace_auth_url, :rackspace_region