takenoko-s3 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6922c02010745f12516ecedde82d5d58b28528d
4
- data.tar.gz: 0d21656bde5a035f48bc594f634179325d20020d
3
+ metadata.gz: 0ecdf63d9549954b21928d1f36b25e4ce9ad9faf
4
+ data.tar.gz: 6facfa7c96a66d5f5128a30cd90bdd91cb96ec4b
5
5
  SHA512:
6
- metadata.gz: e7682d01f2a68bb3f78292495dd552494df603c43afad03780514882bec670c168c6663fc08754922145e0d89df04c5c6622c5c975c81119438884174c74e29c
7
- data.tar.gz: 826600fc19787eb2ab050b9bf3fbb833d2fcba077e95ea0112dc10abb9818b7c4a3f7760cb696c5043c9b042f064565deb5d7cfdf3d1adb0cffa7e9d2d30cd31
6
+ metadata.gz: 31f41d70552a5c90b28bd59c5347bdb503475f717babcf5124edd11a57be4a8a3f227942bc1acf5450a804d3dfc82a6e800e102ba2c7a8ab59b5b8b01043f960
7
+ data.tar.gz: bec6826e76376233d979ab2571b3f365b2eb0cbb8bd69467d58c9933532c02713c6dd7b98b3d7617c75c7792e4766aec855a6f7230e6f9ad3fb164698517d94d
@@ -23,12 +23,17 @@ module Takenoko
23
23
  end
24
24
 
25
25
  file = File.open(file_path)
26
- s3_path = col[:s3_folder]+ "/" + File.basename(row[col[:column_name]])
26
+ file_name = File.basename(row[col[:column_name]])
27
+ s3_path = col[:s3_folder]+ "/" + file_name
27
28
 
28
- find_val = row[table_data[:find_column]]
29
+ # find_val = row[table_data[:find_column]]
30
+ find_val = "#{col[:folder_id]}_#{file_name}"
29
31
 
30
32
  if log_data[find_val].present? && (f = bucket.files.get(s3_path))
31
- next if log_data[find_val][:s3_last_upload] && log_data[find_val][:s3_last_upload] >= file.mtime.to_i
33
+ if log_data[find_val][:s3_last_upload] && log_data[find_val][:s3_last_upload] >= file.mtime.to_i
34
+ Rails.logger.info "Skip uploaded file: #{file_name}"
35
+ next
36
+ end
32
37
  end
33
38
 
34
39
  Rails.logger.info "Uploading to s3: #{file_path} -> #{s3_path}"
@@ -1,5 +1,5 @@
1
1
  module Takenoko
2
2
  module S3
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{S3 Uploader plugin for takenoko}
13
13
  spec.description = %q{S3 Uploader plugin for takenoko}
14
- spec.homepage = "https://github.com/khiemns54/takenoko-s3/tree/release/0.0.6"
14
+ spec.homepage = "https://github.com/khiemns54/takenoko-s3/tree/release/0.0.7"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.12"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
25
- spec.add_dependency "takenoko", "~> 0.2.5"
25
+ spec.add_dependency "takenoko", "~> 0.2.6"
26
26
  spec.add_dependency "fog-aws"
27
27
 
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takenoko-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - KhiemNS
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2016-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.5
61
+ version: 0.2.6
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.5
68
+ version: 0.2.6
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fog-aws
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -104,7 +104,7 @@ files:
104
104
  - lib/takenoko/s3/tasks/takenoko.rake
105
105
  - lib/takenoko/s3/version.rb
106
106
  - takenoko-s3.gemspec
107
- homepage: https://github.com/khiemns54/takenoko-s3/tree/release/0.0.6
107
+ homepage: https://github.com/khiemns54/takenoko-s3/tree/release/0.0.7
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}