blendris 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/Manifest CHANGED
@@ -5,6 +5,7 @@ PostInstall.txt
5
5
  README.markdown
6
6
  Rakefile
7
7
  autotest/discover.rb
8
+ blendris.gemspec
8
9
  lib/blendris.rb
9
10
  lib/blendris/accessor.rb
10
11
  lib/blendris/errors.rb
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{blendris}
5
- s.version = "1.1"
5
+ s.version = "1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alex McHale"]
9
9
  s.cert_chain = ["/home/alexmchale/.ssh/gem-public_cert.pem"]
10
- s.date = %q{2010-11-05}
10
+ s.date = %q{2010-11-08}
11
11
  s.description = %q{A redis library for Ruby}
12
12
  s.email = %q{alexmchale@gmail.com}
13
13
  s.extra_rdoc_files = ["LICENSE", "README.markdown", "lib/blendris.rb", "lib/blendris/accessor.rb", "lib/blendris/errors.rb", "lib/blendris/integer.rb", "lib/blendris/list.rb", "lib/blendris/model.rb", "lib/blendris/node.rb", "lib/blendris/reference.rb", "lib/blendris/reference_base.rb", "lib/blendris/reference_set.rb", "lib/blendris/set.rb", "lib/blendris/string.rb", "lib/blendris/types.rb", "lib/blendris/utils.rb", "lib/blendris/zset.rb"]
14
- s.files = ["History.txt", "LICENSE", "Manifest", "PostInstall.txt", "README.markdown", "Rakefile", "autotest/discover.rb", "lib/blendris.rb", "lib/blendris/accessor.rb", "lib/blendris/errors.rb", "lib/blendris/integer.rb", "lib/blendris/list.rb", "lib/blendris/model.rb", "lib/blendris/node.rb", "lib/blendris/reference.rb", "lib/blendris/reference_base.rb", "lib/blendris/reference_set.rb", "lib/blendris/set.rb", "lib/blendris/string.rb", "lib/blendris/types.rb", "lib/blendris/utils.rb", "lib/blendris/zset.rb", "script/console", "script/destroy", "script/generate", "spec/integer_spec.rb", "spec/list_spec.rb", "spec/model_spec.rb", "spec/redis-tools_spec.rb", "spec/ref_spec.rb", "spec/set_spec.rb", "spec/spec_helper.rb", "spec/string_spec.rb", "spec/utils_spec.rb", "spec/zset_spec.rb", "blendris.gemspec"]
14
+ s.files = ["History.txt", "LICENSE", "Manifest", "PostInstall.txt", "README.markdown", "Rakefile", "autotest/discover.rb", "blendris.gemspec", "lib/blendris.rb", "lib/blendris/accessor.rb", "lib/blendris/errors.rb", "lib/blendris/integer.rb", "lib/blendris/list.rb", "lib/blendris/model.rb", "lib/blendris/node.rb", "lib/blendris/reference.rb", "lib/blendris/reference_base.rb", "lib/blendris/reference_set.rb", "lib/blendris/set.rb", "lib/blendris/string.rb", "lib/blendris/types.rb", "lib/blendris/utils.rb", "lib/blendris/zset.rb", "script/console", "script/destroy", "script/generate", "spec/integer_spec.rb", "spec/list_spec.rb", "spec/model_spec.rb", "spec/redis-tools_spec.rb", "spec/ref_spec.rb", "spec/set_spec.rb", "spec/spec_helper.rb", "spec/string_spec.rb", "spec/utils_spec.rb", "spec/zset_spec.rb"]
15
15
  s.homepage = %q{http://github.com/alexmchale/blendris}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Blendris", "--main", "README.markdown"]
17
17
  s.require_paths = ["lib"]
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Blendris
5
- VERSION = '1.1'
5
+ VERSION = '1.2'
6
6
  end
7
7
 
8
8
  require "redis"
@@ -52,6 +52,10 @@ module Blendris
52
52
  notify_changed
53
53
  end
54
54
 
55
+ def count
56
+ redis.llen key
57
+ end
58
+
55
59
  end
56
60
 
57
61
  end
@@ -85,6 +85,12 @@ module Blendris
85
85
  end
86
86
  end
87
87
 
88
+ def destroy
89
+ self.class.redis_symbols.keys.each { |key| self[key].clear }
90
+ redis.srem self.class.index_key, key
91
+ redis.del key
92
+ end
93
+
88
94
  class << self
89
95
 
90
96
  include RedisAccessor
@@ -86,6 +86,10 @@ module Blendris
86
86
  self.include? value
87
87
  end
88
88
 
89
+ def count
90
+ refs.count
91
+ end
92
+
89
93
  end
90
94
 
91
95
  end
@@ -52,6 +52,10 @@ module Blendris
52
52
  notify_changed
53
53
  end
54
54
 
55
+ def count
56
+ redis.scard key
57
+ end
58
+
55
59
  # Set this set's members to the intersection of this set and the given set.
56
60
  def intersect!(other)
57
61
  redis.sinterstore key, key, other.key
@@ -100,6 +100,10 @@ module Blendris
100
100
  notify_changed
101
101
  end
102
102
 
103
+ def count
104
+ redis.zcard key
105
+ end
106
+
103
107
  end
104
108
 
105
109
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blendris
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 1
9
- version: "1.1"
8
+ - 2
9
+ version: "1.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alex McHale
@@ -35,7 +35,7 @@ cert_chain:
35
35
  qyGdKMrvQEbACA==
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2010-11-05 00:00:00 -05:00
38
+ date: 2010-11-08 00:00:00 -06:00
39
39
  default_executable:
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
@@ -86,6 +86,7 @@ files:
86
86
  - README.markdown
87
87
  - Rakefile
88
88
  - autotest/discover.rb
89
+ - blendris.gemspec
89
90
  - lib/blendris.rb
90
91
  - lib/blendris/accessor.rb
91
92
  - lib/blendris/errors.rb
@@ -114,7 +115,6 @@ files:
114
115
  - spec/string_spec.rb
115
116
  - spec/utils_spec.rb
116
117
  - spec/zset_spec.rb
117
- - blendris.gemspec
118
118
  has_rdoc: true
119
119
  homepage: http://github.com/alexmchale/blendris
120
120
  licenses: []
metadata.gz.sig CHANGED
Binary file