phocoder-rails 0.0.55 → 0.0.56

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/README.md CHANGED
@@ -9,7 +9,7 @@ with the [Phocoder](http://www.phocoder.com/) image processing service.
9
9
  Add this to your Gemfile:
10
10
 
11
11
  ```ruby
12
- gem "phocoder-rails"
12
+ gem "phocoder-rails", :require => 'phocoder_rails'
13
13
  ```
14
14
 
15
15
  And then run:
@@ -54,15 +54,30 @@ create app/views/image_uploads/show.html.erb
54
54
  route resources :image_uploads, :except=>[:edit,:update]
55
55
  ```
56
56
 
57
+ Then run
58
+
59
+ ```term
60
+ rake db:migrate
61
+ ```
62
+
57
63
  ## Updating an existing model
58
64
 
59
- First generate a migration that will add some extra columns to your table. You should red the migration
60
- after it is generated to make sure that it makes sense within the context of your model.
65
+ You can also update an existing model. First generate a migration that will add some extra columns to your
66
+ table.
61
67
 
62
68
  ```term
63
69
  rails g phocoder_rails:model_update my_model
64
70
  ```
65
71
 
72
+ You should read the migration after it is generated to make
73
+ sure that it makes sense within the context of your model.
74
+
75
+ Then run
76
+
77
+ ```term
78
+ rake db:migrate
79
+ ```
80
+
66
81
  Then you should make sure that your form is set up for multi part encoding, and that you have a `file_field`
67
82
  in your form named `file`.
68
83
 
@@ -88,9 +103,9 @@ class ImageUpload < ActiveRecord::Base
88
103
  {:label=>"medium", :width=>400, :height=>400, :aspect_mode => 'preserve',
89
104
  :frame=>{ :width=>20, :bottom=>50, :color=>'003' },
90
105
  :annotations=>[
91
- {:text=>"Annotation Testing",:pointsize=>30,:fill_color=>'fff',:gravity=>"South",:y=>10},
92
- {:text=>"Howdy!",:pointsize=>10,:fill_color=>'ccc',:gravity=>"North",:y=>5}
93
- ]
106
+ {:text=>"Annotation Testing",:pointsize=>30,:fill_color=>'fff',:gravity=>"South",:y=>10},
107
+ {:text=>"Howdy!",:pointsize=>10,:fill_color=>'ccc',:gravity=>"North",:y=>5}
108
+ ]
94
109
  }
95
110
  ]
96
111
 
@@ -105,4 +120,4 @@ and on the bottom of the image.
105
120
  [Add images]
106
121
 
107
122
 
108
- ## Storage and Processing Modes
123
+ ## Storage and Processing Modes
data/VERSION CHANGED
@@ -1,4 +1,4 @@
1
- 0.0.55
1
+ 0.0.56
2
2
 
3
3
 
4
4
 
File without changes
File without changes
@@ -8,7 +8,7 @@
8
8
 
9
9
  </tr>
10
10
 
11
- <%% @<%= file_name %>.each do |<%= file_name.singularize %>| %>
11
+ <%% @<%= file_name.pluralize %>.each do |<%= file_name.singularize %>| %>
12
12
  <tr>
13
13
  <td>
14
14
  <%%= phocoder_thumbnail <%= file_name.singularize %>,"small",false %><br/>
@@ -2,4 +2,4 @@
2
2
 
3
3
  <%%= render 'form' %>
4
4
 
5
- <%%= link_to 'Back', <%= file_name %>_path %>
5
+ <%%= link_to 'Back', <%= file_name.pluralize %>_path %>
@@ -9,4 +9,4 @@
9
9
 
10
10
  <br/>
11
11
 
12
- <%%= link_to 'Back', <%= file_name %>_path %>
12
+ <%%= link_to 'Back', <%= file_name.pluralize %>_path %>
@@ -200,7 +200,9 @@ module ActsAsPhocodable
200
200
  def acts_as_phocodable(options = { })
201
201
 
202
202
  include InstanceMethods
203
- include Spawn
203
+ if defined? Spawn
204
+ include Spawn
205
+ end
204
206
  attr_reader :saved_file
205
207
  attr_accessor :phocoding
206
208
  after_save :save_local_file
@@ -1075,10 +1077,10 @@ module ActsAsPhocodable
1075
1077
  @saved_a_new_file = true
1076
1078
  self.save
1077
1079
  end
1078
- if ActsAsPhocodable.storeage_mode == "s3" and ActsAsPhocodable.processing_mode == "automatic"
1080
+ if ActsAsPhocodable.storeage_mode == "s3" && ActsAsPhocodable.processing_mode == "automatic"
1079
1081
  self.save_s3_file
1080
1082
  end
1081
- if ActsAsPhocodable.storeage_mode == "s3" and ActsAsPhocodable.processing_mode == "spawn"
1083
+ if ActsAsPhocodable.storeage_mode == "s3" && ActsAsPhocodable.processing_mode == "spawn" && defined?(Spawn)
1082
1084
  spawn do # :method => :thread # <-- I think that should be set at the config/environment level
1083
1085
  Rails.logger.debug "------------beginning of spawn block"
1084
1086
  #puts "------------beginning of spawn block"
@@ -1087,7 +1089,7 @@ module ActsAsPhocodable
1087
1089
  #puts "------------end of spawn block"
1088
1090
  end
1089
1091
  end
1090
- if ActsAsPhocodable.storeage_mode == "local" and ActsAsPhocodable.processing_mode == "automatic"
1092
+ if ActsAsPhocodable.storeage_mode == "local" && ActsAsPhocodable.processing_mode == "automatic"
1091
1093
  self.encode
1092
1094
  end
1093
1095
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phocoder-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.55
4
+ version: 0.0.56
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-01-09 00:00:00.000000000 Z
12
+ date: 2013-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -300,6 +300,8 @@ files:
300
300
  - README.md
301
301
  - Rakefile
302
302
  - VERSION
303
+ - app/assets/javascripts/phocodable.js
304
+ - app/assets/stylesheets/phocodable.css
303
305
  - app/controllers/phocoder_controller.rb
304
306
  - app/helpers/phocoder_helper.rb
305
307
  - app/models/encodable_job.rb
@@ -336,7 +338,6 @@ files:
336
338
  - public/images/play_small.png
337
339
  - public/images/storing.gif
338
340
  - public/images/waiting.gif
339
- - public/javascripts/phocodable.js
340
341
  - public/javascripts/video-js-2.0.2/LICENSE.txt
341
342
  - public/javascripts/video-js-2.0.2/README.markdown
342
343
  - public/javascripts/video-js-2.0.2/demo-subtitles.srt
@@ -346,7 +347,6 @@ files:
346
347
  - public/javascripts/video-js-2.0.2/skins/vim.css
347
348
  - public/javascripts/video-js-2.0.2/video-js.css
348
349
  - public/javascripts/video-js-2.0.2/video.js
349
- - public/stylesheets/phocodable.css
350
350
  - spec/controllers/phocoder_controller_spec.rb
351
351
  - spec/dummy/Rakefile
352
352
  - spec/dummy/app/controllers/application_controller.rb
@@ -425,7 +425,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
425
425
  version: '0'
426
426
  segments:
427
427
  - 0
428
- hash: 3838405062470515638
428
+ hash: -3998073261859968829
429
429
  required_rubygems_version: !ruby/object:Gem::Requirement
430
430
  none: false
431
431
  requirements:
@@ -434,7 +434,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
434
434
  version: '0'
435
435
  segments:
436
436
  - 0
437
- hash: 3838405062470515638
437
+ hash: -3998073261859968829
438
438
  requirements: []
439
439
  rubyforge_project:
440
440
  rubygems_version: 1.8.24