ecm_pictures 0.0.18 → 0.0.19

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.
@@ -15,7 +15,7 @@ class Ecm::Pictures::Picture < ActiveRecord::Base
15
15
  acts_as_list :scope => :picture_gallery
16
16
 
17
17
  # callbacks
18
- before_validation :set_name_from_image_file_name, :if => Proc.new { |p| p.name.nil? }
18
+ before_validation :set_name_from_image_file_name, :if => Proc.new { |p| ( p.name.nil? || p.name.empty? ) }
19
19
 
20
20
  # default scope
21
21
  default_scope :order => "picture_gallery_id, position ASC"
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Pictures
3
- VERSION = "0.0.18"
3
+ VERSION = "0.0.19"
4
4
  end
5
5
  end
@@ -47,7 +47,7 @@ namespace :ecm do
47
47
  50.times do
48
48
  Ecm::Pictures::Picture.create! do |p|
49
49
  p.picture_gallery = picture_galleries.choice
50
- p.image = File.open(File.join(Rails.root, 'spec/files', 'ecm/pictures/pictures', 'example.jpg'))
50
+ p.image = File.open(File.join(Ecm::Pictures::Engine.root, 'spec/files', 'ecm/pictures/pictures', 'example.jpg'))
51
51
  p.name = Faker::Product.brand if (rand(2) == 1)
52
52
  p.description = Faker::Lorem.paragraph(rand(10))
53
53
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_pictures
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 18
10
- version: 0.0.18
9
+ - 19
10
+ version: 0.0.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Roberto Vasquez Angel