locomotive_cms 2.5.6.rc2 → 2.5.6

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: b39721a2c18764375ea4711a4d204b26c3f3389c
4
- data.tar.gz: 71c5f61a9a06e22dbc9f0820628358fd3a26a173
3
+ metadata.gz: 5dfbff0cc38b5176c19758fbfc3f62445f568dd7
4
+ data.tar.gz: a3cbab7b3f997330faa9d3be3cd19102b4f4594e
5
5
  SHA512:
6
- metadata.gz: 19ea3bdd811ca435f4a873b4db1f705f263586323ff8af846cb4c6a2fa949667069d4f1f0ed60b3b946d1dfaabe6cef144fcd2d0b0bc4d17af81c6bec6398163
7
- data.tar.gz: 56d022b27bc92ce5326944d2175e13be7bfe12210c75d8646a562b8ba4361fca8f933ddeebce873cf7070c5bad6f5bf81a79eb58763a192b6c7c33ca2696b789
6
+ metadata.gz: 027015441876276ed84f1a4bd441f92e8c2f4b8e6ccae09321eeecf1bf762ec0e6f61cfeb3d0bf8a8a1d205dd3fed985dbdd3e0c4895efb4ead37afc0ab33438
7
+ data.tar.gz: fb8250bc13cb6e7e174967e11d91fc5061484f5cd1632f215a8612c2b6db114516fd9aa2fb593876d4e6eceb7d3e284f7bab3a4112a40d1761280ee79094343a
@@ -12,6 +12,10 @@ module Locomotive
12
12
  end
13
13
  end
14
14
 
15
+ def api_location
16
+ success_location
17
+ end
18
+
15
19
  def navigation_error_behavior
16
20
  if error_location =~ %r(^http://)
17
21
  # simple redirection for outside urls
@@ -31,7 +31,7 @@ module Locomotive
31
31
  fullpath = current_site.localized_page_fullpath(page, locale)
32
32
 
33
33
  if content = options.delete(:content)
34
- fullpath = File.join(fullpath.gsub('content_type_template', ''), content._slug)
34
+ fullpath = fullpath.gsub('content_type_template', content._slug)
35
35
  end
36
36
 
37
37
  File.join(current_site_public_url, fullpath)
@@ -17,6 +17,12 @@ module Locomotive
17
17
  input.blank? ? value : input
18
18
  end
19
19
 
20
+ # FIXME: to be removed once we use liquid > 2.6
21
+ # https://github.com/Shopify/liquid/blob/master/lib/liquid/standardfilters.rb#L81
22
+ def split(input, pattern)
23
+ input.to_s.split(pattern)
24
+ end
25
+
20
26
  # Render the navigation for a paginated collection
21
27
  def default_pagination(paginate, *args)
22
28
  return '' if paginate['parts'].empty?
@@ -1,3 +1,3 @@
1
1
  module Locomotive #:nodoc
2
- VERSION = '2.5.6.rc2'
2
+ VERSION = '2.5.6'
3
3
  end
@@ -2,6 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Locomotive::Liquid::Filters::Misc do
4
4
 
5
+ include Liquid::StandardFilters
5
6
  include Locomotive::Liquid::Filters::Base
6
7
  include Locomotive::Liquid::Filters::Misc
7
8
 
@@ -20,6 +21,23 @@ describe Locomotive::Liquid::Filters::Misc do
20
21
  default(nil, 42).should == 42
21
22
  end
22
23
 
24
+ describe 'split' do
25
+
26
+ let(:string) { nil }
27
+ subject { split(string, ',') }
28
+
29
+ it { should eq [] }
30
+
31
+ context 'a not nil value' do
32
+
33
+ let(:string) { 'foo,bar'}
34
+
35
+ it { should eq %w(foo bar) }
36
+
37
+ end
38
+
39
+ end
40
+
23
41
  describe 'random' do
24
42
 
25
43
  context 'from an integer' do
@@ -9,12 +9,12 @@ describe 'Locomotive::Middlewares::LocaleRedirection' do
9
9
  let(:middleware) { Locomotive::Middlewares::LocaleRedirection.new(app) }
10
10
  let(:locale) { 'de' }
11
11
 
12
- subject do
12
+ subject do
13
13
  code, env = middleware.call(env_for(url, 'locomotive.site' => site, 'locomotive.locale' => locale))
14
14
  [code, env['Location']]
15
15
  end
16
16
 
17
- describe 'not prefixed by locale' do
17
+ describe 'not prefixed by locale' do
18
18
 
19
19
  describe 'strip default locale from root path' do
20
20
  let(:url) { 'http://models.example.com/de' }
@@ -50,10 +50,7 @@ describe 'Locomotive::Middlewares::LocaleRedirection' do
50
50
 
51
51
  end
52
52
 
53
-
54
-
55
-
56
- describe 'prefixed by locale' do
53
+ describe 'prefixed by locale' do
57
54
 
58
55
  let(:prefixed) { true }
59
56
 
@@ -89,7 +86,7 @@ describe 'Locomotive::Middlewares::LocaleRedirection' do
89
86
  end
90
87
 
91
88
  describe 'with locale' do
92
-
89
+
93
90
  describe 'dont add default locale if already present' do
94
91
  let(:locale) { 'de' }
95
92
  let(:url) { 'http://models.example.com/de/hello/world' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotive_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.6.rc2
4
+ version: 2.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-20 00:00:00.000000000 Z
11
+ date: 2014-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -1457,9 +1457,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1457
1457
  version: '0'
1458
1458
  required_rubygems_version: !ruby/object:Gem::Requirement
1459
1459
  requirements:
1460
- - - ">"
1460
+ - - ">="
1461
1461
  - !ruby/object:Gem::Version
1462
- version: 1.3.1
1462
+ version: '0'
1463
1463
  requirements: []
1464
1464
  rubyforge_project:
1465
1465
  rubygems_version: 2.2.2