datum 0.8.2 → 0.8.3
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/lib/datum/enable_task.rb +13 -11
- data/lib/datum/verification_task.rb +15 -9
- data/lib/datum/version.rb +7 -2
- metadata +3 -3
data/lib/datum/enable_task.rb
CHANGED
@@ -30,6 +30,18 @@ module Datum
|
|
30
30
|
puts " Datum enabled.\n "
|
31
31
|
end
|
32
32
|
|
33
|
+
def create_directories
|
34
|
+
@@directories = ["#{@@datum_drop_path}/fixtures",
|
35
|
+
"#{@@datum_drop_path}/locals", "#{@@datum_drop_path}/migrate",
|
36
|
+
"#{@@datum_drop_path}/models"]
|
37
|
+
|
38
|
+
@@directories.each {
|
39
|
+
|path| FileUtils.mkdir_p(path) if !File::directory?(path)
|
40
|
+
}
|
41
|
+
|
42
|
+
puts " Datum directories created."
|
43
|
+
end
|
44
|
+
|
33
45
|
private
|
34
46
|
@@use_verification = @@ask_user = true
|
35
47
|
@@directories = @@application_path = @@info = nil
|
@@ -42,17 +54,7 @@ module Datum
|
|
42
54
|
#@@datum_drop_path.gsub(Regexp.new("\\/"), "\\/")
|
43
55
|
#"config.autoload_paths.*#{encoded_path}\/models"
|
44
56
|
|
45
|
-
|
46
|
-
@@directories = ["#{@@datum_drop_path}/fixtures",
|
47
|
-
"#{@@datum_drop_path}/locals", "#{@@datum_drop_path}/migrate",
|
48
|
-
"#{@@datum_drop_path}/models"]
|
49
|
-
|
50
|
-
@@directories.each {
|
51
|
-
|path| FileUtils.mkdir_p(path) if !File::directory?(path)
|
52
|
-
}
|
53
|
-
|
54
|
-
puts " Datum directories created."
|
55
|
-
end
|
57
|
+
|
56
58
|
|
57
59
|
def notify_check
|
58
60
|
@@update_yml = need_yml?
|
@@ -74,7 +74,9 @@ module Datum
|
|
74
74
|
DatumVersion.create([
|
75
75
|
{:version => "0.0.1"},
|
76
76
|
{:version => "0.8.0"},
|
77
|
-
{:version => "0.8.1"}
|
77
|
+
{:version => "0.8.1"},
|
78
|
+
{:version => "0.8.2"},
|
79
|
+
{:version => "0.8.3"}])
|
78
80
|
end
|
79
81
|
|
80
82
|
def exec_test
|
@@ -89,6 +91,12 @@ module Datum
|
|
89
91
|
end
|
90
92
|
|
91
93
|
def copy_verification_files
|
94
|
+
# need to make sure all existing fixtures are moved to prevent
|
95
|
+
# overwritting or unwanted data in verification process
|
96
|
+
FileUtils.cp_r "#{@@local_path}", "#{@@datum_tmp}"
|
97
|
+
FileUtils.remove_dir "#{@@local_path}"
|
98
|
+
(Datum::EnableTask.new).create_directories
|
99
|
+
|
92
100
|
FileUtils.cp_r @@migration_src, "#{@@local_path}/migrate"
|
93
101
|
FileUtils.cp_r @@model_src, "#{@@local_path}/models"
|
94
102
|
FileUtils.cp_r @@test_src, "#{@@unit_dir}"
|
@@ -96,20 +104,18 @@ module Datum
|
|
96
104
|
|
97
105
|
# delete: the migration, the fixture, the ruby file, the model
|
98
106
|
def remove_verification_files
|
99
|
-
files = ["#{@@local_path}/migrate/#{@@migration_file}",
|
100
|
-
"#{@@local_path}/fixtures/#{@@fixture_file}",
|
101
|
-
"#{@@local_path}/locals/#{@@ruby_file}",
|
102
|
-
"#{@@local_path}/models/#{@@model_file}", @@test_drop]
|
103
107
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
}
|
108
|
+
# need to move fixtures back
|
109
|
+
FileUtils.remove_dir "#{@@local_path}"
|
110
|
+
FileUtils.cp_r "#{@@datum_tmp}", "#{@@local_path}"
|
111
|
+
FileUtils.remove_dir "#{@@datum_tmp}"
|
112
|
+
|
108
113
|
end
|
109
114
|
|
110
115
|
private
|
111
116
|
@@ask_user = true
|
112
117
|
@@local_path = "#{Rails.root}/test/lib/datum"
|
118
|
+
@@datum_tmp = "#{Rails.root}/test/lib/datum_tmp"
|
113
119
|
@@gem_path = File.expand_path(File.dirname(__FILE__))
|
114
120
|
@@migration_file = "20120726105125_create_datum_versions.rb"
|
115
121
|
@@version_str = "DatumVersion"
|
data/lib/datum/version.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
module Datum
|
2
|
-
VERSION = "0.8.
|
2
|
+
VERSION = "0.8.3"
|
3
3
|
end
|
4
4
|
|
5
|
+
## 0.8.1
|
5
6
|
## Added datum:db:verify to simplify detecting pre-release holes in config
|
6
|
-
## Added tests to formally sign-off datum releases
|
7
|
+
## Added tests to formally sign-off datum releases (not complete)
|
8
|
+
## 0.8.2
|
9
|
+
## Fixed errors in verification / environment
|
10
|
+
## 0.8.3
|
11
|
+
## Added functionality in verification to handle existing datum files
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash:
|
109
|
+
hash: 3533206801691062155
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash:
|
118
|
+
hash: 3533206801691062155
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
121
|
rubygems_version: 1.8.24
|