cloudhdr_rails 0.0.2 → 0.0.3
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.
| 
         @@ -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 
     | 
    
         
            -
                 
     | 
| 
       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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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}/" : ""
         
     | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 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:  
     | 
| 
      
 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:  
     | 
| 
      
 221 
     | 
    
         
            +
                  hash: 2963536726816567442
         
     | 
| 
       222 
222 
     | 
    
         
             
            requirements: []
         
     | 
| 
       223 
223 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       224 
224 
     | 
    
         
             
            rubygems_version: 1.8.25
         
     |