topmodel 0.2 → 0.2.1

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: 6b8b321b0771de0cc8f8d29793630c8197e1170b
4
- data.tar.gz: 0a5f7fcbea472f2063cc57d8c1977c573a355d5c
3
+ metadata.gz: a952577926b51b8c0053be523be532428e0d221d
4
+ data.tar.gz: 41e3ed2cc74b915b7656491e14a9e7878f5d4b27
5
5
  SHA512:
6
- metadata.gz: 5cfeea8c618607147fbfa39a659e24dd4f2afa33d0d27918cf408806510bcc8f9a335ad6f2083f54b4eee18bbca357ab8800bb137e4da036b226912f0c1e31ed
7
- data.tar.gz: d3454ce5cfb68900d8299fca12ee0fe78ef20003326198151bfadcb034c56e59b6e14f9ff0095e51420d348fc009e847793af5471a443ba65f72a9987100b05c
6
+ metadata.gz: ef6417293797f7820dccc86d6db24e839455174fe1bcf9c76d5427088240e19f04ff16c6c905300ffc5ac850ccdda609d7fc228792f3e555d4ca1075de83a012
7
+ data.tar.gz: 643e7bffa6f7aa6444756e53e59ff0a4153fdfdf04eb38da776607db701428d0eb439f747927cb92a954f8262b6eca82c12b45cd0665916b9a527d316abbbbef
data/.gitignore CHANGED
@@ -0,0 +1,6 @@
1
+ dump.db
2
+ redis_test.rb
3
+ pkg
4
+ lib/supermodel/cassandra.rb
5
+ *.gem
6
+ tags
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- #TopModel a Rails 4 compatible in-memory database using ActiveModel
1
+ #TopModel is a Rails 4 compatible In-Memory Object-Relational mapper using ActiveModel
2
2
  **This gem is based on topmodel by Alex Maccaw (maccman). It includes some fixes and is updated to be compatible with Rails 4.**
3
3
 
4
4
 
@@ -15,50 +15,51 @@ http://github.com/maccman/bowline**
15
15
 
16
16
  ##Examples:
17
17
 
18
- require "topmodel"
18
+ require "topmodel"
19
+ class Test < TopModel::Base
20
+ end
19
21
 
20
- class Test < TopModel::Base
21
- end
22
+ t = Test.new
23
+ t.name = "foo"
24
+ t.save #=> true
22
25
 
23
- t = Test.new
24
- t.name = "foo"
25
- t.save #=> true
26
-
27
- Test.all
28
- Test.first
29
- Test.last
30
- Test.find_by_name('foo)
26
+ Test.all
27
+ Test.first
28
+ Test.last
29
+ Test.find_by_name('foo)
31
30
 
32
31
  You can use a random ID rather than the object ID:
33
32
 
34
- class Test < TopModel::Base
35
- include TopModel::RandomID
36
- end
33
+ class Test < TopModel::Base
34
+ include TopModel::RandomID
35
+ end
37
36
 
38
- t = Test.create(:name => "test")
39
- t.id #=> "7ee935377bb4aecc54ad4f9126"
37
+ t = Test.create(:name => "test")
38
+ t.id #=> "7ee935377bb4aecc54ad4f9126"
40
39
 
41
40
  You can marshal objects to disk on startup/shutdown
42
41
 
43
- class Test < TopModel::Base
44
- include TopModel::Marshal::Model
45
- end
42
+ class Test < TopModel::Base
43
+ include TopModel::Marshal::Model
44
+ end
46
45
 
47
- TopModel::Marshal.path = "dump.db"
48
- TopModel::Marshal.load
46
+ TopModel::Marshal.path = "dump.db"
47
+ TopModel::Marshal.load
49
48
 
50
- at_exit {
51
- TopModel::Marshal.dump
52
- }
49
+ at_exit {
50
+ TopModel::Marshal.dump
51
+ }
53
52
 
54
53
  You can use Redis, you need the Redis gem installed:
55
54
 
56
- require "redis"
57
- class Test < TopModel::Base
58
- include TopModel::Redis::Model
59
-
60
- attributes :name
61
- indexes :name
62
- end
55
+ require "redis"
56
+ class Test < TopModel::Base
57
+ include TopModel::Redis::Model
58
+ attributes :name
59
+ indexes :name
60
+ end
63
61
 
64
- Test.find_or_create_by_name("foo")
62
+ Test.find_or_create_by_name("foo")
63
+
64
+
65
+ ;-)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2
1
+ 0.2.1
@@ -22,7 +22,7 @@ module TopModel
22
22
  end
23
23
 
24
24
  def redis
25
- @redis ||= ::Redis.connect(redis_options)
25
+ @redis ||= ::Redis.new(redis_options)
26
26
  end
27
27
 
28
28
  def indexes(*indexes)
@@ -166,4 +166,4 @@ module TopModel
166
166
  end
167
167
  end
168
168
  end
169
- end
169
+ end
data/topmodel.gemspec CHANGED
@@ -5,13 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{topmodel}
8
- s.version = "0.2"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Alex MacCaw", "Alex Ebeling-Hoppe"]
11
+ s.authors = ["Alex Ebeling-Hoppe", "Alex MacCaw", "Jai-gouk Kim", "Mateusz D", "Denis Tierno"]
12
12
  s.date = %q{2014-04-03}
13
- s.description = %q{In memory DB using ActiveModel}
14
- s.email = %q{info@eribium.org}
13
+ s.licenses = ['MIT']
14
+ s.description = %q{TopModel is a Rails 4 compatible In-Memory Object-Relational mapper using ActiveModel}
15
+ s.homepage = %q{https://github.com/agilastic/topmodel}
16
+ s.email = %q{ebeling-hoppe@agilastic.de}
15
17
  s.extra_rdoc_files = [
16
18
  "README.md"
17
19
  ]
@@ -41,7 +43,7 @@ Gem::Specification.new do |s|
41
43
  s.rdoc_options = ["--charset=UTF-8"]
42
44
  s.require_paths = ["lib"]
43
45
  s.rubygems_version = %q{1.3.7}
44
- s.summary = %q{In memory DB using ActiveModel}
46
+ s.summary = %q{TopModel is a Rails 4 compatible In-Memory Object-Relational mapper using ActiveModel}
45
47
 
46
48
  if s.respond_to? :specification_version then
47
49
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
metadata CHANGED
@@ -1,11 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topmodel
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Alex MacCaw
8
7
  - Alex Ebeling-Hoppe
8
+ - Alex MacCaw
9
+ - Jai-gouk Kim
10
+ - Mateusz D
11
+ - Denis Tierno
9
12
  autorequire:
10
13
  bindir: bin
11
14
  cert_chain: []
@@ -31,8 +34,9 @@ dependencies:
31
34
  - - "<="
32
35
  - !ruby/object:Gem::Version
33
36
  version: 4.0.3
34
- description: In memory DB using ActiveModel
35
- email: info@eribium.org
37
+ description: TopModel is a Rails 4 compatible In-Memory Object-Relational mapper using
38
+ ActiveModel
39
+ email: ebeling-hoppe@agilastic.de
36
40
  executables: []
37
41
  extensions: []
38
42
  extra_rdoc_files:
@@ -58,8 +62,9 @@ files:
58
62
  - lib/topmodel/validations.rb
59
63
  - lib/topmodel/validations/uniqueness.rb
60
64
  - topmodel.gemspec
61
- homepage:
62
- licenses: []
65
+ homepage: https://github.com/agilastic/topmodel
66
+ licenses:
67
+ - MIT
63
68
  metadata: {}
64
69
  post_install_message:
65
70
  rdoc_options:
@@ -81,5 +86,6 @@ rubyforge_project:
81
86
  rubygems_version: 2.2.2
82
87
  signing_key:
83
88
  specification_version: 3
84
- summary: In memory DB using ActiveModel
89
+ summary: TopModel is a Rails 4 compatible In-Memory Object-Relational mapper using
90
+ ActiveModel
85
91
  test_files: []