appoxy-simple_record 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/simple_record.rb CHANGED
@@ -130,9 +130,10 @@ module SimpleRecord
130
130
  }
131
131
  end
132
132
 
133
+ @@attributes = []
133
134
  def self.has_attributes(*args)
134
- @@attributes = args
135
135
  args.each do |arg|
136
+ @@attributes << arg if @@attributes.index(arg).nil?
136
137
  # define reader method
137
138
  send :define_method, arg do
138
139
  ret = nil
@@ -818,7 +819,7 @@ This is done on getters now
818
819
  class_name = results.class.name
819
820
  id = results.id
820
821
  cache_key = self.cache_key(class_name, id)
821
- puts 'caching result at ' + cache_key + ': ' + results.inspect
822
+ #puts 'caching result at ' + cache_key + ': ' + results.inspect
822
823
  @@cache_store.write(cache_key, results, :expires_in =>30)
823
824
  end
824
825
  end
@@ -8,18 +8,14 @@ require 'my_child_model'
8
8
  class TestSimpleRecord < Test::Unit::TestCase
9
9
 
10
10
  def setup
11
- f = File.expand_path("~/.amazon/#{"simple_record_tests.yml"}")
12
- puts f.inspect
13
- @config = YAML::load(File.open(File.expand_path("~/.amazon/#{"simple_record_tests.yml"}")))
14
- puts @config.inspect
15
- #puts 'akey=' + @config['amazon']['access_key']
16
- #puts 'skey=' + @config['amazon']['secret_key']
17
- RightAws::ActiveSdb.establish_connection(@config['amazon']['access_key'], @config['amazon']['secret_key'], :port=>80, :protocol=>"http")
11
+ @config = YAML::load(File.open(File.expand_path("~/.amazon/simple_record_tests.yml")))
12
+ #puts @config.inspect
13
+ SimpleRecord.establish_connection(@config['amazon']['access_key'], @config['amazon']['secret_key'], :port=>80, :protocol=>"http")
18
14
  SimpleRecord::Base.set_domain_prefix("simplerecord_tests_")
19
15
  end
20
16
 
21
17
  def teardown
22
- RightAws::ActiveSdb.close_connection()
18
+ SimpleRecord.close_connection()
23
19
  end
24
20
 
25
21
  def test_save_get
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appoxy-simple_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.22
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-28 00:00:00 -07:00
13
+ date: 2009-07-15 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16