locomotivecms_wagon 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 584d291f468656a7b31173c7be873aad1dbced16
4
- data.tar.gz: 3a1e7101530936c218a7cbe98a0c8b32d81037dc
3
+ metadata.gz: 76b2020908c1a171019f9559425d9cd3765ca893
4
+ data.tar.gz: 87806b21c18e81bb3c7e1ffe89fc62cef2737398
5
5
  SHA512:
6
- metadata.gz: 4842ef241d5145e96725234c421d996dc53d3bf350c9f9ee67409eb1d89232475e71ffe8ed10432128b077b934e17737ca45b4df5a973de0db6bf5b2175b8f0c
7
- data.tar.gz: 78ca185d52052ff61cb54bdf1c4dc647fe61c23fa2593c48f6696472c85505513901444228a4708855dcca3128cf7d020ace5122e0f8296a2f54ff3aec6f2be9
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.ico">
19
- <link rel="apple-touch-icon" href="/samples/apple-touch-icon.png">
20
- <link rel="apple-touch-icon" sizes="72x72" href="/samples/apple-touch-icon-72x72.png">
21
- <link rel="apple-touch-icon" sizes="114x114" href="/samples/apple-touch-icon-114x114.png">
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.ico", rel: "shortcut icon"}/
19
- %link{href: "/samples/apple-touch-icon.png", rel: "apple-touch-icon"}/
20
- %link{href: "/samples/apple-touch-icon-72x72.png", rel: "apple-touch-icon", sizes: "72x72"}/
21
- %link{href: "/samples/apple-touch-icon-114x114.png", rel: "apple-touch-icon", sizes: "114x114"}/
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
- # TODO: explain it
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
- # TODO: explain it
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
- # TODO: explain it
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
- # TODO: explain it
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
- # TODO: explain it
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
- # TODO: explain it
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"
@@ -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
- options = { slug: slug, translated: false }
36
- file_path = File.join(pages_path, slug)
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.send(:_source)
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.send(:_source), true)
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.
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '1.3.1'
3
+ VERSION = '1.3.2'
4
4
  end
5
5
  end
@@ -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.1'
37
+ gem.add_dependency 'locomotivecms_mounter', '~> 1.3.2'
38
38
 
39
39
  gem.add_dependency 'faker', '~> 0.9.5'
40
40
 
@@ -95,4 +95,6 @@ title: Home page
95
95
 
96
96
  {% include footer %}
97
97
 
98
+ {% include a_complicated_one %}
99
+
98
100
  {% google_analytics 'UA-20661758-1' %}
@@ -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.1
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-10-24 00:00:00.000000000 Z
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.1
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.1
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-114-precomposed.png
408
- - generators/bootstrap3/public/samples/apple-touch-icon-144-precomposed.png
409
- - generators/bootstrap3/public/samples/apple-touch-icon-57-precomposed.png
410
- - generators/bootstrap3/public/samples/apple-touch-icon-72-precomposed.png
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