kuhsaft 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,15 +14,27 @@ module Kuhsaft
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def create_migration_file
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
install_migration_once 'create_kuhsaft_pages.rb'
|
18
|
+
install_migration_once 'create_kuhsaft_localized_pages.rb'
|
19
|
+
install_migration_once 'create_page_part_contents.rb'
|
20
|
+
install_migration_once 'create_assets.rb'
|
21
|
+
install_migration_once 'add_url_to_localized_pages.rb'
|
22
|
+
install_migration_once 'add_type_to_page_part_contents.rb'
|
23
|
+
install_migration_once 'add_fulltext_to_localized_page.rb'
|
24
|
+
install_migration_once 'add_page_type_to_localized_pages.rb'
|
25
|
+
install_migration_once 'add_published_at_to_localized_pages.rb'
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def install_migration_once file
|
30
|
+
end_path = File.join(Rails.root, 'db/migrate/')
|
31
|
+
end_file = File.join(end_path, file)
|
32
|
+
installed = Dir[File.join(end_path, '*.rb')].map(&:to_s).select { |f| f.include?(file) }.length > 0
|
33
|
+
if installed
|
34
|
+
log "The migration '#{file}' is already installed in '#{end_path}'"
|
35
|
+
else
|
36
|
+
migration_template(file, end_file)
|
37
|
+
end
|
26
38
|
end
|
27
39
|
end
|
28
40
|
end
|
data/lib/kuhsaft/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuhsaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Immanuel H\xC3\xA4ussermann"
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-04-
|
20
|
+
date: 2011-04-28 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|