kvbean 0.0.1
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/MIT-LICENSE +20 -0
- data/README.md +62 -0
- data/Rakefile +45 -0
- data/lib/kvbean.rb +15 -0
- data/lib/kvbean/base.rb +233 -0
- data/lib/kvbean/callbacks.rb +23 -0
- data/lib/kvbean/ext/array.rb +7 -0
- data/lib/kvbean/observing.rb +29 -0
- data/lib/kvbean/redis.rb +109 -0
- data/lib/kvbean/timestamp.rb +51 -0
- data/lib/kvbean/validations.rb +19 -0
- data/lib/kvbean/version.rb +3 -0
- data/lib/tasks/kvbean_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/message.rb +6 -0
- data/test/dummy/app/models/post.rb +15 -0
- data/test/dummy/app/observer/post_observer.rb +8 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +63 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +21 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/log/test.log +11064 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/kvbean/model/message_test.rb +150 -0
- data/test/kvbean/model/post_test.rb +39 -0
- data/test/kvbean/redis_test.rb +90 -0
- data/test/kvbean_test.rb +7 -0
- data/test/support/assertions.rb +17 -0
- data/test/test_helper.rb +17 -0
- metadata +166 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/404.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/422.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/500.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
+
|
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
+
require 'rails/commands'
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class MessageTest < ActiveSupport::TestCase
|
|
4
|
+
|
|
5
|
+
setup do
|
|
6
|
+
@redis = ::Redis.new
|
|
7
|
+
now = Time.now
|
|
8
|
+
current = Time.current
|
|
9
|
+
Time.stubs(:now).returns(now)
|
|
10
|
+
Time.stubs(:current).returns(current)
|
|
11
|
+
@db_time = (current || now)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
teardown do
|
|
15
|
+
@redis.del('message:*')
|
|
16
|
+
@redis.keys("message:*").each do |key|
|
|
17
|
+
@redis.del key
|
|
18
|
+
end
|
|
19
|
+
Message.destroy_all
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
test "kv_field" do
|
|
23
|
+
assert_equal Message.kv_fields.sort, [:content, :title, :user_id, :created_at, :updated_at].sort
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
test "changes" do
|
|
27
|
+
m = Message.new
|
|
28
|
+
m.content = 'new_content'
|
|
29
|
+
assert_equal m.content, 'new_content'
|
|
30
|
+
assert m.changed?
|
|
31
|
+
assert_equal m.changes, { "content" => [nil, 'new_content'] }
|
|
32
|
+
m.send :saved
|
|
33
|
+
|
|
34
|
+
m.content = 'another_new_content'
|
|
35
|
+
assert m.changed?
|
|
36
|
+
assert_equal m.changes, { "content" => ['new_content', 'another_new_content'] }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
test "save" do
|
|
40
|
+
m = Message.new
|
|
41
|
+
m.content = 'new_content'
|
|
42
|
+
m.save
|
|
43
|
+
assert_not_blank m.id
|
|
44
|
+
decoded = ActiveSupport::JSON.decode(@redis.get("message:#{m.id}")).delete_if{|k,v| ['updated_at', 'created_at'].include?(k) }
|
|
45
|
+
assert_equal decoded, { "content" => "new_content", "id" => m.id, "title" => nil, "user_id" => nil }
|
|
46
|
+
assert_equal @redis.smembers('message:content:new_content'), [m.id]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
test 'update' do
|
|
50
|
+
m = Message.new
|
|
51
|
+
m.content = 'new_content'
|
|
52
|
+
m.save
|
|
53
|
+
|
|
54
|
+
m.content = 'another_new_content'
|
|
55
|
+
m.save
|
|
56
|
+
|
|
57
|
+
assert_not_blank m.id
|
|
58
|
+
decoded = ActiveSupport::JSON.decode(@redis.get("message:#{m.id}")).delete_if{|k,v| ['updated_at', 'created_at'].include?(k) }
|
|
59
|
+
assert_equal decoded, { "content" => "another_new_content", "id" => m.id, "title" => nil, "user_id" => nil }
|
|
60
|
+
assert_equal @redis.smembers('message:content:another_new_content'), [m.id]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
test 'destroy' do
|
|
64
|
+
m = Message.new
|
|
65
|
+
m.content = 'new_content'
|
|
66
|
+
m.save
|
|
67
|
+
m.destroy
|
|
68
|
+
|
|
69
|
+
assert_blank @redis.get("message:#{m.id}")
|
|
70
|
+
assert_blank @redis.smembers('message:content:another_new_content')
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
test "find" do
|
|
74
|
+
m = Message.new
|
|
75
|
+
m.content = 'new_content'
|
|
76
|
+
m.save
|
|
77
|
+
assert Message.find(m.id) == m
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
test "create" do
|
|
81
|
+
m = Message.create(content: 'create content')
|
|
82
|
+
assert_not_blank m.id
|
|
83
|
+
assert_equal Message.first.content, 'create content'
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
test "create!" do
|
|
87
|
+
Message.stubs(:create).returns(nil)
|
|
88
|
+
assert_raise Kvbean::InvalidRecord do
|
|
89
|
+
Message.create!(content: 'create content')
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
test "all" do
|
|
94
|
+
m1 = Message.create(content: 'new_content')
|
|
95
|
+
m2 = Message.create(content: 'another_new_content')
|
|
96
|
+
assert_equal Message.all.size, 2
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
test "first" do
|
|
100
|
+
m1 = Message.new
|
|
101
|
+
m1.content = 'new_content'
|
|
102
|
+
m1.save
|
|
103
|
+
m2 = Message.new
|
|
104
|
+
m2.content = 'another_content'
|
|
105
|
+
m2.save
|
|
106
|
+
assert Message.first == m1
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
test "last" do
|
|
110
|
+
m1 = Message.new
|
|
111
|
+
m1.content = 'new_content'
|
|
112
|
+
m1.save
|
|
113
|
+
m2 = Message.new
|
|
114
|
+
m2.content = 'another_content'
|
|
115
|
+
m2.save
|
|
116
|
+
assert Message.last == m2
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
test "count" do
|
|
120
|
+
1.upto(10) do
|
|
121
|
+
m = Message.new
|
|
122
|
+
m.content = '123'
|
|
123
|
+
m.save
|
|
124
|
+
end
|
|
125
|
+
assert_equal Message.count, 10
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
test "class.update" do
|
|
129
|
+
m1 = Message.create(content: 'content')
|
|
130
|
+
Message.update(m1.id, content: 'new_content')
|
|
131
|
+
assert_equal Message.all.first.content, 'new_content'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
test "timestamp" do
|
|
135
|
+
m = Message.create(content: 'content')
|
|
136
|
+
assert_equal m.created_at, @db_time
|
|
137
|
+
assert_equal m.updated_at, @db_time
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
test "find_by_?" do
|
|
141
|
+
1.upto(10).each do |i|
|
|
142
|
+
Message.create(content: 'content', user_id: i)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
Message.create(content: 'content', user_id: 1)
|
|
146
|
+
|
|
147
|
+
assert_equal Message.find_by_user_id(1), Message.first
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class PostTest < ActiveSupport::TestCase
|
|
4
|
+
|
|
5
|
+
setup do
|
|
6
|
+
@redis = ::Redis.new
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
teardown do
|
|
10
|
+
@redis.del('post:*')
|
|
11
|
+
@redis.keys("post:*").each do |key|
|
|
12
|
+
@redis.del key
|
|
13
|
+
end
|
|
14
|
+
Post.destroy_all
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
test "callbacks" do
|
|
18
|
+
post = Post.create(title: 'i am a title')
|
|
19
|
+
assert_equal post.content, 'i am a content'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
test "observer" do
|
|
23
|
+
post = Post.create(title: 'i am a title')
|
|
24
|
+
assert_equal post.another_content, 'i am another content'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "validations(presence)" do
|
|
28
|
+
post = Post.new
|
|
29
|
+
post.title = nil
|
|
30
|
+
assert_not post.valid?
|
|
31
|
+
assert_not_blank post.errors.messages
|
|
32
|
+
|
|
33
|
+
post = Post.new
|
|
34
|
+
post.title = nil
|
|
35
|
+
post.save
|
|
36
|
+
assert_not_blank post.errors.messages
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class Kvmodel
|
|
4
|
+
include Kvbean::Base
|
|
5
|
+
|
|
6
|
+
kv_field :content
|
|
7
|
+
|
|
8
|
+
def id
|
|
9
|
+
1
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class KvmodelTest < ActiveSupport::TestCase
|
|
14
|
+
|
|
15
|
+
setup do
|
|
16
|
+
Kvmodel.redis.del('kvmodel:content:123')
|
|
17
|
+
Kvmodel.redis.del('kvmodel:content:456')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
test "redis" do
|
|
21
|
+
assert_equal Kvmodel.redis.class.name, 'Redis'
|
|
22
|
+
assert_equal Kvmodel.new.send(:redis).class.name, 'Redis'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
test "namespace" do
|
|
26
|
+
assert_equal Kvmodel.namespace, 'kvmodel'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
test "set namespace" do
|
|
30
|
+
Kvmodel.namespace = 'test_kvmodel'
|
|
31
|
+
assert_equal Kvmodel.namespace, 'test_kvmodel'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
test "redis_key" do
|
|
35
|
+
assert_equal Kvmodel.redis_key(['123', '456']), 'kvmodel:123:456'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
test "redis set, get, del" do
|
|
39
|
+
kv = Kvmodel.new
|
|
40
|
+
kv.class.namespace = 'test_kvmodel'
|
|
41
|
+
kv.content = '123'
|
|
42
|
+
kv.send(:redis_set)
|
|
43
|
+
key = kv.send(:redis_key)
|
|
44
|
+
kv.content = '456'
|
|
45
|
+
assert_equal kv.content, '456'
|
|
46
|
+
data = kv.send(:redis_get)
|
|
47
|
+
assert_equal kv.content, '123'
|
|
48
|
+
kv.send(:redis).del(key)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
test "raw create" do
|
|
52
|
+
kv = Kvmodel.new
|
|
53
|
+
kv.content = '123'
|
|
54
|
+
kv.send :raw_create
|
|
55
|
+
assert_equal ActiveSupport::JSON.decode(Kvmodel.redis.get('kvmodel:1')), { "content"=>"123", "created_at"=>nil, "updated_at"=>nil }
|
|
56
|
+
assert_equal Kvmodel.redis.smembers('kvmodel:content:123'), ['1']
|
|
57
|
+
Kvmodel.redis.del('kvmodel:1')
|
|
58
|
+
Kvmodel.redis.del('kvmodel:content:123')
|
|
59
|
+
Kvmodel.redis.del('kvmodel:created_at:')
|
|
60
|
+
Kvmodel.redis.del('kvmodel:updated_at:')
|
|
61
|
+
|
|
62
|
+
assert_equal Kvmodel.redis.keys('kvmodel:*'), []
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
test "raw update" do
|
|
66
|
+
kv = Kvmodel.new
|
|
67
|
+
kv.content = '123'
|
|
68
|
+
kv.send :raw_create
|
|
69
|
+
kv.content = '456'
|
|
70
|
+
kv.send :raw_update
|
|
71
|
+
|
|
72
|
+
assert_equal ActiveSupport::JSON.decode(Kvmodel.redis.get('kvmodel:1')), { "content" => "456", "created_at"=>nil, "updated_at"=>nil }
|
|
73
|
+
assert_equal Kvmodel.redis.smembers('kvmodel:content:456'), ['1']
|
|
74
|
+
Kvmodel.redis.del('kvmodel:1')
|
|
75
|
+
Kvmodel.redis.del('kvmodel:content:456')
|
|
76
|
+
Kvmodel.redis.del('kvmodel:created_at:')
|
|
77
|
+
Kvmodel.redis.del('kvmodel:updated_at:')
|
|
78
|
+
|
|
79
|
+
assert_equal Kvmodel.redis.keys('kvmodel:*'), []
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
test "raw destroy" do
|
|
83
|
+
kv = Kvmodel.new
|
|
84
|
+
kv.content = '123'
|
|
85
|
+
kv.send :raw_create
|
|
86
|
+
kv.send :raw_destroy
|
|
87
|
+
|
|
88
|
+
assert_equal Kvmodel.redis.keys('kvmodel:*'), []
|
|
89
|
+
end
|
|
90
|
+
end
|
data/test/kvbean_test.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'active_support/test_case'
|
|
2
|
+
|
|
3
|
+
class ActiveSupport::TestCase
|
|
4
|
+
|
|
5
|
+
def assert_not(assertion)
|
|
6
|
+
assert !assertion
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def assert_blank(assertion)
|
|
10
|
+
assert assertion.blank?
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def assert_not_blank(assertion)
|
|
14
|
+
assert !assertion.blank?
|
|
15
|
+
end
|
|
16
|
+
alias :assert_present :assert_not_blank
|
|
17
|
+
end
|
data/test/test_helper.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Configure Rails Environment
|
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
|
3
|
+
|
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
|
5
|
+
require "rails/test_help"
|
|
6
|
+
|
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
|
8
|
+
|
|
9
|
+
require 'mocha'
|
|
10
|
+
|
|
11
|
+
# Load support files
|
|
12
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
13
|
+
|
|
14
|
+
# Load fixtures from the engine
|
|
15
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
|
16
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
|
17
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: kvbean
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Sen
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: rails
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ~>
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.2.3
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ~>
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 3.2.3
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: sqlite3
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
type: :development
|
|
39
|
+
prerelease: false
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
description: Make redis on rails easier
|
|
47
|
+
email:
|
|
48
|
+
- sen9ob@gmail.com
|
|
49
|
+
executables: []
|
|
50
|
+
extensions: []
|
|
51
|
+
extra_rdoc_files: []
|
|
52
|
+
files:
|
|
53
|
+
- lib/kvbean/base.rb
|
|
54
|
+
- lib/kvbean/callbacks.rb
|
|
55
|
+
- lib/kvbean/ext/array.rb
|
|
56
|
+
- lib/kvbean/observing.rb
|
|
57
|
+
- lib/kvbean/redis.rb
|
|
58
|
+
- lib/kvbean/timestamp.rb
|
|
59
|
+
- lib/kvbean/validations.rb
|
|
60
|
+
- lib/kvbean/version.rb
|
|
61
|
+
- lib/kvbean.rb
|
|
62
|
+
- lib/tasks/kvbean_tasks.rake
|
|
63
|
+
- MIT-LICENSE
|
|
64
|
+
- Rakefile
|
|
65
|
+
- README.md
|
|
66
|
+
- test/dummy/app/assets/javascripts/application.js
|
|
67
|
+
- test/dummy/app/assets/stylesheets/application.css
|
|
68
|
+
- test/dummy/app/controllers/application_controller.rb
|
|
69
|
+
- test/dummy/app/helpers/application_helper.rb
|
|
70
|
+
- test/dummy/app/models/message.rb
|
|
71
|
+
- test/dummy/app/models/post.rb
|
|
72
|
+
- test/dummy/app/observer/post_observer.rb
|
|
73
|
+
- test/dummy/app/views/layouts/application.html.erb
|
|
74
|
+
- test/dummy/config/application.rb
|
|
75
|
+
- test/dummy/config/boot.rb
|
|
76
|
+
- test/dummy/config/database.yml
|
|
77
|
+
- test/dummy/config/environment.rb
|
|
78
|
+
- test/dummy/config/environments/development.rb
|
|
79
|
+
- test/dummy/config/environments/production.rb
|
|
80
|
+
- test/dummy/config/environments/test.rb
|
|
81
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
82
|
+
- test/dummy/config/initializers/inflections.rb
|
|
83
|
+
- test/dummy/config/initializers/mime_types.rb
|
|
84
|
+
- test/dummy/config/initializers/secret_token.rb
|
|
85
|
+
- test/dummy/config/initializers/session_store.rb
|
|
86
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
|
87
|
+
- test/dummy/config/locales/en.yml
|
|
88
|
+
- test/dummy/config/routes.rb
|
|
89
|
+
- test/dummy/config.ru
|
|
90
|
+
- test/dummy/log/test.log
|
|
91
|
+
- test/dummy/public/404.html
|
|
92
|
+
- test/dummy/public/422.html
|
|
93
|
+
- test/dummy/public/500.html
|
|
94
|
+
- test/dummy/public/favicon.ico
|
|
95
|
+
- test/dummy/Rakefile
|
|
96
|
+
- test/dummy/README.rdoc
|
|
97
|
+
- test/dummy/script/rails
|
|
98
|
+
- test/kvbean/model/message_test.rb
|
|
99
|
+
- test/kvbean/model/post_test.rb
|
|
100
|
+
- test/kvbean/redis_test.rb
|
|
101
|
+
- test/kvbean_test.rb
|
|
102
|
+
- test/support/assertions.rb
|
|
103
|
+
- test/test_helper.rb
|
|
104
|
+
homepage: https://github.com/Sen/kvbean
|
|
105
|
+
licenses: []
|
|
106
|
+
post_install_message:
|
|
107
|
+
rdoc_options: []
|
|
108
|
+
require_paths:
|
|
109
|
+
- lib
|
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
|
+
none: false
|
|
112
|
+
requirements:
|
|
113
|
+
- - ! '>='
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '0'
|
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
|
+
none: false
|
|
118
|
+
requirements:
|
|
119
|
+
- - ! '>='
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '0'
|
|
122
|
+
requirements: []
|
|
123
|
+
rubyforge_project:
|
|
124
|
+
rubygems_version: 1.8.24
|
|
125
|
+
signing_key:
|
|
126
|
+
specification_version: 3
|
|
127
|
+
summary: Redis on ActiveRecord
|
|
128
|
+
test_files:
|
|
129
|
+
- test/dummy/app/assets/javascripts/application.js
|
|
130
|
+
- test/dummy/app/assets/stylesheets/application.css
|
|
131
|
+
- test/dummy/app/controllers/application_controller.rb
|
|
132
|
+
- test/dummy/app/helpers/application_helper.rb
|
|
133
|
+
- test/dummy/app/models/message.rb
|
|
134
|
+
- test/dummy/app/models/post.rb
|
|
135
|
+
- test/dummy/app/observer/post_observer.rb
|
|
136
|
+
- test/dummy/app/views/layouts/application.html.erb
|
|
137
|
+
- test/dummy/config/application.rb
|
|
138
|
+
- test/dummy/config/boot.rb
|
|
139
|
+
- test/dummy/config/database.yml
|
|
140
|
+
- test/dummy/config/environment.rb
|
|
141
|
+
- test/dummy/config/environments/development.rb
|
|
142
|
+
- test/dummy/config/environments/production.rb
|
|
143
|
+
- test/dummy/config/environments/test.rb
|
|
144
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
145
|
+
- test/dummy/config/initializers/inflections.rb
|
|
146
|
+
- test/dummy/config/initializers/mime_types.rb
|
|
147
|
+
- test/dummy/config/initializers/secret_token.rb
|
|
148
|
+
- test/dummy/config/initializers/session_store.rb
|
|
149
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
|
150
|
+
- test/dummy/config/locales/en.yml
|
|
151
|
+
- test/dummy/config/routes.rb
|
|
152
|
+
- test/dummy/config.ru
|
|
153
|
+
- test/dummy/log/test.log
|
|
154
|
+
- test/dummy/public/404.html
|
|
155
|
+
- test/dummy/public/422.html
|
|
156
|
+
- test/dummy/public/500.html
|
|
157
|
+
- test/dummy/public/favicon.ico
|
|
158
|
+
- test/dummy/Rakefile
|
|
159
|
+
- test/dummy/README.rdoc
|
|
160
|
+
- test/dummy/script/rails
|
|
161
|
+
- test/kvbean/model/message_test.rb
|
|
162
|
+
- test/kvbean/model/post_test.rb
|
|
163
|
+
- test/kvbean/redis_test.rb
|
|
164
|
+
- test/kvbean_test.rb
|
|
165
|
+
- test/support/assertions.rb
|
|
166
|
+
- test/test_helper.rb
|