eatenbyagrue-entity_storage 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ === 1.0.2 2009-09-21
2
+ * changed method of table discovery for auto table creation
3
+
1
4
  === 1.0.1 2009-09-20
2
5
  * documentation update
3
6
 
data/README.rdoc CHANGED
@@ -12,7 +12,8 @@ Additionally, allows users to set a list of default keys that auto-initiliazes b
12
12
 
13
13
  You can use the entity store like so:
14
14
 
15
- # Get key value. If it doesn't exist and is specified in default list, will be initialized and returned. If not in default list, will return nil.
15
+ # Get key value. If it doesn't exist and is specified in default list, will be initialized and returned.
16
+ # If not in default list, will return nil.
16
17
  e = EntityStore["testkey"]
17
18
  e = EntityStore.testkey
18
19
  e = EntityStore[:testkey]
@@ -40,8 +41,19 @@ Keys can be up to 512 characters in length. Values can be practically any size,
40
41
  Requires ActiveRecord 2.2.3 or above (probably works with earlier versions, but has not been tested.)
41
42
 
42
43
  == INSTALL:
44
+ To install from github:
43
45
 
44
- sudo gem install entity_storage
46
+ Run the following if you haven't already:
47
+
48
+ gem sources -a http://gems.github.com
49
+
50
+ Install the gem(s):
51
+
52
+ sudo gem install eatenbyagrue-entity_storage
53
+
54
+ Or download the souce above and run, customized for version and environment:
55
+
56
+ sudo gem install PATH/entity_storage.#.#.#.gem
45
57
 
46
58
  Put the following at the bottom of your environment.rb file, or in an initializer.
47
59
 
data/Rakefile CHANGED
@@ -15,7 +15,6 @@ $hoe = Hoe.spec 'entity_storage' do
15
15
  # self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
16
  self.rubyforge_name = self.name # TODO this is default value
17
17
  self.extra_deps = [['activerecord','>= 2.2.2']]
18
-
19
18
  end
20
19
 
21
20
  require 'newgem/tasks'
data/config/database.yml CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  adapter: mysql
3
- database:
3
+ database: test
4
4
  username: root
5
5
  password:
6
6
  host: localhost
@@ -5,17 +5,15 @@ require 'rubygems'
5
5
  require 'activerecord'
6
6
 
7
7
  module EntityStorage
8
- VERSION = '1.0.1'
8
+ VERSION = '1.0.2'
9
9
 
10
10
  class Storage
11
11
  attr_accessor :defaults
12
12
 
13
13
  # Checks for the existence of the necessary Entities table... if not here, creates it.
14
14
  def initialize(defaults={})
15
- table_exists = false
16
- ActiveRecord::Base.connection.execute("show tables like 'entity_storage'").each { |w| table_exists = true }
17
- unless table_exists
18
- AddEntitiesTable.up
15
+ unless ActiveRecord::Base.connection.table_exists?('entity_storage')
16
+ AddEntitiesTable.up
19
17
  end
20
18
 
21
19
  self.defaults = defaults
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eatenbyagrue-entity_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Siler
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-20 00:00:00 -07:00
12
+ date: 2009-09-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency