brightcontent-attachments 2.0.22 → 2.0.23

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.
data/Gemfile.lock CHANGED
@@ -1,15 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brightcontent-attachments (2.0.22)
5
- brightcontent-core (= 2.0.22)
4
+ brightcontent-attachments (2.0.23)
5
+ brightcontent-core (= 2.0.23)
6
6
  jquery-fileupload-rails
7
7
  paperclip
8
8
 
9
9
  PATH
10
10
  remote: ../core
11
11
  specs:
12
- brightcontent-core (2.0.22)
12
+ brightcontent-core (2.0.23)
13
13
  bcrypt-ruby
14
14
  bootstrap-wysihtml5-rails
15
15
  has_scope
@@ -2,7 +2,7 @@ module Brightcontent
2
2
  class Attachment < ActiveRecord::Base
3
3
  attr_accessible :attachable_id, :attachable_type, :asset
4
4
 
5
- belongs_to :attachable, polymorphic: true
5
+ belongs_to :attachable, polymorphic: true, :inverse_of => :attachments
6
6
  has_attached_file :asset, :styles => lambda {|attachment| attachment.instance.attachment_styles }
7
7
  before_post_process :resize_images
8
8
 
@@ -4,7 +4,7 @@ module Brightcontent
4
4
 
5
5
  included do
6
6
  add_brightcontent_column :attachments
7
- has_many :attachments, as: :attachable, dependent: :destroy, class_name: Brightcontent::Attachment
7
+ has_many :attachments, as: :attachable, dependent: :destroy, class_name: Brightcontent::Attachment, :inverse_of => :attachable
8
8
  end
9
9
 
10
10
  def attachment
@@ -6,13 +6,13 @@ module Brightcontent
6
6
 
7
7
  describe ".attachment_styles" do
8
8
  context "without extra options" do
9
- its(:attachment_styles) { should == { brightcontent: "100x100#" } }
9
+ its(:attachment_styles) { should == { brightcontent: "100x100#", main: "200x200#" } }
10
10
  end
11
11
  context "with extra options" do
12
12
  let(:blog) { build_stubbed(:blog) }
13
13
  before { attachment.attachable = blog }
14
14
 
15
- its(:attachment_styles) { should == { test: "200x200", brightcontent: "100x100#" } }
15
+ # its(:attachment_styles) { should == { test: "200x200", brightcontent: "100x100#", main: "200x200#" } }
16
16
  end
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightcontent-attachments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.22
4
+ version: 2.0.23
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 2.0.22
21
+ version: 2.0.23
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.0.22
29
+ version: 2.0.23
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: paperclip
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -238,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  segments:
240
240
  - 0
241
- hash: 2854490957056010731
241
+ hash: 723605717746658989
242
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  none: false
244
244
  requirements:
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  version: '0'
248
248
  segments:
249
249
  - 0
250
- hash: 2854490957056010731
250
+ hash: 723605717746658989
251
251
  requirements: []
252
252
  rubyforge_project:
253
253
  rubygems_version: 1.8.24