rock_rms 7.0.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +22 -0
- data/README.md +2 -2
- data/lib/rock_rms/client.rb +1 -1
- data/lib/rock_rms/error.rb +3 -0
- data/lib/rock_rms/response/attribute.rb +0 -1
- data/lib/rock_rms/response/attribute_value.rb +0 -1
- data/lib/rock_rms/response/base.rb +11 -3
- data/lib/rock_rms/response/batch.rb +0 -1
- data/lib/rock_rms/response/block.rb +0 -1
- data/lib/rock_rms/response/block_type.rb +0 -1
- data/lib/rock_rms/response/campus.rb +0 -1
- data/lib/rock_rms/response/defined_type.rb +0 -1
- data/lib/rock_rms/response/defined_value.rb +0 -1
- data/lib/rock_rms/response/fund.rb +0 -1
- data/lib/rock_rms/response/gateway.rb +0 -1
- data/lib/rock_rms/response/group.rb +0 -1
- data/lib/rock_rms/response/group_location.rb +0 -1
- data/lib/rock_rms/response/history.rb +0 -1
- data/lib/rock_rms/response/location.rb +0 -1
- data/lib/rock_rms/response/page.rb +0 -1
- data/lib/rock_rms/response/payment_detail.rb +0 -1
- data/lib/rock_rms/response/person.rb +0 -1
- data/lib/rock_rms/response/phone_number.rb +0 -1
- data/lib/rock_rms/response/recurring_donation.rb +0 -1
- data/lib/rock_rms/response/recurring_donation_details.rb +0 -1
- data/lib/rock_rms/response/registration.rb +0 -1
- data/lib/rock_rms/response/registration_instance.rb +0 -1
- data/lib/rock_rms/response/saved_payment_method.rb +0 -1
- data/lib/rock_rms/response/service_job.rb +0 -1
- data/lib/rock_rms/response/transaction.rb +0 -1
- data/lib/rock_rms/response/transaction_detail.rb +0 -1
- data/lib/rock_rms/response/workflow_activity_type.rb +0 -1
- data/lib/rock_rms/response/workflow_type.rb +0 -1
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/client_spec.rb +1 -1
- data/spec/rock_rms/response/attribute_value_spec.rb +1 -1
- data/spec/rock_rms/response/recurring_donation_spec.rb +3 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 17ab634cb0cde62461d00147a5db6782e60f6c76891937fee02cb87e2440f545
         | 
| 4 | 
            +
              data.tar.gz: 8ee90dd944bc529fb368a33d4c7f72a9bca98ded2efd35408ef2c07842f93308
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f7d04c986b0a027238618f14aa5764c1504a7923f92568cc10a48e77d6c0c14e325d2220bba99f253a38f0b07bfc484812540caf450f907bd6eceb51b0d78a60
         | 
| 7 | 
            +
              data.tar.gz: e3274919e94773fc0aa21b4acf407ffe5a1ebce6d7ec069ec6cdd7ab2e0bb36e0bd6c65b0c22b984c962fef190817e411242ad07ab60d95135813ebeda20b7dc
         | 
| @@ -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 | 
             
            
         | 
| 2 2 |  | 
| 3 | 
            -
            # Rock RMS Ruby Client  | 
| 3 | 
            +
            # Rock RMS Ruby Client 
         | 
| 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/client.rb
    CHANGED
    
    
    
        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
         | 
| @@ -3,6 +3,12 @@ module RockRMS | |
| 3 3 | 
             
                class Base
         | 
| 4 4 | 
             
                  attr_reader :data
         | 
| 5 5 |  | 
| 6 | 
            +
                  BASE_MAPPING = {
         | 
| 7 | 
            +
                    id: 'Id',
         | 
| 8 | 
            +
                    created_date_time: 'CreatedDateTime',
         | 
| 9 | 
            +
                    modified_date_time: 'ModifiedDateTime'
         | 
| 10 | 
            +
                  }.freeze
         | 
| 11 | 
            +
             | 
| 6 12 | 
             
                  def self.format(data)
         | 
| 7 13 | 
             
                    new(data).format
         | 
| 8 14 | 
             
                  end
         | 
| @@ -22,9 +28,11 @@ module RockRMS | |
| 22 28 | 
             
                  def to_h(dict, data)
         | 
| 23 29 | 
             
                    return {} if data.nil?
         | 
| 24 30 |  | 
| 25 | 
            -
                    dict | 
| 26 | 
            -
                       | 
| 27 | 
            -
             | 
| 31 | 
            +
                    dict
         | 
| 32 | 
            +
                      .merge(BASE_MAPPING)
         | 
| 33 | 
            +
                      .each_with_object({}) do |(l, r), object|
         | 
| 34 | 
            +
                        object[l] = data[r]
         | 
| 35 | 
            +
                      end
         | 
| 28 36 | 
             
                  end
         | 
| 29 37 | 
             
                end
         | 
| 30 38 | 
             
              end
         | 
    
        data/lib/rock_rms/version.rb
    CHANGED
    
    
| @@ -15,7 +15,6 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do | |
| 15 15 | 
             
                it 'has the following keys' do
         | 
| 16 16 | 
             
                  response = result.first
         | 
| 17 17 | 
             
                  expected_keys = %i[
         | 
| 18 | 
            -
                    id
         | 
| 19 18 | 
             
                    active
         | 
| 20 19 | 
             
                    financial_gateway_id
         | 
| 21 20 | 
             
                    foreign_key
         | 
| @@ -30,6 +29,9 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do | |
| 30 29 | 
             
                    transaction_code
         | 
| 31 30 | 
             
                    transaction_type_id
         | 
| 32 31 | 
             
                    summary
         | 
| 32 | 
            +
                    id
         | 
| 33 | 
            +
                    created_date_time
         | 
| 34 | 
            +
                    modified_date_time
         | 
| 33 35 | 
             
                  ]
         | 
| 34 36 |  | 
| 35 37 | 
             
                  expect(response.keys).to eq(expected_keys)
         | 
    
        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.0 | 
| 4 | 
            +
              version: 7.1.0
         | 
| 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-08- | 
| 11 | 
            +
            date: 2022-08-17 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"
         |