trusty-cms 4.2.2 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +98 -89
  4. data/app/assets/config/trusty-cms/manifest.js +7 -0
  5. data/app/assets/javascripts/admin/custom_file_upload.js +7 -0
  6. data/app/controllers/admin/assets_controller.rb +1 -1
  7. data/app/models/page.rb +2 -2
  8. data/app/views/admin/assets/new.html.haml +2 -0
  9. data/config/database.yml +4 -0
  10. data/config/initializers/assets.rb +0 -4
  11. data/coverage/index.html +155 -155
  12. data/lib/trusty_cms.rb +1 -1
  13. data/node_modules/hosted-git-info/CHANGELOG.md +10 -0
  14. data/node_modules/hosted-git-info/index.js +2 -2
  15. data/node_modules/hosted-git-info/package.json +1 -1
  16. data/node_modules/lodash/README.md +2 -2
  17. data/node_modules/lodash/_baseClone.js +2 -1
  18. data/node_modules/lodash/_baseOrderBy.js +17 -2
  19. data/node_modules/lodash/_baseSet.js +4 -0
  20. data/node_modules/lodash/_baseSortedIndexBy.js +7 -4
  21. data/node_modules/lodash/_baseTrim.js +19 -0
  22. data/node_modules/lodash/_equalArrays.js +5 -4
  23. data/node_modules/lodash/_equalObjects.js +5 -4
  24. data/node_modules/lodash/_trimmedEndIndex.js +19 -0
  25. data/node_modules/lodash/core.js +48 -6
  26. data/node_modules/lodash/core.min.js +9 -9
  27. data/node_modules/lodash/filter.js +4 -0
  28. data/node_modules/lodash/flake.lock +40 -0
  29. data/node_modules/lodash/flake.nix +20 -0
  30. data/node_modules/lodash/lodash.js +59 -11
  31. data/node_modules/lodash/lodash.min.js +126 -125
  32. data/node_modules/lodash/matches.js +7 -0
  33. data/node_modules/lodash/matchesProperty.js +7 -0
  34. data/node_modules/lodash/overEvery.js +4 -0
  35. data/node_modules/lodash/overSome.js +7 -0
  36. data/node_modules/lodash/package.json +1 -1
  37. data/node_modules/lodash/parseInt.js +1 -1
  38. data/node_modules/lodash/release.md +48 -0
  39. data/node_modules/lodash/sortBy.js +3 -3
  40. data/node_modules/lodash/template.js +24 -5
  41. data/node_modules/lodash/toNumber.js +3 -5
  42. data/node_modules/lodash/trim.js +2 -4
  43. data/node_modules/lodash/trimEnd.js +3 -5
  44. data/node_modules/lodash/trimStart.js +1 -1
  45. data/spec/dummy/log/development.log +9 -163
  46. data/spec/dummy/log/test.log +536 -0
  47. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +333 -0
  48. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +43 -0
  49. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +11008 -0
  50. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  51. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  52. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  53. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  54. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  55. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  56. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +559 -0
  57. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +1312 -0
  58. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +18706 -0
  59. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +7 -0
  60. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +13 -0
  61. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +886 -0
  62. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +5 -0
  63. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +443 -0
  64. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +5 -0
  65. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +33 -0
  66. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +109 -0
  67. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +20 -0
  68. data/spec/dummy/node_modules/jquery-ujs/README.md +86 -0
  69. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +23 -0
  70. data/spec/dummy/node_modules/jquery-ujs/bower.json +19 -0
  71. data/spec/dummy/node_modules/jquery-ujs/package.json +26 -0
  72. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +555 -0
  73. data/spec/dummy/node_modules/jquery/AUTHORS.txt +327 -0
  74. data/spec/dummy/node_modules/jquery/LICENSE.txt +20 -0
  75. data/spec/dummy/node_modules/jquery/README.md +62 -0
  76. data/spec/dummy/node_modules/jquery/bower.json +14 -0
  77. data/spec/dummy/node_modules/jquery/dist/jquery.js +10872 -0
  78. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +2 -0
  79. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +1 -0
  80. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +8777 -0
  81. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +2 -0
  82. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +1 -0
  83. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
  84. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +2478 -0
  85. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  86. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  87. data/spec/dummy/node_modules/jquery/package.json +117 -0
  88. data/spec/dummy/node_modules/jquery/src/ajax.js +873 -0
  89. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +103 -0
  90. data/spec/dummy/node_modules/jquery/src/ajax/load.js +77 -0
  91. data/spec/dummy/node_modules/jquery/src/ajax/script.js +74 -0
  92. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +5 -0
  93. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  94. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +5 -0
  95. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +170 -0
  96. data/spec/dummy/node_modules/jquery/src/attributes.js +13 -0
  97. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +141 -0
  98. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +186 -0
  99. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +143 -0
  100. data/spec/dummy/node_modules/jquery/src/attributes/support.js +33 -0
  101. data/spec/dummy/node_modules/jquery/src/attributes/val.js +191 -0
  102. data/spec/dummy/node_modules/jquery/src/callbacks.js +236 -0
  103. data/spec/dummy/node_modules/jquery/src/core.js +400 -0
  104. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +43 -0
  105. data/spec/dummy/node_modules/jquery/src/core/access.js +72 -0
  106. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +23 -0
  107. data/spec/dummy/node_modules/jquery/src/core/init.js +129 -0
  108. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +26 -0
  109. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +13 -0
  110. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +65 -0
  111. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +30 -0
  112. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +97 -0
  113. data/spec/dummy/node_modules/jquery/src/core/ready.js +86 -0
  114. data/spec/dummy/node_modules/jquery/src/core/readyException.js +13 -0
  115. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
  116. data/spec/dummy/node_modules/jquery/src/core/support.js +20 -0
  117. data/spec/dummy/node_modules/jquery/src/core/toType.js +20 -0
  118. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +7 -0
  119. data/spec/dummy/node_modules/jquery/src/css.js +494 -0
  120. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +26 -0
  121. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +74 -0
  122. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +65 -0
  123. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +42 -0
  124. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  125. data/spec/dummy/node_modules/jquery/src/css/showHide.js +105 -0
  126. data/spec/dummy/node_modules/jquery/src/css/support.js +133 -0
  127. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +5 -0
  128. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +17 -0
  129. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  130. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +7 -0
  131. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
  132. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +26 -0
  133. data/spec/dummy/node_modules/jquery/src/data.js +180 -0
  134. data/spec/dummy/node_modules/jquery/src/data/Data.js +162 -0
  135. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +19 -0
  136. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +7 -0
  137. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +7 -0
  138. data/spec/dummy/node_modules/jquery/src/deferred.js +399 -0
  139. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
  140. data/spec/dummy/node_modules/jquery/src/deprecated.js +87 -0
  141. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +22 -0
  142. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +48 -0
  143. data/spec/dummy/node_modules/jquery/src/dimensions.js +57 -0
  144. data/spec/dummy/node_modules/jquery/src/effects.js +701 -0
  145. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +125 -0
  146. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +15 -0
  147. data/spec/dummy/node_modules/jquery/src/event.js +892 -0
  148. data/spec/dummy/node_modules/jquery/src/event/focusin.js +58 -0
  149. data/spec/dummy/node_modules/jquery/src/event/support.js +11 -0
  150. data/spec/dummy/node_modules/jquery/src/event/trigger.js +201 -0
  151. data/spec/dummy/node_modules/jquery/src/exports/amd.js +26 -0
  152. data/spec/dummy/node_modules/jquery/src/exports/global.js +34 -0
  153. data/spec/dummy/node_modules/jquery/src/jquery.js +41 -0
  154. data/spec/dummy/node_modules/jquery/src/manipulation.js +480 -0
  155. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +32 -0
  156. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +106 -0
  157. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +32 -0
  158. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
  159. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +41 -0
  160. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
  161. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +8 -0
  162. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +30 -0
  163. data/spec/dummy/node_modules/jquery/src/offset.js +238 -0
  164. data/spec/dummy/node_modules/jquery/src/queue.js +145 -0
  165. data/spec/dummy/node_modules/jquery/src/queue/delay.js +24 -0
  166. data/spec/dummy/node_modules/jquery/src/selector-native.js +241 -0
  167. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +19 -0
  168. data/spec/dummy/node_modules/jquery/src/selector.js +3 -0
  169. data/spec/dummy/node_modules/jquery/src/serialize.js +136 -0
  170. data/spec/dummy/node_modules/jquery/src/traversing.js +198 -0
  171. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +97 -0
  172. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +22 -0
  173. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
  174. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +17 -0
  175. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
  176. data/spec/dummy/node_modules/jquery/src/var/arr.js +5 -0
  177. data/spec/dummy/node_modules/jquery/src/var/class2type.js +6 -0
  178. data/spec/dummy/node_modules/jquery/src/var/document.js +5 -0
  179. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +7 -0
  180. data/spec/dummy/node_modules/jquery/src/var/flat.js +16 -0
  181. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +7 -0
  182. data/spec/dummy/node_modules/jquery/src/var/getProto.js +5 -0
  183. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +7 -0
  184. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +7 -0
  185. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +13 -0
  186. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +8 -0
  187. data/spec/dummy/node_modules/jquery/src/var/pnum.js +5 -0
  188. data/spec/dummy/node_modules/jquery/src/var/push.js +7 -0
  189. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +5 -0
  190. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +9 -0
  191. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
  192. data/spec/dummy/node_modules/jquery/src/var/slice.js +7 -0
  193. data/spec/dummy/node_modules/jquery/src/var/support.js +6 -0
  194. data/spec/dummy/node_modules/jquery/src/var/toString.js +7 -0
  195. data/spec/dummy/node_modules/jquery/src/wrap.js +78 -0
  196. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +5 -0
  197. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -0
  198. data/trusty_cms.gemspec +3 -2
  199. data/yarn.lock +9 -9
  200. metadata +354 -50
@@ -5,6 +5,10 @@ var arraySome = require('./_arraySome'),
5
5
  * Creates a function that checks if **any** of the `predicates` return
6
6
  * truthy when invoked with the arguments it receives.
7
7
  *
8
+ * Following shorthands are possible for providing predicates.
9
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
10
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
11
+ *
8
12
  * @static
9
13
  * @memberOf _
10
14
  * @since 4.0.0
@@ -24,6 +28,9 @@ var arraySome = require('./_arraySome'),
24
28
  *
25
29
  * func(NaN);
26
30
  * // => false
31
+ *
32
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
33
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
27
34
  */
28
35
  var overSome = createOver(arraySome);
29
36
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lodash",
3
- "version": "4.17.19",
3
+ "version": "4.17.21",
4
4
  "description": "Lodash modular utilities.",
5
5
  "keywords": "modules, stdlib, util",
6
6
  "homepage": "https://lodash.com/",
@@ -1,7 +1,7 @@
1
1
  var root = require('./_root'),
2
2
  toString = require('./toString');
3
3
 
4
- /** Used to match leading and trailing whitespace. */
4
+ /** Used to match leading whitespace. */
5
5
  var reTrimStart = /^\s+/;
6
6
 
7
7
  /* Built-in method references for those with the same name as other `lodash` methods. */
@@ -0,0 +1,48 @@
1
+ npm run build
2
+ npm run doc
3
+ npm i
4
+ git clone --depth=10 --branch=master git@github.com:lodash-archive/lodash-cli.git ./node_modules/lodash-cli
5
+ mkdir -p ./node_modules/lodash-cli/node_modules/lodash; cd $_; cp ../../../../lodash.js ./lodash.js; cp ../../../../package.json ./package.json
6
+ cd ../../; npm i --production; cd ../../
7
+ node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
8
+ node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
9
+ cp lodash.js npm-package/lodash.js
10
+ cp dist/lodash.min.js npm-package/lodash.min.js
11
+ cp LICENSE npm-package/LICENSE
12
+
13
+ 1. Clone two repos
14
+ Bump lodash version in package.json, readme, package=locak, lodash.js
15
+ npm run build
16
+ npm run doc
17
+
18
+ 2. update mappings in ldoash-cli
19
+ 3. copy ldoash into lodash-cli node modules and package json.
20
+
21
+ node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
22
+ node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
23
+
24
+
25
+
26
+ 1. Clone the two repositories:
27
+ ```sh
28
+ $ git clone https://github.com/lodash/lodash.git
29
+ $ git clone https://github.com/bnjmnt4n/lodash-cli.git
30
+ ```
31
+ 2. Update lodash-cli to accomdate changes in lodash source. This can typically involve adding new function dependency mappings in lib/mappings.js. Sometimes, additional changes might be needed for more involved functions.
32
+ 3. In the lodash repository, update references to the lodash version in README.md, lodash.js, package.jsona nd package-lock.json
33
+ 4. Run:
34
+ ```sh
35
+ npm run build
36
+ npm run doc
37
+ node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
38
+ ```
39
+ 5. Add a commit and tag the release
40
+ mkdir ../lodash-temp
41
+ cp lodash.js dist/lodash.min.js dist/lodash.core.js dist/lodash.core.min.js ../lodash-temp/
42
+ node ../lodash-cli/bin/lodash modularize exports=node -o .
43
+ cp ../lodash-temp/lodash.core.js core.js
44
+ cp ../lodash-temp/lodash.core.min.js core.min.js
45
+ cp ../lodash-temp/lodash.js lodash.js
46
+ cp ../lodash-temp/lodash.min.js lodash.min.js
47
+
48
+ ❯ node ../lodash-cli/bin/lodash modularize exports=es -o .
@@ -22,15 +22,15 @@ var baseFlatten = require('./_baseFlatten'),
22
22
  * var users = [
23
23
  * { 'user': 'fred', 'age': 48 },
24
24
  * { 'user': 'barney', 'age': 36 },
25
- * { 'user': 'fred', 'age': 40 },
25
+ * { 'user': 'fred', 'age': 30 },
26
26
  * { 'user': 'barney', 'age': 34 }
27
27
  * ];
28
28
  *
29
29
  * _.sortBy(users, [function(o) { return o.user; }]);
30
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
30
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
31
31
  *
32
32
  * _.sortBy(users, ['user', 'age']);
33
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
33
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
34
34
  */
35
35
  var sortBy = baseRest(function(collection, iteratees) {
36
36
  if (collection == null) {
@@ -10,11 +10,26 @@ var assignInWith = require('./assignInWith'),
10
10
  templateSettings = require('./templateSettings'),
11
11
  toString = require('./toString');
12
12
 
13
+ /** Error message constants. */
14
+ var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
15
+
13
16
  /** Used to match empty string literals in compiled template source. */
14
17
  var reEmptyStringLeading = /\b__p \+= '';/g,
15
18
  reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
16
19
  reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
17
20
 
21
+ /**
22
+ * Used to validate the `validate` option in `_.template` variable.
23
+ *
24
+ * Forbids characters which could potentially change the meaning of the function argument definition:
25
+ * - "()," (modification of function parameters)
26
+ * - "=" (default value)
27
+ * - "[]{}" (destructuring of function parameters)
28
+ * - "/" (beginning of a comment)
29
+ * - whitespace
30
+ */
31
+ var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
32
+
18
33
  /**
19
34
  * Used to match
20
35
  * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
@@ -169,11 +184,11 @@ function template(string, options, guard) {
169
184
 
170
185
  // Use a sourceURL for easier debugging.
171
186
  // The sourceURL gets injected into the source that's eval-ed, so be careful
172
- // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
173
- // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
187
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
188
+ // and escape the comment, thus injecting code that gets evaled.
174
189
  var sourceURL = hasOwnProperty.call(options, 'sourceURL')
175
190
  ? ('//# sourceURL=' +
176
- (options.sourceURL + '').replace(/[\r\n]/g, ' ') +
191
+ (options.sourceURL + '').replace(/\s/g, ' ') +
177
192
  '\n')
178
193
  : '';
179
194
 
@@ -206,12 +221,16 @@ function template(string, options, guard) {
206
221
 
207
222
  // If `variable` is not specified wrap a with-statement around the generated
208
223
  // code to add the data object to the top of the scope chain.
209
- // Like with sourceURL, we take care to not check the option's prototype,
210
- // as this configuration is a code injection vector.
211
224
  var variable = hasOwnProperty.call(options, 'variable') && options.variable;
212
225
  if (!variable) {
213
226
  source = 'with (obj) {\n' + source + '\n}\n';
214
227
  }
228
+ // Throw an error if a forbidden character was found in `variable`, to prevent
229
+ // potential command injection attacks.
230
+ else if (reForbiddenIdentifierChars.test(variable)) {
231
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
232
+ }
233
+
215
234
  // Cleanup code by stripping empty strings.
216
235
  source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
217
236
  .replace(reEmptyStringMiddle, '$1')
@@ -1,12 +1,10 @@
1
- var isObject = require('./isObject'),
1
+ var baseTrim = require('./_baseTrim'),
2
+ isObject = require('./isObject'),
2
3
  isSymbol = require('./isSymbol');
3
4
 
4
5
  /** Used as references for various `Number` constants. */
5
6
  var NAN = 0 / 0;
6
7
 
7
- /** Used to match leading and trailing whitespace. */
8
- var reTrim = /^\s+|\s+$/g;
9
-
10
8
  /** Used to detect bad signed hexadecimal string values. */
11
9
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
12
10
 
@@ -56,7 +54,7 @@ function toNumber(value) {
56
54
  if (typeof value != 'string') {
57
55
  return value === 0 ? value : +value;
58
56
  }
59
- value = value.replace(reTrim, '');
57
+ value = baseTrim(value);
60
58
  var isBinary = reIsBinary.test(value);
61
59
  return (isBinary || reIsOctal.test(value))
62
60
  ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
@@ -1,13 +1,11 @@
1
1
  var baseToString = require('./_baseToString'),
2
+ baseTrim = require('./_baseTrim'),
2
3
  castSlice = require('./_castSlice'),
3
4
  charsEndIndex = require('./_charsEndIndex'),
4
5
  charsStartIndex = require('./_charsStartIndex'),
5
6
  stringToArray = require('./_stringToArray'),
6
7
  toString = require('./toString');
7
8
 
8
- /** Used to match leading and trailing whitespace. */
9
- var reTrim = /^\s+|\s+$/g;
10
-
11
9
  /**
12
10
  * Removes leading and trailing whitespace or specified characters from `string`.
13
11
  *
@@ -33,7 +31,7 @@ var reTrim = /^\s+|\s+$/g;
33
31
  function trim(string, chars, guard) {
34
32
  string = toString(string);
35
33
  if (string && (guard || chars === undefined)) {
36
- return string.replace(reTrim, '');
34
+ return baseTrim(string);
37
35
  }
38
36
  if (!string || !(chars = baseToString(chars))) {
39
37
  return string;
@@ -2,10 +2,8 @@ var baseToString = require('./_baseToString'),
2
2
  castSlice = require('./_castSlice'),
3
3
  charsEndIndex = require('./_charsEndIndex'),
4
4
  stringToArray = require('./_stringToArray'),
5
- toString = require('./toString');
6
-
7
- /** Used to match leading and trailing whitespace. */
8
- var reTrimEnd = /\s+$/;
5
+ toString = require('./toString'),
6
+ trimmedEndIndex = require('./_trimmedEndIndex');
9
7
 
10
8
  /**
11
9
  * Removes trailing whitespace or specified characters from `string`.
@@ -29,7 +27,7 @@ var reTrimEnd = /\s+$/;
29
27
  function trimEnd(string, chars, guard) {
30
28
  string = toString(string);
31
29
  if (string && (guard || chars === undefined)) {
32
- return string.replace(reTrimEnd, '');
30
+ return string.slice(0, trimmedEndIndex(string) + 1);
33
31
  }
34
32
  if (!string || !(chars = baseToString(chars))) {
35
33
  return string;
@@ -4,7 +4,7 @@ var baseToString = require('./_baseToString'),
4
4
  stringToArray = require('./_stringToArray'),
5
5
  toString = require('./toString');
6
6
 
7
- /** Used to match leading and trailing whitespace. */
7
+ /** Used to match leading whitespace. */
8
8
  var reTrimStart = /^\s+/;
9
9
 
10
10
  /**
@@ -1,3 +1,4 @@
1
+ DEPRECATION WARNING: SourceAnnotationExtractor is deprecated! Use Rails::SourceAnnotationExtractor instead. (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
1
2
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
2
3
 
3
4
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -9,163 +10,8 @@ the expected changes won't be reflected in that stale Class object.
9
10
 
10
11
  `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
11
12
 
12
- In order to autoload safely at boot time, please wrap your code in a reloader
13
- callback this way:
14
-
15
- Rails.application.reloader.to_prepare do
16
- # Autoload classes and modules needed at boot time here.
17
- end
18
-
19
- That block runs when the application boots, and every time there is a reload.
20
- For historical reasons, it may run twice, so it has to be idempotent.
21
-
22
- Check the "Autoloading and Reloading Constants" guide to learn more about how
23
- Rails autoloads and reloads.
24
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
25
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
26
-
27
- Being able to do this is deprecated. Autoloading during initialization is going
28
- to be an error condition in future versions of Rails.
29
-
30
- Reloading does not reboot the application, and therefore code executed during
31
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
32
- the expected changes won't be reflected in that stale Class object.
33
-
34
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
35
-
36
- In order to autoload safely at boot time, please wrap your code in a reloader
37
- callback this way:
38
-
39
- Rails.application.reloader.to_prepare do
40
- # Autoload classes and modules needed at boot time here.
41
- end
42
-
43
- That block runs when the application boots, and every time there is a reload.
44
- For historical reasons, it may run twice, so it has to be idempotent.
45
-
46
- Check the "Autoloading and Reloading Constants" guide to learn more about how
47
- Rails autoloads and reloads.
48
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
49
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
50
-
51
- Being able to do this is deprecated. Autoloading during initialization is going
52
- to be an error condition in future versions of Rails.
53
-
54
- Reloading does not reboot the application, and therefore code executed during
55
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
56
- the expected changes won't be reflected in that stale Class object.
57
-
58
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
59
-
60
- In order to autoload safely at boot time, please wrap your code in a reloader
61
- callback this way:
62
-
63
- Rails.application.reloader.to_prepare do
64
- # Autoload classes and modules needed at boot time here.
65
- end
66
-
67
- That block runs when the application boots, and every time there is a reload.
68
- For historical reasons, it may run twice, so it has to be idempotent.
69
-
70
- Check the "Autoloading and Reloading Constants" guide to learn more about how
71
- Rails autoloads and reloads.
72
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
73
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
74
-
75
- Being able to do this is deprecated. Autoloading during initialization is going
76
- to be an error condition in future versions of Rails.
77
-
78
- Reloading does not reboot the application, and therefore code executed during
79
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
80
- the expected changes won't be reflected in that stale Class object.
81
-
82
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
83
-
84
- In order to autoload safely at boot time, please wrap your code in a reloader
85
- callback this way:
86
-
87
- Rails.application.reloader.to_prepare do
88
- # Autoload classes and modules needed at boot time here.
89
- end
90
-
91
- That block runs when the application boots, and every time there is a reload.
92
- For historical reasons, it may run twice, so it has to be idempotent.
93
-
94
- Check the "Autoloading and Reloading Constants" guide to learn more about how
95
- Rails autoloads and reloads.
96
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
97
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
98
-
99
- Being able to do this is deprecated. Autoloading during initialization is going
100
- to be an error condition in future versions of Rails.
101
-
102
- Reloading does not reboot the application, and therefore code executed during
103
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
104
- the expected changes won't be reflected in that stale Class object.
105
-
106
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
107
-
108
- In order to autoload safely at boot time, please wrap your code in a reloader
109
- callback this way:
110
-
111
- Rails.application.reloader.to_prepare do
112
- # Autoload classes and modules needed at boot time here.
113
- end
114
-
115
- That block runs when the application boots, and every time there is a reload.
116
- For historical reasons, it may run twice, so it has to be idempotent.
117
-
118
- Check the "Autoloading and Reloading Constants" guide to learn more about how
119
- Rails autoloads and reloads.
120
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
121
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
122
-
123
- Being able to do this is deprecated. Autoloading during initialization is going
124
- to be an error condition in future versions of Rails.
125
-
126
- Reloading does not reboot the application, and therefore code executed during
127
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
128
- the expected changes won't be reflected in that stale Class object.
129
-
130
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
131
-
132
- In order to autoload safely at boot time, please wrap your code in a reloader
133
- callback this way:
134
-
135
- Rails.application.reloader.to_prepare do
136
- # Autoload classes and modules needed at boot time here.
137
- end
138
-
139
- That block runs when the application boots, and every time there is a reload.
140
- For historical reasons, it may run twice, so it has to be idempotent.
141
-
142
- Check the "Autoloading and Reloading Constants" guide to learn more about how
143
- Rails autoloads and reloads.
144
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
145
- DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
146
-
147
- Being able to do this is deprecated. Autoloading during initialization is going
148
- to be an error condition in future versions of Rails.
149
-
150
- Reloading does not reboot the application, and therefore code executed during
151
- initialization does not run again. So, if you reload TrustyCms::Config, for example,
152
- the expected changes won't be reflected in that stale Class object.
153
-
154
- `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
155
-
156
- In order to autoload safely at boot time, please wrap your code in a reloader
157
- callback this way:
158
-
159
- Rails.application.reloader.to_prepare do
160
- # Autoload classes and modules needed at boot time here.
161
- end
162
-
163
- That block runs when the application boots, and every time there is a reload.
164
- For historical reasons, it may run twice, so it has to be idempotent.
165
-
166
- Check the "Autoloading and Reloading Constants" guide to learn more about how
167
- Rails autoloads and reloads.
168
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
13
+ Please, check the "Autoloading and Reloading Constants" guide for solutions.
14
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
169
15
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
170
16
 
171
17
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -189,7 +35,7 @@ For historical reasons, it may run twice, so it has to be idempotent.
189
35
 
190
36
  Check the "Autoloading and Reloading Constants" guide to learn more about how
191
37
  Rails autoloads and reloads.
192
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
38
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
193
39
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
194
40
 
195
41
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -213,7 +59,7 @@ For historical reasons, it may run twice, so it has to be idempotent.
213
59
 
214
60
  Check the "Autoloading and Reloading Constants" guide to learn more about how
215
61
  Rails autoloads and reloads.
216
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
62
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
217
63
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
218
64
 
219
65
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -237,7 +83,7 @@ For historical reasons, it may run twice, so it has to be idempotent.
237
83
 
238
84
  Check the "Autoloading and Reloading Constants" guide to learn more about how
239
85
  Rails autoloads and reloads.
240
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
86
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
241
87
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
242
88
 
243
89
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -261,7 +107,7 @@ For historical reasons, it may run twice, so it has to be idempotent.
261
107
 
262
108
  Check the "Autoloading and Reloading Constants" guide to learn more about how
263
109
  Rails autoloads and reloads.
264
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
110
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
265
111
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
266
112
 
267
113
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -285,7 +131,7 @@ For historical reasons, it may run twice, so it has to be idempotent.
285
131
 
286
132
  Check the "Autoloading and Reloading Constants" guide to learn more about how
287
133
  Rails autoloads and reloads.
288
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
134
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)
289
135
  DEPRECATION WARNING: Initialization autoloaded the constants TrustyCms::Config, Admin, Admin::RegionsHelper, ApplicationHelper, DeviseHelper, ApplicationController, Admin::ResourceHelper, Admin::ResourceController, Admin::LayoutsHelper, Admin::LayoutsController, MultiSite::SiteChooserHelper, Admin::SnippetsController, ActionText::ContentHelper, and ActionText::TagHelper.
290
136
 
291
137
  Being able to do this is deprecated. Autoloading during initialization is going
@@ -309,4 +155,4 @@ For historical reasons, it may run twice, so it has to be idempotent.
309
155
 
310
156
  Check the "Autoloading and Reloading Constants" guide to learn more about how
311
157
  Rails autoloads and reloads.
312
- (called from <top (required)> at /Users/donavin/Documents/development/trusty-cms/spec/dummy/config/environment.rb:5)
158
+ (called from <top (required)> at /Users/greaves/Documents/Development/trusty-cms/spec/dummy/config/environment.rb:5)