tp_client 0.2.2 → 0.2.7

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: 74db5f53c5017070ac69231e4ba9e4db02e145f00944ac3b9776f0b6189840e0
4
- data.tar.gz: 0f7eed9ead59dbc324238ace99f2292a255bbf8b11377e26c63dc329c8541e67
3
+ metadata.gz: e29b25829af14b5095160e9f72747356c3e0213ca0ff9c22af24a71974ef322a
4
+ data.tar.gz: 1a3f83e33cff75a15d95a8e3020eeebe269ded25b3459e3990d78a67c167b39d
5
5
  SHA512:
6
- metadata.gz: 5c295b28692f105778b54dcb4f3fa75470b5bf2594eca84032645f3b73fd05131d75be044c864ab471cdc0e594268b603974c70eec0c38b96706df082524df02
7
- data.tar.gz: e36ac6716ca438dd51db4272b70c302f5338893759da467a7112fd34471b85daa7302c5b5bfdb4278112f78b9dcb9a5a39eb52d52ccdd3e399bbf580c5d98c45
6
+ metadata.gz: 1eeb97b81788d54e267bcdd0dc035bece07901277b30c4730c682d9168674abc515f7ce0ad17c6626f12197f1477f5d6af3621b431531ae39b1467c68d0938b0
7
+ data.tar.gz: 7c87e6989ab4888e7ae753fd7a1b905320046c85f060a3fa3e8593ee98cf9728018910ce0c4aff7a9aaa9d11edb752f020bf5a4d92ab4c070908f2ed79657642
data/.gitignore CHANGED
@@ -3,7 +3,9 @@
3
3
  /.config
4
4
  /coverage/
5
5
  /gems/
6
+ /gemfiles/*.lock
6
7
  /gemfiles/gems/
8
+ /gemfiles/vendor/bundle
7
9
  /InstalledFiles
8
10
  /pkg/
9
11
  /spec/reports/
data/.travis.yml CHANGED
@@ -1,17 +1,41 @@
1
+ dist: bionic
1
2
  sudo: false
2
3
  language: ruby
3
- rvm:
4
- - 2.5.3
5
- gemfile:
6
- - gemfiles/activesupport_4.gemfile
7
- - gemfiles/activesupport_5.gemfile
8
- - gemfiles/activesupport_6.gemfile
9
- deploy:
10
- provider: rubygems
11
- api_key:
12
- secure: rhnpzPKF7/SYka8XSo8ohtIT/YZB+eltG+uK1Yrup+RHYUvvjL5VbGuVXK71ouNtA5g0iA0xHB8lYyXBkC/DsovURjwhYQXymykqWz68yGjCQgl3i0IP8bgntAP5+PYbeOvYpy8DlH+6qakoTewa/cOhYvLLVlE91zk92UFORIW2b0TVxxMASB2cuKBOkI5a7vRpncpBYupIWLMIHwQd2IGPlWCPOx53QumZkuG1Xze8wuxGTdT+Oo4pIJsNZi1Oz5KKbOaYgYOZa29TlXesz43HcTruIIeMJgKuVMOMgSO0OuQGZa2wK5r7frWqepL8fOvkxS1MYM/9CBC2oUDPQMfX8OIbKQrvgmmIWy5gb78PXQzc8nzYXi+D8HZSydL+7lGnW6Jj5wUUcZ/s8pzfUtC5vgVq+mA7HssKwt3vFACh2prDa+EZuas7jDz36ek9GZsKooKHzMaN2gO9um8JfwgonWbqvXJvhz64QOqTu8ySaWX4is0Y93wc+3fLHPtS6gnyG/ClhLtm7PtJ1+LPo6xrn+9dMfcMfpLTq/z1urHJyzj+8NspMp+ZAZVu+WgfmfcX3/UmzOUBcTOCjA4i2L+jEydFgrOJhYXgGp3iCueKUhHmAAFzWkG8Vtt/KgmvW400kjCAjqIKYo+2DZjlqILZbT19Kr/ZMqDiwnB5ozI=
13
- gem: tp_client
14
- on:
15
- tags: true
16
- branch: master
17
- repo: TINYhr/tiny_client
4
+ cache: bundler
5
+ script: bundle exec rake
6
+ jobs:
7
+ fast_finish: true
8
+ include:
9
+ - stage: Test
10
+ rvm: 2.4.10
11
+ gemfile: gemfiles/activesupport_4.2.gemfile
12
+ - rvm: 2.4.10
13
+ gemfile: gemfiles/activesupport_5.1.gemfile
14
+ - rvm: 2.5.8
15
+ gemfile: gemfiles/activesupport_5.1.gemfile
16
+ - rvm: 2.5.8
17
+ gemfile: gemfiles/activesupport_5.2.gemfile
18
+ - rvm: 2.5.8
19
+ gemfile: gemfiles/activesupport_6.gemfile
20
+ - rvm: 2.6.6
21
+ gemfile: gemfiles/activesupport_5.2.gemfile
22
+ - rvm: 2.6.6
23
+ gemfile: gemfiles/activesupport_6.gemfile
24
+ - rvm: 2.7.2
25
+ gemfile: gemfiles/activesupport_5.2.gemfile
26
+ - rvm: 2.7.2
27
+ gemfile: gemfiles/activesupport_6.gemfile
28
+ - if: tag IS present
29
+ stage: Release Gem
30
+ rvm: 2.5.8
31
+ gemfile: gemfiles/activesupport_5.1.gemfile
32
+ script: skip
33
+ deploy:
34
+ provider: rubygems
35
+ gem: tp_client
36
+ api_key:
37
+ secure: vyxUUOg1A7K1iqfjXa/P9URnbh+ntKvgfAYDAxr4My9isOsnlYXtRdDl2RgLttmmtOv5unPDrTv8Mkh5B1WMA6ihKaBUXCaU4cgyh6vLds2fSy1yxUSR/TmfnoXmRVAtBHYiuKuHol5koIW+gSDNHYenzO2mvrOks06Jtkmp0X2OJgVCS1PqWjTrDvlpfRKf2bUnE2/5/XvwnUqKCLRls1CSpV+phW6m9qsAkqMv0TMa8Em3pOUjY8mCAgFArr3cl5MtyX3Nhh95CzcGHeMUfLu8Lz0NcHscG8xNq58NnFFU6m8nQJYyxZOjFtUrJumyvy5qwZZtprwc8XxE6BmY1IJWfKCnDJbEl/qxaX0psfVG2Eiu6e/Y/Lad1NUV9hYZCXkEVEsksZa7n3sd2XOzbJmqPgM0z53Ly3koj1uMZrJ5BJ4AfZIE4gbFm5+UmSez/K9xnCWUc5NXR9+v1kyJYLsjHevn0DMxb+7xvSR5zxyS9du+GUIbIGRIKBERYGS08u+/zaPTLmGSyMpK+x5ichJoSLaJsECGGUbY2kL9aO18w41oZbvQf+Cp/656oRZM8U4DV2HtRCp6Dqc3Y8MJG1Pzft6+mHYPepon21fi08B6GOAFMF/Rcuz/SpnP9dvSCJyEcgNahDDNvRQmOwT00M8tSDeQeuR3uTXfMScBkAA=
38
+ on:
39
+ tags: true
40
+ branch: master
41
+ repo: TINYhr/tiny_client
data/Appraisals CHANGED
@@ -1,11 +1,15 @@
1
- appraise "activesupport-4" do
2
- gem 'activesupport', '~> 4.0'
1
+ appraise 'activesupport-4.2' do
2
+ gem 'activesupport', '~> 4.2'
3
3
  end
4
4
 
5
- appraise "activesupport-5" do
6
- gem 'activesupport', '~> 5.0'
5
+ appraise 'activesupport-5.1' do
6
+ gem 'activesupport', '~> 5.1'
7
7
  end
8
8
 
9
- appraise "activesupport-6" do
9
+ appraise 'activesupport-5.2' do
10
+ gem 'activesupport', '~> 5.2'
11
+ end
12
+
13
+ appraise 'activesupport-6' do
10
14
  gem 'activesupport', '~> 6.0'
11
15
  end
data/README.md CHANGED
@@ -16,7 +16,7 @@ gem install tp_client
16
16
 
17
17
  ```ruby
18
18
  # As gem main class is different from gem name, we must require file name explicitly
19
- gem 'tp_client', '~> 0.1', require: 'tiny_client'
19
+ gem 'tp_client', '~> 0.2.7', require: 'tiny_client'
20
20
  ```
21
21
 
22
22
  Please notice, we have 2 similar gems:
@@ -34,7 +34,6 @@ You can initialize your API by extending the `TinyClient::Configuration`
34
34
 
35
35
  ```ruby
36
36
  class MyConf < TinyClient::Configuration
37
-
38
37
  def initialize
39
38
  @url = 'http://localhost:3000/api/1.0'
40
39
  @headers = { 'Authorization' => 'token asdfasf4ffsafasdf@12rfsdfa' }
@@ -197,7 +196,7 @@ toto.save! # POST { author: {} }
197
196
  Pagination, buffer is achieve through `limit` and `offset` params.
198
197
 
199
198
  ```
200
- Author.index_all({limit: 100}) # Will queries the server by batch of 100, until all authors has been retrieved through the enumerator.
199
+ Author.index_all(limit: 100) # Will queries the server by batch of 100, until all authors has been retrieved through the enumerator.
201
200
 
202
201
  ```
203
202
 
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
3
  require 'yard'
4
4
 
5
5
  task default: [:test]
6
+ task gem: [:test, :build]
6
7
 
7
8
  Rake::TestTask.new do |t|
8
9
  t.libs << 'test'
@@ -13,14 +14,3 @@ YARD::Rake::YardocTask.new do |t|
13
14
  t.files = ['lib/**/*.rb']
14
15
  t.options = ['-o docs']
15
16
  end
16
-
17
- desc 'Build the gem'
18
- task gem: [:test] do
19
- sh 'gem build tiny_client.gemspec'
20
- end
21
-
22
- desc 'Clean up'
23
- task :clean do
24
- sh 'rm -rf docs'
25
- sh 'rm -f tiny_client*.gem'
26
- end
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activesupport", "~> 4.0"
5
+ gem "activesupport", "~> 4.2"
6
6
 
7
7
  group :test, :development do
8
8
  gem "byebug"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activesupport", "~> 5.0"
5
+ gem "activesupport", "~> 5.1"
6
6
 
7
7
  group :test, :development do
8
8
  gem "byebug"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 5.2"
6
+
7
+ group :test, :development do
8
+ gem "byebug"
9
+ gem "minitest"
10
+ gem "mocha"
11
+ gem "rake"
12
+ gem "webmock"
13
+ gem "yard"
14
+ end
15
+
16
+ gemspec path: "../"
@@ -6,6 +6,7 @@ module TinyClient
6
6
  # @attr_reader [Integer] limit default limit used as a query param
7
7
  class Configuration
8
8
  include Singleton
9
+
9
10
  attr_reader :url, :limit
10
11
 
11
12
  # You need to initialize the api {#url}, default {#headers}, and default limit.
@@ -28,6 +29,18 @@ module TinyClient
28
29
  @verbose ||= false
29
30
  end
30
31
 
32
+ # @return [String] url using `TinyClient::UrlBuilder` to build url
33
+ def url_for(*args)
34
+ query = args.extract_options!
35
+ url_builder.path(*args).query(query).build
36
+ end
37
+
38
+ # @return [TinyClient::UrlBuilder] url_builder
39
+ def url_builder
40
+ TinyClient::UrlBuilder.url(url)
41
+ end
42
+
43
+ # @return [TinyClient::RemoteClient] requestor
31
44
  def requestor
32
45
  @requestor ||= TinyClient::RemoteClient.new(self)
33
46
  end
@@ -22,14 +22,14 @@ module TinyClient
22
22
  def nested_show(resource_class, id, params = {})
23
23
  raise ArgumentError, 'Works only for TinyClient::Resource' unless resource_class <= Resource
24
24
  path = UrlBuilder.url(resource_class.path).path(id).build!
25
- self.class.get(params, @id, path, resource_class)
25
+ self.class.get(params, id, path, resource_class)
26
26
  end
27
27
 
28
28
  # @raise [ArgumentError] if the given resource_class is not a Resource
29
29
  # @raise [ResponseError] if the server respond with an error status (i.e 404, 500..)
30
30
  def nested_index(resource_class, params = {})
31
31
  raise ArgumentError, 'Works only for TinyClient::Resource' unless resource_class <= Resource
32
- self.class.get(params, @id, resource_class.path, resource_class)
32
+ self.class.get(params, id, resource_class.path, resource_class)
33
33
  end
34
34
 
35
35
  # @raise [ArgumentError] if the given resource does not have an id or is not Resource instance
@@ -39,7 +39,7 @@ module TinyClient
39
39
  raise ArgumentError, 'resource must have id set' if resource.id.nil?
40
40
  path = UrlBuilder.url(resource.class.path).path(resource.id).build!
41
41
  data = resource.changes.to_a.each_with_object({}) { |fld, h| h[fld] = resource.send(fld) }
42
- self.class.put({ resource.class.low_name => data }, @id, path, resource.class)
42
+ self.class.put({ resource.class.low_name => data }, id, path, resource.class)
43
43
  end
44
44
 
45
45
  # @raise [ArgumentError] if the given resource does not have an id or is not a Resource instance
@@ -9,7 +9,7 @@ module TinyClient
9
9
  # @raise [ResponseError] if the server respond with an error status (i.e 404, 500..)
10
10
  # @return [Response]
11
11
  def get(path, params, id, name)
12
- url = build_url(path, id, name).query(params).build!
12
+ url = @config.url_for(path, id, name, params)
13
13
  CurbRequestor.perform_get(url, {
14
14
  'Accept' => 'application/json',
15
15
  'Content-Type' => 'application/x-www-form-urlencoded'
@@ -21,7 +21,7 @@ module TinyClient
21
21
  # @raise [ResponseError] if the server respond with an error status (i.e 404, 500..)
22
22
  # @return [Response]
23
23
  def post(data, path, id, name)
24
- url = build_url(path, id, name).build!
24
+ url = @config.url_for(path, id, name)
25
25
  verify_json(data)
26
26
  CurbRequestor.perform_post(url, {
27
27
  'Accept' => 'application/json',
@@ -34,7 +34,7 @@ module TinyClient
34
34
  # @raise [ResponseError] if the server respond with an error status (i.e 404, 500..)
35
35
  # @return [Response]
36
36
  def put(data, path, id, name)
37
- url = build_url(path, id, name).build!
37
+ url = @config.url_for(path, id, name)
38
38
  verify_json(data)
39
39
  CurbRequestor.perform_put(url, {
40
40
  'Accept' => 'application/json',
@@ -46,7 +46,7 @@ module TinyClient
46
46
  # @raise [ResponseError] if the server respond with an error status (i.e 404, 500..)
47
47
  # @return [Response]
48
48
  def delete(path, id, name)
49
- url = build_url(path, id, name).build!
49
+ url = @config.url_for(path, id, name)
50
50
  CurbRequestor.perform_delete(url, {
51
51
  'Accept' => 'application/json',
52
52
  'Content-Type' => 'application/x-www-form-urlencoded'
@@ -58,9 +58,5 @@ module TinyClient
58
58
  def verify_json(data)
59
59
  raise ArgumentError, 'data must respond to .to_json' unless data.respond_to? :to_json
60
60
  end
61
-
62
- def build_url(path, id, name)
63
- UrlBuilder.url(@config.url).path(path).path(id).path(name)
64
- end
65
61
  end
66
62
  end
@@ -12,9 +12,6 @@ module TinyClient
12
12
  include PaginationSupport
13
13
  include NestedSupport
14
14
 
15
- # A resource always have an id
16
- attr_accessor :id
17
-
18
15
  class << self
19
16
  # Set this resource client configuration
20
17
  # @param [Configuration] config the api url and client default headers.
@@ -157,10 +154,14 @@ module TinyClient
157
154
  end
158
155
  end
159
156
 
157
+ # A resource always have an id
158
+ attr_accessor :id
159
+
160
160
  # the fields that has beem modified, and will be save on {save!}
161
161
  attr_reader :changes
162
162
 
163
163
  def initialize(*_args)
164
+ @id = nil
164
165
  @changes = Set.new # store the fields change here
165
166
  end
166
167
 
@@ -4,14 +4,14 @@ require 'active_support/gzip'
4
4
  module TinyClient
5
5
  # Wrap the curl request response.
6
6
  class Response
7
- attr_reader :status, :body_str, :header_str, :url, :code
7
+ attr_reader :url, :body_str, :header_str, :status, :code
8
8
 
9
9
  def initialize(curb)
10
- @status = curb.status
10
+ @url = curb.url
11
11
  @body_str = curb.body_str
12
12
  @header_str = curb.header_str
13
+ @status = curb.status
13
14
  @code = @status.to_i
14
- @url = curb.url
15
15
  end
16
16
 
17
17
  # Convert the response json body into an hash.
@@ -43,29 +43,53 @@ module TinyClient
43
43
  @code >= 400
44
44
  end
45
45
 
46
+ # @return true if the HTTP status code of this response is 404
47
+ def not_found_error?
48
+ @code == 404
49
+ end
50
+
51
+ # @return true if the HTTP status code of this response correspond to an client error.
46
52
  def client_error?
47
53
  (400..499).cover?(@code)
48
54
  end
49
55
 
56
+ # @return true if the HTTP status code of this response correspond to a server error.
50
57
  def server_error?
51
58
  @code >= 500
52
59
  end
53
60
 
61
+ # @return true if the HTTP status code of this response correspond to a redirect.
54
62
  def redirect?
55
63
  (300..399).cover?(@code)
56
64
  end
57
65
 
58
- def to_s
66
+ # @return Hash with url, status, body and headers fields
67
+ def to_hash
59
68
  {
60
- url: url,
61
- status: status,
62
- body: body_str,
63
- headers: header_str
64
- }.to_s
69
+ 'url' => url,
70
+ 'status' => status,
71
+ 'body' => (parse_body rescue body_str),
72
+ 'headers' => (parse_headers rescue header_str)
73
+ }
74
+ end
75
+
76
+ # @return String of #to_hash
77
+ def to_s
78
+ to_hash.to_s
65
79
  end
66
80
 
67
81
  protected
68
82
 
83
+ def parse_headers
84
+ {}.tap do |headers|
85
+ header_str.to_s.each_line do |header|
86
+ next if header.index(':').nil?
87
+ key, value = header.split(':', 2)
88
+ headers[key] = value.to_s.strip
89
+ end
90
+ end
91
+ end
92
+
69
93
  def gzip_decompress
70
94
  ActiveSupport::Gzip.decompress(body_str)
71
95
  end
@@ -9,5 +9,9 @@ module TinyClient
9
9
  @response = response
10
10
  super("Error #{response.status} occured when calling #{response.url}")
11
11
  end
12
+
13
+ def to_hash
14
+ response.to_hash
15
+ end
12
16
  end
13
17
  end
@@ -4,14 +4,16 @@ module TinyClient
4
4
  # Convenient class used to build a request URL.
5
5
  class UrlBuilder
6
6
  SEPARATOR = '/'.freeze
7
- attr_writer :query
8
7
 
9
8
  def self.url(url)
10
9
  new(url)
11
10
  end
12
11
 
13
- def path(path)
14
- @path << fix_path(path) unless path.blank?
12
+ def path(*paths)
13
+ paths.each do |path|
14
+ new_path = fix_path(path)
15
+ @path << new_path if new_path.present?
16
+ end
15
17
  self
16
18
  end
17
19
 
@@ -20,21 +22,43 @@ module TinyClient
20
22
  self
21
23
  end
22
24
 
25
+ # @return [String] url with all paths and query params
26
+ def build
27
+ url = "#{[@url, @path].join(SEPARATOR)}.json"
28
+ url = "#{url}?#{@query.to_query}" unless @query.empty?
29
+ url
30
+ end
31
+
32
+ # @deprecated Please use {#build} instead
23
33
  def build!
24
- query_s = "?#{@query.to_query}" unless @query.empty?
25
- "#{@path.join(SEPARATOR)}.json#{query_s}"
34
+ ActiveSupport::Deprecation.warn('`build!` is deprecated. Please use `build` instead')
35
+ build
26
36
  end
27
37
 
28
38
  private
29
39
 
30
40
  def initialize(url)
31
- @path = [url]
41
+ @url = parse_url(url)
42
+ @path = []
32
43
  @query = {}
33
44
  end
34
45
 
46
+ def parse_url(url)
47
+ if url.blank? || url == SEPARATOR
48
+ ''
49
+ else
50
+ url = url[0..-2] if url.end_with?(SEPARATOR)
51
+ url
52
+ end
53
+ end
54
+
35
55
  def fix_path(path)
36
- if path.respond_to?(:gsub)
37
- path.gsub(/\.json$/, '')
56
+ case path
57
+ when String
58
+ path = path.gsub(/\.json$/, '')
59
+ path = path[1..-1] if path.start_with?('/')
60
+ path = path[0..-2] if path.end_with?('/')
61
+ path
38
62
  else
39
63
  path
40
64
  end
data/tp_client.gemspec CHANGED
@@ -1,37 +1,36 @@
1
1
  Gem::Specification.new do |s|
2
- s.name = 'tp_client'
3
- s.authors = ['TINYpulse Devops']
4
- s.version = '0.2.2'
2
+ s.platform = Gem::Platform::RUBY
3
+ s.name = 'tp_client'
4
+ s.version = '0.2.7'
5
+ s.authors = ['TINYpulse DevOps']
6
+ s.email = 'devops@tinypulse.com'
5
7
 
6
- s.summary = 'TINYclient, an HTTP/JSON crud client toolkit.'
7
- s.description = 'TINYclient is an HTTP/JSON crud toolkit inspired by ActiveRecord and based on Curb.'
8
- s.email = 'devops@tinypulse.com'
8
+ s.license = 'MIT'
9
9
 
10
- s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
10
+ s.summary = 'TINYclient, an HTTP/JSON crud client toolkit.'
11
+ s.description = 'TINYclient is an HTTP/JSON crud toolkit inspired by ActiveRecord and based on Curb.'
12
+ s.homepage = 'https://github.com/TINYhr/tiny_client'
11
13
 
12
14
  if s.respond_to?(:metadata)
13
- s.metadata["allowed_push_host"] = 'https://rubygems.org'
15
+ s.metadata['allowed_push_host'] = 'https://rubygems.org'
16
+ s.metadata['homepage_uri'] = s.homepage
14
17
  else
15
- raise "RubyGems 2.0 or newer is required to protect against " \
16
- "public gem pushes."
18
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
17
19
  end
18
20
 
19
21
  #### Load-time details
20
- s.require_paths = %w(lib ext)
21
- s.rubyforge_project = 'tiny_client'
22
- s.test_files = ['test/tiny_client/']
22
+ s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ end
25
+ s.require_paths = %w[lib ext]
26
+ s.test_files = ['test/tiny_client/']
23
27
 
24
- #### Documentation and testing.
25
- s.has_rdoc = 'yard'
26
- s.homepage = 'https://github.com/TINYhr/tiny_client'
27
- s.rdoc_options = ['--main', 'README.md']
28
+ #### Documentation
29
+ s.rdoc_options = ['--main', 'README.md']
28
30
  s.extra_rdoc_files = ['LICENSE', 'README.md']
29
31
 
30
- s.platform = Gem::Platform::RUBY
31
- s.license = 'MIT'
32
-
33
- s.add_runtime_dependency 'curb', '> 0.7.0', '< 1.0.0'
34
- s.add_runtime_dependency 'activesupport', '>= 4.0', '< 7.0'
32
+ s.add_runtime_dependency 'curb', '> 0.7.0', '< 1.0.0'
33
+ s.add_runtime_dependency 'activesupport', '>= 4.0', '< 7.0'
35
34
 
36
- s.add_development_dependency "appraisal", '~> 2.2', '>= 2.2.0'
35
+ s.add_development_dependency 'appraisal', '~> 2.2', '>= 2.2.0'
37
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
- - TINYpulse Devops
8
- autorequire:
7
+ - TINYpulse DevOps
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-06 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb
@@ -54,22 +54,22 @@ dependencies:
54
54
  name: appraisal
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '2.2'
60
57
  - - ">="
61
58
  - !ruby/object:Gem::Version
62
59
  version: 2.2.0
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '2.2'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '2.2'
70
67
  - - ">="
71
68
  - !ruby/object:Gem::Version
72
69
  version: 2.2.0
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '2.2'
73
73
  description: TINYclient is an HTTP/JSON crud toolkit inspired by ActiveRecord and
74
74
  based on Curb.
75
75
  email: devops@tinypulse.com
@@ -88,12 +88,10 @@ files:
88
88
  - README.md
89
89
  - Rakefile
90
90
  - gemfiles/.bundle/config
91
- - gemfiles/activesupport_4.gemfile
92
- - gemfiles/activesupport_4.gemfile.lock
93
- - gemfiles/activesupport_5.gemfile
94
- - gemfiles/activesupport_5.gemfile.lock
91
+ - gemfiles/activesupport_4.2.gemfile
92
+ - gemfiles/activesupport_5.1.gemfile
93
+ - gemfiles/activesupport_5.2.gemfile
95
94
  - gemfiles/activesupport_6.gemfile
96
- - gemfiles/activesupport_6.gemfile.lock
97
95
  - lib/tiny_client.rb
98
96
  - lib/tiny_client/base_error.rb
99
97
  - lib/tiny_client/configuration.rb
@@ -113,7 +111,8 @@ licenses:
113
111
  - MIT
114
112
  metadata:
115
113
  allowed_push_host: https://rubygems.org
116
- post_install_message:
114
+ homepage_uri: https://github.com/TINYhr/tiny_client
115
+ post_install_message:
117
116
  rdoc_options:
118
117
  - "--main"
119
118
  - README.md
@@ -131,9 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
130
  - !ruby/object:Gem::Version
132
131
  version: '0'
133
132
  requirements: []
134
- rubyforge_project: tiny_client
135
- rubygems_version: 2.7.7
136
- signing_key:
133
+ rubygems_version: 3.0.3.1
134
+ signing_key:
137
135
  specification_version: 4
138
136
  summary: TINYclient, an HTTP/JSON crud client toolkit.
139
137
  test_files: []
@@ -1,62 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- tp_client (0.2.2)
5
- activesupport (>= 4.0, < 7.0)
6
- curb (> 0.7.0, < 1.0.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (4.2.11.1)
12
- i18n (~> 0.7)
13
- minitest (~> 5.1)
14
- thread_safe (~> 0.3, >= 0.3.4)
15
- tzinfo (~> 1.1)
16
- addressable (2.6.0)
17
- public_suffix (>= 2.0.2, < 4.0)
18
- appraisal (2.2.0)
19
- bundler
20
- rake
21
- thor (>= 0.14.0)
22
- byebug (11.0.1)
23
- concurrent-ruby (1.1.5)
24
- crack (0.4.3)
25
- safe_yaml (~> 1.0.0)
26
- curb (0.9.10)
27
- hashdiff (1.0.0)
28
- i18n (0.9.5)
29
- concurrent-ruby (~> 1.0)
30
- metaclass (0.0.4)
31
- minitest (5.11.3)
32
- mocha (1.9.0)
33
- metaclass (~> 0.0.1)
34
- public_suffix (3.1.1)
35
- rake (12.3.3)
36
- safe_yaml (1.0.5)
37
- thor (0.20.3)
38
- thread_safe (0.3.6)
39
- tzinfo (1.2.5)
40
- thread_safe (~> 0.1)
41
- webmock (3.7.0)
42
- addressable (>= 2.3.6)
43
- crack (>= 0.3.2)
44
- hashdiff (>= 0.4.0, < 2.0.0)
45
- yard (0.9.20)
46
-
47
- PLATFORMS
48
- ruby
49
-
50
- DEPENDENCIES
51
- activesupport (~> 4.0)
52
- appraisal (~> 2.2, >= 2.2.0)
53
- byebug
54
- minitest
55
- mocha
56
- rake
57
- tp_client!
58
- webmock
59
- yard
60
-
61
- BUNDLED WITH
62
- 1.17.3
@@ -1,62 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- tp_client (0.2.2)
5
- activesupport (>= 4.0, < 7.0)
6
- curb (> 0.7.0, < 1.0.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (5.2.3)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- addressable (2.6.0)
17
- public_suffix (>= 2.0.2, < 4.0)
18
- appraisal (2.2.0)
19
- bundler
20
- rake
21
- thor (>= 0.14.0)
22
- byebug (11.0.1)
23
- concurrent-ruby (1.1.5)
24
- crack (0.4.3)
25
- safe_yaml (~> 1.0.0)
26
- curb (0.9.10)
27
- hashdiff (1.0.0)
28
- i18n (1.6.0)
29
- concurrent-ruby (~> 1.0)
30
- metaclass (0.0.4)
31
- minitest (5.11.3)
32
- mocha (1.9.0)
33
- metaclass (~> 0.0.1)
34
- public_suffix (3.1.1)
35
- rake (12.3.3)
36
- safe_yaml (1.0.5)
37
- thor (0.20.3)
38
- thread_safe (0.3.6)
39
- tzinfo (1.2.5)
40
- thread_safe (~> 0.1)
41
- webmock (3.7.0)
42
- addressable (>= 2.3.6)
43
- crack (>= 0.3.2)
44
- hashdiff (>= 0.4.0, < 2.0.0)
45
- yard (0.9.20)
46
-
47
- PLATFORMS
48
- ruby
49
-
50
- DEPENDENCIES
51
- activesupport (~> 5.0)
52
- appraisal (~> 2.2, >= 2.2.0)
53
- byebug
54
- minitest
55
- mocha
56
- rake
57
- tp_client!
58
- webmock
59
- yard
60
-
61
- BUNDLED WITH
62
- 1.17.3
@@ -1,64 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- tp_client (0.2.2)
5
- activesupport (>= 4.0, < 7.0)
6
- curb (> 0.7.0, < 1.0.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (6.0.0)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- zeitwerk (~> 2.1, >= 2.1.8)
17
- addressable (2.6.0)
18
- public_suffix (>= 2.0.2, < 4.0)
19
- appraisal (2.2.0)
20
- bundler
21
- rake
22
- thor (>= 0.14.0)
23
- byebug (11.0.1)
24
- concurrent-ruby (1.1.5)
25
- crack (0.4.3)
26
- safe_yaml (~> 1.0.0)
27
- curb (0.9.10)
28
- hashdiff (1.0.0)
29
- i18n (1.6.0)
30
- concurrent-ruby (~> 1.0)
31
- metaclass (0.0.4)
32
- minitest (5.11.3)
33
- mocha (1.9.0)
34
- metaclass (~> 0.0.1)
35
- public_suffix (3.1.1)
36
- rake (12.3.3)
37
- safe_yaml (1.0.5)
38
- thor (0.20.3)
39
- thread_safe (0.3.6)
40
- tzinfo (1.2.5)
41
- thread_safe (~> 0.1)
42
- webmock (3.7.0)
43
- addressable (>= 2.3.6)
44
- crack (>= 0.3.2)
45
- hashdiff (>= 0.4.0, < 2.0.0)
46
- yard (0.9.20)
47
- zeitwerk (2.1.9)
48
-
49
- PLATFORMS
50
- ruby
51
-
52
- DEPENDENCIES
53
- activesupport (~> 6.0)
54
- appraisal (~> 2.2, >= 2.2.0)
55
- byebug
56
- minitest
57
- mocha
58
- rake
59
- tp_client!
60
- webmock
61
- yard
62
-
63
- BUNDLED WITH
64
- 1.17.3