Skip to content

Commit

Permalink
Introduce new Bambora::Credentials class (#51)
Browse files Browse the repository at this point in the history
* Introduce new Bambora::Credentials class

* Use default bundler in Github Actions instead of manual install
  • Loading branch information
harrylewis authored Feb 1, 2024
1 parent ec6b0a3 commit 3435cbf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:
${{ runner.os }}-gem-
- name: Setup ruby
uses: ruby/setup-ruby@v1
- run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Install dependencies
run: bundle install
- name: Rubocop checks
run: bundle exec rubocop
6 changes: 2 additions & 4 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Install dependencies
run: bundle install
- name: Run Tests
run: |
bundle exec rake spec
1 change: 1 addition & 0 deletions lib/bambora/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
require 'multiparty' # Multipart/mixed requests

require 'bambora/client/version'
require 'bambora/credentials'

# Adapters
require 'bambora/adapters/response'
Expand Down
12 changes: 12 additions & 0 deletions lib/bambora/credentials.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Bambora
class Credentials
attr_reader :merchant_id, :reporting_passcode

def initialize(options = {})
@merchant_id = options[:merchant_id]
@reporting_passcode = options[:reporting_passcode]
end
end
end

0 comments on commit 3435cbf

Please sign in to comment.