imagine_cms 3.0.23 → 3.0.23.1
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/README.rdoc +1 -1
- data/app/assets/javascripts/builder.js +54 -19
- data/imagine_cms.gemspec +1 -1
- data/lib/imagine_cms/version.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -8,7 +8,7 @@ Working on this... it needs to be fairly resilient to hacking attempts, not a tr
|
|
8
8
|
|
9
9
|
=History and Roadmap
|
10
10
|
|
11
|
-
|
11
|
+
Imagine was created in the Rails 1.0 days, to run a large number of technically simple content-based sites (versus the one or two highly customized web applications most Rails developers were building at the time). We wanted to provide a way to create and manage static content while also allowing some automation (navigation, RSS feeds, etc.) while also allowing limitless custom development. However, because plugins/engines were quite limited in those days, Imagine was implemented by monkey-patching core parts of Rails and creating a new framework on top of Rails. Although this allowed us great insight into the inner workings of Rails (and led to a minor contribution to Rails core), this approach proved extremely difficult to port to Rails 2. Thus, sites using Imagine have been stuck on Rails 1.2 since time immemorial.
|
12
12
|
|
13
13
|
All that is now firmly in the past. By extracting Imagine functionality into a gem (a Rails Engine), we have achieved compatibility with Rails 3.2 and Ruby 1.9 and removed roadblocks to a future upgrade to Rails 4 and Ruby 2, all while remaining backwards compatible with the legacy Imagine CMS database structure.
|
14
14
|
|
@@ -1,6 +1,9 @@
|
|
1
|
-
//
|
1
|
+
// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
|
2
|
+
|
3
|
+
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
2
4
|
//
|
3
|
-
//
|
5
|
+
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
6
|
+
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
4
7
|
|
5
8
|
var Builder = {
|
6
9
|
NODEMAP: {
|
@@ -23,7 +26,7 @@ var Builder = {
|
|
23
26
|
// due to a Firefox bug
|
24
27
|
node: function(elementName) {
|
25
28
|
elementName = elementName.toUpperCase();
|
26
|
-
|
29
|
+
|
27
30
|
// try innerHTML approach
|
28
31
|
var parentTag = this.NODEMAP[elementName] || 'div';
|
29
32
|
var parentElement = document.createElement(parentTag);
|
@@ -31,21 +34,22 @@ var Builder = {
|
|
31
34
|
parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
|
32
35
|
} catch(e) {}
|
33
36
|
var element = parentElement.firstChild || null;
|
34
|
-
|
37
|
+
|
35
38
|
// see if browser added wrapping tags
|
36
|
-
if(element && (element.tagName != elementName))
|
39
|
+
if(element && (element.tagName.toUpperCase() != elementName))
|
37
40
|
element = element.getElementsByTagName(elementName)[0];
|
38
|
-
|
41
|
+
|
39
42
|
// fallback to createElement approach
|
40
43
|
if(!element) element = document.createElement(elementName);
|
41
|
-
|
44
|
+
|
42
45
|
// abort if nothing could be created
|
43
46
|
if(!element) return;
|
44
47
|
|
45
48
|
// attributes (or text)
|
46
49
|
if(arguments[1])
|
47
50
|
if(this._isStringOrNumber(arguments[1]) ||
|
48
|
-
(arguments[1] instanceof Array)
|
51
|
+
(arguments[1] instanceof Array) ||
|
52
|
+
arguments[1].tagName) {
|
49
53
|
this._children(element, arguments[1]);
|
50
54
|
} else {
|
51
55
|
var attrs = this._attributes(arguments[1]);
|
@@ -58,44 +62,75 @@ var Builder = {
|
|
58
62
|
// workaround firefox 1.0.X bug
|
59
63
|
if(!element) {
|
60
64
|
element = document.createElement(elementName);
|
61
|
-
for(attr in arguments[1])
|
65
|
+
for(attr in arguments[1])
|
62
66
|
element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
|
63
67
|
}
|
64
|
-
if(element.tagName != elementName)
|
68
|
+
if(element.tagName.toUpperCase() != elementName)
|
65
69
|
element = parentElement.getElementsByTagName(elementName)[0];
|
66
|
-
|
67
|
-
}
|
70
|
+
}
|
71
|
+
}
|
68
72
|
|
69
73
|
// text, or array of children
|
70
74
|
if(arguments[2])
|
71
75
|
this._children(element, arguments[2]);
|
72
76
|
|
73
|
-
return element;
|
77
|
+
return $(element);
|
74
78
|
},
|
75
79
|
_text: function(text) {
|
76
80
|
return document.createTextNode(text);
|
77
81
|
},
|
82
|
+
|
83
|
+
ATTR_MAP: {
|
84
|
+
'className': 'class',
|
85
|
+
'htmlFor': 'for'
|
86
|
+
},
|
87
|
+
|
78
88
|
_attributes: function(attributes) {
|
79
89
|
var attrs = [];
|
80
90
|
for(attribute in attributes)
|
81
|
-
attrs.push((attribute
|
82
|
-
'="' + attributes[attribute].toString().escapeHTML() + '"');
|
91
|
+
attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
|
92
|
+
'="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
|
83
93
|
return attrs.join(" ");
|
84
94
|
},
|
85
95
|
_children: function(element, children) {
|
96
|
+
if(children.tagName) {
|
97
|
+
element.appendChild(children);
|
98
|
+
return;
|
99
|
+
}
|
86
100
|
if(typeof children=='object') { // array can hold nodes and text
|
87
101
|
children.flatten().each( function(e) {
|
88
102
|
if(typeof e=='object')
|
89
|
-
element.appendChild(e)
|
103
|
+
element.appendChild(e);
|
90
104
|
else
|
91
105
|
if(Builder._isStringOrNumber(e))
|
92
106
|
element.appendChild(Builder._text(e));
|
93
107
|
});
|
94
108
|
} else
|
95
|
-
if(Builder._isStringOrNumber(children))
|
96
|
-
|
109
|
+
if(Builder._isStringOrNumber(children))
|
110
|
+
element.appendChild(Builder._text(children));
|
97
111
|
},
|
98
112
|
_isStringOrNumber: function(param) {
|
99
113
|
return(typeof param=='string' || typeof param=='number');
|
114
|
+
},
|
115
|
+
build: function(html) {
|
116
|
+
var element = this.node('div');
|
117
|
+
$(element).update(html.strip());
|
118
|
+
return element.down();
|
119
|
+
},
|
120
|
+
dump: function(scope) {
|
121
|
+
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
122
|
+
|
123
|
+
var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
|
124
|
+
"BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
|
125
|
+
"FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
|
126
|
+
"KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
|
127
|
+
"PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
|
128
|
+
"TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
|
129
|
+
|
130
|
+
tags.each( function(tag){
|
131
|
+
scope[tag] = function() {
|
132
|
+
return Builder.node.apply(Builder, [tag].concat($A(arguments)));
|
133
|
+
};
|
134
|
+
});
|
100
135
|
}
|
101
|
-
}
|
136
|
+
};
|
data/imagine_cms.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_dependency "aws-s3", "~> 0.6.3"
|
33
33
|
s.add_dependency "rmagick"
|
34
34
|
s.add_dependency "mini_magick", "~> 3.3"
|
35
|
-
s.add_dependency "rubyzip"
|
35
|
+
s.add_dependency "rubyzip", "< 1.0"
|
36
36
|
s.add_dependency "rinku", "~> 1.7.2"
|
37
37
|
s.add_dependency "net-dns", "~> 0.7.1"
|
38
38
|
s.add_dependency "acts_as_tree", "~> 1.1"
|
data/lib/imagine_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imagine_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.23
|
4
|
+
version: 3.0.23.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -96,17 +96,17 @@ dependencies:
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - <
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
101
|
+
version: '1.0'
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - <
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
109
|
+
version: '1.0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: rinku
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|