cloudhdr_rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -168,17 +168,8 @@ module ActsAsCloudhdr
168
168
  cattr_accessor :thumbnail_class
169
169
  self.thumbnail_class = options[:thumbnail_class] ? options[:thumbnail_class].constantize : self
170
170
 
171
- cattr_accessor :parent_class
172
- self.parent_class = options[:parent_class] ? options[:parent_class].constantize : self
173
-
174
171
  has_many :thumbnails, :class_name => "::#{self.thumbnail_class.name}",:as => :parent
175
- if self.thumbnail_class != self.parent_class
176
- #we have to do this to get the poster for videos covered
177
- belongs_to :parent, :polymorphic => true
178
- else
179
- belongs_to :parent, :class_name => "::#{self.parent_class.name}" ,:foreign_key => "parent_id"
180
- end
181
-
172
+ belongs_to :parent, :polymorphic => true
182
173
 
183
174
  has_many :cloudhdr_jobs, :as => :image
184
175
 
@@ -443,7 +434,7 @@ module ActsAsCloudhdr
443
434
  response
444
435
  end
445
436
 
446
- def process(input_thumbs = self.parent_class.cloudhdr_thumbnails)
437
+ def process(input_thumbs = self.cloudhdr_thumbnails)
447
438
  #puts " input_thumbs.count = #{input_thumbs.size}"
448
439
  input_thumbs = dedupe_input_thumbs(input_thumbs)
449
440
  #puts " after dedupe input_thumbs.count = #{input_thumbs.size}"
@@ -621,13 +612,13 @@ module ActsAsCloudhdr
621
612
  end
622
613
  end
623
614
 
624
- def cloudhdr_params(input_thumbs = self.parent_class.cloudhdr_thumbnails)
615
+ def cloudhdr_params(input_thumbs = self.cloudhdr_thumbnails)
625
616
  {:input => {:url => self.public_url, :notifications=>[{:url=>callback_url }] },
626
617
  :thumbnails => cloudhdr_thumbnail_params(input_thumbs)
627
618
  }
628
619
  end
629
620
 
630
- def cloudhdr_thumbnail_params(input_thumbs = self.parent_class.cloudhdr_thumbnails)
621
+ def cloudhdr_thumbnail_params(input_thumbs = self.cloudhdr_thumbnails)
631
622
  input_thumbs.map{|thumb|
632
623
  thumb_filename = thumb[:label] + "_" + File.basename(self.filename,File.extname(self.filename)) + cloudhdr_extension
633
624
  base_url = ActsAsCloudhdr.storeage_mode == "s3" ? "s3://#{self.s3_bucket_name}/#{self.thumbnail_resource_dir}/" : ""
@@ -1,3 +1,3 @@
1
1
  module CloudhdrRails
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudhdr_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-08 00:00:00.000000000 Z
12
+ date: 2013-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -209,7 +209,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
209
209
  version: '0'
210
210
  segments:
211
211
  - 0
212
- hash: 936951264966323300
212
+ hash: 2963536726816567442
213
213
  required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  none: false
215
215
  requirements:
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 936951264966323300
221
+ hash: 2963536726816567442
222
222
  requirements: []
223
223
  rubyforge_project:
224
224
  rubygems_version: 1.8.25