Commit Graph

10 Commits

Author SHA1 Message Date
Kevin Menard 9b0de600be Added a JRuby workaround in a test that's failing due to a JRuby bug. 2013-10-24 15:17:51 -04:00
Kyle Rames 83068af68b [core] exclude :headers from symbolization for real this time; added better tests; Thanks @burns! 2013-08-13 15:57:08 -05:00
Hunter Haugen d25b39405f [core] `@credential` should always be a symbol
Similar to #504, say your ~/.fog had multiple stanzas:

```yaml
:default:
  :aws_access_key_id: aaa
test:
  :aws_access_key_id: bbb
:prod:
  :aws_access_key_id: ccc
```

By default, fog will look for either the credential *symbol* `:default` or for the *string* stored in `FOG_CREDENTIAL` (in `lib/fog/core/credentials.rb` method `self.credential`). When the fog credentials file given above is read in, it’s passed through `self.symbolize_credentials` which makes *symbols* out of all the keys (so `prod`, `test`, and `default` will all be symbols) and saves the list to credentials then looks for `credentials[credential]` which is indexing a string in a hash of symbols.

Any value that `@credential` is set to should be a symbol, because the hash keys will only be symbols.
2011-11-16 09:51:43 -08:00
geemus d3073af15a [core] properly fix credentials tests 2011-09-23 16:44:39 -05:00
geemus 1e72d3b600 Revert "[core] make sure credentials tests properly reset after completion"
This reverts commit 7ac7bbe3af.
2011-09-23 16:43:34 -05:00
geemus 7ac7bbe3af [core] make sure credentials tests properly reset after completion 2011-09-23 16:31:18 -05:00
Aaron Suggs e48ac6e8c3 [core] Allow FOG_CREDENTIAL env variable for config
Say your ~/.fog had multiple stanzas:
    :default:
      :aws_access_key_id: aaa
    test:
      :aws_access_key_id: bbb
    prod:
      :aws_access-key_id: ccc

Choose a stanza with an environment variable:
   $ FOG_CREDENTIAL=prod fog
2011-09-10 13:42:55 -04:00
jc00ke 64425e71e0 Return nil if HOME is non-absolute. Fixes #397 2011-07-13 11:17:00 -07:00
Aaron Suggs e0b8606d85 [core] Fixed credential tests
Tests behavior when ENV['HOME'] is not a directory.
2011-05-13 18:14:47 -04:00
Lee Jensen 8dfc9beb0d Deal with missing FOG_RC/HOME env vars better 2011-03-30 17:50:35 -06:00