easy_redis 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/Rakefile +5 -0
- data/easy_redis.gemspec +4 -0
- data/lib/easy_redis/initialize/active_record.rb +1 -0
- data/lib/easy_redis/version/version.rb +1 -1
- data/spec/lib/easy_redis/easy_redis_spec.rb +44 -0
- data/spec/spec_helper.rb +3 -0
- metadata +51 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2c7608b84ca28703f16633aaeab78a9147eec77
|
4
|
+
data.tar.gz: afc1463e509c5a4601848b33c95d3b57b0217338
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88fcc844f823ac8e34c87ce68254bd60b26a234b2858677305519ff6e99837865334db9348623d3543f0af382efdfe8b9ad71dbc85b2430c417f4524fe6df383
|
7
|
+
data.tar.gz: 122dc04851af1d39322b230959de780c565f2a552712ca11c32d5827cce8b778ce38e28a3fdb6342ac958f4888262d58858cbe0a29451fa87f2e43914da06f1d
|
data/.rspec
ADDED
data/Rakefile
CHANGED
data/easy_redis.gemspec
CHANGED
@@ -18,7 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = '>= 1.9.1'
|
21
22
|
spec.add_dependency "redis"
|
23
|
+
spec.add_dependency "activerecord"
|
22
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
23
25
|
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency 'rspec'
|
27
|
+
spec.add_development_dependency "pry"
|
24
28
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EasyRedis::Redis do
|
4
|
+
|
5
|
+
context 'redis method' do
|
6
|
+
it 'should return nil object if redis did not setted' do
|
7
|
+
expect(EasyRedis::Redis.redis).to eql(nil)
|
8
|
+
end
|
9
|
+
it 'should return nil object if redis did not setted' do
|
10
|
+
redis = Redis.new
|
11
|
+
EasyRedis::Redis.configure(redis: redis)
|
12
|
+
expect(EasyRedis::Redis.redis).to eql(redis)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'redis setter method' do
|
17
|
+
it 'should set redis as param' do
|
18
|
+
redis = Redis.new
|
19
|
+
EasyRedis::Redis.redis = redis
|
20
|
+
expect(EasyRedis::Redis.redis).to eql(redis)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'namespace method' do
|
25
|
+
it 'should return easyredis by default if namespace did not setted' do
|
26
|
+
expect(EasyRedis::Redis.namespace).to eql('easyredis')
|
27
|
+
end
|
28
|
+
it 'should return setted namespace if namespace setted' do
|
29
|
+
EasyRedis::Redis.configure(namespace: "namespace")
|
30
|
+
expect(EasyRedis::Redis.namespace).to eql('namespace')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'raise_non_existent_object_error? method' do
|
35
|
+
it 'should return true by default' do
|
36
|
+
expect(EasyRedis::Redis.raise_non_existent_object_error?).to eql(true)
|
37
|
+
end
|
38
|
+
it 'should return false if setted as false' do
|
39
|
+
EasyRedis::Redis.configure(raise_non_existent_object_error: false)
|
40
|
+
expect(EasyRedis::Redis.raise_non_existent_object_error?).to eql(false)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Emin İNAÇ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activerecord
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,34 @@ dependencies:
|
|
52
66
|
- - '>='
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
55
97
|
description: Creates getter and setter methods for redis store.
|
56
98
|
email:
|
57
99
|
- mehmetemininac@gmail.com
|
@@ -60,6 +102,7 @@ extensions: []
|
|
60
102
|
extra_rdoc_files: []
|
61
103
|
files:
|
62
104
|
- .gitignore
|
105
|
+
- .rspec
|
63
106
|
- Gemfile
|
64
107
|
- LICENSE.txt
|
65
108
|
- README.md
|
@@ -74,6 +117,8 @@ files:
|
|
74
117
|
- lib/easy_redis/methods/methods.rb
|
75
118
|
- lib/easy_redis/methods/setters.rb
|
76
119
|
- lib/easy_redis/version/version.rb
|
120
|
+
- spec/lib/easy_redis/easy_redis_spec.rb
|
121
|
+
- spec/spec_helper.rb
|
77
122
|
homepage: http://github.com/meinac/easy_redis
|
78
123
|
licenses:
|
79
124
|
- MIT
|
@@ -86,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
131
|
requirements:
|
87
132
|
- - '>='
|
88
133
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
134
|
+
version: 1.9.1
|
90
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
136
|
requirements:
|
92
137
|
- - '>='
|
@@ -98,4 +143,6 @@ rubygems_version: 2.0.3
|
|
98
143
|
signing_key:
|
99
144
|
specification_version: 4
|
100
145
|
summary: Less coding for redis store
|
101
|
-
test_files:
|
146
|
+
test_files:
|
147
|
+
- spec/lib/easy_redis/easy_redis_spec.rb
|
148
|
+
- spec/spec_helper.rb
|