lifeboat 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -45,7 +45,14 @@ Quick Start
45
45
  Include Lifeboat in your model class:
46
46
 
47
47
  class AnyObject < ActiveRecord::Base
48
- include LifeBoat
48
+ has_lifeboat
49
+ end
50
+
51
+ This will serialize your active record object to json and send it to the
52
+ queue automatically. Moreover, we do XML too.
53
+
54
+ class XMLObject < ActiveRecord::Base
55
+ has_lifeboat :format => :xml
49
56
  end
50
57
 
51
58
  Provide your AWS credentials in config/aws.yml
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/config/aws.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  test:
2
- key: 'AKIAJ3GG5YKJUT3YQQYA'
3
- secret: 'H6FgWZTcUFEdRrhfN/atWyDj7LBABepb9OvlAw2L'
2
+ access_key_id: 'AKIAJ3GG5YKJUT3YQQYA'
3
+ secret_access_key: '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'
data/lib/lifeboat.rb CHANGED
@@ -6,17 +6,9 @@ require 'fileutils'
6
6
  require 'thread'
7
7
 
8
8
  class AWS
9
- # DUPLICATION IS RISING ON THE self.root METHOD
10
- # MACHETE
11
9
  def self.root
12
- if Rails.version == "2.1.2"
13
- YAML::load(IO.read(Rails.root + "/config/aws.yml"))
14
- elsif Rails.version == "2.3.8"
15
- YAML::load(IO.read(Rails.root + "config/aws.yml"))
16
- else
17
- raise "Email ivan@bakedweb.net with this error"
18
- YAML::load(IO.read(File.dirname(__FILE__) + '/../config/aws.yml'))
19
- end
10
+ rails_root = (Rails.version < "2.1.2") ? RAILS_ROOT : Rails.root
11
+ YAML::load(IO.read(File.join(rails_root, 'config', 'aws.yml')))
20
12
  end
21
13
  end
22
14
 
@@ -31,10 +23,10 @@ class Credentials
31
23
 
32
24
  begin
33
25
  def self.key
34
- AWS.root[RAILS_ENV]['key']
26
+ AWS.root[RAILS_ENV]['access_key_id']
35
27
  end
36
28
  def self.secret
37
- AWS.root[RAILS_ENV]['secret']
29
+ AWS.root[RAILS_ENV]['secret_access_key']
38
30
  end
39
31
  rescue RightAws::AwsError
40
32
  puts"LIFEBOAT : AWS Access Key Id needs a subscription for the service."
data/lifeboat.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lifeboat}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ivan Acosta-Rubio"]
12
- s.date = %q{2011-05-08}
12
+ s.date = %q{2011-05-09}
13
13
  s.description = %q{ }
14
14
  s.email = %q{ivan@bakedweb.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifeboat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Acosta-Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-08 00:00:00 Z
18
+ date: 2011-05-09 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement