ripcord 1.0.0 → 2.0.0

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: a6f4824697afe1be3bc87090c42e5896c7d7bd5c51c74b327d865e63a9d5958d
4
- data.tar.gz: 7fd6510c3dfdc74d6923bb64fa17ad62a0a16f31bbc24785812f910fe5b5291c
3
+ metadata.gz: 508d04811b29ea25ed18de87a1248516a6be4a16fe1ec7b0fe5f3cd66e162cff
4
+ data.tar.gz: 302aafd07a9fc8d2d7c63f1ba7884b779a00ebc359d84f036a913f4ebaada740
5
5
  SHA512:
6
- metadata.gz: 321bb751c17acc56b5446a8df6a54fba42dd2120e68349ebdc0da275af1b4b0569bef30abd999e2549cb5abe452d6a9a31a08ffc8c15b164e21c18594dc0dcff
7
- data.tar.gz: 0d1673d284ec1792b3f41f8d6e1b397bdece5862c3b9660a4389ac49f4fcac229bf94da917f6ad8722486a4e0b65fa5862b38eabb8f194e7ac783779069b8acd
6
+ metadata.gz: bb3904e9cf1d9bbd5afdb8148aa5dc4490ae3d999a15c2dc260642f71ec4f3a0cfe7b6390a028f2fa58e1237fa810c690411283d7aefdd6873812f8f059b0050
7
+ data.tar.gz: ac66e4964efc5e27d5d3ab2c4cd1f1773d42a1a637beef335260311bf9cf121b0de7f00b1617cb41777c2bd750b1bd47afab308f3f8cf81178fe0b58b2adb270
data/.rubocop.yml CHANGED
@@ -1,13 +1,5 @@
1
- AllCops:
2
- TargetRubyVersion: 2.6
1
+ inherit_gem:
2
+ rubocop-klaustopher: rubocop.yml
3
3
 
4
- Style/StringLiterals:
5
- Enabled: true
6
- EnforcedStyle: double_quotes
7
-
8
- Style/StringLiteralsInInterpolation:
9
- Enabled: true
10
- EnforcedStyle: double_quotes
11
-
12
- Layout/LineLength:
13
- Max: 120
4
+ RSpec/SubjectStub:
5
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [2.0.0] - 2022-11-15
4
+
5
+ - Apply Rubocop styling I am using in [all my products](https://github.com/klaustopher/rubocop-config/)
6
+ - Remove Support for Ruby 2.x
7
+
3
8
  ## [1.0.0] - 2022-02-21
4
9
 
5
10
  - Release as V1.0.0. This gem has been in use at some places and it is pretty much done. The version should indicate this
data/Gemfile CHANGED
@@ -1,13 +1,11 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
4
2
 
5
3
  # Specify your gem's dependencies in ripcord.gemspec
6
4
  gemspec
7
5
 
8
6
  gem 'simplecov'
9
7
  gem 'simplecov-lcov', '~> 0.8.0'
10
- gem "rake", "~> 13.0"
11
- gem "rspec", "~> 3.0"
12
- gem "rubocop", "~> 1.21"
13
- gem "webmock"
8
+ gem 'rake', '~> 13.0'
9
+ gem 'rspec', '~> 3.0'
10
+ gem 'rubocop-klaustopher', git: 'https://github.com/klaustopher/rubocop-config'
11
+ gem 'webmock'
data/Gemfile.lock CHANGED
@@ -1,26 +1,47 @@
1
+ GIT
2
+ remote: https://github.com/klaustopher/rubocop-config
3
+ revision: 63b93c21cec27e1d75e85bd2cbfd9881767cb1f9
4
+ specs:
5
+ rubocop-klaustopher (1.0.6)
6
+ rubocop (~> 1.37)
7
+ rubocop-performance (~> 1.15)
8
+ rubocop-rails (~> 2.16)
9
+ rubocop-rspec (~> 2.13)
10
+
1
11
  PATH
2
12
  remote: .
3
13
  specs:
4
- ripcord (1.0.0)
14
+ ripcord (2.0.0)
5
15
 
6
16
  GEM
7
17
  remote: https://rubygems.org/
8
18
  specs:
9
- addressable (2.8.0)
10
- public_suffix (>= 2.0.2, < 5.0)
19
+ activesupport (7.0.4)
20
+ concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ i18n (>= 1.6, < 2)
22
+ minitest (>= 5.1)
23
+ tzinfo (~> 2.0)
24
+ addressable (2.8.1)
25
+ public_suffix (>= 2.0.2, < 6.0)
11
26
  ast (2.4.2)
27
+ concurrent-ruby (1.1.10)
12
28
  crack (0.4.5)
13
29
  rexml
14
30
  diff-lcs (1.5.0)
15
31
  docile (1.4.0)
16
32
  hashdiff (1.0.1)
17
- parallel (1.21.0)
18
- parser (3.1.0.0)
33
+ i18n (1.12.0)
34
+ concurrent-ruby (~> 1.0)
35
+ json (2.6.2)
36
+ minitest (5.16.3)
37
+ parallel (1.22.1)
38
+ parser (3.1.2.1)
19
39
  ast (~> 2.4.1)
20
- public_suffix (4.0.6)
40
+ public_suffix (5.0.0)
41
+ rack (3.0.0)
21
42
  rainbow (3.1.1)
22
43
  rake (13.0.6)
23
- regexp_parser (2.2.0)
44
+ regexp_parser (2.6.0)
24
45
  rexml (3.2.5)
25
46
  rspec (3.11.0)
26
47
  rspec-core (~> 3.11.0)
@@ -35,17 +56,27 @@ GEM
35
56
  diff-lcs (>= 1.2.0, < 2.0)
36
57
  rspec-support (~> 3.11.0)
37
58
  rspec-support (3.11.0)
38
- rubocop (1.25.1)
59
+ rubocop (1.39.0)
60
+ json (~> 2.3)
39
61
  parallel (~> 1.10)
40
- parser (>= 3.1.0.0)
62
+ parser (>= 3.1.2.1)
41
63
  rainbow (>= 2.2.2, < 4.0)
42
64
  regexp_parser (>= 1.8, < 3.0)
43
- rexml
44
- rubocop-ast (>= 1.15.1, < 2.0)
65
+ rexml (>= 3.2.5, < 4.0)
66
+ rubocop-ast (>= 1.23.0, < 2.0)
45
67
  ruby-progressbar (~> 1.7)
46
68
  unicode-display_width (>= 1.4.0, < 3.0)
47
- rubocop-ast (1.15.1)
48
- parser (>= 3.0.1.1)
69
+ rubocop-ast (1.23.0)
70
+ parser (>= 3.1.1.0)
71
+ rubocop-performance (1.15.0)
72
+ rubocop (>= 1.7.0, < 2.0)
73
+ rubocop-ast (>= 0.4.0)
74
+ rubocop-rails (2.17.2)
75
+ activesupport (>= 4.2.0)
76
+ rack (>= 1.1)
77
+ rubocop (>= 1.33.0, < 2.0)
78
+ rubocop-rspec (2.15.0)
79
+ rubocop (~> 1.33)
49
80
  ruby-progressbar (1.11.0)
50
81
  simplecov (0.21.2)
51
82
  docile (~> 1.1)
@@ -54,8 +85,10 @@ GEM
54
85
  simplecov-html (0.12.3)
55
86
  simplecov-lcov (0.8.0)
56
87
  simplecov_json_formatter (0.1.4)
57
- unicode-display_width (2.1.0)
58
- webmock (3.14.0)
88
+ tzinfo (2.0.5)
89
+ concurrent-ruby (~> 1.0)
90
+ unicode-display_width (2.3.0)
91
+ webmock (3.18.1)
59
92
  addressable (>= 2.8.0)
60
93
  crack (>= 0.3.2)
61
94
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -68,7 +101,7 @@ DEPENDENCIES
68
101
  rake (~> 13.0)
69
102
  ripcord!
70
103
  rspec (~> 3.0)
71
- rubocop (~> 1.21)
104
+ rubocop-klaustopher!
72
105
  simplecov
73
106
  simplecov-lcov (~> 0.8.0)
74
107
  webmock
data/Rakefile CHANGED
@@ -1,11 +1,9 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
5
3
 
6
4
  RSpec::Core::RakeTask.new(:spec)
7
5
 
8
- require "rubocop/rake_task"
6
+ require 'rubocop/rake_task'
9
7
 
10
8
  RuboCop::RakeTask.new
11
9
 
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module Authentication
5
3
  class HTTPBasicAuth
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module Authentication
5
3
  class HTTPTokenAuth
@@ -8,7 +6,7 @@ module Ripcord
8
6
  end
9
7
 
10
8
  def apply_to(request, _payload_hash)
11
- request.add_field "Authorization", "Token token=#{@token}"
9
+ request.add_field 'Authorization', "Token token=#{@token}"
12
10
  end
13
11
  end
14
12
  end
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module Authentication
5
3
  class InlineToken
@@ -1,9 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module Authentication
5
- require "ripcord/authentication/http_basic_auth"
6
- require "ripcord/authentication/http_token_auth"
7
- require "ripcord/authentication/inline_token"
3
+ require 'ripcord/authentication/http_basic_auth'
4
+ require 'ripcord/authentication/http_token_auth'
5
+ require 'ripcord/authentication/inline_token'
8
6
  end
9
7
  end
@@ -1,9 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
- require "securerandom"
4
- require "uri"
5
- require "net/http"
6
- require "json"
1
+ require 'securerandom'
2
+ require 'uri'
3
+ require 'net/http'
4
+ require 'json'
7
5
 
8
6
  module Ripcord
9
7
  class BaseClient
@@ -22,7 +20,7 @@ module Ripcord
22
20
 
23
21
  def execute_request(json_rpc_request)
24
22
  request = Net::HTTP::Post.new(@endpoint_url.request_uri)
25
- request.content_type = "application/json"
23
+ request.content_type = 'application/json'
26
24
 
27
25
  payload_hash = json_rpc_request.to_payload
28
26
 
@@ -1,13 +1,11 @@
1
- # frozen_string_literal: true
1
+ require 'ripcord/authentication'
2
+ require 'ripcord/json_rpc'
2
3
 
3
- require "ripcord/authentication"
4
- require "ripcord/json_rpc"
5
-
6
- require "securerandom"
7
- require "uri"
8
- require "net/http"
9
- require "json"
10
- require "logger"
4
+ require 'securerandom'
5
+ require 'uri'
6
+ require 'net/http'
7
+ require 'json'
8
+ require 'logger'
11
9
 
12
10
  module Ripcord
13
11
  class Client
@@ -48,7 +46,7 @@ module Ripcord
48
46
 
49
47
  def execute_request(json_rpc_request)
50
48
  request = Net::HTTP::Post.new(@endpoint_url.request_uri)
51
- request.content_type = "application/json"
49
+ request.content_type = 'application/json'
52
50
 
53
51
  payload_hash = json_rpc_request.to_payload
54
52
 
data/lib/ripcord/error.rb CHANGED
@@ -1,10 +1,8 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module Error
5
3
  class InvalidResponse < StandardError
6
4
  def initialize(response_body = nil)
7
- message = "Invalid or empty response from server."
5
+ message = 'Invalid or empty response from server.'
8
6
  message += "\nResponse: #{response_body}" if response_body
9
7
 
10
8
  super(message)
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module JsonRPC
5
3
  class Error
@@ -1,6 +1,4 @@
1
- # frozen_string_literal: true
2
-
3
- require "ripcord/json_rpc/request"
1
+ require 'ripcord/json_rpc/request'
4
2
 
5
3
  module Ripcord
6
4
  module JsonRPC
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module JsonRPC
5
3
  class Request
@@ -15,7 +13,7 @@ module Ripcord
15
13
  def to_payload
16
14
  {
17
15
  jsonrpc: Ripcord::JSON_RPC_VERSION,
18
- method: method
16
+ method: method
19
17
  }.tap do |payload_hash|
20
18
  payload_hash[:params] = params if should_include_params?
21
19
  payload_hash[:id] = id unless id.nil?
@@ -1,7 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
- require "ripcord/error"
4
- require "ripcord/json_rpc/error"
1
+ require 'ripcord/error'
2
+ require 'ripcord/json_rpc/error'
5
3
 
6
4
  module Ripcord
7
5
  module JsonRPC
@@ -1,10 +1,8 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
2
  module JsonRPC
5
- require "ripcord/json_rpc/error"
6
- require "ripcord/json_rpc/request"
7
- require "ripcord/json_rpc/response"
8
- require "ripcord/json_rpc/notification"
3
+ require 'ripcord/json_rpc/error'
4
+ require 'ripcord/json_rpc/request'
5
+ require 'ripcord/json_rpc/response'
6
+ require 'ripcord/json_rpc/notification'
9
7
  end
10
8
  end
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Ripcord
4
- VERSION = "1.0.0"
2
+ VERSION = '2.0.0'.freeze
5
3
  end
data/lib/ripcord.rb CHANGED
@@ -1,8 +1,6 @@
1
- # frozen_string_literal: true
2
-
3
- require "ripcord/version"
4
- require "ripcord/client"
1
+ require 'ripcord/version'
2
+ require 'ripcord/client'
5
3
 
6
4
  module Ripcord
7
- JSON_RPC_VERSION = "2.0"
5
+ JSON_RPC_VERSION = '2.0'.freeze
8
6
  end
data/ripcord.gemspec CHANGED
@@ -1,23 +1,22 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/ripcord/version"
1
+ require_relative 'lib/ripcord/version'
4
2
 
5
3
  Gem::Specification.new do |spec|
6
- spec.name = "ripcord"
4
+ spec.name = 'ripcord'
7
5
  spec.version = Ripcord::VERSION
8
- spec.authors = ["Klaus Zanders", "Pavel Forkert"]
9
- spec.email = ["coding@kgz.me", "fxposter@gmail.com"]
6
+ spec.authors = ['Klaus Zanders', 'Pavel Forkert']
7
+ spec.email = ['coding@kgz.me', 'fxposter@gmail.com']
10
8
 
11
- spec.summary = "This is a JSON-RPC 2.0 client implementation with some specific additions (custom auth schemes, etc)"
12
- spec.description = "JSON-RPC 2.0 client implementation"
13
- spec.homepage = "https://github.com/klaustopher/ripcord"
14
- spec.license = "MIT"
9
+ spec.summary = 'This is a JSON-RPC 2.0 client implementation with some specific additions " \
10
+ "(custom auth schemes, etc)'
11
+ spec.description = 'JSON-RPC 2.0 client implementation'
12
+ spec.homepage = 'https://github.com/klaustopher/ripcord'
13
+ spec.license = 'MIT'
15
14
 
16
- spec.required_ruby_version = ">= 2.0.0"
15
+ spec.required_ruby_version = '>= 3.0.0'
17
16
 
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = spec.homepage
20
- spec.metadata["changelog_uri"] = "https://github.com/klaustopher/ripcord/blob/master/CHANGELOG.md"
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = spec.homepage
19
+ spec.metadata['changelog_uri'] = 'https://github.com/klaustopher/ripcord/blob/master/CHANGELOG.md'
21
20
 
22
21
  # Specify which files should be added to the gem when it is released.
23
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -27,5 +26,6 @@ Gem::Specification.new do |spec|
27
26
  end
28
27
  end
29
28
 
30
- spec.require_paths = ["lib"]
29
+ spec.require_paths = ['lib']
30
+ spec.metadata['rubygems_mfa_required'] = 'true'
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripcord
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaus Zanders
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-21 00:00:00.000000000 Z
12
+ date: 2022-11-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: JSON-RPC 2.0 client implementation
15
15
  email:
@@ -50,6 +50,7 @@ metadata:
50
50
  homepage_uri: https://github.com/klaustopher/ripcord
51
51
  source_code_uri: https://github.com/klaustopher/ripcord
52
52
  changelog_uri: https://github.com/klaustopher/ripcord/blob/master/CHANGELOG.md
53
+ rubygems_mfa_required: 'true'
53
54
  post_install_message:
54
55
  rdoc_options: []
55
56
  require_paths:
@@ -58,16 +59,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
59
  requirements:
59
60
  - - ">="
60
61
  - !ruby/object:Gem::Version
61
- version: 2.0.0
62
+ version: 3.0.0
62
63
  required_rubygems_version: !ruby/object:Gem::Requirement
63
64
  requirements:
64
65
  - - ">="
65
66
  - !ruby/object:Gem::Version
66
67
  version: '0'
67
68
  requirements: []
68
- rubygems_version: 3.3.7
69
+ rubygems_version: 3.3.25
69
70
  signing_key:
70
71
  specification_version: 4
71
72
  summary: This is a JSON-RPC 2.0 client implementation with some specific additions
72
- (custom auth schemes, etc)
73
+ " \ "(custom auth schemes, etc)
73
74
  test_files: []