rock_rms 7.0.3 → 7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +22 -0
- data/README.md +2 -2
- data/lib/rock_rms/error.rb +3 -0
- data/lib/rock_rms/resources/person.rb +4 -4
- data/lib/rock_rms/version.rb +1 -1
- data/rock_rms.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ce1928f116318b0198fefb0dbc9bd901c09cc827289e28b4f4322741fd82ccd
|
4
|
+
data.tar.gz: 065f040911ed6e987f399b8f4d0b3d7022d423ce83d433c95a9c76d316bafcf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6067ac721c3a5cfc1bbf7c511147ec51ef76100ae072c1ecb3d106bf0adf551756d4b3cff095a21201b20f0ce81d0e19f07bfa3d4b9841a52302897ea9b4e7f5
|
7
|
+
data.tar.gz: 1f7ae7604ddd2bf988e593d895b93bfa25cc3140f6a92ddce3af04391f08090a1469391ce18d0c612649b9806e6c4b66376c8349fe33963e3c101b60d5303a34
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Run specs
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
bundler-cache: true
|
19
|
+
- name: Install dependencies
|
20
|
+
run: bundle install
|
21
|
+
- name: Run tests
|
22
|
+
run: bundle exec rspec
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
![](https://www.rockrms.com/Themes/RockExternal/Assets/Images/rock-logo.svg)
|
2
2
|
|
3
|
-
# Rock RMS Ruby Client
|
3
|
+
# Rock RMS Ruby Client ![example workflow](https://github.com/taylorbrooks/rock_rms/actions/workflows/test.yml/badge.svg)
|
4
4
|
|
5
5
|
A Ruby wrapper for the Rock RMS API
|
6
6
|
|
@@ -14,7 +14,7 @@ I'm a big fan of Rock so if you have problems using the gem or would like to see
|
|
14
14
|
Add this line to your application's Gemfile:
|
15
15
|
````ruby
|
16
16
|
# in your Gemfile
|
17
|
-
gem 'rock_rms', '~>
|
17
|
+
gem 'rock_rms', '~> 7.0.3'
|
18
18
|
|
19
19
|
# then...
|
20
20
|
bundle install
|
data/lib/rock_rms/error.rb
CHANGED
@@ -2,6 +2,7 @@ module RockRMS
|
|
2
2
|
class Error < StandardError; end
|
3
3
|
class BadGateway < Error; end
|
4
4
|
class BadRequest < Error; end
|
5
|
+
class CloudflareError < Error; end
|
5
6
|
class Forbidden < Error; end
|
6
7
|
class GatewayTimeout < Error; end
|
7
8
|
class InternalServerError < Error; end
|
@@ -33,6 +34,8 @@ module FaradayMiddleware
|
|
33
34
|
raise RockRMS::ServiceUnavailable, error_message(env)
|
34
35
|
when 504
|
35
36
|
raise RockRMS::GatewayTimeout, error_message(env)
|
37
|
+
when 520
|
38
|
+
raise RockRMS::CloudflareError, error_message(env)
|
36
39
|
when ERROR_STATUSES
|
37
40
|
raise RockRMS::Error, error_message(env)
|
38
41
|
end
|
@@ -35,16 +35,16 @@ module RockRMS
|
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
-
def create_person(first_name:, last_name:, email:, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
|
38
|
+
def create_person(first_name:, last_name:, email:, gender: 1, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
|
39
39
|
options = {
|
40
40
|
'IsSystem' => false,
|
41
41
|
'FirstName' => first_name,
|
42
42
|
'LastName' => last_name,
|
43
43
|
'Email' => email,
|
44
|
-
'Gender' =>
|
44
|
+
'Gender' => gender,
|
45
45
|
'ConnectionStatusValueId' => connection_status_value_id,
|
46
|
-
'RecordStatusValueId'
|
47
|
-
'RecordTypeValueId'
|
46
|
+
'RecordStatusValueId' => record_status_value_id,
|
47
|
+
'RecordTypeValueId' => record_type_value_id
|
48
48
|
}
|
49
49
|
|
50
50
|
# RecordTypeValueId 1 = Person
|
data/lib/rock_rms/version.rb
CHANGED
data/rock_rms.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
17
17
|
s.test_files = s.files.grep(%r{^(test)/})
|
18
18
|
|
19
|
-
s.required_ruby_version = '
|
19
|
+
s.required_ruby_version = '>= 2.7'
|
20
20
|
|
21
21
|
s.require_paths = ['lib']
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_rms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -173,6 +173,7 @@ executables:
|
|
173
173
|
extensions: []
|
174
174
|
extra_rdoc_files: []
|
175
175
|
files:
|
176
|
+
- ".github/workflows/test.yml"
|
176
177
|
- ".gitignore"
|
177
178
|
- ".ruby-version"
|
178
179
|
- ".travis.yml"
|
@@ -349,7 +350,7 @@ require_paths:
|
|
349
350
|
- lib
|
350
351
|
required_ruby_version: !ruby/object:Gem::Requirement
|
351
352
|
requirements:
|
352
|
-
- - "
|
353
|
+
- - ">="
|
353
354
|
- !ruby/object:Gem::Version
|
354
355
|
version: '2.7'
|
355
356
|
required_rubygems_version: !ruby/object:Gem::Requirement
|