cms-fortress 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +45 -50
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/cms-fortress.gemspec +1 -1
- data/lib/comfortable_mexican_sofa/fixture/page.rb +23 -11
- metadata +1 -1
data/Gemfile.lock
CHANGED
@@ -14,28 +14,28 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
aasm (3.
|
18
|
-
actionmailer (4.0.
|
19
|
-
actionpack (= 4.0.
|
20
|
-
mail (~> 2.5.4)
|
21
|
-
actionpack (4.0.
|
22
|
-
activesupport (= 4.0.
|
17
|
+
aasm (3.4.0)
|
18
|
+
actionmailer (4.0.10)
|
19
|
+
actionpack (= 4.0.10)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
actionpack (4.0.10)
|
22
|
+
activesupport (= 4.0.10)
|
23
23
|
builder (~> 3.1.0)
|
24
24
|
erubis (~> 2.7.0)
|
25
25
|
rack (~> 1.5.2)
|
26
26
|
rack-test (~> 0.6.2)
|
27
27
|
active_link_to (1.0.2)
|
28
28
|
actionpack
|
29
|
-
activemodel (4.0.
|
30
|
-
activesupport (= 4.0.
|
29
|
+
activemodel (4.0.10)
|
30
|
+
activesupport (= 4.0.10)
|
31
31
|
builder (~> 3.1.0)
|
32
|
-
activerecord (4.0.
|
33
|
-
activemodel (= 4.0.
|
32
|
+
activerecord (4.0.10)
|
33
|
+
activemodel (= 4.0.10)
|
34
34
|
activerecord-deprecated_finders (~> 1.0.2)
|
35
|
-
activesupport (= 4.0.
|
35
|
+
activesupport (= 4.0.10)
|
36
36
|
arel (~> 4.0.0)
|
37
37
|
activerecord-deprecated_finders (1.0.3)
|
38
|
-
activesupport (4.0.
|
38
|
+
activesupport (4.0.10)
|
39
39
|
i18n (~> 0.6, >= 0.6.9)
|
40
40
|
minitest (~> 4.2)
|
41
41
|
multi_json (~> 1.3)
|
@@ -53,16 +53,16 @@ GEM
|
|
53
53
|
activesupport (>= 3.0)
|
54
54
|
cocaine (0.5.4)
|
55
55
|
climate_control (>= 0.0.3, < 1.0)
|
56
|
-
codemirror-rails (4.
|
56
|
+
codemirror-rails (4.5)
|
57
57
|
railties (>= 3.0, < 5)
|
58
58
|
coffee-rails (4.0.1)
|
59
59
|
coffee-script (>= 2.2.0)
|
60
60
|
railties (>= 4.0.0, < 5.0)
|
61
|
-
coffee-script (2.
|
61
|
+
coffee-script (2.3.0)
|
62
62
|
coffee-script-source
|
63
63
|
execjs
|
64
|
-
coffee-script-source (1.
|
65
|
-
comfortable_mexican_sofa (1.12.
|
64
|
+
coffee-script-source (1.8.0)
|
65
|
+
comfortable_mexican_sofa (1.12.2)
|
66
66
|
active_link_to (>= 1.0.0)
|
67
67
|
bootstrap-sass (~> 3.1.0)
|
68
68
|
bootstrap_form (~> 2.1.1)
|
@@ -70,17 +70,17 @@ GEM
|
|
70
70
|
coffee-rails (>= 3.1.0)
|
71
71
|
haml-rails (>= 0.3.0)
|
72
72
|
jquery-rails (>= 3.0.0)
|
73
|
-
jquery-ui-rails (>=
|
73
|
+
jquery-ui-rails (>= 5.0.0)
|
74
74
|
kaminari (>= 0.14.0)
|
75
75
|
kramdown (>= 1.0.0)
|
76
76
|
paperclip (>= 4.0.0)
|
77
77
|
rails (>= 4.0.0)
|
78
78
|
rails-i18n (~> 4.0.0)
|
79
|
-
sass-rails (>= 4.0.
|
79
|
+
sass-rails (>= 4.0.1)
|
80
80
|
tinymce-rails (>= 4.0.0)
|
81
|
-
delayed_job (4.0.
|
81
|
+
delayed_job (4.0.3)
|
82
82
|
activesupport (>= 3.0, < 4.2)
|
83
|
-
devise (3.
|
83
|
+
devise (3.3.0)
|
84
84
|
bcrypt (~> 3.0)
|
85
85
|
orm_adapter (~> 0.1)
|
86
86
|
railties (>= 3.2.6, < 5)
|
@@ -96,24 +96,23 @@ GEM
|
|
96
96
|
activesupport (>= 4.0.1)
|
97
97
|
haml (>= 3.1, < 5.0)
|
98
98
|
railties (>= 4.0.1)
|
99
|
-
hashie (3.1
|
99
|
+
hashie (3.3.1)
|
100
100
|
hike (1.2.3)
|
101
|
-
i18n (0.6.
|
102
|
-
jquery-rails (3.1.
|
101
|
+
i18n (0.6.11)
|
102
|
+
jquery-rails (3.1.2)
|
103
103
|
railties (>= 3.0, < 5.0)
|
104
104
|
thor (>= 0.14, < 2.0)
|
105
|
-
jquery-ui-rails (
|
105
|
+
jquery-ui-rails (5.0.0)
|
106
106
|
railties (>= 3.2.16)
|
107
107
|
json (1.8.1)
|
108
108
|
kaminari (0.16.1)
|
109
109
|
actionpack (>= 3.0.0)
|
110
110
|
activesupport (>= 3.0.0)
|
111
|
-
kramdown (1.4.
|
112
|
-
mail (2.
|
113
|
-
mime-types (
|
114
|
-
|
115
|
-
|
116
|
-
minitest (4.7.3)
|
111
|
+
kramdown (1.4.1)
|
112
|
+
mail (2.6.1)
|
113
|
+
mime-types (>= 1.16, < 3)
|
114
|
+
mime-types (2.3)
|
115
|
+
minitest (4.7.5)
|
117
116
|
minitest-rails (1.0.1)
|
118
117
|
minitest (~> 4.7)
|
119
118
|
minitest-test (~> 1.0)
|
@@ -130,36 +129,35 @@ GEM
|
|
130
129
|
minitest (~> 4.0)
|
131
130
|
multi_json (1.10.1)
|
132
131
|
orm_adapter (0.5.0)
|
133
|
-
paperclip (4.
|
132
|
+
paperclip (4.2.0)
|
134
133
|
activemodel (>= 3.0.0)
|
135
134
|
activesupport (>= 3.0.0)
|
136
135
|
cocaine (~> 0.5.3)
|
137
136
|
mime-types
|
138
|
-
polyglot (0.3.5)
|
139
137
|
powerbar (1.0.11)
|
140
138
|
ansi (~> 1.4.0)
|
141
139
|
hashie (>= 1.1.0)
|
142
140
|
rack (1.5.2)
|
143
141
|
rack-test (0.6.2)
|
144
142
|
rack (>= 1.0)
|
145
|
-
rails (4.0.
|
146
|
-
actionmailer (= 4.0.
|
147
|
-
actionpack (= 4.0.
|
148
|
-
activerecord (= 4.0.
|
149
|
-
activesupport (= 4.0.
|
143
|
+
rails (4.0.10)
|
144
|
+
actionmailer (= 4.0.10)
|
145
|
+
actionpack (= 4.0.10)
|
146
|
+
activerecord (= 4.0.10)
|
147
|
+
activesupport (= 4.0.10)
|
150
148
|
bundler (>= 1.3.0, < 2.0)
|
151
|
-
railties (= 4.0.
|
149
|
+
railties (= 4.0.10)
|
152
150
|
sprockets-rails (~> 2.0)
|
153
|
-
rails-i18n (4.0.
|
151
|
+
rails-i18n (4.0.3)
|
154
152
|
i18n (~> 0.6)
|
155
|
-
|
156
|
-
railties (4.0.
|
157
|
-
actionpack (= 4.0.
|
158
|
-
activesupport (= 4.0.
|
153
|
+
railties (~> 4.0)
|
154
|
+
railties (4.0.10)
|
155
|
+
actionpack (= 4.0.10)
|
156
|
+
activesupport (= 4.0.10)
|
159
157
|
rake (>= 0.8.7)
|
160
158
|
thor (>= 0.18.1, < 2.0)
|
161
159
|
rake (10.3.2)
|
162
|
-
rdoc (4.1.
|
160
|
+
rdoc (4.1.2)
|
163
161
|
json (~> 1.4)
|
164
162
|
sass (3.2.19)
|
165
163
|
sass-rails (4.0.3)
|
@@ -167,7 +165,7 @@ GEM
|
|
167
165
|
sass (~> 3.2.0)
|
168
166
|
sprockets (~> 2.8, <= 2.11.0)
|
169
167
|
sprockets-rails (~> 2.0)
|
170
|
-
simplecov (0.
|
168
|
+
simplecov (0.9.0)
|
171
169
|
docile (~> 1.1.0)
|
172
170
|
multi_json
|
173
171
|
simplecov-html (~> 0.8.0)
|
@@ -177,7 +175,7 @@ GEM
|
|
177
175
|
multi_json (~> 1.0)
|
178
176
|
rack (~> 1.0)
|
179
177
|
tilt (~> 1.1, != 1.3.0)
|
180
|
-
sprockets-rails (2.1.
|
178
|
+
sprockets-rails (2.1.4)
|
181
179
|
actionpack (>= 3.0)
|
182
180
|
activesupport (>= 3.0)
|
183
181
|
sprockets (~> 2.8)
|
@@ -189,10 +187,7 @@ GEM
|
|
189
187
|
railties (>= 3.1.1)
|
190
188
|
tinymce-rails-langs (4.20140129)
|
191
189
|
tinymce-rails (~> 4.0)
|
192
|
-
|
193
|
-
polyglot
|
194
|
-
polyglot (>= 0.3.1)
|
195
|
-
tzinfo (0.3.39)
|
190
|
+
tzinfo (0.3.41)
|
196
191
|
warden (1.2.3)
|
197
192
|
rack (>= 1.0)
|
198
193
|
|
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.1
|
data/cms-fortress.gemspec
CHANGED
@@ -23,11 +23,13 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
23
23
|
page.layout = site.layouts.where(:identifier => attrs['layout']).first || parent.try(:layout)
|
24
24
|
page.is_published = attrs['is_published'].nil?? true : attrs['is_published']
|
25
25
|
page.position = attrs['position'] if attrs['position']
|
26
|
-
|
26
|
+
|
27
|
+
page.cached_timeout = attrs['cached_timeout']
|
28
|
+
page.aasm_state = attrs['aasm_state']
|
29
|
+
page.published_date = attrs['published_date']
|
30
|
+
|
27
31
|
categories = attrs['categories']
|
28
32
|
|
29
|
-
page.page_workflow = Cms::PageWorkflow.new(attrs['page_workflow']) if page.page_workflow.nil?
|
30
|
-
|
31
33
|
if attrs['target_page']
|
32
34
|
self.target_pages ||= {}
|
33
35
|
self.target_pages[page] = attrs['target_page']
|
@@ -38,13 +40,23 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
38
40
|
# setting content
|
39
41
|
blocks_to_clear = page.blocks.collect(&:identifier)
|
40
42
|
blocks_attributes = [ ]
|
41
|
-
|
42
|
-
|
43
|
+
file_extentions = %w(html haml jpg png gif)
|
44
|
+
Dir.glob("#{path}/*.{#{file_extentions.join(',')}}").each do |block_path|
|
45
|
+
extention = File.extname(block_path)[1..-1]
|
46
|
+
identifier = block_path.split('/').last.gsub(/\.(#{file_extentions.join('|')})\z/, '')
|
43
47
|
blocks_to_clear.delete(identifier)
|
44
48
|
if fresh_fixture?(page, block_path)
|
49
|
+
content = case extention
|
50
|
+
when 'jpg', 'png', 'gif'
|
51
|
+
::File.open(block_path)
|
52
|
+
when 'haml'
|
53
|
+
Haml::Engine.new(::File.open(block_path).read).render.rstrip
|
54
|
+
else
|
55
|
+
::File.open(block_path).read
|
56
|
+
end
|
45
57
|
blocks_attributes << {
|
46
58
|
:identifier => identifier,
|
47
|
-
:content =>
|
59
|
+
:content => content
|
48
60
|
}
|
49
61
|
end
|
50
62
|
end
|
@@ -58,7 +70,7 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
58
70
|
if page.changed? || page.blocks_attributes_changed || self.force_import
|
59
71
|
if page.save
|
60
72
|
save_categorizations!(page, categories)
|
61
|
-
ComfortableMexicanSofa.logger.
|
73
|
+
ComfortableMexicanSofa.logger.info("[FIXTURES] Imported Page \t #{page.full_path}")
|
62
74
|
else
|
63
75
|
ComfortableMexicanSofa.logger.warn("[FIXTURES] Failed to import Page \n#{page.errors.inspect}")
|
64
76
|
end
|
@@ -89,7 +101,6 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
89
101
|
|
90
102
|
class Exporter < ComfortableMexicanSofa::Fixture::Exporter
|
91
103
|
def export!
|
92
|
-
|
93
104
|
prepare_folder!(self.path)
|
94
105
|
|
95
106
|
self.site.pages.each do |page|
|
@@ -106,7 +117,9 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
106
117
|
'categories' => page.categories.map{|c| c.label},
|
107
118
|
'is_published' => page.is_published,
|
108
119
|
'position' => page.position,
|
109
|
-
'
|
120
|
+
'cached_timeout' => page.cached_timeout,
|
121
|
+
'aasm_state' => page.aasm_state,
|
122
|
+
'published_date' => page.published_date
|
110
123
|
}.to_yaml)
|
111
124
|
end
|
112
125
|
page.blocks_attributes.each do |block|
|
@@ -115,9 +128,8 @@ module ComfortableMexicanSofa::Fixture::Page
|
|
115
128
|
end
|
116
129
|
end
|
117
130
|
|
118
|
-
ComfortableMexicanSofa.logger.
|
131
|
+
ComfortableMexicanSofa.logger.info("[FIXTURES] Exported Page \t #{page.full_path}")
|
119
132
|
end
|
120
133
|
end
|
121
134
|
end
|
122
135
|
end
|
123
|
-
|