dm-is-versioned 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -1
- data/Rakefile +1 -1
- data/lib/dm-is-versioned/is/version.rb +1 -1
- data/lib/dm-is-versioned.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/versioned_spec.rb +29 -0
- data/tasks/spec.rb +1 -1
- metadata +4 -4
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ AUTHOR = 'Bernerd Schaefer'
|
|
12
12
|
EMAIL = 'bernerd [a] wieck [d] com'
|
13
13
|
GEM_NAME = 'dm-is-versioned'
|
14
14
|
GEM_VERSION = DataMapper::Is::Versioned::VERSION
|
15
|
-
GEM_DEPENDENCIES = [['dm-core',
|
15
|
+
GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]]
|
16
16
|
GEM_CLEAN = %w[ log pkg coverage ]
|
17
17
|
GEM_EXTRAS = { :has_rdoc => true, :extra_rdoc_files => %w[ README.txt LICENSE TODO History.txt ] }
|
18
18
|
|
data/lib/dm-is-versioned.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/versioned_spec.rb
CHANGED
@@ -18,6 +18,35 @@ class Story
|
|
18
18
|
end
|
19
19
|
|
20
20
|
if HAS_SQLITE3 || HAS_MYSQL || HAS_POSTGRES
|
21
|
+
describe 'DataMapper' do
|
22
|
+
describe "#auto_migrate!" do
|
23
|
+
before do
|
24
|
+
# I *think* AutoMigrator breaks toplevel auto_migrate
|
25
|
+
# into two calls to reduce redundancy, so auto_migrate!
|
26
|
+
# never actually gets called on decendents after a
|
27
|
+
# DataMapper.auto_migrate! call.
|
28
|
+
Story::Version.should_receive(:auto_migrate_down!)
|
29
|
+
Story::Version.should_receive(:auto_migrate_up!)
|
30
|
+
end
|
31
|
+
it "should get called on a versioned inner class" do
|
32
|
+
DataMapper.auto_migrate!
|
33
|
+
end
|
34
|
+
end # #auto_migrate!
|
35
|
+
|
36
|
+
describe "#auto_upgrade!" do
|
37
|
+
before do
|
38
|
+
# AutoMigrator collects all descendents, triggering once
|
39
|
+
# but triggers a second time after Story gets upgraded.
|
40
|
+
# Since it's non-destructive, shouldn't matter that it
|
41
|
+
# gets called twice though.
|
42
|
+
Story::Version.should_receive(:auto_upgrade!).twice
|
43
|
+
end
|
44
|
+
it "should get called on a versioned inner class" do
|
45
|
+
DataMapper.auto_upgrade!
|
46
|
+
end
|
47
|
+
end # #auto_upgrade!
|
48
|
+
end
|
49
|
+
|
21
50
|
describe 'DataMapper::Is::Versioned' do
|
22
51
|
describe "inner class" do
|
23
52
|
it "should be present" do
|
data/tasks/spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-is-versioned
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernerd Schaefer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-03-29 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -18,9 +18,9 @@ dependencies:
|
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.11
|
24
24
|
version:
|
25
25
|
description: DataMapper plugin enabling simple versioning of models
|
26
26
|
email:
|