locomotivecms_wagon 1.3.1 → 1.3.2
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.
- checksums.yaml +4 -4
- data/generators/bootstrap3/app/views/pages/index.liquid +6 -5
- data/generators/bootstrap3/app/views/pages/index.liquid.haml +6 -4
- data/generators/bootstrap3/config/site.yml.tt +21 -7
- data/generators/bootstrap3/public/samples/{apple-touch-icon-114-precomposed.png → apple-touch-icon-114x114-precomposed.png} +0 -0
- data/generators/bootstrap3/public/samples/{apple-touch-icon-144-precomposed.png → apple-touch-icon-144x144-precomposed.png} +0 -0
- data/generators/bootstrap3/public/samples/{apple-touch-icon-72-precomposed.png → apple-touch-icon-72x72-precomposed.png} +0 -0
- data/generators/bootstrap3/public/samples/{apple-touch-icon-57-precomposed.png → apple-touch-icon-precomposed.png} +0 -0
- data/generators/content_type/data/%name%.yml.tt +2 -2
- data/lib/locomotive/wagon/generators/snippet.rb +4 -2
- data/lib/locomotive/wagon/liquid/tags/link_to.rb +2 -2
- data/lib/locomotive/wagon/liquid/tags/nav.rb +1 -1
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +1 -1
- data/spec/fixtures/default/app/views/pages/index.liquid.haml +2 -0
- data/spec/integration/server/basic_spec.rb +14 -0
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76b2020908c1a171019f9559425d9cd3765ca893
|
|
4
|
+
data.tar.gz: 87806b21c18e81bb3c7e1ffe89fc62cef2737398
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0af0ad2b617f60e733a1bf04e6fb414246507e1468957176f4653740e6c7b9d2f71db7e15e1a808d1b707681d88563c885e5ca78f858205b908705c0609282f1
|
|
7
|
+
data.tar.gz: 971d7d9f06a6e68a3d93d52d577880b5e0d38e35fc2eebc9bf664e9d23d7b9bb67b5f323fbfafa9d5c7d992ba11f62c46f0287a6086f04303bc5b601279f9fef
|
|
@@ -15,10 +15,11 @@ published: true
|
|
|
15
15
|
<!--[if lt IE 9]>
|
|
16
16
|
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
17
17
|
<![endif]-->
|
|
18
|
-
<link rel="shortcut icon" href="/samples/favicon.
|
|
19
|
-
<link rel="apple-touch-icon" href="/samples/apple-touch-icon.png">
|
|
20
|
-
<link rel="apple-touch-icon" sizes="
|
|
21
|
-
<link rel="apple-touch-icon" sizes="
|
|
18
|
+
<link rel="shortcut icon" href="/samples/favicon.png">
|
|
19
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/samples/apple-touch-icon-144x144-precomposed.png">
|
|
20
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/samples/apple-touch-icon-114x114-precomposed.png">
|
|
21
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/samples/apple-touch-icon-72x72-precomposed.png">
|
|
22
|
+
<link rel="apple-touch-icon-precomposed" href="/samples/apple-touch-icon-precomposed.png">
|
|
22
23
|
<!-- CSS code from Bootply.com editor -->
|
|
23
24
|
<style type="text/css">
|
|
24
25
|
@media screen and (min-width: 992px) {
|
|
@@ -776,4 +777,4 @@ published: true
|
|
|
776
777
|
});
|
|
777
778
|
</script>
|
|
778
779
|
</body>
|
|
779
|
-
</html>
|
|
780
|
+
</html>
|
|
@@ -15,10 +15,12 @@ published: true
|
|
|
15
15
|
{{ 'bootstrap.css' | stylesheet_tag }}
|
|
16
16
|
/[if lt IE 9]
|
|
17
17
|
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
18
|
-
%link{href: "/samples/favicon.
|
|
19
|
-
%link{
|
|
20
|
-
%link{
|
|
21
|
-
%link{
|
|
18
|
+
%link{rel: "shortcut icon", href: "/samples/favicon.png"}/
|
|
19
|
+
%link{rel: "apple-touch-icon-precomposed", sizes: "144x144", href: "/samples/apple-touch-icon-144x144-precomposed.png"}/
|
|
20
|
+
%link{rel: "apple-touch-icon-precomposed", sizes: "114x114", href: "/samples/apple-touch-icon-114x114-precomposed.png"}/
|
|
21
|
+
%link{rel: "apple-touch-icon-precomposed", sizes: "72x72", href: "/samples/apple-touch-icon-72x72-precomposed.png"}/
|
|
22
|
+
%link{rel: "apple-touch-icon-precomposed", href: "/samples/apple-touch-icon-precomposed.png"}/
|
|
23
|
+
|
|
22
24
|
/ CSS code from Bootply.com editor
|
|
23
25
|
:css
|
|
24
26
|
@media screen and (min-width: 992px) {
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# The name of this site
|
|
2
|
+
# This text displays in the back-office and
|
|
3
|
+
# can be used in templates through the site.name global variable
|
|
2
4
|
name: <%= config[:name] %>
|
|
3
5
|
|
|
4
|
-
#
|
|
6
|
+
# The site's subdomain
|
|
7
|
+
# This option is for sites on multi-site engines
|
|
8
|
+
# The value determines where the site can be accessed under the engine's primary domain
|
|
5
9
|
# subdomain: sample
|
|
6
10
|
|
|
7
|
-
#
|
|
11
|
+
# An array of domain aliases for the site
|
|
12
|
+
# This option is for sites on multi-site engines
|
|
8
13
|
# domains: [www.example.com, example.com]
|
|
9
14
|
|
|
10
|
-
#
|
|
15
|
+
# An array of locales (languages) the site is available in
|
|
16
|
+
# The locale listed first is the site's default locale
|
|
17
|
+
# Locales are specified using ISO language codes
|
|
18
|
+
# Possible locales include: en, de, fr, pl, pt-BR, it, nl, nb, es, ru, et, ja, zh-CN
|
|
11
19
|
locales: [en]
|
|
12
20
|
|
|
13
|
-
#
|
|
21
|
+
# The site's timezone
|
|
22
|
+
# This converts the server's time to the site's time zone in templates
|
|
23
|
+
# The TimeZone class from Rail's ActiveSupport is used to interpret the string
|
|
24
|
+
# Sample timezone strings: Tokyo, Beijing, Moscow, Cairo, Paris, Pacific Time (US & Canada)
|
|
14
25
|
# timezone: Paris
|
|
15
26
|
|
|
16
|
-
#
|
|
27
|
+
# For SEO purposes, sites may wish to add a relevant string to the <title> tag
|
|
28
|
+
# And include <meta type="keywords"> and <meta type="description">
|
|
29
|
+
# For this purpose you can set values for these variables here
|
|
30
|
+
# They can be accessed in templates through the site.seo_title, site.meta_keywords, and site.meta_description variables
|
|
17
31
|
seo_title: <%= @name %>
|
|
18
32
|
meta_keywords: "some meta keywords"
|
|
19
|
-
meta_description: "some meta description"
|
|
33
|
+
meta_description: "some meta description"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% 4.times do |i| -%>
|
|
2
|
-
- "Sample <%= i + 1 %>":
|
|
2
|
+
- "Sample <%= i + 1 %>"<%= ':' if config[:fields].size > 1 %>
|
|
3
3
|
<% config[:fields][1..-1].each do |field| -%>
|
|
4
4
|
<% case field.type -%>
|
|
5
5
|
<% when 'string' -%>
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
<% end -%>
|
|
22
22
|
<% end -%>
|
|
23
23
|
|
|
24
|
-
<% end -%>
|
|
24
|
+
<% end -%>
|
|
@@ -32,8 +32,10 @@ module Locomotive
|
|
|
32
32
|
def create_snippet
|
|
33
33
|
extension = self.haml ? 'liquid.haml' : 'liquid'
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
_slug = slug.clone.downcase.gsub(/[-]/, '_')
|
|
36
|
+
|
|
37
|
+
options = { slug: _slug, translated: false }
|
|
38
|
+
file_path = File.join(pages_path, _slug)
|
|
37
39
|
|
|
38
40
|
template "template.#{extension}.tt", "#{file_path}.#{extension}", options
|
|
39
41
|
|
|
@@ -46,9 +46,9 @@ module Locomotive
|
|
|
46
46
|
|
|
47
47
|
page = case handle
|
|
48
48
|
when Locomotive::Mounter::Models::Page then handle
|
|
49
|
-
when Liquid::Drops::Page then handle.
|
|
49
|
+
when Liquid::Drops::Page then handle.instance_variable_get(:@_source)
|
|
50
50
|
when String then fetch_page(mounting_point, handle)
|
|
51
|
-
when Liquid::Drops::ContentEntry then fetch_page(mounting_point, handle.
|
|
51
|
+
when Liquid::Drops::ContentEntry then fetch_page(mounting_point, handle.instance_variable_get(:@_source), true)
|
|
52
52
|
when Locomotive::Mounter::Models::ContentEntry then fetch_page(mounting_point, handle, true)
|
|
53
53
|
else
|
|
54
54
|
nil
|
|
@@ -106,7 +106,7 @@ module Locomotive
|
|
|
106
106
|
# @return [ Boolean ]
|
|
107
107
|
#
|
|
108
108
|
def page_selected?(page)
|
|
109
|
-
self.current_page.fullpath =~ /^#{page.fullpath}
|
|
109
|
+
self.current_page.fullpath =~ /^#{page.fullpath}(\/.*)?$/
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Determine if the children of a page have to be rendered or not.
|
data/locomotivecms_wagon.gemspec
CHANGED
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |gem|
|
|
|
34
34
|
|
|
35
35
|
gem.add_dependency 'httmultiparty', '0.3.10'
|
|
36
36
|
gem.add_dependency 'will_paginate', '~> 3.0.3'
|
|
37
|
-
gem.add_dependency 'locomotivecms_mounter', '~> 1.3.
|
|
37
|
+
gem.add_dependency 'locomotivecms_mounter', '~> 1.3.2'
|
|
38
38
|
|
|
39
39
|
gem.add_dependency 'faker', '~> 0.9.5'
|
|
40
40
|
|
|
@@ -74,6 +74,20 @@ describe Locomotive::Wagon::Server do
|
|
|
74
74
|
last_response.body.should =~ /<li>A song template<\/li>/
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
describe 'snippets' do
|
|
78
|
+
|
|
79
|
+
it 'includes a basic snippet' do
|
|
80
|
+
get '/'
|
|
81
|
+
last_response.body.should =~ /All photos are licensed under Creative Commons\./
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
it 'includes a snippet whose name is composed of dash' do
|
|
85
|
+
get '/'
|
|
86
|
+
last_response.body.should =~ /<p>A complicated one name indeed.<\/p>/
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
end
|
|
90
|
+
|
|
77
91
|
describe 'nav' do
|
|
78
92
|
|
|
79
93
|
subject { get '/all'; last_response.body }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locomotivecms_wagon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Didier Lafforgue
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-11-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: thor
|
|
@@ -213,14 +213,14 @@ dependencies:
|
|
|
213
213
|
requirements:
|
|
214
214
|
- - ~>
|
|
215
215
|
- !ruby/object:Gem::Version
|
|
216
|
-
version: 1.3.
|
|
216
|
+
version: 1.3.2
|
|
217
217
|
type: :runtime
|
|
218
218
|
prerelease: false
|
|
219
219
|
version_requirements: !ruby/object:Gem::Requirement
|
|
220
220
|
requirements:
|
|
221
221
|
- - ~>
|
|
222
222
|
- !ruby/object:Gem::Version
|
|
223
|
-
version: 1.3.
|
|
223
|
+
version: 1.3.2
|
|
224
224
|
- !ruby/object:Gem::Dependency
|
|
225
225
|
name: faker
|
|
226
226
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -404,10 +404,10 @@ files:
|
|
|
404
404
|
- generators/bootstrap3/public/fonts/glyphicons-halflings-regular.woff
|
|
405
405
|
- generators/bootstrap3/public/javascripts/bootstrap.js
|
|
406
406
|
- generators/bootstrap3/public/javascripts/bootstrap.min.js
|
|
407
|
-
- generators/bootstrap3/public/samples/apple-touch-icon-
|
|
408
|
-
- generators/bootstrap3/public/samples/apple-touch-icon-
|
|
409
|
-
- generators/bootstrap3/public/samples/apple-touch-icon-
|
|
410
|
-
- generators/bootstrap3/public/samples/apple-touch-icon-
|
|
407
|
+
- generators/bootstrap3/public/samples/apple-touch-icon-114x114-precomposed.png
|
|
408
|
+
- generators/bootstrap3/public/samples/apple-touch-icon-144x144-precomposed.png
|
|
409
|
+
- generators/bootstrap3/public/samples/apple-touch-icon-72x72-precomposed.png
|
|
410
|
+
- generators/bootstrap3/public/samples/apple-touch-icon-precomposed.png
|
|
411
411
|
- generators/bootstrap3/public/samples/favicon.png
|
|
412
412
|
- generators/bootstrap3/public/stylesheets/bootstrap-theme.css
|
|
413
413
|
- generators/bootstrap3/public/stylesheets/bootstrap-theme.min.css
|