filebound_client 0.3.8 → 0.4.1

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
  SHA256:
3
- metadata.gz: e20e6e1a54b151676d55c781dfd1d1f9a182b043a2c6a6dd3da3a819edb36137
4
- data.tar.gz: 9280a01d4a7032a71c5014c9adf15e4509d5f56fcdfd5d92c85bf92f27cf5be0
3
+ metadata.gz: e4c298380990383c5572e670540c81fa7ba921ad6ed6fc89569c2feaab43da05
4
+ data.tar.gz: 1c7317c2116217d0f27c469e584402af783e5dd4568488e01a84d9b3319f53c5
5
5
  SHA512:
6
- metadata.gz: b129577455eb061ed4ca768062b09eafbd9d38b0f3f972299b7d0bb51e4ea9e7dd782b6eb8ca3f4c67f7502038df0e14160aa536a8d83ba73622fa615ff95163
7
- data.tar.gz: 98b5f1b05c539cb18033d34bdc1a1b12a61bbe72398a71e30d99b2a8236ab8208785bfa53d90bfc183245de1f17a0f5bff7315f1a1618cecb90217cb360d49cd
6
+ metadata.gz: 5d42ec2aac7f053fd6d05e278d3b56ad9c38d58d87ad3a2ec0232a1a236fbb099293a70c72f4f77b3135ec82ce630b076ab6498e96b2a26b06a10c8f004ddb6e
7
+ data.tar.gz: 1778bf7e70fa174a231d50fecea4b4acfdc495702be32c4135e77d2071322090e3e43265e41aed237970f19f0f440e078aec53f1a19516a811a4e0bb419b5099
@@ -0,0 +1,30 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby 2.6
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ version: 2.6.x
20
+
21
+ - name: Publish to RubyGems
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push *.gem
29
+ env:
30
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
@@ -3,6 +3,25 @@
3
3
 
4
4
  Changes to this gem will be noted here.
5
5
 
6
+ ## [0.4.1] - 2021-01-13
7
+
8
+ ### Changed
9
+
10
+ - Allowed for the possibility that the Filebound API may return an empty string in the response body
11
+
12
+ ### Added
13
+
14
+ - Spec for creating a document note
15
+
16
+ ## [0.4.0] - 2020-12-30
17
+
18
+ ### Added
19
+
20
+ - Created FileboundClient::Endpoints::Documents#document_comments for retrieve comments for a document
21
+ - Created FileboundClient::Endpoints::Documents#document_add_comment for creating new comments on a document
22
+ - Created FileboundClient::Endpoints::Files#file_comments for retrieve comments for a file
23
+ - Created FileboundClient::Endpoints::Files#file_add_comment for creating new comments on a file
24
+
6
25
  ## [0.3.8] - 2020-04-15
7
26
 
8
27
  ### Changed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- filebound_client (0.3.7)
4
+ filebound_client (0.4.1)
5
5
  httpi (~> 2.4.0)
6
6
  rubyntlm (~> 0.6.0)
7
7
 
@@ -10,7 +10,7 @@ GEM
10
10
  specs:
11
11
  ast (2.4.0)
12
12
  diff-lcs (1.3)
13
- httpi (2.4.4)
13
+ httpi (2.4.5)
14
14
  rack
15
15
  socksify
16
16
  jaro_winkler (1.5.4)
@@ -18,7 +18,7 @@ GEM
18
18
  parser (2.7.1.1)
19
19
  ast (~> 2.4.0)
20
20
  powerpack (0.1.2)
21
- rack (2.2.2)
21
+ rack (2.2.3)
22
22
  rainbow (3.0.0)
23
23
  rake (12.3.3)
24
24
  rspec (3.9.0)
@@ -58,6 +58,3 @@ DEPENDENCIES
58
58
  rspec (~> 3.0)
59
59
  rubocop (~> 0.58.2)
60
60
  yard (>= 0.9.20)
61
-
62
- BUNDLED WITH
63
- 2.1.4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FileboundClient
2
2
 
3
- This gem provides a easy way for you to access the Filebound API.
3
+ This gem provides an easy way for you to access the Filebound API.
4
4
 
5
5
  [![Build Status](https://travis-ci.org/JDHeiskell/filebound_client.svg?branch=master)](https://travis-ci.org/JDHeiskell/filebound_client)
6
6
 
@@ -101,7 +101,11 @@ module FileboundClient
101
101
  raise FileboundClientException.new(message, response.code)
102
102
  end
103
103
 
104
- response.body
104
+ if response.body.nil? || response.body.to_s == ''
105
+ '{}'
106
+ else
107
+ response.body
108
+ end
105
109
  end
106
110
  end
107
111
  end
@@ -94,9 +94,24 @@ module FileboundClient
94
94
  # Delete a document
95
95
  # @param [int] document_id the document key
96
96
  # @return [bool] true if document was deleted successfully
97
- def document_delete(document_id)
97
+ def document_delete(document_id, query_params = nil)
98
98
  delete("/documents/#{document_id}")
99
99
  end
100
+
101
+ # Returns the document comments for the supplied document key
102
+ # @param [int] document_id the document key
103
+ # @param [Hash] query_params the additional query params to send in the request
104
+ def document_comments(document_id, query_params = nil)
105
+ get("/documents/#{document_id}/comments", query_params)
106
+ end
107
+
108
+ # Adds a comment to document
109
+ # @param [int] document_id the document key
110
+ # @param [Hash] comment_data the comment to add
111
+ # @return [Hash] the newly added document comment hash
112
+ def document_add_comment(document_id, comment_data, query_params = nil)
113
+ put("/documents/#{document_id}/comments", nil, comment_data)
114
+ end
100
115
  end
101
116
  end
102
117
  end
@@ -64,6 +64,21 @@ module FileboundClient
64
64
  def file_delete(file_id)
65
65
  delete("/files/#{file_id}")
66
66
  end
67
+
68
+ # Returns the file comments for the supplied file key
69
+ # @param [int] file_id the file key
70
+ # @param [Hash] query_params the additional query params to send in the request
71
+ def file_comments(file_id, query_params = nil)
72
+ get("/files/#{file_id}/comments", query_params)
73
+ end
74
+
75
+ # Adds a comment to file
76
+ # @param [int] file_id the file key
77
+ # @param [Hash] comment_data the comment to add
78
+ # @return [Hash] the newly added file comment hash
79
+ def file_add_comment(file_id, comment_data, query_params = nil)
80
+ put("/files/#{file_id}/comments", nil, comment_data)
81
+ end
67
82
  end
68
83
  end
69
84
  end
@@ -1,4 +1,4 @@
1
1
  module FileboundClient
2
2
  # Current version of gem
3
- VERSION = '0.3.8'.freeze
3
+ VERSION = '0.4.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filebound_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Richardson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-15 00:00:00.000000000 Z
11
+ date: 2021-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,6 +90,7 @@ files:
90
90
  - ".github/ISSUE_TEMPLATE/bug_report.md"
91
91
  - ".github/ISSUE_TEMPLATE/feature_request.md"
92
92
  - ".github/PULL_REQUEST_TEMPLATE.md"
93
+ - ".github/workflows/gempush.yml"
93
94
  - ".gitignore"
94
95
  - ".rspec"
95
96
  - ".rubocop.yml"
@@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  - !ruby/object:Gem::Version
150
151
  version: '0'
151
152
  requirements: []
152
- rubygems_version: 3.0.3
153
+ rubygems_version: 3.2.3
153
154
  signing_key:
154
155
  specification_version: 4
155
156
  summary: Provides connection to FileBound API