itrp-client 1.0.2 → 1.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDBlZmJiM2E5MjRkOGE4NWQ1YmQ3YTM0Njg1Nzk1ZmI4ZGI4YWY2YQ==
4
+ NWFhYjc1OGYzOTc0N2U3NmIxOGI2NzFhMTY5MDMyZWVkNGVhNTY3Mg==
5
5
  data.tar.gz: !binary |-
6
- ZDEyYThlYjgyZDkxZTAxZTA3Y2ExMTc5ZWYyZWM2YzQyNmQ1MThkMw==
6
+ MWI0MGMyYTY5MzQ5MDg5NmRlZWJhMGI4MjY4NWZlYjU3MzY0NzBhMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjllNDM3ODZkODU5OWI4NTliZDQxNzg4N2QwODM1MDJhN2I2MTNkY2EzM2Y0
10
- ODZkMDVhYjhmYTMzMDkyNTJlMGViMzM1MDE1M2Y2ZDFkNTQyYzBlMjJlNzdi
11
- MDUzYjc4ZTdkNTMzZGI2OTIyMzM5NTU3N2YzOWEzYjZmZmVkYWI=
9
+ YjE4YWMwMzIxNDhiZDQwZWM4NGFkNjJiM2ZkNWY5ODQwNjE5OGM4MjExZDIw
10
+ MzRlMTkyYmM5ZTM1MGE5MDQzODdhYzA2NWYwY2Q2MDEyYmUwZDdkNTRkOTA0
11
+ YWE2OTk2NDE2OTIwNjZkYjcxYTgyYzE4Mzc2NzgxOWMzMDRkOWU=
12
12
  data.tar.gz: !binary |-
13
- NzFkYzY5OTEzMzJlNzE3MGYwOTdlYjAyMWMxMTE3M2YwYjMxN2IyNGJmMDBj
14
- MzYyYjgxMDhkYjI0ZjQyMTBjNTllNWFlNjY0YTY5OWIxZWZjZTIwODhiNWJl
15
- N2RjMjExZTJkMjJmOTI0MjA2ZjRjMzllMDljYzY4OGJmYmEzYTk=
13
+ NDJmZmNhZmIwZjVlZDEzODY0NmU3N2Q0OTkzYmIxOWNjMGEwMmVlNjZmN2Nk
14
+ ZWUyNjRkOTQxNmFjNDQxYWYzNjg5OWI3Mjc3OTE1MWNlMmY1Zjk2ZTJhOTY3
15
+ YTlmZjQ3MTg2OWFiNmY3ODRkODliNzBhMjNlYjdiNDg4YWU0OTA=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- itrp-client (1.0.1)
4
+ itrp-client (1.0.2)
5
5
  activesupport
6
6
  gem_config
7
7
  mime-types
@@ -15,7 +15,7 @@ GEM
15
15
  safe_yaml (~> 0.9.0)
16
16
  diff-lcs (1.2.4)
17
17
  gem_config (0.2.4)
18
- mime-types (1.25)
18
+ mime-types (2.0)
19
19
  multi_json (1.8.0)
20
20
  rake (10.1.0)
21
21
  rspec (2.14.1)
data/lib/itrp/client.rb CHANGED
@@ -114,7 +114,7 @@ module Itrp
114
114
  # @raise Itrp::UploadFailed in case the file could was not accepted by ITRP and +block_until_completed+ is +true+
115
115
  # @raise Itrp::Exception in case the import progress could not be monitored
116
116
  def import(csv, type, block_until_completed = false)
117
- csv = File.open(csv, 'r') unless csv.respond_to?(:path) && csv.respond_to?(:read)
117
+ csv = File.open(csv, 'rb') unless csv.respond_to?(:path) && csv.respond_to?(:read)
118
118
  data, headers = Itrp::Multipart::Post.prepare_query(type: type, file: csv)
119
119
  request = Net::HTTP::Post.new(expand_path('/import'), expand_header(headers))
120
120
  request.body = data
@@ -50,7 +50,7 @@ module Itrp
50
50
  # attachment is already a file or we need to open the file from disk
51
51
  unless attachment.respond_to?(:path) && attachment.respond_to?(:read)
52
52
  raise "file does not exist: #{attachment}" unless File.exists?(attachment)
53
- attachment = File.open(attachment, 'r')
53
+ attachment = File.open(attachment, 'rb')
54
54
  end
55
55
 
56
56
  # there are two different upload methods: AWS S3 and ITRP local storage
@@ -1,5 +1,5 @@
1
1
  module Itrp
2
2
  class Client
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itrp-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITRP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config