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

146 commits

Author SHA1 Message Date
geemus
b2c8ff0388 [core] work toward separate requires
Should facilitate the following:

    require 'fog/aws'
    require 'fog/compute'
    require 'fog/aws/compute'

I think once you `require 'rubygems'` those should work.

further cleanup should reduce common requires (ie nokogiri)
2011-08-31 15:52:53 -05:00
geemus
35bbd854e0 [core] add collection#destroy(identity) 2011-08-23 09:43:33 -05:00
Pan Thomakos
e1f625f9f2 Added Fog::CurrentMachine#ip_address.
This function allows you to get the ip address of the current machine. I
found this useful because I wanted to add my personal or production
machine to a specific RDS security group. The call is quite simple and
connects to amazon's checkip website. The class is threadsafe and I have
included specs with it as well. I have also added the
Fog::AWS::RDS::SecurityGroup#authorize_me function to make adding the
current machine to a given RDS security group very easy.
2011-08-17 14:35:03 -07:00
Mark A. Miller
f3e2c939f4 * Changed LoadError to Fog::Error::LoadError when missing configuration
* When running from command line, rescue the exception, and print the help message

When running fog for the first time with no setup, the missing_exception message
was surrounded above and below with a stack trace, which is not particularly
user-friendly. Since we've rescuing the LoadError only in bin/fog, we know
we don't have to worry about higher level libraries not getting the exception,
since it wouldn't propagate between processes.

Changing LoadError to Fog::Error::LoadError lets us know that this was
an issue on fog's part, rather than some other library we might be
using. Since we inherit from the LoadError class, any higher-level
libraries that were using a rescue based on LoadError will still work.
2011-08-14 08:09:35 -05:00
geemus
bfe7efdd10 [compute|aws] fixes for bootstrap and placing attributes json 2011-08-09 13:39:43 -05:00
Michael Hale
7b8d8d52bc enable mocking for dynect 2011-08-04 16:00:58 -05:00
geemus
87b07ba117 [misc] provide #providers for shared services 2011-07-27 11:37:58 -07:00
Wesley Beary
b6921d255b Merge pull request from brianhartsock/squash_false
Fixed  - Unable to squash kvp with false values
2011-07-20 16:00:18 -07:00
Brian Hartsock
72778886a1 Fixed - Unable to squash kvp with false values 2011-07-20 18:18:05 -04:00
geemus
8be455e4a7 make collection class_eval more consistent 2011-07-20 16:36:22 -05:00
geemus
7cbf1861aa [misc] to_json calls to use MultiJson 2011-07-20 11:08:11 -05:00
Claudio Poli
507127a0c5 Use multi_json gem 2011-07-16 04:51:03 +02:00
Claudio Poli
1d9f0af243 Make Rails' respond_with play nice with to_json. 2011-07-15 23:58:41 +02:00
Wesley Beary
ddfe5d5b34 Merge pull request from jc00ke/master
Fixes non-absolute exception for File.expand_path
2011-07-13 11:40:48 -07:00
jc00ke
64425e71e0 Return nil if HOME is non-absolute. Fixes 2011-07-13 11:17:00 -07:00
geemus
a17ec2f42a [core] avoid ||= in timeout lookup 2011-07-12 11:04:49 -05:00
Dylan Egan
47ca2bc45a Clean up timeout and add tests. 2011-07-12 13:05:54 +10:00
Christopher Meiklejohn
49d8a92a63 Move timeout up to Fog from Fog::Mock. 2011-07-11 18:06:47 -04:00
Christopher Meiklejohn
74c4689691 Move the timeout to Mock and stop hardcoding. 2011-07-09 20:47:49 -04:00
Wesley Beary
2dc0623703 Merge pull request from redzebra/centos5
[core] avoid ArgumentError with Ruby 1.8.5 on CentOS.
2011-07-07 15:51:41 -07:00
geemus
0019667ce6 [core] fix to_date_header to use self.utc instead of self.class.now.utc
closes 
2011-07-06 12:44:08 -05:00
Dylan Egan
dda35a0f99 requires_one, allows you to require at least one of the specified attributes. 2011-07-05 13:17:20 -07:00
geemus
c3f91950f9 [core] fix mock reset to work with new namespaces
closes 
2011-06-21 14:50:16 -07:00
geemus
18992e951b Merge remote branch 'phlipper/scp-options'
Conflicts:
	lib/fog/compute/models/aws/server.rb
	lib/fog/compute/models/bluebox/server.rb
	lib/fog/compute/models/go_grid/server.rb
	lib/fog/compute/models/rackspace/server.rb
	lib/fog/compute/models/slicehost/server.rb
	lib/fog/compute/models/virtual_box/server.rb
	lib/fog/core/scp.rb
2011-06-13 10:53:08 -07:00
Phil Cohen
a840dd7224 use a hash not nil for default scp_options 2011-06-11 00:50:45 -07:00
Phil Cohen
b9198da1f7 add Net::SCP options parameter to Fog::SCP proxy 2011-06-11 00:08:30 -07:00
Nick Osborn
3b8c398019 [core] avoid ArgumentError with Ruby 1.8.5 on CentOS. 2011-06-10 15:48:43 +01:00
Luke Robins
2e567a870d Add an options hash to scp. Set to {} by default 2011-06-08 12:27:20 +10:00
Luke Robins
1066d9eded Add recursive argument to server scp methods. Set to false by default 2011-06-05 17:11:57 +10:00
Luqman Amjad
48536cb036 Added new DNS provider => DNS Made Easy 2011-05-30 00:41:27 +01:00
geemus
96a5c2f46a [core] making collection.new error more idiomatic 2011-05-27 11:17:32 -07:00
geemus
5cf271ff6c Merge branch 'josephholsten'
Conflicts:
	tests/compute/requests/bluebox/block_tests.rb
2011-05-27 11:15:35 -07:00
geemus
9fe17c5978 [core] add namespaced errors for better messaging 2011-05-27 10:46:09 -07:00
Dan Peterson
63b9ea6eb0 [mock] fix Fog::Mock.reset 2011-05-20 15:00:22 -03:00
geemus
9ea5432fde [mock] cleanup and reset related fixes 2011-05-19 15:35:33 -07:00
anomalousthought
c30f077b71 Add a reset method to Fog::Mock that resets all providers/services in addition to Compute providers. 2011-05-19 10:06:02 -04:00
anomalousthought
5fcf3185ca Add a reset method to Fog::Mock that resets all providers/services. 2011-05-17 22:41:35 -04:00
geemus
53de3d04f9 [core] handle busted ENV['HOME']. thanks pfalcone
closes 
2011-05-13 12:58:46 -07:00
geemus
b452aa679d [core] update parser to better handle whitespace 2011-05-12 13:15:13 -07:00
geemus
3022df2b23 Fixes error messaging when credentials missing
closes 
2011-05-04 13:12:52 -07:00
Wesley Beary
8a048c6c3f Merge pull request from seeingidog/stormondemandfog.
[stormondemand] Implement Stormondemand API
2011-05-02 11:24:30 -07:00
Wesley Beary
746f39a526 Merged pull request from smerritt/each_file.
AWS::Storage::Directory#each_file
2011-04-28 11:49:40 -07:00
Samuel Merritt
5c78e814ed Simplify dup-ing of @attributes for models.
This way, @attributes gets copied so that there's no data sharing,
but there is no way to poke unsanitized attributes in.
2011-04-28 10:17:06 -07:00
seeingidog
0cb8b18379 [stormondemand] Implement Stormondemand API 2011-04-27 21:49:56 -04:00
Samuel Merritt
4630f2e43f Make Model#dup copy the attributes too.
Otherwise, #dup-ing yourself and operating on a copy isn't enough
to ensure your own state remains untouched. For example,
AWS::Storage::Files#each will only work once without this change, since
even though the object operates on a copy of itself, its 'marker' attribute
winds up getting changed because @attributes is shared with the copy.
2011-04-26 15:20:02 -07:00
Joseph Anthony Pasquale Holsten
5d547d1ee8 give a more useful error if someone tries to say connection.directories.create('dir') 2011-04-22 16:00:52 -05:00
Aaron Suggs
3c6a677b80 [compute|aws] Fixes trailing whitespace in attributes 2011-04-19 17:39:57 -04:00
Pieter van de Bruggen
331d58dabf Make Model#reload more resilient against errors.
Connection errors had the behavior of failing catastrophically, which had
some rather unpleasant implications for things like Model#wait_for, which
implicitly reload repeatedly without any protection.

This change may be better suited to special cases (e.g. Model#wait_for).
2011-04-14 15:41:47 -07:00
Pieter van de Bruggen
e71895f1a4 Fix small logic error in Model#wait_for. 2011-04-14 15:41:47 -07:00
Geraud
1364f1a0d8 Parser does not concatenates all the strings when parsing
When parsing a Route53 DNS record containing a " such as 
"v=DKIM1; k=rsa; p=MIGfMA0GCSqG....x59/8qdGvAo+S5xwIDAQAB", the parser just retains the last double quote.
2011-04-13 08:58:06 -07:00