timely-app 1.0.4 → 1.1.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
2
  SHA256:
3
- metadata.gz: 5fc2e1df8e95c1af4f14f67e40bd7849218fa6a25a7012b91d6c6bedba49875b
4
- data.tar.gz: f10ba288aa8074824ee6cd2508e509564575ea0519c8502220e9b13bfd02cee9
3
+ metadata.gz: '081d23531d1a234416b20f80fb7ce3237cbe26b5e0d09bebe5c7fae92a277784'
4
+ data.tar.gz: 3bbb2fde1f3f6de651c51fbf14702ef54aaf94eeb007e1958fdace1297716aa7
5
5
  SHA512:
6
- metadata.gz: e05a47853c2dfb6233e8ddca0bbb3f1250ebdc1618328f5694370e0128b0ae52606385ed8886230eb0a9df0a8ba7a620c01c4c258ca3f8ab57db3b8fcf33df5d
7
- data.tar.gz: 9e384734bc8a02b3778927cad38cb4e667c40fbf7e91cb048007b0041818aa79c88c4e1831e86ce4c94cc6dd87bc1b2476ec5ff8b8763a59e841978f366b01e8
6
+ metadata.gz: 96c5cf25a5aa6eb5f15ef2d3dc8c271ed0d6888d8842cc7b2ef6d6788928d53c236bd42a2c858cdc30817ea2b593c776999a1b25682a5d9a0ac9d79550256794
7
+ data.tar.gz: d0e430daefdb542b08f59245d314848433ea2d5a75a749083715faf46d44e68de4cbf9563ae82ea992f09894e559390afa65f84590ee3e0252b25b9ed99b23d0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 1.1.0
2
+
3
+ * Update ruby version to 3.2.2
4
+ * Update dependencies
5
+
6
+ # 1.0.5
7
+
8
+ * Fix verbose mode check
9
+
1
10
  # 1.0.4
2
11
 
3
12
  * Update CLI to check input properly and handle command arguments
data/README.md CHANGED
@@ -22,10 +22,12 @@ gem install timely-app
22
22
 
23
23
  Register your local service at https://app.timelyapp.com/{account_id}/oauth_applications
24
24
 
25
- Run auth script:
25
+ Install `timely-app` gem as dependency or globally.
26
+
27
+ Run auth:
26
28
 
27
29
  ```sh
28
- TIMELY_CLIENT_ID=<CLIENT_ID> TIMELY_CLIENT_SECRET=<CLIENT_SECRET> ./examples/auth_cli.rb
30
+ TIMELY_CLIENT_ID=<client_id> TIMELY_CLIENT_SECRET=<client_secret> bundle exec timely-app auth -s
29
31
  ```
30
32
 
31
33
  ## Usage for web service
@@ -89,6 +91,14 @@ There are large list of available tools for tunneling: [awesome-tunneling](https
89
91
 
90
92
  Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/timely-app
91
93
 
94
+ ## Publishing
95
+
96
+ ```sh
97
+ rm timely-app-*.gem
98
+ gem build timely-app.gemspec
99
+ gem push timely-app-*.gem
100
+ ```
101
+
92
102
  ## License
93
103
 
94
104
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'timely-app/version'
3
4
  require 'timely-app/errors'
4
5
  require 'timely-app/link_header'
@@ -13,7 +14,8 @@ module TimelyApp
13
14
  attr_accessor :account_id
14
15
 
15
16
  def initialize(options = {})
16
- @auth_header, @auth_value = 'Authorization', "Bearer #{options[:access_token]}"
17
+ @auth_header = 'Authorization'
18
+ @auth_value = "Bearer #{options[:access_token]}"
17
19
  @user_agent = options.fetch(:user_agent) { "timely-app/#{VERSION} ruby/#{RUBY_VERSION}" }
18
20
 
19
21
  @host = 'api.timelyapp.com'
@@ -22,7 +24,7 @@ module TimelyApp
22
24
  @http.use_ssl = true
23
25
 
24
26
  @account_id = options[:account_id]
25
- @verbose = options[:verbose] || ENV['VERBOSE'] || false
27
+ @verbose = options[:verbose] || !ENV['VERBOSE'].nil? || false
26
28
  end
27
29
 
28
30
  def get(path, params = nil)
@@ -32,7 +34,7 @@ module TimelyApp
32
34
  private
33
35
 
34
36
  def verbose?
35
- !@verbose.nil?
37
+ @verbose == true
36
38
  end
37
39
 
38
40
  def host_uri_join(path, params)
@@ -67,11 +69,9 @@ module TimelyApp
67
69
  puts "<< response: #{http_request.method} #{http_request.path} #{response.code} #{response.body}"
68
70
  end
69
71
 
70
- if response.is_a?(Net::HTTPSuccess)
71
- Response.parse(response)
72
- else
73
- raise Response.error(response)
74
- end
72
+ raise Response.error(response) unless response.is_a?(Net::HTTPSuccess)
73
+
74
+ Response.parse(response)
75
75
  end
76
76
  end
77
77
  end
@@ -1,3 +1,3 @@
1
1
  module TimelyApp
2
- VERSION = '1.0.4'
2
+ VERSION = '1.1.0'
3
3
  end
data/timely-app.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "timely-app"
3
- s.version = "1.0.4"
3
+ s.version = "1.1.0"
4
4
 
5
5
  s.license = "MIT"
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timely-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-08-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client for the Timely API
14
14
  email:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.3.3
72
+ rubygems_version: 3.4.10
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: See description