comfortable_mexican_sofa 1.0.20 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/comfortable_mexican_sofa.gemspec +1 -1
- data/lib/tasks/comfortable_mexican_sofa.rake +11 -8
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.21
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{comfortable_mexican_sofa}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.21"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
@@ -7,10 +7,12 @@ namespace :comfortable_mexican_sofa do
|
|
7
7
|
task :check_for_requirements => :environment do |task, args|
|
8
8
|
@from = args[:from].present?? args[:from] : nil
|
9
9
|
@site = args[:to].present?? args[:to] : nil
|
10
|
-
@seed_path =
|
10
|
+
@seed_path =
|
11
|
+
ComfortableMexicanSofa.config.seed_data_path =
|
12
|
+
(args[:seed_path].present?? args[:seed_path] : nil) || ComfortableMexicanSofa.config.seed_data_path
|
11
13
|
|
12
14
|
if !@seed_path
|
13
|
-
abort '
|
15
|
+
abort 'SEED_PATH is not set. Please define where cms fixtures are located.'
|
14
16
|
end
|
15
17
|
unless File.exists?((@from && @seed_path = "#{@seed_path}/#{@from}").to_s)
|
16
18
|
abort "FROM is not properly set. Cannot find fixtures in '#{@seed_path}'"
|
@@ -27,9 +29,8 @@ namespace :comfortable_mexican_sofa do
|
|
27
29
|
puts '-----------------'
|
28
30
|
layouts = Dir.glob(File.expand_path('layouts/*.yml', @seed_path)).collect do |layout_file_path|
|
29
31
|
attributes = YAML.load_file(layout_file_path).symbolize_keys!
|
30
|
-
@site.cms_layouts.
|
32
|
+
@site.cms_layouts.load_from_file(@site, attributes[:slug])
|
31
33
|
end
|
32
|
-
|
33
34
|
CmsPage.connection.transaction do
|
34
35
|
# Fixtures are not ordered in any particular way. Saving order matters,
|
35
36
|
# so we cycle them until there nothing left to save
|
@@ -67,7 +68,7 @@ namespace :comfortable_mexican_sofa do
|
|
67
68
|
puts '---------------'
|
68
69
|
pages = Dir.glob(File.expand_path('pages/**/*.yml', @seed_path)).collect do |page_file_path|
|
69
70
|
attributes = YAML.load_file(page_file_path).symbolize_keys!
|
70
|
-
@site.cms_pages.
|
71
|
+
@site.cms_pages.load_from_file(@site, attributes[:full_path])
|
71
72
|
end
|
72
73
|
CmsPage.connection.transaction do
|
73
74
|
# Fixtures are not ordered in any particular way. Saving order matters,
|
@@ -116,7 +117,7 @@ namespace :comfortable_mexican_sofa do
|
|
116
117
|
puts '------------------'
|
117
118
|
snippets = Dir.glob(File.expand_path('snippets/*.yml', @seed_path)).collect do |snippet_file_path|
|
118
119
|
attributes = YAML.load_file(snippet_file_path).symbolize_keys!
|
119
|
-
@site.cms_snippets.
|
120
|
+
@site.cms_snippets.load_from_file(@site, attributes[:slug])
|
120
121
|
end
|
121
122
|
CmsSnippet.connection.transaction do
|
122
123
|
snippets.each do |snippet|
|
@@ -152,10 +153,12 @@ namespace :comfortable_mexican_sofa do
|
|
152
153
|
task :check_for_requirements => :environment do |task, args|
|
153
154
|
@site = args[:from].present?? args[:from] : nil
|
154
155
|
@to = args[:to].present?? args[:to] : nil
|
155
|
-
@seed_path =
|
156
|
+
@seed_path =
|
157
|
+
ComfortableMexicanSofa.config.seed_data_path =
|
158
|
+
(args[:seed_path].present?? args[:seed_path] : nil) || ComfortableMexicanSofa.config.seed_data_path
|
156
159
|
|
157
160
|
if !@seed_path
|
158
|
-
abort '
|
161
|
+
abort 'SEED_PATH is not set. Please define where cms fixtures are located.'
|
159
162
|
end
|
160
163
|
if !(@site = CmsSite.find_by_hostname(args[:from]))
|
161
164
|
abort "FROM is not properly set. Cannot find site with hostname '#{args[:from]}'"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_mexican_sofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 21
|
10
|
+
version: 1.0.21
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oleg Khabarov
|