laundry 0.0.6 → 0.0.7
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.
- data/.rvmrc +81 -0
 - data/Gemfile +2 -0
 - data/README.md +1 -9
 - data/laundry.gemspec +1 -1
 - data/lib/laundry/payments_gateway/models/merchant.rb +1 -0
 - data/lib/laundry/stubbed.rb +7 -4
 - data/lib/laundry/version.rb +1 -1
 - data/spec/spec_helper.rb +1 -0
 - metadata +6 -5
 
    
        data/.rvmrc
    ADDED
    
    | 
         @@ -0,0 +1,81 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env bash
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            # This is an RVM Project .rvmrc file, used to automatically load the ruby
         
     | 
| 
      
 4 
     | 
    
         
            +
            # development environment upon cd'ing into the directory
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
         
     | 
| 
      
 7 
     | 
    
         
            +
            environment_id="ruby-1.9.3-p194@laundry"
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            #
         
     | 
| 
      
 10 
     | 
    
         
            +
            # Uncomment the following lines if you want to verify rvm version per project
         
     | 
| 
      
 11 
     | 
    
         
            +
            #
         
     | 
| 
      
 12 
     | 
    
         
            +
            # rvmrc_rvm_version="1.10.2" # 1.10.1 seams as a safe start
         
     | 
| 
      
 13 
     | 
    
         
            +
            # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
         
     | 
| 
      
 14 
     | 
    
         
            +
            #   echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
         
     | 
| 
      
 15 
     | 
    
         
            +
            #   return 1
         
     | 
| 
      
 16 
     | 
    
         
            +
            # }
         
     | 
| 
      
 17 
     | 
    
         
            +
            #
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            #
         
     | 
| 
      
 20 
     | 
    
         
            +
            # Uncomment following line if you want options to be set only for given project.
         
     | 
| 
      
 21 
     | 
    
         
            +
            #
         
     | 
| 
      
 22 
     | 
    
         
            +
            # PROJECT_JRUBY_OPTS=( --1.9 )
         
     | 
| 
      
 23 
     | 
    
         
            +
            #
         
     | 
| 
      
 24 
     | 
    
         
            +
            # The variable PROJECT_JRUBY_OPTS requires the following to be run in shell:
         
     | 
| 
      
 25 
     | 
    
         
            +
            #
         
     | 
| 
      
 26 
     | 
    
         
            +
            #    chmod +x ${rvm_path}/hooks/after_use_jruby_opts
         
     | 
| 
      
 27 
     | 
    
         
            +
            #
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            #
         
     | 
| 
      
 30 
     | 
    
         
            +
            # First we attempt to load the desired environment directly from the environment
         
     | 
| 
      
 31 
     | 
    
         
            +
            # file. This is very fast and efficient compared to running through the entire
         
     | 
| 
      
 32 
     | 
    
         
            +
            # CLI and selector. If you want feedback on which environment was used then
         
     | 
| 
      
 33 
     | 
    
         
            +
            # insert the word 'use' after --create as this triggers verbose mode.
         
     | 
| 
      
 34 
     | 
    
         
            +
            #
         
     | 
| 
      
 35 
     | 
    
         
            +
            if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
         
     | 
| 
      
 36 
     | 
    
         
            +
              && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
         
     | 
| 
      
 37 
     | 
    
         
            +
            then
         
     | 
| 
      
 38 
     | 
    
         
            +
              \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
              if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]
         
     | 
| 
      
 41 
     | 
    
         
            +
              then
         
     | 
| 
      
 42 
     | 
    
         
            +
                . "${rvm_path:-$HOME/.rvm}/hooks/after_use"
         
     | 
| 
      
 43 
     | 
    
         
            +
              fi
         
     | 
| 
      
 44 
     | 
    
         
            +
            else
         
     | 
| 
      
 45 
     | 
    
         
            +
              # If the environment file has not yet been created, use the RVM CLI to select.
         
     | 
| 
      
 46 
     | 
    
         
            +
              if ! rvm --create use  "$environment_id"
         
     | 
| 
      
 47 
     | 
    
         
            +
              then
         
     | 
| 
      
 48 
     | 
    
         
            +
                echo "Failed to create RVM environment '${environment_id}'."
         
     | 
| 
      
 49 
     | 
    
         
            +
                return 1
         
     | 
| 
      
 50 
     | 
    
         
            +
              fi
         
     | 
| 
      
 51 
     | 
    
         
            +
            fi
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            #
         
     | 
| 
      
 54 
     | 
    
         
            +
            # If you use an RVM gemset file to install a list of gems (*.gems), you can have
         
     | 
| 
      
 55 
     | 
    
         
            +
            # it be automatically loaded. Uncomment the following and adjust the filename if
         
     | 
| 
      
 56 
     | 
    
         
            +
            # necessary.
         
     | 
| 
      
 57 
     | 
    
         
            +
            #
         
     | 
| 
      
 58 
     | 
    
         
            +
            # filename=".gems"
         
     | 
| 
      
 59 
     | 
    
         
            +
            # if [[ -s "$filename" ]]
         
     | 
| 
      
 60 
     | 
    
         
            +
            # then
         
     | 
| 
      
 61 
     | 
    
         
            +
            #   rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
         
     | 
| 
      
 62 
     | 
    
         
            +
            # fi
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
            # If you use bundler, this might be useful to you:
         
     | 
| 
      
 65 
     | 
    
         
            +
            # if [[ -s Gemfile ]] && ! command -v bundle >/dev/null
         
     | 
| 
      
 66 
     | 
    
         
            +
            # then
         
     | 
| 
      
 67 
     | 
    
         
            +
            #   printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
         
     | 
| 
      
 68 
     | 
    
         
            +
            #   gem install bundler
         
     | 
| 
      
 69 
     | 
    
         
            +
            # fi
         
     | 
| 
      
 70 
     | 
    
         
            +
            # if [[ -s Gemfile ]] && command -v bundle
         
     | 
| 
      
 71 
     | 
    
         
            +
            # then
         
     | 
| 
      
 72 
     | 
    
         
            +
            #   bundle install
         
     | 
| 
      
 73 
     | 
    
         
            +
            # fi
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            if [[ $- == *i* ]] # check for interactive shells
         
     | 
| 
      
 76 
     | 
    
         
            +
            then
         
     | 
| 
      
 77 
     | 
    
         
            +
                echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
         
     | 
| 
      
 78 
     | 
    
         
            +
            else
         
     | 
| 
      
 79 
     | 
    
         
            +
            	echo "Using: $GEM_HOME" # don't use colors in interactive shells
         
     | 
| 
      
 80 
     | 
    
         
            +
            fi
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #Laundry [](http://travis-ci.org/supapuerco/laundry) [](https://codeclimate.com/github/supapuerco/laundry)
         
     | 
| 
      
 1 
     | 
    
         
            +
            #Laundry [](http://travis-ci.org/supapuerco/laundry) [](https://gemnasium.com/wilg/laundry) [](https://codeclimate.com/github/supapuerco/laundry)
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Have you ever wanted to use [ACH Direct](http://www.achdirect.com)'s [Payments Gateway](http://paymentsgateway.com) SOAP API? Neither did anyone. However, with this little gem you should be able to interact with it without going too terribly nuts.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -45,14 +45,6 @@ merchant = Laundry::PaymentsGateway::Merchant.new({ 
     | 
|
| 
       45 
45 
     | 
    
         
             
            })
         
     | 
| 
       46 
46 
     | 
    
         
             
            ```
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
            Since you probably just have the one account you can store that by using `default_merchant` instead of `new`:
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
            ```ruby
         
     | 
| 
       51 
     | 
    
         
            -
            Laundry::PaymentsGateway::Merchant.default_merchant({...})
         
     | 
| 
       52 
     | 
    
         
            -
            ```
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
            Then, you can access your merchant without having to keep track of the account details by calling `Laundry::PaymentsGateway::Merchant.default_merchant` again.
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
48 
     | 
    
         
             
            ### Sandbox
         
     | 
| 
       57 
49 
     | 
    
         | 
| 
       58 
50 
     | 
    
         
             
            In development? You should probably **sandbox** this baby:
         
     | 
    
        data/laundry.gemspec
    CHANGED
    
    | 
         @@ -7,7 +7,7 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       7 
7 
     | 
    
         
             
              gem.email         = ["supapuerco@gmail.com"]
         
     | 
| 
       8 
8 
     | 
    
         
             
              gem.description   = "A soapy interface to ACH Direct's PaymentsGateway.com service."
         
     | 
| 
       9 
9 
     | 
    
         
             
              gem.summary       = "A soapy interface to ACH Direct's PaymentsGateway.com service."
         
     | 
| 
       10 
     | 
    
         
            -
              gem.homepage      = "https://github.com/ 
     | 
| 
      
 10 
     | 
    
         
            +
              gem.homepage      = "https://github.com/wilg/laundry"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
              gem.files         = `git ls-files`.split($\)
         
     | 
| 
       13 
13 
     | 
    
         
             
              gem.executables   = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
         
     | 
    
        data/lib/laundry/stubbed.rb
    CHANGED
    
    | 
         @@ -1,9 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require "rspec/mocks/standalone"
         
     | 
| 
       2 
2 
     | 
    
         
             
            require 'factory_girl'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            FactoryGirl.definition_file_paths = [factories_dir]
         
     | 
| 
       6 
     | 
    
         
            -
            FactoryGirl.find_definitions
         
     | 
| 
      
 3 
     | 
    
         
            +
            begin
         
     | 
| 
      
 4 
     | 
    
         
            +
            	factories_dir = File.expand_path File.join(__FILE__, "..", "..", "..", "spec", "factories")
         
     | 
| 
      
 5 
     | 
    
         
            +
            	FactoryGirl.definition_file_paths = [factories_dir]
         
     | 
| 
      
 6 
     | 
    
         
            +
            	FactoryGirl.find_definitions
         
     | 
| 
      
 7 
     | 
    
         
            +
            rescue FactoryGirl::DuplicateDefinitionError
         
     | 
| 
      
 8 
     | 
    
         
            +
            	puts "Factories already loaded."
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
       7 
10 
     | 
    
         
             
            include FactoryGirl::Syntax::Methods
         
     | 
| 
       8 
11 
     | 
    
         | 
| 
       9 
12 
     | 
    
         
             
            class Module
         
     | 
    
        data/lib/laundry/version.rb
    CHANGED
    
    
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: laundry
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.7
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2012- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-09-10 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: savon
         
     | 
| 
         @@ -84,6 +84,7 @@ extra_rdoc_files: [] 
     | 
|
| 
       84 
84 
     | 
    
         
             
            files:
         
     | 
| 
       85 
85 
     | 
    
         
             
            - .gitignore
         
     | 
| 
       86 
86 
     | 
    
         
             
            - .rspec
         
     | 
| 
      
 87 
     | 
    
         
            +
            - .rvmrc
         
     | 
| 
       87 
88 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       88 
89 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       89 
90 
     | 
    
         
             
            - LICENSE
         
     | 
| 
         @@ -113,7 +114,7 @@ files: 
     | 
|
| 
       113 
114 
     | 
    
         
             
            - spec/factories/transaction_response_factory.rb
         
     | 
| 
       114 
115 
     | 
    
         
             
            - spec/laundry/merchant_spec.rb
         
     | 
| 
       115 
116 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
       116 
     | 
    
         
            -
            homepage: https://github.com/ 
     | 
| 
      
 117 
     | 
    
         
            +
            homepage: https://github.com/wilg/laundry
         
     | 
| 
       117 
118 
     | 
    
         
             
            licenses: []
         
     | 
| 
       118 
119 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       119 
120 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
         @@ -127,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       127 
128 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       128 
129 
     | 
    
         
             
                  segments:
         
     | 
| 
       129 
130 
     | 
    
         
             
                  - 0
         
     | 
| 
       130 
     | 
    
         
            -
                  hash: - 
     | 
| 
      
 131 
     | 
    
         
            +
                  hash: -483635044022324010
         
     | 
| 
       131 
132 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       132 
133 
     | 
    
         
             
              none: false
         
     | 
| 
       133 
134 
     | 
    
         
             
              requirements:
         
     | 
| 
         @@ -136,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       136 
137 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       137 
138 
     | 
    
         
             
                  segments:
         
     | 
| 
       138 
139 
     | 
    
         
             
                  - 0
         
     | 
| 
       139 
     | 
    
         
            -
                  hash: - 
     | 
| 
      
 140 
     | 
    
         
            +
                  hash: -483635044022324010
         
     | 
| 
       140 
141 
     | 
    
         
             
            requirements: []
         
     | 
| 
       141 
142 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       142 
143 
     | 
    
         
             
            rubygems_version: 1.8.24
         
     |