familia 0.9.1 → 0.9.3

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
  SHA256:
3
- metadata.gz: 9473b7b95d58032b285d3239087e0152918c0dea1e8c6d3345a02b636ea0b6e3
4
- data.tar.gz: 44eb92935529e962b9284954849bc8c12667636bc5379f32de57c7d6060b0ffa
3
+ metadata.gz: 41c7c66be20ea8a959ec23a2cbf7124ad7bd78e7fd63949ee97dbdee85461207
4
+ data.tar.gz: 3befcbeb6154d9efe92ec3bf519fb8e14257f7ad6b4f09a2a348782745f45374
5
5
  SHA512:
6
- metadata.gz: ac52ed32ea22521c2400dab6b9b2d195561049cc4ae652868706636ec74c6c7475e7c0bd909c32d7cc468b97bd62a1e4286f827f636d785810141b4a29ad9dd3
7
- data.tar.gz: b3d35682e4d316f58724ebae3f5731036065c3491ec1e0b661cb24c1bbceb288371290ea8d9eedb2f4b7a9adc7f0c26fb6d31c8e78dc8d45b044aa5156623971
6
+ metadata.gz: 54b20874123486ea007225c8aa5953a8d08a9682f13cec3cd208c9c73d4ec2d91a42fa13a2d81f2709e9b5977a91d169cf2e356c2975da0e752893a9305c6cfa
7
+ data.tar.gz: 6fdd2f5713f8ba9e1cfcf51bd508b28212f92ab829514bb5c78cd151c3679451ef7ac71b01930c9f2aa521178599f94fcabe3a6ec2772128dc5880167db12d91
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  ruby '>= 2.6.8'
4
4
 
5
- gem 'redis', '~> 4.8'
5
+ gem 'redis', '>= 4.8', '< 7'
6
6
  gem 'uri-redis'
7
7
  gem 'gibbler'
8
8
  gem 'storable'
data/LICENSE.txt CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2010-2011 Solutious Inc, Delano Mandelbaum
1
+ MIT License
2
+
3
+ Copyright (c) 2010-2024 Delano Mandelbaum
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
6
  of this software and associated documentation files (the "Software"), to deal
@@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
9
  copies of the Software, and to permit persons to whom the Software is
8
10
  furnished to do so, subject to the following conditions:
9
11
 
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
12
14
 
13
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :MAJOR: 0
3
3
  :MINOR: 9
4
- :PATCH: 1
4
+ :PATCH: 3
data/familia.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "familia"
3
- s.version = "0.9.1"
3
+ s.version = "0.9.3"
4
4
  s.summary = "Organize and store ruby objects in Redis"
5
5
  s.description = "Familia: #{s.summary}"
6
6
  s.authors = ["Delano Mandelbaum"]
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.8")
17
17
 
18
- s.add_dependency "redis", "~> 5.1.0"
19
- s.add_dependency "uri-redis", ">= 0.4.2"
18
+ s.add_dependency "redis", ">= 4.8", "< 7"
19
+ s.add_dependency "uri-redis", ">= 1.0.0"
20
20
  s.add_dependency "gibbler", "~> 1.0.0"
21
21
  s.add_dependency "storable", "~> 0.10.0"
22
22
  s.add_dependency "multi_json", "~> 1.15"
@@ -508,7 +508,7 @@ module Familia
508
508
  end
509
509
 
510
510
  def add *values
511
- values.flatten.compact.each { |v| redis.sadd rediskey, to_redis(v) }
511
+ values.flatten.compact.each { |v| redis.sadd? rediskey, to_redis(v) }
512
512
  update_expiration
513
513
  self
514
514
  end
data/lib/familia.rb CHANGED
@@ -86,15 +86,6 @@ module Familia
86
86
  uri &&= URI.parse uri if String === uri
87
87
  uri ||= Familia.uri
88
88
  conf = uri.conf
89
- conf[:thread_safe] = "true" unless conf.has_key?(:thread_safe)
90
- conf[:thread_safe] = conf[:thread_safe].to_s == "true"
91
- conf[:logging] = conf[:logging].to_s == "true"
92
- if conf.has_key?(:logging) && conf[:logging].to_s == "true"
93
- require 'logger'
94
- require 'log4r'
95
- @logger ||= log :DEBUG, "./familia.log"
96
- conf[:logger] = Familia.logger
97
- end
98
89
  redis = Redis.new conf
99
90
  Familia.trace :CONNECT, redis, conf.inspect, caller[0..3] if Familia.debug
100
91
  @clients[uri.serverid] = redis
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: familia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -14,30 +14,36 @@ dependencies:
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.0
19
+ version: '4.8'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4.8'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 5.1.0
32
+ version: '7'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: uri-redis
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: 0.4.2
39
+ version: 1.0.0
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: 0.4.2
46
+ version: 1.0.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: gibbler
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +93,6 @@ extensions: []
87
93
  extra_rdoc_files: []
88
94
  files:
89
95
  - ".gitignore"
90
- - CHANGES.txt
91
96
  - Gemfile
92
97
  - Gemfile.lock
93
98
  - LICENSE.txt
data/CHANGES.txt DELETED
@@ -1,117 +0,0 @@
1
- FAMILIA, CHANGES
2
-
3
-
4
- #### 0.7.1 (2011-04-09) ###############################
5
-
6
- * FIXED: Explicitly convert boolean conf options to true or false. Redis client
7
- treats "true" as false.
8
- * FIXED: Clone options for each RedisObject instance to prevent cross contamination.
9
- * CHANGE: Fix for Familia objects with custom suffixes
10
- * CHANGE: Familia::String methods that modify the key now automatically update_expiration.
11
- * CHANGE: Familia::Object.prefix replaces :: in class names with Familia.delim
12
- * CHANGE: Use Familia::Object#object_proxy instead of Familia::Object.string :object
13
- * ADDED: Familia.qnow, Familia::Object.qstamp, RedisObject#qstamp
14
- * ADDED: RedisObject option: quantize
15
- * ADDED: Familia::Object#savenx
16
- * ADDED: Can now include a Familia object in Familia::Object.index (it uses its index)
17
- * ADDED: Dependency multi_json
18
- * ADDED: Hash#to_json, Hash.from_json, Array#to_json, Array.from_json
19
- * ADDED: Familia::Object#update!
20
-
21
-
22
- #### 0.7.0 (2011-03-04) ###############################
23
-
24
- * CHANGE: Use RedisObject#multi_from_redis when possible (uses mget command)
25
- * CHANGE: No need to check if a key exists before getting it. It will be nil anyway.
26
- * ADDED: Set#randomraw
27
-
28
-
29
- #### 0.6.10 (2011-01-08) ###############################
30
-
31
- * FIXED: RedisObject#db does not set @db
32
- * CHANGE: RedisObject#to_redis returns the original String if the given value
33
- is a String, even if :class is specified.
34
- * CHANGE: Update expiration when adding to List, Set, SortedSet, and HashKey
35
- * CHANGE: Only call Familia.ld when in debug mode.
36
- * ADDED: RedisObject#rename, renamenx, persist
37
-
38
-
39
- #### 0.6.9 (2011-01-09) ###############################
40
-
41
- * ADDED: RedisObject#cache
42
- * ADDED: RedisObject#echo
43
- # ADDED: Familia.logger (new option: :logger)
44
-
45
-
46
- #### 0.6.8 (2011-01-08) ###############################
47
-
48
- * CHANGE: RedisObject#members calls compact to remove nils
49
- * ADDED: RedisObject#to_redis/from_redis print message for nils to STDERR
50
- * ADDED: RedisObjects#membersraw for List, Set, and SortedSet
51
-
52
-
53
- #### 0.6.7 (2011-01-02) ###############################
54
-
55
- * FIXED: RedisObject#ttl, grab from instance first.
56
-
57
- #### 0.6.6 (2011-01-02) ###############################
58
-
59
- * FIXED: Classes that include Familia now use the suffix defined for that class.
60
- * FIXED: Familia::String#value= calls update_expiration
61
- * CHANGE: RedisObject classes grab the ttl from @opts[:class]
62
- * ADDED: Familia.classes can return RedisObject.classes
63
-
64
-
65
- #### 0.6.4 (2010-12-31) ###############################
66
-
67
- * CHANGE: initialize does not call from_array (fix for Storable 0.8.6)
68
-
69
- #### 0.6.3 (2010-12-30) ###############################
70
-
71
- * FIXED: HashKey#update
72
- * FIXED: count in List#members, SortedSed#members
73
- * ADDED: List#add
74
-
75
-
76
- #### 0.6.2 (2010-12-29) ###############################
77
-
78
- * FIXED: Familia::ClassMethods.ttl=
79
- * FIXED: Familia.class_lists (etc) methods.
80
- * FIXED: Redis objects check if parent is a Module
81
- * CHANGE: redis_objects, class_redis_objects maintain order they're defined in. (See Bluth::Queue)
82
- * CHANGE: Depends on Storable 0.8.4
83
- * CHANGE: FamiliaObject.instances is now a sorted set
84
- * ADDED: InstanceMethods#initialize calls init if available
85
- * ADDED: Can set index values via InstanceMethods#index=
86
- * ADDED: empty? method for List, Set, et al
87
- * ADDED: :extend option for RedisObject instances
88
- * ADDED: :reference option for storing the index value instead of the marshaled value
89
-
90
-
91
- #### 0.6.1 (2010-12-18) ###############################
92
-
93
- * CHANGE: Default initialize method calls initialize_redis_objects before super
94
- * CHANGE: Familia::String: lazy-set default value
95
- * ADDED: Familia.index can accept an Array of field names
96
- * ADDED: Support for using redis objects directly
97
- * ADDED RedisObject.ttl, RedisObject.db
98
- * ADDED: Familia classes maintain a set of instances (by index) which is updated
99
- automatically anytime an instance is saved or destroyed.
100
-
101
-
102
- #### 0.6.0 (2010-12-10) ###############################
103
-
104
- NOTE: Mucho refactoring. 0.6 syntax is not compatible with previous versions.
105
-
106
- CHANGE: All methods name "key" are now "rediskey"
107
- CHANGE: Familia#destroy! no longer takes a suffix argument. It now deletes
108
- the object and all suffixes. See destroy.
109
- CHANGE: Redis Object class methods now take the following args: name, options={}
110
- CHANGE: Familia class suffixes are now derived from redis_objects
111
- ADDED: Familia#destroy deletes just the object.
112
-
113
-
114
- #### 0.5.3 (2010-12-10) ###############################
115
-
116
- Initial public release
117
-