action_kit_rest 0.4.5 → 0.4.6

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: 719c1f9eff7913a9c74153afcd98ae22b046f641f7ad3a951d05650db38ccb08
4
- data.tar.gz: 5bf33654f9fd0f7e8c3d305b35bf8864885e6f0b73bd9d8f183e96a295294cae
3
+ metadata.gz: 2116d0818685f8278921f966f7f4dfb53d4121c983642bb431a13267de077195
4
+ data.tar.gz: 19e5351054a60071bef7926ea245ad4f1392a7aa33e929ef44fbb590f18335d1
5
5
  SHA512:
6
- metadata.gz: d949bf41d12791611c0893826515620f8e89630828709b8d6b22f64aaf11adc2bf549e3c2cb3166fd7d35429ca3073e42d9251dd1801c07770f879001610edbe
7
- data.tar.gz: f2f7fed453b3518d7114b28b4d6b4f25fe1506a40ca8e0e24963ffa4eac1ce5dc5193beef908058677a8478277dd7c4b5533df403d5920391fb7b08474675cc9
6
+ metadata.gz: 61722ea2d57c2da9e942351d1651ddfc8b3c2d8df337736aab9d9ce57d4f28993ac8be1f83f6e2f5b88a6f463e21849d5df353ac3d155791be8e57ce4ce2884d
7
+ data.tar.gz: efa307aa27a974fa7a93eba9ebf3ebacc6e6b4ba7a11abc63cbaed748c27d5346477dfa19cc8d01d93e4e3986363fed50de7b110f4d02b621e9301e0f14229e9
@@ -0,0 +1,24 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
10
+ with:
11
+ ruby-version: 2.7
12
+ bundler-cache: true
13
+ - run: bundle install
14
+ - run: bundle exec rspec
15
+ rubocop:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
20
+ with:
21
+ ruby-version: 2.7
22
+ bundler-cache: true
23
+ - run: bundle install
24
+ - run: bundle exec rubocop
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 2.7.4
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # action_kit_rest
1
+ # action\_kit\_rest
2
2
 
3
3
  A ruby binding for the ActionKit REST API
4
4
 
5
- [![Build Status](https://travis-ci.org/controlshift/action_kit_rest.svg)](https://travis-ci.org/controlshift/action_kit_rest)
5
+ [![CI Status](https://github.com/controlshift/action_kit_rest/actions/workflows/ci.yml/badge.svg)](https://github.com/controlshift/action_kit_rest/actions/workflows/ci.yml)
6
6
 
7
7
  ## Usage
8
8
 
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: action_kit_rest 0.4.5 ruby lib
5
+ # stub: action_kit_rest 0.4.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "action_kit_rest".freeze
9
- s.version = "0.4.5"
9
+ s.version = "0.4.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Nathan Woodhull".freeze, "Diego Marcet".freeze, "Grey Moore".freeze]
14
- s.date = "2021-03-23"
14
+ s.date = "2021-09-29"
15
15
  s.description = "Gem for interacting with the ActionKit API".freeze
16
16
  s.email = "systems@controlshiftlabs.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -20,11 +20,11 @@ Gem::Specification.new do |s|
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
+ ".github/workflows/ci.yml",
23
24
  ".rspec",
24
25
  ".rubocop.yml",
25
26
  ".ruby-gemset",
26
27
  ".ruby-version",
27
- ".travis.yml",
28
28
  "Gemfile",
29
29
  "LICENSE.txt",
30
30
  "README.md",
@@ -90,35 +90,24 @@ Gem::Specification.new do |s|
90
90
  ]
91
91
  s.homepage = "http://github.com/controlshift/action_kit_rest".freeze
92
92
  s.licenses = ["MIT".freeze]
93
- s.rubygems_version = "3.0.8".freeze
93
+ s.rubygems_version = "3.1.6".freeze
94
94
  s.summary = "A wrapper for the ActionKit REST API".freeze
95
95
 
96
96
  if s.respond_to? :specification_version then
97
97
  s.specification_version = 4
98
+ end
98
99
 
99
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
100
- s.add_runtime_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
101
- s.add_development_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
102
- s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
103
- s.add_development_dependency(%q<em-http-request>.freeze, [">= 1.1.5", "< 2.0"])
104
- s.add_development_dependency(%q<em-synchrony>.freeze, [">= 1.0.6", "< 2.0"])
105
- s.add_development_dependency(%q<eventmachine>.freeze, [">= 1.2.5", "< 2.0"])
106
- s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
107
- s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
108
- s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
109
- s.add_development_dependency(%q<webmock>.freeze, ["~> 3.3"])
110
- else
111
- s.add_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
112
- s.add_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
113
- s.add_dependency(%q<byebug>.freeze, [">= 0"])
114
- s.add_dependency(%q<em-http-request>.freeze, [">= 1.1.5", "< 2.0"])
115
- s.add_dependency(%q<em-synchrony>.freeze, [">= 1.0.6", "< 2.0"])
116
- s.add_dependency(%q<eventmachine>.freeze, [">= 1.2.5", "< 2.0"])
117
- s.add_dependency(%q<juwelier>.freeze, [">= 0"])
118
- s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
119
- s.add_dependency(%q<rubocop>.freeze, [">= 0"])
120
- s.add_dependency(%q<webmock>.freeze, ["~> 3.3"])
121
- end
100
+ if s.respond_to? :add_runtime_dependency then
101
+ s.add_runtime_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
102
+ s.add_development_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
103
+ s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
104
+ s.add_development_dependency(%q<em-http-request>.freeze, [">= 1.1.5", "< 2.0"])
105
+ s.add_development_dependency(%q<em-synchrony>.freeze, [">= 1.0.6", "< 2.0"])
106
+ s.add_development_dependency(%q<eventmachine>.freeze, [">= 1.2.5", "< 2.0"])
107
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
108
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
109
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
110
+ s.add_development_dependency(%q<webmock>.freeze, ["~> 3.3"])
122
111
  else
123
112
  s.add_dependency(%q<vertebrae>.freeze, [">= 0.6.0"])
124
113
  s.add_dependency(%q<bundler>.freeze, [">= 2.0", "< 3.0"])
@@ -13,7 +13,7 @@ module ActionKitRest
13
13
  end
14
14
 
15
15
  def to_s
16
- "#{super()} \n url: #{url} \n body: #{body} \n errors: #{errors}"
16
+ "#{super()} \n url: #{url} \n body: #{body.force_encoding('UTF-8')} \n errors: #{errors}"
17
17
  rescue Encoding::CompatibilityError
18
18
  # Something went gravely wrong trying to construct the error message, so give up on the extra info
19
19
  # and just raise the name of the exception.
@@ -4,7 +4,7 @@ module ActionKitRest
4
4
  module VERSION
5
5
  MAJOR = 0
6
6
  MINOR = 4
7
- PATCH = 5
7
+ PATCH = 6
8
8
  BUILD = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -25,5 +25,15 @@ describe ActionKitRest::Response::ValidationError do
25
25
  expect(subject.to_s).to eq "ActionKitRest::Response::ValidationError \n url: #{url} \n body: #{body} \n errors: #{errors.inspect}"
26
26
  end
27
27
  end
28
+
29
+ context 'with a body in ASCII-8BIT format' do
30
+ let(:url) { 'https://actionkit.example.com/rest/v1/page/1' }
31
+ let(:errors) { {'mailing_id' => ['לא הצלחנו לקשר בין מספר הזיהוי של רשימת הדיוור הזו לבין החשבון.']} }
32
+ let(:body) { { errors: errors }.to_json.b }
33
+
34
+ it 'should put information in the string' do
35
+ expect(subject.to_s).to eq "ActionKitRest::Response::ValidationError \n url: #{url} \n body: {\"errors\":#{errors.to_json}} \n errors: #{errors.inspect}"
36
+ end
37
+ end
28
38
  end
29
39
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_kit_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
8
8
  - Diego Marcet
9
9
  - Grey Moore
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-03-23 00:00:00.000000000 Z
13
+ date: 2021-09-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: vertebrae
@@ -185,11 +185,11 @@ extra_rdoc_files:
185
185
  - README.md
186
186
  files:
187
187
  - ".document"
188
+ - ".github/workflows/ci.yml"
188
189
  - ".rspec"
189
190
  - ".rubocop.yml"
190
191
  - ".ruby-gemset"
191
192
  - ".ruby-version"
192
- - ".travis.yml"
193
193
  - Gemfile
194
194
  - LICENSE.txt
195
195
  - README.md
@@ -256,7 +256,7 @@ homepage: http://github.com/controlshift/action_kit_rest
256
256
  licenses:
257
257
  - MIT
258
258
  metadata: {}
259
- post_install_message:
259
+ post_install_message:
260
260
  rdoc_options: []
261
261
  require_paths:
262
262
  - lib
@@ -271,8 +271,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
271
  - !ruby/object:Gem::Version
272
272
  version: '0'
273
273
  requirements: []
274
- rubygems_version: 3.0.8
275
- signing_key:
274
+ rubygems_version: 3.1.6
275
+ signing_key:
276
276
  specification_version: 4
277
277
  summary: A wrapper for the ActionKit REST API
278
278
  test_files: []
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6
4
- cache: bundler
5
- before_install:
6
- - gem install bundler
7
- script:
8
- - bundle exec rspec
9
- - bundle exec rubocop