redis-file 0.4.2
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.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rspec +1 -0
- data/.travis.yml +8 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +86 -0
- data/Rakefile +27 -0
- data/lib/redis-file.rb +6 -0
- data/lib/redis-file/expiring_hash.rb +70 -0
- data/lib/redis-file/rspec.rb +23 -0
- data/lib/redis-file/sorted_set_argument_handler.rb +74 -0
- data/lib/redis-file/sorted_set_store.rb +80 -0
- data/lib/redis-file/version.rb +3 -0
- data/lib/redis-file/zset.rb +29 -0
- data/lib/redis/connection/file.rb +960 -0
- data/redis-file.gemspec +23 -0
- data/spec/compatibility_spec.rb +9 -0
- data/spec/connection_spec.rb +85 -0
- data/spec/hashes_spec.rb +182 -0
- data/spec/keys_spec.rb +248 -0
- data/spec/lists_spec.rb +195 -0
- data/spec/server_spec.rb +100 -0
- data/spec/sets_spec.rb +178 -0
- data/spec/sorted_sets_spec.rb +425 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/spec_helper_live_redis.rb +14 -0
- data/spec/strings_spec.rb +236 -0
- data/spec/transactions_spec.rb +19 -0
- data/spec/upcase_method_name_spec.rb +18 -0
- metadata +103 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RedisFile
|
4
|
+
describe "TransactionsMethods" do
|
5
|
+
before(:each) do
|
6
|
+
@client = Redis.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should mark the start of a transaction block" do
|
10
|
+
transaction = @client.multi do
|
11
|
+
@client.set("key1", "1")
|
12
|
+
@client.set("key2", "2")
|
13
|
+
@client.mget("key1", "key2")
|
14
|
+
end
|
15
|
+
|
16
|
+
transaction.should be == ["OK", "OK", ["1", "2"]]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RedisFile
|
4
|
+
describe "UPCASE method name will call downcase method" do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = Redis.new
|
8
|
+
end
|
9
|
+
|
10
|
+
it "#ZCOUNT" do
|
11
|
+
@client.ZCOUNT("key", 2, 3).should == @client.zcount("key", 2, 3)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "#ZSCORE" do
|
15
|
+
@client.ZSCORE("key", 2).should == @client.zscore("key", 2)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: redis-file
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Loureiro
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: redis
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.0.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.0.0
|
41
|
+
description: Fake (local file) driver for redis-rb. Useful for development environment
|
42
|
+
and machines without Redis.
|
43
|
+
email:
|
44
|
+
- loureirorg@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- .gitignore
|
50
|
+
- .rspec
|
51
|
+
- .travis.yml
|
52
|
+
- Gemfile
|
53
|
+
- LICENSE
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- lib/redis-file.rb
|
57
|
+
- lib/redis-file/expiring_hash.rb
|
58
|
+
- lib/redis-file/rspec.rb
|
59
|
+
- lib/redis-file/sorted_set_argument_handler.rb
|
60
|
+
- lib/redis-file/sorted_set_store.rb
|
61
|
+
- lib/redis-file/version.rb
|
62
|
+
- lib/redis-file/zset.rb
|
63
|
+
- lib/redis/connection/file.rb
|
64
|
+
- redis-file.gemspec
|
65
|
+
- spec/compatibility_spec.rb
|
66
|
+
- spec/connection_spec.rb
|
67
|
+
- spec/hashes_spec.rb
|
68
|
+
- spec/keys_spec.rb
|
69
|
+
- spec/lists_spec.rb
|
70
|
+
- spec/server_spec.rb
|
71
|
+
- spec/sets_spec.rb
|
72
|
+
- spec/sorted_sets_spec.rb
|
73
|
+
- spec/spec_helper.rb
|
74
|
+
- spec/spec_helper_live_redis.rb
|
75
|
+
- spec/strings_spec.rb
|
76
|
+
- spec/transactions_spec.rb
|
77
|
+
- spec/upcase_method_name_spec.rb
|
78
|
+
homepage: https://github.com/loureirorg/redis-file
|
79
|
+
licenses:
|
80
|
+
- MIT
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.0.7
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: Fake (local file) driver for redis-rb.
|
102
|
+
test_files: []
|
103
|
+
has_rdoc:
|