tessitura_rest 1.1.7 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +50 -0
- data/.codeclimate.yml +10 -3
- data/.github/workflows/gem-push.yml +34 -0
- data/.rubocop.yml +10 -2
- data/lib/tessitura_rest/crm/issues.rb +0 -12
- data/lib/tessitura_rest/txn/orders.rb +0 -13
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest.rb +3 -4
- metadata +8 -9
- data/.env.enc +0 -0
- data/.travis.yml +0 -7
- data/lib/tessitura_rest/crm/actions.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2812c2d529428c1cf0d14f6d3a939d8840c07f2da4760000f13d9021f53a0c7d
|
4
|
+
data.tar.gz: 101e006c9faa8374ce8e7296bc8360b708e713eba33bfb0319a3ead35fa1ae4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a3fcd45427b219fe80d57a8fa981c4f27c1f8509f007cdcf9b2e32225b49528d018919f7ff4f16d3eb662ba6331e479228d6b69306e6da9e4bb9464285330c4
|
7
|
+
data.tar.gz: 2a643a907ca9857018904014ecc6cca30b61498a7fe0a86e84eae3c61bafa1937cc570e5a0fb0d9b048a7ffe3cfef77a0af45572cd29da289d2160baadaf8c84
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Use the latest 2.1 version of CircleCI pipeline process engine.
|
2
|
+
# See: https://circleci.com/docs/2.0/configuration-reference
|
3
|
+
version: 2.1
|
4
|
+
orbs:
|
5
|
+
ruby: circleci/ruby@1.8.0
|
6
|
+
# Define a job to be invoked later in a workflow.
|
7
|
+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
environment:
|
11
|
+
CC_TEST_REPORTER_ID: 4951685688ee1bee2e2727863031df516e8b5a203811f3aa3802981368416b13
|
12
|
+
docker:
|
13
|
+
- image: cimg/ruby:3.0.1-node
|
14
|
+
|
15
|
+
# Add steps to the job
|
16
|
+
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- checkout
|
20
|
+
- run:
|
21
|
+
name: Install Bundler
|
22
|
+
command: gem install bundler
|
23
|
+
- run:
|
24
|
+
name: Install Dependencies
|
25
|
+
command: bundle install
|
26
|
+
- run:
|
27
|
+
name: Decrypt Env
|
28
|
+
command: echo "$ENV_ENC" | base64 --decode > .env
|
29
|
+
|
30
|
+
- run:
|
31
|
+
name: Install Code Climate Test Reporter
|
32
|
+
command: |
|
33
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
34
|
+
chmod +x ./cc-test-reporter
|
35
|
+
|
36
|
+
- run:
|
37
|
+
name: Run tests
|
38
|
+
command: |
|
39
|
+
./cc-test-reporter before-build
|
40
|
+
bundle exec rspec
|
41
|
+
./cc-test-reporter after-build --coverage-input-type simplecov
|
42
|
+
when: always
|
43
|
+
|
44
|
+
# Invoke jobs via workflows
|
45
|
+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
46
|
+
workflows:
|
47
|
+
version: 2
|
48
|
+
deploy:
|
49
|
+
jobs:
|
50
|
+
- test
|
data/.codeclimate.yml
CHANGED
@@ -11,7 +11,7 @@ plugins:
|
|
11
11
|
flog:
|
12
12
|
enabled: true
|
13
13
|
config:
|
14
|
-
score_threshold: 20.0
|
14
|
+
score_threshold: 20.0
|
15
15
|
haml-lint:
|
16
16
|
enabled: false
|
17
17
|
checks:
|
@@ -20,15 +20,22 @@ plugins:
|
|
20
20
|
reek:
|
21
21
|
enabled: true
|
22
22
|
checks:
|
23
|
+
checks:
|
24
|
+
BooleanParameter:
|
25
|
+
enabled: false
|
26
|
+
DataClump:
|
27
|
+
enabled: false
|
23
28
|
IrresponsibleModule:
|
24
29
|
enabled: false
|
30
|
+
LongParameterList:
|
31
|
+
enabled: false
|
25
32
|
UncommunicativeName:
|
26
33
|
enabled: false
|
27
34
|
UncommunicativeVariableName:
|
28
35
|
enabled: false
|
29
36
|
rubocop:
|
30
37
|
enabled: true
|
31
|
-
channel: rubocop-1-
|
38
|
+
channel: rubocop-1-30-0
|
32
39
|
stylelint:
|
33
40
|
enabled: false
|
34
41
|
checks:
|
@@ -38,5 +45,5 @@ plugins:
|
|
38
45
|
enabled: false
|
39
46
|
exclude_patterns:
|
40
47
|
- .rubocop.yml
|
41
|
-
- .rubocop_todo.yml
|
42
48
|
- spec/**/*
|
49
|
+
- bin/*
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
paths: [ 'lib/tessitura_rest/version.rb' ]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
permissions:
|
13
|
+
contents: read
|
14
|
+
packages: write
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby 2.6
|
18
|
+
uses: actions/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 2.6.x
|
21
|
+
|
22
|
+
- name: Publish to RubyGems
|
23
|
+
run: |
|
24
|
+
mkdir -p $HOME/.gem
|
25
|
+
touch $HOME/.gem/credentials
|
26
|
+
chmod 0600 $HOME/.gem/credentials
|
27
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
28
|
+
gem build *.gemspec
|
29
|
+
gem push *.gem
|
30
|
+
env:
|
31
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
32
|
+
|
33
|
+
- name: Remove gem build file
|
34
|
+
run: rm *.gem
|
data/.rubocop.yml
CHANGED
@@ -202,7 +202,7 @@ Style/LineEndConcatenation:
|
|
202
202
|
Layout/LineLength:
|
203
203
|
Description: 'Limit lines to 80 characters.'
|
204
204
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
205
|
-
Max:
|
205
|
+
Max: 230
|
206
206
|
|
207
207
|
Metrics/MethodLength:
|
208
208
|
Description: 'Avoid methods longer than 10 lines of code.'
|
@@ -534,7 +534,12 @@ Lint/RequireParentheses:
|
|
534
534
|
Lint/UnderscorePrefixedVariableName:
|
535
535
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
536
536
|
Enabled: false
|
537
|
-
|
537
|
+
|
538
|
+
Lint/UselessAssignment:
|
539
|
+
Description: Checks for useless assignment to a local variable.
|
540
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#underscore-unused-vars
|
541
|
+
Enabled: false
|
542
|
+
|
538
543
|
Lint/RedundantCopDisableDirective:
|
539
544
|
Description: >-
|
540
545
|
Checks for rubocop:disable comments that can be removed.
|
@@ -566,4 +571,7 @@ Style/HashSyntax:
|
|
566
571
|
EnforcedStyle: no_mixed_keys
|
567
572
|
|
568
573
|
Naming/VariableNumber:
|
574
|
+
Enabled: false
|
575
|
+
|
576
|
+
Gemspec/RequireMFA:
|
569
577
|
Enabled: false
|
@@ -1,16 +1,4 @@
|
|
1
1
|
module Issues
|
2
|
-
def get_issue(id, options = {})
|
3
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
4
|
-
response = self.class.get(base_api_endpoint("CRM/Issues/#{id}"), options)
|
5
|
-
JSON.parse(response.body)
|
6
|
-
end
|
7
|
-
|
8
|
-
def get_issues(constituent_id, start_date = Date.today, end_date = Date.today + 365, resolved = false, options = {})
|
9
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
10
|
-
response = self.class.get(base_api_endpoint("CRM/Issues?constituentId=#{constituent_id}"), options)
|
11
|
-
JSON.parse(response.body)
|
12
|
-
end
|
13
|
-
|
14
2
|
def create_issue(activity_type, category_id, constituent_id, contact_type, notes, origin_id, options = {})
|
15
3
|
parameters =
|
16
4
|
{
|
@@ -4,17 +4,4 @@ module Orders
|
|
4
4
|
response = self.class.get(base_api_endpoint("TXN/Orders/#{id}/ProductsView"), options)
|
5
5
|
JSON.parse(response.body)
|
6
6
|
end
|
7
|
-
|
8
|
-
def print_order_ticket_elements(order_id, ticket_design, reprint, new_ticket_no = false, options = {})
|
9
|
-
parameters =
|
10
|
-
{
|
11
|
-
'IncludeReceipts': false,
|
12
|
-
'ReprintTickets': reprint,
|
13
|
-
'TicketDesignId': ticket_design,
|
14
|
-
'NewTicketNoForReprints': new_ticket_no,
|
15
|
-
}
|
16
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
17
|
-
options.merge!(:body => parameters)
|
18
|
-
self.class.post(base_api_endpoint("/TXN/Orders/#{order_id}/PrintTicketElements"), options)
|
19
|
-
end
|
20
7
|
end
|
data/lib/tessitura_rest.rb
CHANGED
@@ -7,7 +7,6 @@ class TessituraRest
|
|
7
7
|
include HTTParty
|
8
8
|
|
9
9
|
include Accounts
|
10
|
-
include Actions
|
11
10
|
include Addresses
|
12
11
|
include Attributes
|
13
12
|
include Appeals
|
@@ -43,12 +42,12 @@ class TessituraRest
|
|
43
42
|
include WebLogins
|
44
43
|
|
45
44
|
def initialize(options = {})
|
46
|
-
@auth = { username: ENV
|
47
|
-
password: ENV
|
45
|
+
@auth = { username: ENV.fetch('TESSITURA_USERNAME'),
|
46
|
+
password: ENV.fetch('TESSITURA_PASSWORD') }
|
48
47
|
@headers = { 'Accept': 'application/json' }
|
49
48
|
end
|
50
49
|
|
51
50
|
def base_api_endpoint(end_point)
|
52
|
-
"#{ENV
|
51
|
+
"#{ENV.fetch('TESSITURA_URL')}#{end_point}"
|
53
52
|
end
|
54
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tessitura_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,13 +116,13 @@ executables: []
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".circleci/config.yml"
|
119
120
|
- ".codeclimate.yml"
|
120
|
-
- ".env.enc"
|
121
121
|
- ".github/dependabot.yml"
|
122
|
+
- ".github/workflows/gem-push.yml"
|
122
123
|
- ".gitignore"
|
123
124
|
- ".rspec"
|
124
125
|
- ".rubocop.yml"
|
125
|
-
- ".travis.yml"
|
126
126
|
- CODE_OF_CONDUCT.md
|
127
127
|
- Gemfile
|
128
128
|
- LICENSE.txt
|
@@ -132,7 +132,6 @@ files:
|
|
132
132
|
- bin/setup
|
133
133
|
- lib/tessitura_rest.rb
|
134
134
|
- lib/tessitura_rest/crm/accounts.rb
|
135
|
-
- lib/tessitura_rest/crm/actions.rb
|
136
135
|
- lib/tessitura_rest/crm/addresses.rb
|
137
136
|
- lib/tessitura_rest/crm/attributes.rb
|
138
137
|
- lib/tessitura_rest/crm/constituencies.rb
|
@@ -172,7 +171,7 @@ homepage: https://github.com/pgharts/tessitura
|
|
172
171
|
licenses:
|
173
172
|
- MIT
|
174
173
|
metadata: {}
|
175
|
-
post_install_message:
|
174
|
+
post_install_message:
|
176
175
|
rdoc_options: []
|
177
176
|
require_paths:
|
178
177
|
- lib
|
@@ -187,8 +186,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
186
|
- !ruby/object:Gem::Version
|
188
187
|
version: '0'
|
189
188
|
requirements: []
|
190
|
-
rubygems_version: 3.3.
|
191
|
-
signing_key:
|
189
|
+
rubygems_version: 3.0.3.1
|
190
|
+
signing_key:
|
192
191
|
specification_version: 4
|
193
192
|
summary: Rest API Endpoint for the Tessitura Rest API (v14+).
|
194
193
|
test_files: []
|
data/.env.enc
DELETED
Binary file
|
data/.travis.yml
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
def get_action(id, options = {})
|
3
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
4
|
-
response = self.class.get(base_api_endpoint("CRM/Actions/#{id}"), options)
|
5
|
-
JSON.parse(response.body)
|
6
|
-
end
|
7
|
-
|
8
|
-
def get_actions(constituent_id, issue_id, options = {})
|
9
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
10
|
-
response = self.class.get(base_api_endpoint("CRM/Actions?constituentId=#{constituent_id}&issueId=#{issue_id}"), options)
|
11
|
-
JSON.parse(response.body)
|
12
|
-
end
|
13
|
-
|
14
|
-
def create_action(action_type, constituent_id, issue_id, notes = '', options = {})
|
15
|
-
parameters =
|
16
|
-
{
|
17
|
-
'ActionType': {
|
18
|
-
'Id': action_type,
|
19
|
-
},
|
20
|
-
'Issue': {
|
21
|
-
'Id': issue_id,
|
22
|
-
},
|
23
|
-
'Constituent': {
|
24
|
-
'Id': constituent_id,
|
25
|
-
},
|
26
|
-
'Notes': notes,
|
27
|
-
'Resolved': true,
|
28
|
-
}
|
29
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
30
|
-
options.merge!(:body => parameters)
|
31
|
-
response = self.class.post(base_api_endpoint('CRM/Actions'), options)
|
32
|
-
JSON.parse(response.body)
|
33
|
-
end
|
34
|
-
end
|