Skip to content

Commit

Permalink
Merge pull request #192 from AuthorizeNet/future
Browse files Browse the repository at this point in the history
Removed unnecessary files
  • Loading branch information
gnongsie authored Sep 18, 2024
2 parents 002019e + 8f7faec commit c0ff334
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 219 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/ruby-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Authorize.net Ruby CI
on:
push:
pull_request:
workflow_dispatch:
env:
sdk_ruby: 'sdk-ruby'
sample_code_ruby: 'sample-code-ruby'
jobs:
workflow-job:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
exclude:
- operating-system: macos-latest
ruby-version: '2.4'
- operating-system: macos-latest
ruby-version: '2.5'
include:
- operating-system: macos-13
ruby-version: '2.4'
- operating-system: macos-13
ruby-version: '2.5'
runs-on: ${{matrix.operating-system}}
env:
API_LOGIN_ID: 5KP3u95bQpv
API_TRANSACTION_KEY: 346HZ32z3fP4hTG2
MD5_VALUE: 'MD5_TEST'
steps:
- name: Creating separate folders for SDK and Sample Codes
run: |
rm -rf $sdk_ruby
rm -rf $sample_code_ruby
mkdir $sdk_ruby $sample_code_ruby
- name: Checkout authorizenet/sdk-ruby
uses: actions/checkout@v4
with:
path: ${{env.sdk_ruby}}


- name: Checkout authorizenet/sample-code-ruby
uses: actions/checkout@v4
with:
repository: 'authorizenet/sample-code-ruby'
ref: 'future' # Remove this line before pushing to master branch
path: ${{env.sample_code_ruby}}


- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby-version}}


- name: Install and Test
run: |
cd $sdk_ruby
bundle install
rake gem
PACKAGE_VERSION=$(cat authorizenet.gemspec | grep -w s.version | cut -d '"' -f 2)
bundle exec rake spec
cd ../$sample_code_ruby
gem install ../$sdk_ruby/authorizenet-$PACKAGE_VERSION.gem
bundle install
bundle exec rspec spec/sample_code_spec.rb
19 changes: 0 additions & 19 deletions .rubocop.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .scrutinizer.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions Appraisals

This file was deleted.

20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Authorize.Net Ruby SDK

[![Authorize.net Ruby CI](https://github.com/AuthorizeNet/sdk-ruby/actions/workflows/ruby-workflow.yml/badge.svg?branch=master)](https://github.com/AuthorizeNet/sdk-ruby/actions/workflows/ruby-workflow.yml)
[![Version ][rubygems_badge]][rubygems]
[![Travis CI ][travis_badge]][travis]
[![Coverage ][coverage_badge]][coverage]
[![Scrutinizer ][scrutinizer_badge]][scrutinizer]

Starting Release 1.8.6 November 2015 the Authorize.Net API has been [reorganized to be more merchant focused](https://developer.authorize.net/api/upgrade_guide/).
AIM, ARB, CIM, Reporting and SIM have all been deprecated in favor of sdk-ruby/lib/authorize_net/api.

## Requirements
* Ruby 2.2.2 or higher
* Ruby 2.4 or higher
* RubyGem 1.3.7 or higher (to build the gem)
* RDoc 1.0 or higher (to build documentation)
* Rake 0.8.7 or higher (to use the rake tasks)
Expand Down Expand Up @@ -39,7 +37,7 @@ The Authorize.Net API only support connections using the TLS 1.2 security protoc
```
> bundle install
> rake gem
> sudo gem install ./authorizenet-1.9.3.gem
> sudo gem install ./authorizenet-<version>.gem
```


Expand Down Expand Up @@ -111,10 +109,6 @@ To run the integration tests in the sandbox:
```
rake spec
```
To run the unit tests:
```
rake spec:ci
```

To run rspec tests, create a spec/credentials.yml with the following credentials and the values obtained as described below.
```ruby
Expand Down Expand Up @@ -156,10 +150,4 @@ Authorize.Net is phasing out the MD5 based `transHash` element in favor of the S
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.

[rubygems_badge]: https://badge.fury.io/rb/authorizenet.svg
[rubygems]: https://rubygems.org/gems/authorizenet
[travis_badge]: https://travis-ci.org/AuthorizeNet/sdk-ruby.svg?branch=master
[travis]: https://travis-ci.org/AuthorizeNet/sdk-ruby
[coverage_badge]: https://scrutinizer-ci.com/g/AuthorizeNet/sdk-ruby/badges/coverage.png?b=master
[coverage]: https://scrutinizer-ci.com/g/AuthorizeNet/sdk-ruby/?branch=master
[scrutinizer_badge]: https://scrutinizer-ci.com/g/AuthorizeNet/sdk-ruby/badges/quality-score.png?b=master
[scrutinizer]: https://scrutinizer-ci.com/g/AuthorizeNet/sdk-ruby/?branch=master
[rubygems]: https://rubygems.org/gems/authorizenet
36 changes: 0 additions & 36 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,12 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
end

namespace "spec" do
desc "Run the CIM spec"
RSpec::Core::RakeTask.new('cim') do |spec|
spec.pattern = FileList['spec/cim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the ARB spec"
RSpec::Core::RakeTask.new('arb') do |spec|
spec.pattern = FileList['spec/arb_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the AIM spec"
RSpec::Core::RakeTask.new('aim') do |spec|
spec.pattern = FileList['spec/aim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the API spec"
RSpec::Core::RakeTask.new('api') do |spec|
spec.pattern = FileList['spec/api_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the CI Unit Test spec"
RSpec::Core::RakeTask.new('ci') do |spec|
spec.pattern = FileList['spec/authorize_net_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the SIM spec"
RSpec::Core::RakeTask.new('sim') do |spec|
spec.pattern = FileList['spec/sim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the Reporting spec"
RSpec::Core::RakeTask.new('reporting') do |spec|
spec.pattern = FileList['spec/reporting_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end

desc "Run the Sample code Test Runner"
RSpec::Core::RakeTask.new('testrunner') do |spec|
spec.pattern = FileList['sample-code-ruby/spec/sample_code_spec.rb']
Expand Down
7 changes: 2 additions & 5 deletions authorizenet.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "authorizenet"
s.version = "2.0.1"
s.version = "2.0.2"
s.platform = Gem::Platform::RUBY
s.date = "2021-03-31"
s.summary = "Authorize.Net Payments SDK"
Expand All @@ -12,16 +12,13 @@ Gem::Specification.new do |s|
s.license = "https://github.com/AuthorizeNet/sdk-ruby/blob/master/LICENSE.txt"

s.required_ruby_version = '>= 2.4.0'
s.required_rubygems_version = '>= 1.3.6'
s.required_rubygems_version = '>= 1.3.7'

s.add_runtime_dependency 'activesupport', '>= 5.2.4.5'
s.add_runtime_dependency 'nokogiri', '~> 1.6', '>= 1.6.4'
s.add_runtime_dependency 'roxml', '>= 3.3.1'
s.add_runtime_dependency 'rexml', '>= 3.2.0'

s.add_development_dependency('appraisal')
s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
s.add_development_dependency 'rspec', '~> 3.9.0'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'scrutinizer-ocular'
end
2 changes: 0 additions & 2 deletions gemfiles/.bundle/config

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/rails_42.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/rails_50.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/rails_51.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/rails_52.gemfile

This file was deleted.

Loading

0 comments on commit c0ff334

Please sign in to comment.