bobhr 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: 4a4cfc182047ea0cc73d936310c357503289d39887a234d5ec98d4342912d340
4
- data.tar.gz: 3ded6f900318c2984a2fb02784b4ecdbd880ac3ddf711d31207d852c38f869e7
3
+ metadata.gz: 2b9d038c1042d01b0e46340d931e1c5da69fa042d4f7b5b80d4b0da16c9d55cb
4
+ data.tar.gz: 76de84e1183c0670233fdbd90436bd05d4f1a37e7546f04d4ed18ed0b9c98598
5
5
  SHA512:
6
- metadata.gz: e894d067445285d3dd4beafb06f8bc62e7d5aaedc9c47131ef8db93c2af2a357c222de13205fdd948fb47ad346941c9533dde687de3416cee7192ebdee2382e9
7
- data.tar.gz: b6582c5fb8de24a7d76b368061224359c2a0f02ece2cfc02510d115fd97dbfedf7775083d31ddc22c528f0bd900f20cb0038d8462874bafadc4661a1844abc82
6
+ metadata.gz: 0faea7caf98f0e5b1c3db8af78bce12b9422453dc4e56da3fd87fa2bfbd7a9430198e9c24397f4b517af3e1a18f15c44995a58b3aafbacb62eea9b9b0a2d1308
7
+ data.tar.gz: '0286903dc7b12ea93d9acdf031e5df8c77c843ee2a123291b492c31f5641e4113fcc8774e0ea399aa5cbc6a760e74f96c6e8069a393f6c902b23085e9a0bc7d7'
data/README.md CHANGED
@@ -51,7 +51,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
51
51
 
52
52
  ## Contributing
53
53
 
54
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hibob. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/hibob/blob/master/CODE_OF_CONDUCT.md).
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lienvdsteen/hibob. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/lienvdsteen/hibob/blob/master/CODE_OF_CONDUCT.md).
55
55
 
56
56
  ## License
57
57
 
@@ -59,4 +59,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
59
59
 
60
60
  ## Code of Conduct
61
61
 
62
- Everyone interacting in the Hibob project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hibob/blob/master/CODE_OF_CONDUCT.md).
62
+ Everyone interacting in the Hibob project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/lienvdsteen/hibob/blob/master/CODE_OF_CONDUCT.md).
data/lib/bob/api.rb CHANGED
@@ -64,7 +64,7 @@ module Bob
64
64
  CSV.open("tmp/#{file_name}.csv", 'wb') do |csv|
65
65
  csv << splitted.shift.split(',')
66
66
  splitted.each do |row|
67
- csv << row.split(',')
67
+ csv << CSV.parse_line(row)
68
68
  end
69
69
  end
70
70
 
data/lib/bob/reports.rb CHANGED
@@ -14,10 +14,13 @@ module Bob
14
14
 
15
15
  def self.sftp_upload(sftp_details:, report_id:)
16
16
  file_name = read(report_id)
17
+ uri = URI.parse("sftp://#{sftp_details[:host]}")
17
18
 
18
- Net::SFTP.start(sftp_details[:host], sftp_details[:user], password: sftp_details[:password]) do |sftp|
19
+ Net::SFTP.start(uri.host, sftp_details[:user], password: sftp_details[:password]) do |sftp|
19
20
  sftp.upload!(file_name, sftp_details[:remote_file_path])
20
21
  end
22
+
23
+ true
21
24
  end
22
25
  end
23
26
  end
data/lib/bob/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bob
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobhr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lien Van Den Steen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-23 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -25,33 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rest-client
28
+ name: net-sftp
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: net-sftp
42
+ name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2.0'
55
55
  description: Ruby gem for Bob API
56
56
  email:
57
57
  - lienvandensteen@gmail.com