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

22 commits

Author SHA1 Message Date
Peter Meier
7ac96b96e3 [core] fix attribute squashing with : in key
It can happen, that the squashing options conatins a : within its key,
for example: :squash => :'ovf:Item' . However this fails if we don't
quote the used symbol.

Note that :a == :'a', hence we don't change anything on how things work.
2011-10-04 10:58:40 +02:00
Peter Meier
321783ff56 [core] treat boolean values as a boolean 2011-10-03 19:36:38 +02:00
Brian Hartsock
72778886a1 Fixed #444 - Unable to squash kvp with false values 2011-07-20 18:18:05 -04: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
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
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
geemus
ac2610c85f [virtualbox|compute] rough initial implementation 2011-03-09 17:03:15 -08:00
geemus
d555ec47cd fix _dump for collections/models
closes #171
2011-02-15 11:26:04 -08:00
geemus
a5d65fc26e [core] fix attributes to properly accomodate aliases 2010-12-16 11:25:31 -08:00
geemus
b689650666 more attributes spec to tests, fix attribute names 2010-12-15 14:05:55 -08:00
Juris Galang
827c029a99 This is a combination of 23 commits (included merges from upstream); this commit(s) include changes to enforces recognizes/requires parameters for all supported services. Comments from the included commits follow:
- Added google_storage_* keys
- Fixed indentations.
- Factored out requires and recognizes method implementation (now relies on the requires and recognizes clause from the NamedParameters module)
- Added dependency to named-parameters gem.
- Added recognizes declaration to classes for all supported services to enforce parameter name checks -
- passing an unrecognized key when instantiating a service object will now cause an ArgumentError to be raised.
- Added NOTE
- comment added
- check/filter-out keys from credentials that are not required by the class being instantiated
- [local|storage] properly write out file contents
- Added google_storage_* keys
- Fixed indentations.
- added put_object_acl request (ref: https://github.com/geemus/fog/issues#issue/74)
- Release 0.3.24
- remove tracker reference from README
- issues is now the goto for bugs/todo
- notify and gracefully skip credential-less testsa
- [rackspace|storage] fixes for directory/files
- [local|storage] CGI.escape file names
- Release 0.3.25
- updated deps; recognized_parameters -> declared_parameters; restored options filtering if Fog.bin
- Added requires/recognizes to Fog::Terremark::Ecloud
- Updted to use latest named-parameters gem.
- Filter out unwanted parameters when Fog.bin
- Updated to latest named-parameters gem
- commented out unnecessary code
- fix missing "volume" parameter error when setting Fog::AWS::Volume#server to nil (in order to detach it)
- documentation update for key_pairs and helper
- [aws|compute] commented/documented flavors/volumes
- Fixes for issue 38 and 39
Closes #96
2010-12-01 14:34:42 -08:00
geemus
5854e249aa more consistent attribute storage/usage 2010-11-19 13:45:45 -08:00
geemus
b60bdd37da fix another edge case for reload bug 2010-11-18 15:07:51 -08:00
geemus
e25afbd284 [core] fixes attributes memoization 2010-11-17 17:25:47 -08:00
Paul Thornthwaite
524a30918d [patch] When an attribute is an empty string, do not try and parse (and get current time)
* Spec to support handling empty strings when attribute is set to time.
2010-11-16 11:11:53 -08:00
Paul Thornthwaite
d299ae1579 [patch] Change Model#attribute's :squash options to accept a String as well as a Symbol
* Spec to test "squashed" value patch
2010-11-16 11:11:52 -08:00
geemus
ff2af54c28 fix for the backwards compat stuff to work with ruby 1.9+ 2010-11-03 17:32:06 -07:00
geemus
defbbecddc fix attributes to work with private methods 2010-10-28 13:13:51 -07:00
geemus
5fddabd891 more universal attribute handling 2010-10-28 10:55:35 -07:00
geemus
c8821907bb attributes should compare against the symbol key, rather than string 2010-10-28 10:49:27 -07:00
geemus
3c8e45ec15 better behaved models for undefined attributes
only effects merge_attributes (and therefore initialize)
for any non-attributes (except collection/connection),
values just get trown into model#attributes,
but won't show up as accessors or in inspect, etc.
Results in no errors, but implies that the attributes SHOULD be added.
2010-10-27 16:16:22 -07:00
geemus
dfd30e521f cleanup lib/fog by segregating shared into 'core' 2010-09-29 13:22:30 -07:00
Renamed from lib/fog/attributes.rb (Browse further)