mem_model 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjE0N2IyYTEwODVjYjExZDIxMzllMDIyMzk2ZDI2MzhiYjU5ZWY0Yw==
4
+ MzRhNWZjNTkwOWFiYWVjNzNjNzdkNTNjZDVkYWRjNTRiOWE5YWEzZQ==
5
5
  data.tar.gz: !binary |-
6
- YWVkM2FhMTUzOTlhODYwMjQ2NDRlN2M2MzMxYjc2MzMzNjY4NGE4YQ==
6
+ NWIwNDI4NWZmZDU1Y2EyMjJlMzA3ZTZhYTQ2OGM2Y2FmNGVmY2M0Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDlmOTM3M2VkZWJkYjdmYjg0MWFlZWU1YjcxYWRjZDA0MTk2ZTM1NGE4NGQy
10
- MTdhODRmMmExM2M3NGM0ZTY3NmUyZGNmMWFiN2NkOTBhYjQ0ZDQxZDdiOGE1
11
- NWEyOTA0MmUzYmQzNjgyOTU0YjhlYzg5NjI5M2I4ZWZiZjUxODM=
9
+ YjQxNjZiY2UyNWUyMWVmYTJkOTBkMDgzN2JlZWFjMGMzMjU5NjZjMDJiNzlk
10
+ MjZjNmY3ZjNhNDI1ZGZlMGM1NWE1MDZjYzY2ZDBmMTNkNDMwMmU2MjAzMTFm
11
+ ODNjMGE1MDgxMWZiNTJlNjQ0ZDAyZWZjOGFlODBhZmI4YjEzNjk=
12
12
  data.tar.gz: !binary |-
13
- NjljNmVmMjkwYmUyMDFlOGNhY2Y3Yzk2NjQ3NWE3ZjgwNjQ1Mzg4Zjg0MmRi
14
- MzIyZTNjZmQ3ODJmMzMzMDJmMjQ0YTcyNjI1ZjkzZWIzYmE1ZDcyOWM5ZWFi
15
- Yzg2MmJiNTZhNzlhMWQyZWNmMDM1MDIwMDhjNjUxMTUzNWE2MWE=
13
+ NjA0ZDQ1MWJkMGE0YTE2NGJhNmFjMjlkZDkwNDBhMDJmZmIwZTQzODM0NGJl
14
+ NjI3NGIzNzJiNTlhZGNjYTY5ZWIwNDE1ZTRkZjViYzE2M2IxZTcxZTk3ZTAw
15
+ ODk1Njc2ZjU1Nzg3NzlmY2UxYmQwYmU2Yjg2MTZiZGY2ZGQwZDM=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 0.4.0 / 2014-01-02
2
+
3
+ * 1 enhancement:
4
+
5
+ * Use class var (not class instance var) for store
6
+
7
+
1
8
  ### 0.3.0 / 2013-12-27
2
9
 
3
10
  * 1 enhancement
@@ -23,7 +23,7 @@ module MemModel
23
23
  end
24
24
 
25
25
  def store
26
- @store ||= store_class.new
26
+ @@store ||= store_class.new
27
27
  end
28
28
 
29
29
  def size
@@ -1,3 +1,3 @@
1
1
  module MemModel
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
data/mem_model.gemspec CHANGED
@@ -1,17 +1,17 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mem_model 0.3.0.20131227093624 ruby lib
2
+ # stub: mem_model 0.4.0.20140102120535 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mem_model"
6
- s.version = "0.3.0.20131227093624"
6
+ s.version = "0.4.0.20140102120535"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["JohnnyT"]
10
- s.date = "2013-12-27"
10
+ s.date = "2014-01-02"
11
11
  s.description = "MemModel persists Ruby objects using MagLev as a data storage engine. It's an ActiveModel implementation so it works stand-alone or in Rails 3 as a drop-in replacement for ActiveRecord or DataMapper. If MemModel is used in non-MagLev platforms, objects will be persisted to in-memory sets."
12
12
  s.email = ["ubergeek3141@gmail.com"]
13
13
  s.extra_rdoc_files = ["CHANGELOG.md", "CONTRIBUTING.md", "LICENSE.md", "Manifest.txt", "README.md"]
14
- s.files = [".coveralls.yml", ".gitignore", ".travis.yml", "CHANGELOG.md", "CONTRIBUTING.md", "Gemfile.ci", "LICENSE.md", "Manifest.txt", "README.md", "Rakefile", "lib/mem_model.rb", "lib/mem_model/base.rb", "lib/mem_model/guid.rb", "lib/mem_model/rooted_base.rb", "lib/mem_model/rooted_store.rb", "lib/mem_model/version.rb", "mem_model.gemspec", "test/helper.rb", "test/mem_model/test_active_model.rb", "test/mem_model/test_base.rb", "test/mem_model/test_guid.rb", "test/mem_model/test_rooted_store.rb", "test/test_version.rb", "test/mem_model/test_rooted_base.rb", "test/mem_model/test_validations.rb", "test/mem_model/test_version.rb", ".gemtest"]
14
+ s.files = [".coveralls.yml", ".gitignore", ".travis.yml", "CHANGELOG.md", "CONTRIBUTING.md", "Gemfile.ci", "LICENSE.md", "Manifest.txt", "README.md", "Rakefile", "lib/mem_model.rb", "lib/mem_model/base.rb", "lib/mem_model/concern.rb", "lib/mem_model/errors.rb", "lib/mem_model/guid.rb", "lib/mem_model/model_name.rb", "lib/mem_model/rooted_base.rb", "lib/mem_model/validations.rb", "lib/mem_model/version.rb", "mem_model.gemspec", "test/helper.rb", "test/mem_model/test_active_model.rb", "test/mem_model/test_base.rb", "test/mem_model/test_guid.rb", "test/mem_model/test_rooted_base.rb", "test/mem_model/test_validations.rb", "test/mem_model/test_version.rb", "test/support/active_model_lint.rb", ".gemtest"]
15
15
  s.homepage = "https://github.com/johnnyt/mem_model"
16
16
  s.licenses = ["MIT"]
17
17
  s.rdoc_options = ["--main", "README.md"]
@@ -18,10 +18,22 @@ class TestRootedBase < Minitest::Test
18
18
  refute Account.exists? 314159
19
19
  end
20
20
 
21
- def test_exists
22
- refute Account.exists? @account.id
23
- @account.save
24
- assert Account.exists? @account.id
21
+ if MemModel.maglev?
22
+
23
+ def test_maglev_exists
24
+ assert_raises TransactionError, 'The test Account class is transient' do
25
+ @account.save
26
+ end
27
+ end
28
+
29
+ else
30
+
31
+ def test_mri_exists
32
+ refute Account.exists? @account.id
33
+ @account.save
34
+ assert Account.exists? @account.id
35
+ end
36
+
25
37
  end
26
38
 
27
39
  def test_root_container
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mem_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JohnnyT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2014-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest