fclay 0.1.35 → 0.1.36

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12515396b9e16fbbff5eb261a41796eb9fd1b82b
4
- data.tar.gz: 02af1c706ff5d26e845562486a1c741778d9bae5
3
+ metadata.gz: 57729275c262e15813840370c7462a452641bbac
4
+ data.tar.gz: b8f567bfd5704815ef95af1dd2ad58e7640da865
5
5
  SHA512:
6
- metadata.gz: 3f609388bb8b1c40112a459b37b6407c9c8aa1f55af8f64b329fe2a23a5873b79acc0b096a10b3abdea4aee98efdd9ddad86468d9fbdd18525a45fc688649dfc
7
- data.tar.gz: 90f18fa710144e4ec5cc571c9dc868674433e2188c6879f90cfcc866068cd60fc64e5fe9bcc1181c13d7f47aa50c968b80db8c85f4d5e1a07df5711f1b727028
6
+ metadata.gz: 9db12763ad77f2a1d98a0ac7ac835e6121f996f2d58f0e6da6c71f0878bffc1ff1317c25a6298e6c8dabd08b3facc025d4e6e0240cb7a5539d2937bb5d404cae
7
+ data.tar.gz: a02585d27ba42d4bbfd04e4e8db6d7ecb6475a41b82750e1f9cac428e6065500a81e4f7128f9ec76260051fae42367370adc1047edbf2efe2f0b084700ad9b50
@@ -154,14 +154,18 @@ module Fclay
154
154
  end
155
155
 
156
156
  def process_file
157
-
157
+ self.log("process_file called")
158
+ self.log("@file: #{@file.try(:to_s)}")
158
159
  return unless @file
159
-
160
+
160
161
  delete_files
161
-
162
- path = @file.try(:path) || @file[:path]
162
+ path = @file.try(:path) || @file.try(:[],:path)
163
+
164
+ self.log("fetched path: #{path.try(:to_s)}")
163
165
  return unless path
164
166
 
167
+ self.content_type = @file.try(:content_type) || @file.try(:[],:content_type)
168
+
165
169
  if path[0..3] == "http"
166
170
  self.file_status = 'idle'
167
171
  self.file_location = 'external_link'
@@ -172,14 +176,14 @@ module Fclay
172
176
 
173
177
  (self.class.fclay_options[:styles] || [nil]).each do |style|
174
178
  FileUtils.cp(path,local_file_path(style))
175
- `chmod 0755 #{local_file_path(style)}`
179
+ `chmod 777 #{local_file_path(style)}`
176
180
  end
177
181
 
178
-
179
182
  delete_tmp_file
180
183
  set_file_size self.class.fclay_options[:styles].try(:first)
181
184
  self.file_location = 'local'
182
185
  self.file_status = need_upload ? "processing" : "idle"
186
+ self.log("file_processed, file_status: #{self.file_status}")
183
187
  end
184
188
  end
185
189
 
data/lib/fclay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fclay
2
- VERSION = "0.1.35"
2
+ VERSION = "0.1.36"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fclay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.35
4
+ version: 0.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Galiev