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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 195815edfacb1c85290d569e268c67090b4233d4
4
- data.tar.gz: af059c901a40e331a20a992fd2c9be05c3ce8aa0
3
+ metadata.gz: e2c7608b84ca28703f16633aaeab78a9147eec77
4
+ data.tar.gz: afc1463e509c5a4601848b33c95d3b57b0217338
5
5
  SHA512:
6
- metadata.gz: c2973d34dcba12294e95a43b44ea14301007a4ba8566aa1b67df32448ab9128e7c509fc276e7a3e2c2f710a6b506fda319bae31a7e9964930c13e4b8fb5724bc
7
- data.tar.gz: 7c3648c87aab8d5578cc50d64b56adf916c93bd80fca166149a53191e1c36cb83096866a0e8b0a93df4998c8b4878b86ed4bac3942c1d83a316d8638fa694c79
6
+ metadata.gz: 88fcc844f823ac8e34c87ce68254bd60b26a234b2858677305519ff6e99837865334db9348623d3543f0af382efdfe8b9ad71dbc85b2430c417f4524fe6df383
7
+ data.tar.gz: 122dc04851af1d39322b230959de780c565f2a552712ca11c32d5827cce8b778ce38e28a3fdb6342ac958f4888262d58858cbe0a29451fa87f2e43914da06f1d
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
2
3
 
4
+ RSpec::Core::RakeTask.new
5
+
6
+ task default: :spec
7
+ task test: :spec
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
@@ -1,3 +1,4 @@
1
+ require "active_record"
1
2
  require "easy_redis/methods/methods"
2
3
 
3
4
  class ActiveRecord::Base
@@ -1,3 +1,3 @@
1
1
  module EasyRedis
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  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
@@ -0,0 +1,3 @@
1
+ require 'easy_redis'
2
+ require 'pry'
3
+ require 'redis'
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.3
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-06 00:00:00.000000000 Z
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: '0'
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