mrkt 1.2.1 → 1.2.2

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: 850ac5a692b131df87d8bc0a86d0bbd0c82fb38b382a41cc201e427caaba18f6
4
- data.tar.gz: 4eb5399bad28b69658a2a7699d87e691a6d18c273061985aa4b558001e79d37a
3
+ metadata.gz: 49ea20abe571eedb99a4d2a1efd803804e1b97f5294aa9980909bc3da3f2a6b4
4
+ data.tar.gz: 84e3ada1633dec6b3542085ee1bb74dd6f0c936e8f5237ffd06b2be246fbff99
5
5
  SHA512:
6
- metadata.gz: 6cc5334a1161bf7fe032e5b5919e9a7b0721124965a1a2e2b6cefed6d9305550eedd0a8370f401d85d884a6b08f5fcb1c3eadb60d4ba3bba05be457f09c4e8cc
7
- data.tar.gz: b325752b6d9cec194cc9cab4cea09744a63d9a48ebe80c774aca9d3233b8e6c07f60d644fe41d49fb0059ebf9bd625cdf2a191353c390d970ddb1e0311412533
6
+ metadata.gz: 4d0c67f1b4428bb01be0c9e006ddaf537e77ea72acc31740329c874a183d20b3a30378cf3d0e904c76c650b53cb513bbff40317edc67e298be43ca0205c90936
7
+ data.tar.gz: f49b468b10766d46a2427d7ed9f48b76c3ba7d9b1d3a742c9cb1311dd0ae7f1bea82b7140c8fb9c30b313d01f7c824e41606d1b7914dce2bd351ec59fe13851c
@@ -12,10 +12,14 @@ jobs:
12
12
 
13
13
  strategy:
14
14
  matrix:
15
- ruby: [2.5, 2.6, 2.7, 3.0]
15
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
16
+ gemfile: [faraday_1, faraday_2]
17
+
18
+ env:
19
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
16
20
 
17
21
  steps:
18
- - uses: actions/checkout@v2.4.0
22
+ - uses: actions/checkout@v3
19
23
 
20
24
  - name: Set up Ruby
21
25
  uses: ruby/setup-ruby@v1
@@ -33,7 +37,7 @@ jobs:
33
37
  run: bundle install
34
38
 
35
39
  - name: Run tests and publish coverage
36
- uses: paambaati/codeclimate-action@v3.0.0
40
+ uses: paambaati/codeclimate-action@v3.2.0
37
41
  env:
38
42
  COVERAGE: on
39
43
  CC_TEST_REPORTER_ID: 45cd2174f49b570406e294ff393d456c4ae8532cf16dd6430abb06d8a0722a28
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ require:
3
3
  - rubocop-rspec
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.5
6
+ TargetRubyVersion: 2.6
7
7
  Exclude:
8
8
  - 'bin/**/*'
9
9
  - 'vendor/**/*'
data/Gemfile.lock CHANGED
@@ -1,49 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mrkt (1.2.1)
5
- faraday (~> 1.0)
6
- faraday_middleware (~> 1.0)
4
+ mrkt (1.2.2)
5
+ faraday (>= 1.10, < 3)
6
+ faraday-multipart
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.0)
12
- public_suffix (>= 2.0.2, < 5.0)
11
+ addressable (2.8.1)
12
+ public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
14
  byebug (11.1.3)
15
15
  coderay (1.1.3)
16
16
  crack (0.4.5)
17
17
  rexml
18
- diff-lcs (1.4.4)
18
+ diff-lcs (1.5.0)
19
19
  docile (1.4.0)
20
- faraday (1.8.0)
21
- faraday-em_http (~> 1.0)
22
- faraday-em_synchrony (~> 1.0)
23
- faraday-excon (~> 1.1)
24
- faraday-httpclient (~> 1.0.1)
25
- faraday-net_http (~> 1.0)
26
- faraday-net_http_persistent (~> 1.1)
27
- faraday-patron (~> 1.0)
28
- faraday-rack (~> 1.0)
29
- multipart-post (>= 1.2, < 3)
20
+ faraday (2.7.2)
21
+ faraday-net_http (>= 2.0, < 3.1)
30
22
  ruby2_keywords (>= 0.0.4)
31
- faraday-em_http (1.0.0)
32
- faraday-em_synchrony (1.0.0)
33
- faraday-excon (1.1.0)
34
- faraday-httpclient (1.0.1)
35
- faraday-net_http (1.0.1)
36
- faraday-net_http_persistent (1.2.0)
37
- faraday-patron (1.0.0)
38
- faraday-rack (1.0.0)
39
- faraday_middleware (1.2.0)
40
- faraday (~> 1.0)
23
+ faraday-multipart (1.0.4)
24
+ multipart-post (~> 2)
25
+ faraday-net_http (3.0.2)
41
26
  gem-release (2.2.2)
42
27
  hashdiff (1.0.1)
43
28
  method_source (1.0.0)
44
- multipart-post (2.1.1)
45
- parallel (1.21.0)
46
- parser (3.0.3.2)
29
+ multipart-post (2.2.3)
30
+ parallel (1.22.1)
31
+ parser (3.1.2.0)
47
32
  ast (~> 2.4.1)
48
33
  pry (0.13.1)
49
34
  coderay (~> 1.1)
@@ -51,49 +36,49 @@ GEM
51
36
  pry-byebug (3.9.0)
52
37
  byebug (~> 11.0)
53
38
  pry (~> 0.13.0)
54
- public_suffix (4.0.6)
55
- rainbow (3.0.0)
39
+ public_suffix (4.0.7)
40
+ rainbow (3.1.1)
56
41
  rake (13.0.6)
57
- regexp_parser (2.2.0)
42
+ regexp_parser (2.3.1)
58
43
  rexml (3.2.5)
59
- rspec (3.10.0)
60
- rspec-core (~> 3.10.0)
61
- rspec-expectations (~> 3.10.0)
62
- rspec-mocks (~> 3.10.0)
63
- rspec-core (3.10.1)
64
- rspec-support (~> 3.10.0)
65
- rspec-expectations (3.10.1)
44
+ rspec (3.12.0)
45
+ rspec-core (~> 3.12.0)
46
+ rspec-expectations (~> 3.12.0)
47
+ rspec-mocks (~> 3.12.0)
48
+ rspec-core (3.12.0)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-expectations (3.12.0)
66
51
  diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.10.0)
68
- rspec-mocks (3.10.2)
52
+ rspec-support (~> 3.12.0)
53
+ rspec-mocks (3.12.0)
69
54
  diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.10.0)
71
- rspec-support (3.10.3)
72
- rubocop (1.23.0)
55
+ rspec-support (~> 3.12.0)
56
+ rspec-support (3.12.0)
57
+ rubocop (1.28.2)
73
58
  parallel (~> 1.10)
74
- parser (>= 3.0.0.0)
59
+ parser (>= 3.1.0.0)
75
60
  rainbow (>= 2.2.2, < 4.0)
76
61
  regexp_parser (>= 1.8, < 3.0)
77
62
  rexml
78
- rubocop-ast (>= 1.12.0, < 2.0)
63
+ rubocop-ast (>= 1.17.0, < 2.0)
79
64
  ruby-progressbar (~> 1.7)
80
65
  unicode-display_width (>= 1.4.0, < 3.0)
81
- rubocop-ast (1.15.0)
82
- parser (>= 3.0.1.1)
66
+ rubocop-ast (1.17.0)
67
+ parser (>= 3.1.1.0)
83
68
  rubocop-rake (0.6.0)
84
69
  rubocop (~> 1.0)
85
- rubocop-rspec (2.6.0)
70
+ rubocop-rspec (2.10.0)
86
71
  rubocop (~> 1.19)
87
72
  ruby-progressbar (1.11.0)
88
73
  ruby2_keywords (0.0.5)
89
- simplecov (0.21.2)
74
+ simplecov (0.22.0)
90
75
  docile (~> 1.1)
91
76
  simplecov-html (~> 0.11)
92
77
  simplecov_json_formatter (~> 0.1)
93
78
  simplecov-html (0.12.3)
94
- simplecov_json_formatter (0.1.3)
79
+ simplecov_json_formatter (0.1.4)
95
80
  unicode-display_width (2.1.0)
96
- webmock (3.14.0)
81
+ webmock (3.18.1)
97
82
  addressable (>= 2.8.0)
98
83
  crack (>= 0.3.2)
99
84
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -108,10 +93,10 @@ DEPENDENCIES
108
93
  pry-byebug (~> 3.7)
109
94
  rake (~> 13.0)
110
95
  rspec (~> 3.2)
111
- rubocop (~> 1.23.0)
96
+ rubocop (~> 1.28.2)
112
97
  rubocop-rake (~> 0.6.0)
113
98
  rubocop-rspec (~> 2.6)
114
- simplecov (~> 0.21.2)
99
+ simplecov (~> 0.22.0)
115
100
  webmock (~> 3.1)
116
101
 
117
102
  BUNDLED WITH
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # require v1.10 or higher.
6
+ # Because gem needs JSON middleware.
7
+ #
8
+ # see: https://github.com/lostisland/faraday/releases/tag/v1.10.0
9
+ gem 'faraday', '~> 1.10'
10
+
11
+ eval_gemfile File.expand_path('../Gemfile', __dir__)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'faraday', '~> 2'
6
+
7
+ eval_gemfile File.expand_path('../Gemfile', __dir__)
@@ -12,7 +12,7 @@ module Mrkt
12
12
  conn.request :url_encoded
13
13
 
14
14
  conn.response :logger, @logger, (@log_options || {}) if @debug
15
- conn.response :mkto, content_type: /\bjson$/
15
+ conn.response :mkto, content_type: /\bjson$/, parser_options: { symbolize_names: true }
16
16
 
17
17
  conn.options.timeout = @options[:read_timeout] if @options.key?(:read_timeout)
18
18
  conn.options.open_timeout = @options[:open_timeout] if @options.key?(:open_timeout)
data/lib/mrkt/faraday.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'faraday'
2
+ require 'faraday/multipart'
2
3
 
3
4
  require 'mrkt/faraday/params_encoder'
4
5
  require 'mrkt/faraday_middleware'
@@ -1,11 +1,9 @@
1
- require 'faraday_middleware'
1
+ require 'faraday/response/json'
2
2
 
3
3
  module Mrkt
4
4
  module FaradayMiddleware
5
- class Response < ::FaradayMiddleware::ParseJson
6
- define_parser do |body|
7
- JSON.parse(body, symbolize_names: true) unless body.strip.empty?
8
- end
5
+ class Response < ::Faraday::Response::Json
6
+ private
9
7
 
10
8
  def process_response(env)
11
9
  super
data/lib/mrkt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mrkt
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
data/mrkt.gemspec CHANGED
@@ -19,19 +19,19 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.metadata['rubygems_mfa_required'] = 'true'
21
21
 
22
- spec.required_ruby_version = '>= 2.5'
22
+ spec.required_ruby_version = '>= 2.6'
23
23
 
24
- spec.add_dependency 'faraday', '~> 1.0'
25
- spec.add_dependency 'faraday_middleware', '~> 1.0'
24
+ spec.add_dependency 'faraday', '>= 1.10', '< 3'
25
+ spec.add_dependency 'faraday-multipart'
26
26
 
27
27
  spec.add_development_dependency 'bundler', '~> 2.0'
28
28
  spec.add_development_dependency 'gem-release', '~> 2.1'
29
29
  spec.add_development_dependency 'pry-byebug', '~> 3.7'
30
30
  spec.add_development_dependency 'rake', '~> 13.0'
31
31
  spec.add_development_dependency 'rspec', '~> 3.2'
32
- spec.add_development_dependency 'rubocop', '~> 1.23.0'
32
+ spec.add_development_dependency 'rubocop', '~> 1.28.2'
33
33
  spec.add_development_dependency 'rubocop-rake', '~> 0.6.0'
34
34
  spec.add_development_dependency 'rubocop-rspec', '~> 2.6'
35
- spec.add_development_dependency 'simplecov', '~> 0.21.2'
35
+ spec.add_development_dependency 'simplecov', '~> 0.22.0'
36
36
  spec.add_development_dependency 'webmock', '~> 3.1'
37
37
  end
metadata CHANGED
@@ -1,44 +1,50 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrkt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - KARASZI István
8
8
  - Jacques Lemieux
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-12-14 00:00:00.000000000 Z
12
+ date: 2023-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '1.10'
21
+ - - "<"
19
22
  - !ruby/object:Gem::Version
20
- version: '1.0'
23
+ version: '3'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '1.0'
30
+ version: '1.10'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '3'
28
34
  - !ruby/object:Gem::Dependency
29
- name: faraday_middleware
35
+ name: faraday-multipart
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
- - - "~>"
38
+ - - ">="
33
39
  - !ruby/object:Gem::Version
34
- version: '1.0'
40
+ version: '0'
35
41
  type: :runtime
36
42
  prerelease: false
37
43
  version_requirements: !ruby/object:Gem::Requirement
38
44
  requirements:
39
- - - "~>"
45
+ - - ">="
40
46
  - !ruby/object:Gem::Version
41
- version: '1.0'
47
+ version: '0'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: bundler
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -115,14 +121,14 @@ dependencies:
115
121
  requirements:
116
122
  - - "~>"
117
123
  - !ruby/object:Gem::Version
118
- version: 1.23.0
124
+ version: 1.28.2
119
125
  type: :development
120
126
  prerelease: false
121
127
  version_requirements: !ruby/object:Gem::Requirement
122
128
  requirements:
123
129
  - - "~>"
124
130
  - !ruby/object:Gem::Version
125
- version: 1.23.0
131
+ version: 1.28.2
126
132
  - !ruby/object:Gem::Dependency
127
133
  name: rubocop-rake
128
134
  requirement: !ruby/object:Gem::Requirement
@@ -157,14 +163,14 @@ dependencies:
157
163
  requirements:
158
164
  - - "~>"
159
165
  - !ruby/object:Gem::Version
160
- version: 0.21.2
166
+ version: 0.22.0
161
167
  type: :development
162
168
  prerelease: false
163
169
  version_requirements: !ruby/object:Gem::Requirement
164
170
  requirements:
165
171
  - - "~>"
166
172
  - !ruby/object:Gem::Version
167
- version: 0.21.2
173
+ version: 0.22.0
168
174
  - !ruby/object:Gem::Dependency
169
175
  name: webmock
170
176
  requirement: !ruby/object:Gem::Requirement
@@ -198,6 +204,8 @@ files:
198
204
  - LICENSE.txt
199
205
  - README.md
200
206
  - Rakefile
207
+ - gemfiles/faraday_1.gemfile
208
+ - gemfiles/faraday_2.gemfile
201
209
  - lib/mrkt.rb
202
210
  - lib/mrkt/concerns/authentication.rb
203
211
  - lib/mrkt/concerns/connection.rb
@@ -245,7 +253,7 @@ licenses:
245
253
  - MIT
246
254
  metadata:
247
255
  rubygems_mfa_required: 'true'
248
- post_install_message:
256
+ post_install_message:
249
257
  rdoc_options: []
250
258
  require_paths:
251
259
  - lib
@@ -253,15 +261,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
261
  requirements:
254
262
  - - ">="
255
263
  - !ruby/object:Gem::Version
256
- version: '2.5'
264
+ version: '2.6'
257
265
  required_rubygems_version: !ruby/object:Gem::Requirement
258
266
  requirements:
259
267
  - - ">="
260
268
  - !ruby/object:Gem::Version
261
269
  version: '0'
262
270
  requirements: []
263
- rubygems_version: 3.1.4
264
- signing_key:
271
+ rubygems_version: 3.3.7
272
+ signing_key:
265
273
  specification_version: 4
266
274
  summary: Marketo REST API Facade
267
275
  test_files: