entity_storage 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +0 -0
- data/lib/entity_storage.rb +10 -9
- data/test/test_helper.rb +0 -0
- metadata +81 -53
data/Manifest.txt
CHANGED
File without changes
|
data/lib/entity_storage.rb
CHANGED
@@ -9,26 +9,27 @@ require 'active_record'
|
|
9
9
|
|
10
10
|
|
11
11
|
module EntityStorage
|
12
|
-
VERSION = '2.1.
|
12
|
+
VERSION = '2.1.1'
|
13
13
|
|
14
14
|
class Storage
|
15
15
|
attr_accessor :defaults
|
16
16
|
|
17
17
|
# Checks for the existence of the necessary Entities table... if not here, creates it.
|
18
18
|
def initialize(defaults={})
|
19
|
+
self.defaults = defaults
|
19
20
|
if !ActiveRecord::Base.connection.table_exists?('entity_storage')
|
20
21
|
puts "Creating entity table..."
|
21
22
|
AddEntitiesTable.create
|
22
|
-
|
23
|
+
elsif self['ENTITY_STORAGE_MASTER_VERSION'].nil? || (self['ENTITY_STORAGE_MASTER_VERSION']!='2.1.0' && self['ENTITY_STORAGE_MASTER_VERSION']!='2.1.1')
|
24
|
+
# this will need to be updated for future version changes
|
25
|
+
self['ENTITY_STORAGE_MASTER_VERSION']='2.1.1'
|
26
|
+
puts "Migrating to new 2.1.x binary format..."
|
27
|
+
ActiveRecord::Base.connection.execute("alter table entity_storage modify value blob")
|
28
|
+
end
|
23
29
|
|
24
|
-
self.defaults = defaults
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
self['ENTITY_STORAGE_MASTER_VERSION']='2.1.0'
|
29
|
-
puts "Migrating to new 2.1.0 binary format..."
|
30
|
-
ActiveRecord::Base.connection.execute("alter table entity_storage modify value blob")
|
31
|
-
end
|
31
|
+
|
32
|
+
|
32
33
|
end
|
33
34
|
|
34
35
|
# Read a value.
|
data/test/test_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,68 +1,86 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: entity_storage
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 2.1.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Joshua Siler
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-12-30 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: rails
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 1
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 0
|
32
|
+
- 3
|
21
33
|
version: 3.0.3
|
22
34
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
26
37
|
name: activerecord
|
27
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 1
|
45
|
+
segments:
|
46
|
+
- 3
|
47
|
+
- 0
|
48
|
+
- 3
|
32
49
|
version: 3.0.3
|
33
50
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
37
53
|
name: hoe
|
38
|
-
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
56
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 5
|
61
|
+
segments:
|
62
|
+
- 2
|
63
|
+
- 3
|
64
|
+
- 3
|
43
65
|
version: 2.3.3
|
44
66
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
5 minutes.
|
54
|
-
|
55
|
-
|
56
|
-
Additionally, allows users to set a list of default keys that auto-initializes baseline
|
57
|
-
key/value pairs in the database for easy initialization.'
|
58
|
-
email:
|
67
|
+
version_requirements: *id003
|
68
|
+
description: |-
|
69
|
+
An easy to use Key/Value store for any Ruby on Rails project. Like Memcache, only persistent. Stores config values & application wide state in the database in order to survive server restarts.
|
70
|
+
|
71
|
+
Designed to allow you to add persistent value storage to any Rails project in about 5 minutes.
|
72
|
+
|
73
|
+
Additionally, allows users to set a list of default keys that auto-initializes baseline key/value pairs in the database for easy initialization.
|
74
|
+
email:
|
59
75
|
- joshua.siler@gmail.com
|
60
76
|
executables: []
|
77
|
+
|
61
78
|
extensions: []
|
62
|
-
|
79
|
+
|
80
|
+
extra_rdoc_files:
|
63
81
|
- History.txt
|
64
82
|
- Manifest.txt
|
65
|
-
files:
|
83
|
+
files:
|
66
84
|
- History.txt
|
67
85
|
- Manifest.txt
|
68
86
|
- README.rdoc
|
@@ -76,30 +94,40 @@ files:
|
|
76
94
|
- test/test_helper.rb
|
77
95
|
homepage: http://github.com/eatenbyagrue/entity_storage
|
78
96
|
licenses: []
|
97
|
+
|
79
98
|
post_install_message:
|
80
|
-
rdoc_options:
|
99
|
+
rdoc_options:
|
81
100
|
- --main
|
82
101
|
- README.rdoc
|
83
|
-
require_paths:
|
102
|
+
require_paths:
|
84
103
|
- lib
|
85
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
105
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
hash: 57
|
110
|
+
segments:
|
111
|
+
- 1
|
112
|
+
- 8
|
113
|
+
- 7
|
90
114
|
version: 1.8.7
|
91
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
116
|
none: false
|
93
|
-
requirements:
|
94
|
-
- -
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
hash: 3
|
121
|
+
segments:
|
122
|
+
- 0
|
123
|
+
version: "0"
|
97
124
|
requirements: []
|
125
|
+
|
98
126
|
rubyforge_project: entity-storage
|
99
127
|
rubygems_version: 1.8.10
|
100
128
|
signing_key:
|
101
129
|
specification_version: 3
|
102
130
|
summary: An easy to use Key/Value store for any Ruby on Rails project
|
103
|
-
test_files:
|
131
|
+
test_files:
|
104
132
|
- test/test_entity_storage.rb
|
105
133
|
- test/test_helper.rb
|