locomotive_cms 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,7 +38,7 @@ module CustomFields
38
38
 
39
39
  # Set correct paths
40
40
  def store_dir
41
- "sites/#{model.site_id}/#{model.class.model_name.demodulize.underscore}/#{model.id}/files"
41
+ "sites/#{model.site_id}/#{model._type.demodulize.underscore}/#{model.id}/files"
42
42
  end
43
43
 
44
44
  # In some situations, for instance, for the notification email when a content entry is created,
@@ -35,7 +35,7 @@ module Locomotive
35
35
  Site.match_domain(domain_name).only(:id).first._id.to_s rescue ''
36
36
  end
37
37
 
38
- site_id.blank? ? nil : Site.new(id: site_id)
38
+ site_id.blank? ? nil : Site.new.tap { |site| site._id = site_id }
39
39
  end
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module Locomotive #:nodoc
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
@@ -67,7 +67,7 @@ describe Locomotive::ContentEntry do
67
67
  build_content_entry(_slug: 'fish-1-hi').tap(&:save!)._slug.should == 'fish-1-hi'
68
68
  build_content_entry(_slug: 'fish-1-hi').tap(&:save!)._slug.should == 'fish-1-hi-1'
69
69
  end
70
-
70
+
71
71
  it 'correctly handles more than 13 slugs with the same name' do
72
72
  (1..15).each do |i|
73
73
  build_content_entry(_slug: 'dogs').tap(&:save!)._slug.should == "dogs-#{i}"
@@ -118,7 +118,7 @@ describe Locomotive::ContentEntry do
118
118
 
119
119
  subject { build_content_entry(file: FixturedAsset.open('5k.png')).tap(&:save).to_values(host: 'example.com') }
120
120
 
121
- its(:last) { should match(/^http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry\/[0-9a-f]+\/files\/5k.png$/) }
121
+ its(:last) { should match(/^http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry[0-9a-f]+\/[0-9a-f]+\/files\/5k.png$/) }
122
122
 
123
123
  end
124
124
 
@@ -139,7 +139,7 @@ describe Locomotive::ContentEntry do
139
139
 
140
140
  its(:first) { should eq("Title,Description,Visible ?,File") }
141
141
 
142
- its(:last) { should match(/^Locomotive,Lorem ipsum....,false,http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry\/[0-9a-f]+\/files\/5k.png$/) }
142
+ its(:last) { should match(/^Locomotive,Lorem ipsum....,false,http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry[0-9a-f]+\/[0-9a-f]+\/files\/5k.png$/) }
143
143
 
144
144
  end
145
145
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotive_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -1373,7 +1373,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1373
1373
  version: '0'
1374
1374
  segments:
1375
1375
  - 0
1376
- hash: 2534107307124546099
1376
+ hash: 978956877074840268
1377
1377
  required_rubygems_version: !ruby/object:Gem::Requirement
1378
1378
  none: false
1379
1379
  requirements:
@@ -1382,7 +1382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1382
1382
  version: '0'
1383
1383
  segments:
1384
1384
  - 0
1385
- hash: 2534107307124546099
1385
+ hash: 978956877074840268
1386
1386
  requirements: []
1387
1387
  rubyforge_project:
1388
1388
  rubygems_version: 1.8.23