ohm 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "ohm"
3
+ s.version = "1.3.1"
4
+ s.summary = %{Object-hash mapping library for Redis.}
5
+ s.description = %Q{Ohm is a library that allows to store an object in Redis, a persistent key-value database. It includes an extensible list of validations and has very good performance.}
6
+ s.authors = ["Michel Martens", "Damian Janowski", "Cyril David"]
7
+ s.email = ["michel@soveran.com", "djanowski@dimaion.com", "me@cyrildavid.com"]
8
+ s.homepage = "http://soveran.github.com/ohm/"
9
+ s.license = "MIT"
10
+
11
+ s.files = `git ls-files`.split("\n")
12
+
13
+ s.rubyforge_project = "ohm"
14
+ s.add_dependency "redis"
15
+ s.add_dependency "nest", "~> 1.0"
16
+ s.add_dependency "scrivener", "~> 0.0.3"
17
+ s.add_development_dependency "cutest", "~> 1.1"
18
+ end
@@ -339,7 +339,7 @@ end
339
339
  setup do
340
340
  end
341
341
 
342
- test "be no leftover keys" do
342
+ test "no leftover keys" do
343
343
  class ::Foo < Ohm::Model
344
344
  attribute :name
345
345
  index :name
@@ -348,7 +348,7 @@ test "be no leftover keys" do
348
348
  assert_equal [], Ohm.redis.keys("*")
349
349
 
350
350
  Foo.create(:name => "Bar")
351
- expected = %w[Foo:1 Foo:1:_indices Foo:all Foo:id Foo:indices:name:Bar]
351
+ expected = %w[Foo:1 Foo:all Foo:id Foo:indices:name:Bar]
352
352
 
353
353
  assert expected.sort == Ohm.redis.keys("*").sort
354
354
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Martens
@@ -10,20 +10,20 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-29 00:00:00.000000000 Z
13
+ date: 2013-04-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: redis
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ! '>='
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
@@ -79,19 +79,35 @@ executables: []
79
79
  extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
+ - .gems
83
+ - .gitignore
84
+ - CHANGELOG
85
+ - LICENSE
86
+ - README.md
87
+ - Rakefile
88
+ - benchmarks/common.rb
89
+ - benchmarks/create.rb
90
+ - benchmarks/delete.rb
91
+ - examples/activity-feed.rb
92
+ - examples/chaining.rb
93
+ - examples/json-hash.rb
94
+ - examples/one-to-many.rb
95
+ - examples/philosophy.rb
96
+ - examples/redis-logging.txt
97
+ - examples/slug.rb
98
+ - examples/tagging.rb
99
+ - lib/ohm.rb
82
100
  - lib/ohm/command.rb
83
101
  - lib/ohm/json.rb
84
102
  - lib/ohm/transaction.rb
85
- - lib/ohm.rb
86
- - README.md
87
- - LICENSE
88
- - Rakefile
103
+ - ohm.gemspec
89
104
  - test/1.8.6_test.rb
90
105
  - test/association.rb
91
106
  - test/command.rb
92
107
  - test/connection.rb
93
108
  - test/core.rb
94
109
  - test/counters.rb
110
+ - test/db/.gitignore
95
111
  - test/enumerable.rb
96
112
  - test/extensibility.rb
97
113
  - test/filtering.rb
@@ -103,14 +119,13 @@ files:
103
119
  - test/list.rb
104
120
  - test/model.rb
105
121
  - test/pipeline-performance.rb
106
- - test/ranks.rb
107
- - test/setup.rb
122
+ - test/test.conf
108
123
  - test/transactions.rb
109
124
  - test/uniques.rb
110
125
  - test/validations.rb
111
- - test/test.conf
112
126
  homepage: http://soveran.github.com/ohm/
113
- licenses: []
127
+ licenses:
128
+ - MIT
114
129
  metadata: {}
115
130
  post_install_message:
116
131
  rdoc_options: []
@@ -118,17 +133,17 @@ require_paths:
118
133
  - lib
119
134
  required_ruby_version: !ruby/object:Gem::Requirement
120
135
  requirements:
121
- - - '>='
136
+ - - ! '>='
122
137
  - !ruby/object:Gem::Version
123
138
  version: '0'
124
139
  required_rubygems_version: !ruby/object:Gem::Requirement
125
140
  requirements:
126
- - - '>='
141
+ - - ! '>='
127
142
  - !ruby/object:Gem::Version
128
143
  version: '0'
129
144
  requirements: []
130
145
  rubyforge_project: ohm
131
- rubygems_version: 2.0.3
146
+ rubygems_version: 2.0.0
132
147
  signing_key:
133
148
  specification_version: 4
134
149
  summary: Object-hash mapping library for Redis.
@@ -1,21 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- __END__
4
- require File.expand_path("./helper", File.dirname(__FILE__))
5
-
6
- class Comment < Ohm::Model
7
- def self.ranks
8
- @indices ||= []
9
- end
10
-
11
- def self.rank(attribute)
12
- ranks << attribute unless ranks.include?(attribute)
13
- end
14
-
15
- def ranked?(attribute)
16
- end
17
- end
18
-
19
- setup do
20
- User.create(:email => "a@a.com")
21
- end
@@ -1,48 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- require File.expand_path("./helper", File.dirname(__FILE__))
4
-
5
- class Event < Ohm::Model
6
- attribute :name
7
- attribute :location
8
-
9
- def setup
10
- txn = Transaction.new do |t|
11
- related = nil
12
-
13
- t.watch(key[:related]) unless new?
14
-
15
- t.read do
16
- related = db.smembers(key[:related])
17
- end
18
-
19
- t.write do
20
- related.each do |k|
21
- db.del(k)
22
- end
23
-
24
- db.del(key[:related])
25
- end
26
- end
27
-
28
- __delete__.append(txn)
29
- end
30
- end
31
-
32
- test "assign attributes from the hash" do
33
- event = Event.new(:name => "Ruby Tuesday")
34
- assert_equal event.name, "Ruby Tuesday"
35
- end
36
-
37
- test "assign an ID and save the object" do
38
- event1 = Event.create(:name => "Ruby Tuesday")
39
- event2 = Event.create(:name => "Ruby Meetup")
40
-
41
- assert_equal "1", event1.id
42
- assert_equal "2", event2.id
43
- end
44
-
45
- test "save the attributes in UTF8" do
46
- event = Event.create(:name => "32° Kisei-sen")
47
- assert "32° Kisei-sen" == Event[event.id].name
48
- end