1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fixing warnings

This commit is contained in:
geemus 2010-10-12 16:22:12 -07:00
parent 856334fe38
commit f890f27141
13 changed files with 17 additions and 14 deletions

View file

@ -21,6 +21,8 @@ require 'fog/core'
module Fog
@mocking = false
unless const_defined?(:VERSION)
VERSION = '0.3.7'
end

View file

@ -113,10 +113,6 @@ module Fog
fingerprint.join(':')
end
def self.image_id
"ami-#{hex(8)}"
end
def self.instance_id
"i-#{hex(8)}"
end

View file

@ -35,7 +35,7 @@ module Fog
attribute :tags, :aliases => 'tagSet'
attribute :user_data
attr_accessor :password, :username
attr_accessor :password
attr_writer :private_key, :private_key_path, :public_key, :public_key_path
def initialize(attributes={})
@ -63,6 +63,7 @@ module Fog
true
end
remove_method :flavor_id
def flavor_id
@flavor && @flavor.id || @flavor_id
end
@ -85,6 +86,7 @@ module Fog
@key_name = new_keypair && new_keypair.name
end
remove_method :monitoring=
def monitoring=(new_monitoring)
if new_monitoring.is_a?(Hash)
@monitoring = new_monitoring['state']
@ -201,6 +203,7 @@ module Fog
private
remove_method :state=
def state=(new_state)
if new_state.is_a?(Hash)
@state = new_state['name']

View file

@ -8,7 +8,6 @@ module Fog
identity :key, :aliases => 'Key'
attr_accessor :body
attribute :content_length, :aliases => 'Content-Length'
attribute :content_type, :aliases => 'Content-Type'
attribute :etag, :aliases => ['Etag', 'ETag']
@ -58,6 +57,7 @@ module Fog
true
end
remove_method :owner=
def owner=(new_owner)
if new_owner
@owner = {

View file

@ -3,7 +3,7 @@ module Fog
module AWS
module Storage
class AccessControlList < Fog::Parsers::Base
class GetBucketLogging < Fog::Parsers::Base
def reset
@grant = { 'Grantee' => {} }

View file

@ -17,6 +17,7 @@ module Fog
%w[reject select].each do |method|
class_eval <<-RUBY
remove_method :#{method}
def #{method}(*args)
unless @loaded
lazy_load
@ -37,6 +38,7 @@ module Fog
attr_accessor :connection
remove_method :clear
def clear
@loaded = true
super
@ -49,9 +51,11 @@ module Fog
end
def initialize(attributes = {})
@loaded = false
merge_attributes(attributes)
end
remove_method :inspect
def inspect
Thread.current[:formatador] ||= Formatador.new
data = "#{Thread.current[:formatador].indentation}<#{self.class.name}\n"

View file

@ -68,6 +68,7 @@ module Fog
superclass.setup_requirements
end
@required ||= false
unless @required
for collection in collections
require [@model_path, collection].join('/')

View file

@ -13,7 +13,7 @@ module Fog
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
def grid_server_delete(server, power)
def grid_server_power(server, power)
request(
:path => 'grid/server/power',
:query => {'server' => server}
@ -24,7 +24,7 @@ module Fog
class Mock
def grid_server_delete(server)
def grid_server_power(server)
Fog::Mock.not_implemented
end

View file

@ -8,7 +8,6 @@ module Fog
identity :key, :aliases => 'Key'
attr_accessor :body
attribute :content_length, :aliases => 'Content-Length'
attribute :content_type, :aliases => 'Content-Type'
attribute :etag, :aliases => ['Etag', 'ETag']
@ -53,6 +52,7 @@ module Fog
true
end
remove_method :owner=
def owner=(new_owner)
if new_owner
@owner = {

View file

@ -8,7 +8,6 @@ module Fog
identity :key, :aliases => 'Key'
attr_accessor :body
attribute :content_length, :aliases => 'Content-Length'
# attribute :content_type, :aliases => 'Content-Type'
attribute :last_modified, :aliases => 'Last-Modified'

View file

@ -8,8 +8,6 @@ module Fog
identity :id
attribute :bits
attribute :cores
attribute :disk
attribute :name
attribute :ram

View file

@ -8,7 +8,6 @@ module Fog
identity :key, :aliases => 'Key'
attr_accessor :body
attribute :content_length, :aliases => 'Content-Length'
attribute :content_type, :aliases => 'Content-Type'
attribute :etag, :aliases => 'Etag'

View file

@ -3,6 +3,7 @@ module Fog
module Shared
module Parser
remove_method :parse
def parse(data)
case data['type']
when 'application/vnd.vmware.vcloud.vApp+xml'