smartsheet 1.2.0 → 1.3.0

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
- SHA1:
3
- metadata.gz: d40986baa13b5cbda5dbf6bab61056dfc3e64b34
4
- data.tar.gz: e8fea36ef79dd09ce22a632f5134d5561db01673
2
+ SHA256:
3
+ metadata.gz: dfdb074b34d136b1e899f676f8cf8807e32bdd662d69bdc5386a8ffe7cfb0f58
4
+ data.tar.gz: cda02013bf2ea4e3ffa64d4aed6d5b113e0c272cf905e37a28d963584b7b975c
5
5
  SHA512:
6
- metadata.gz: bc87fcc08699c74aa731c9f0c1fd04b2790abbd473ae14ccf92ee3b39a522b9f8369e3b5a5c15b1963923263b7b84d4a2b366de8241198ab6e73ddb3904c6f56
7
- data.tar.gz: 54e1bc705a081fcf7809a14b11cbc43f571f61ce59cd225772d66a613397cd0318d5a574eb0b973c8622860a3496ad6f0a6560386fb3a1f03e519e4f8d881d19
6
+ metadata.gz: 07c7a7f66f6b3fe1b5e3bcc18c79eb99fb61462c1cf2b66284398cd24629dd96e97442d9507fa4b1142d22b807983be0d5c9e730e236b6d93b9f4c8decefe49d
7
+ data.tar.gz: ff81233acec8c754515b60adfa38d9e435ab4669973488e9c20a855f13bfbd1d594a7e2c9f7a3f87d605028186b55ed6a75c83c8b021e1bdb425dcd0d336844d
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  /.idea/
11
11
  *.gem
12
+ test.rb
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.0] - 2019-02-11
10
+ - Added constant for smartsheetgov
11
+ - Updated documentation regarding the usage of base_url to clarify how clients can access smartsheetgov
12
+
9
13
  ## [1.2.0] - 2018-06-29
10
14
  ### Added
11
15
  - Added support for 'import sheet from XLSX, CSV file' endpoints
data/README.md CHANGED
@@ -11,7 +11,7 @@ The SDK supports Ruby versions 2.2 or later.
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'smartsheet', '>= 1.0.0'
14
+ gem 'smartsheet', '>= 1.3.0'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -66,6 +66,28 @@ end
66
66
 
67
67
  See the [read-write-sheet](https://github.com/smartsheet-samples/ruby-read-write-sheet) example to see a more robust use case in action.
68
68
 
69
+ ## Conventions
70
+
71
+ Each endpoint may take a number of keyword arguments, including the special keyword argument `body` for requests that accept a request body. Smartsheet's API Ruby documentation provides the parameters expected for each endpoint.
72
+
73
+ Each endpoint also provides two optional keyword arguments:
74
+
75
+ * `params` - This option is common for specifying enhancements or additional features for an API call. It specifies the query string for the call's URL.
76
+
77
+ This must be a hash of URL query string fields to their values. For example, to make a call with the query string `?include=comments&includeAll=true`, an API call would look like the following:
78
+
79
+ ```ruby
80
+ ...get( ..., params: {include: 'comments', includeAll: true})
81
+ ```
82
+
83
+ * `header_overrides` - This option is less frequently used, as it overrides the HTTP headers sent by API calls on an individual basis. _Use with caution_, as some headers are required to allow the SDK to function properly.
84
+
85
+ This must be a hash of headers to override values. For example, to make a call with a modified `Assume-User` header set to `jane.doe@smartsheet.com`, an API call would look like the following:
86
+
87
+ ```ruby
88
+ ...get( ..., header_overrides: {'Assume-User' => 'jane.doe@smartsheet.com'})
89
+ ```
90
+
69
91
  ## Basic Configuration
70
92
 
71
93
  When creating the client object, pass an object with any of the following properties to tune its behavior.
@@ -74,7 +96,9 @@ When creating the client object, pass an object with any of the following proper
74
96
 
75
97
  * `max_retry_time` - The maximum time in seconds to retry intermittent errors. (Defaults to 15 seconds.)
76
98
 
77
- * `base_url` - By default, the SDK connects to the production API URL. Provide a custom base URL to connect to other environments.
99
+ * `base_url` - By default, the SDK connects to the production API URL. Provide a custom base URL to connect to other environments. For example, to access SmartsheetGov, the `base_url` will be `https://api.smartsheetgov.com/2.0`.
100
+ * To access Smartsheetgov, you will need to specify the Smartsheetgov API URI, `https://api.smartsheetgov.com/2.0/`, as the `base_url` during creation of the Smartsheet client object. The Smartsheetgov URI is defined as a constant (`GOV_API_URL`).
101
+
78
102
 
79
103
  ## Advanced Configuration Options
80
104
  ### Logging Configuration
@@ -158,7 +182,7 @@ To invoke the passthrough, your code can call one of the following three methods
158
182
  `response = smartsheet.request_with_file_from_path(method:, url_path:, path:, filename:, content_type:, params:, header_overrides:)`
159
183
 
160
184
  * `method`: The method to invoke, one of `:get`, `:post`, `:put`, or `:delete`
161
- * `url_path`: The specific API endpoint you wish to invoke. The client object base URL gets prepended to the caller’s endpoint URL argument. For example, passing a `url_path` of `sheets/1` to a standard client would give a URL like `https://api.smartsheet.com/2.0/sheets/1`
185
+ * `url_path`: The specific API endpoint you wish to invoke. The client object base URL gets prepended to the caller’s endpoint URL argument.
162
186
  * `body`: An optional hash of data to be passed as a JSON request body
163
187
  * `file`: An opened `File` object to read as the request body, generally for file attachment endpoints
164
188
  * `path`: The path of a file to be read as the request body, generally for file attachment endpoints
@@ -209,6 +233,6 @@ If you have any questions or issues with this SDK please post on [Stack Overflow
209
233
 
210
234
  ## Release Notes
211
235
 
212
- Each specific release is available for download via [GitHub](https://github.com/smartsheet-platform/smartsheet-ruby-sdk/tags). Detailed release notes are available in [CHANGELOG.md].
236
+ Each specific release is available for download via [GitHub](https://github.com/smartsheet-platform/smartsheet-ruby-sdk/tags). Detailed release notes are available in [CHANGELOG.md].
213
237
 
214
238
  *Note*: Minor changes that result in a patch version increment in RubyGems (such as updates to the README) will not be tagged as a Release in GitHub.
@@ -1,9 +1,10 @@
1
1
  module Smartsheet
2
2
  module Constants
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.3.0'.freeze
4
4
 
5
5
  USER_AGENT = 'smartsheet-ruby-sdk'.freeze
6
6
  API_URL = 'https://api.smartsheet.com/2.0'.freeze
7
+ GOV_API_URL = 'https://api.smartsheetgov.com/2.0'.freeze
7
8
 
8
9
  JSON_TYPE = 'application/json'.freeze
9
10
  EXCEL_TYPE = 'application/vnd.ms-excel'.freeze
data/smartsheet.gemspec CHANGED
@@ -45,9 +45,9 @@ Gem::Specification.new do |spec|
45
45
  spec.add_development_dependency 'minitest', '~> 5.0'
46
46
  spec.add_development_dependency 'mocha', '~> 1.3'
47
47
  spec.add_development_dependency 'timecop', '~> 0.9.1'
48
- spec.add_development_dependency 'rubocop', '~> 0.49.1'
48
+ spec.add_development_dependency 'rubocop', '~> 0.49'
49
49
  spec.add_development_dependency 'reek', '~> 4.7'
50
- spec.add_development_dependency 'rubycritic', '~> 3.2'
50
+ spec.add_development_dependency 'rubycritic', '~> 3.4'
51
51
  spec.add_development_dependency 'yard', '~> 0.9'
52
52
  spec.add_development_dependency 'redcarpet', '~> 3.4'
53
53
  spec.add_development_dependency 'github-markup', '~> 1.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smartsheet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.49.1
173
+ version: '0.49'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.49.1
180
+ version: '0.49'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: reek
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +198,14 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '3.2'
201
+ version: '3.4'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '3.2'
208
+ version: '3.4'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: yard
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  version: '0'
345
345
  requirements: []
346
346
  rubyforge_project:
347
- rubygems_version: 2.4.5.2
347
+ rubygems_version: 2.7.6
348
348
  signing_key:
349
349
  specification_version: 4
350
350
  summary: An SDK to simplify connecting to the Smartsheet API from Ruby applications.