cgi_party 0.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 +7 -0
 - data/.gitignore +11 -0
 - data/.rspec +3 -0
 - data/.travis.yml +5 -0
 - data/Gemfile +6 -0
 - data/Gemfile.lock +70 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +110 -0
 - data/Rakefile +6 -0
 - data/bin/console +14 -0
 - data/bin/setup +8 -0
 - data/cgi_party.gemspec +39 -0
 - data/lib/cgi_party/authenticate_request.rb +32 -0
 - data/lib/cgi_party/authenticate_response.rb +9 -0
 - data/lib/cgi_party/client.rb +51 -0
 - data/lib/cgi_party/collect_request.rb +33 -0
 - data/lib/cgi_party/collect_response.rb +19 -0
 - data/lib/cgi_party/request.rb +36 -0
 - data/lib/cgi_party/response.rb +28 -0
 - data/lib/cgi_party/version.rb +3 -0
 - data/lib/cgi_party/wsdl_paths.rb +5 -0
 - data/lib/cgi_party.rb +32 -0
 - metadata +150 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: a97167288228a134bb92d9d3ad1cbc28690b2d1b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: eff0aa5f12900a09f082ee6424b7a1769bbe3bc5
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 6e7cac639147e60ca5ac2ed718d302d238d71b88d7e81404d3187c7d475b60ef127da4d9b448ed708be338984f02c5349340f29e6634eed36c26c323f207b93d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ea178ab86e66ab2fc0c63bf8b1201c1527cbbb73a20196dc504024d7965eaa68eb12766f58ce98ef902c258854d898e0c2fcefff61ed33c7d62eae2b4b2f2232
         
     | 
    
        data/.gitignore
    ADDED
    
    
    
        data/.rspec
    ADDED
    
    
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | 
         @@ -0,0 +1,70 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            PATH
         
     | 
| 
      
 2 
     | 
    
         
            +
              remote: .
         
     | 
| 
      
 3 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 4 
     | 
    
         
            +
                cgi_party (0.1.0)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  savon (~> 2.0)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            GEM
         
     | 
| 
      
 8 
     | 
    
         
            +
              remote: https://rubygems.org/
         
     | 
| 
      
 9 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 10 
     | 
    
         
            +
                akami (1.3.1)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  gyoku (>= 0.4.0)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  nokogiri
         
     | 
| 
      
 13 
     | 
    
         
            +
                builder (3.2.3)
         
     | 
| 
      
 14 
     | 
    
         
            +
                coderay (1.1.2)
         
     | 
| 
      
 15 
     | 
    
         
            +
                diff-lcs (1.3)
         
     | 
| 
      
 16 
     | 
    
         
            +
                gyoku (1.3.1)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  builder (>= 2.1.2)
         
     | 
| 
      
 18 
     | 
    
         
            +
                httpi (2.4.2)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  rack
         
     | 
| 
      
 20 
     | 
    
         
            +
                  socksify
         
     | 
| 
      
 21 
     | 
    
         
            +
                method_source (0.9.0)
         
     | 
| 
      
 22 
     | 
    
         
            +
                mini_portile2 (2.3.0)
         
     | 
| 
      
 23 
     | 
    
         
            +
                nokogiri (1.8.2)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  mini_portile2 (~> 2.3.0)
         
     | 
| 
      
 25 
     | 
    
         
            +
                nori (2.6.0)
         
     | 
| 
      
 26 
     | 
    
         
            +
                pry (0.11.3)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  coderay (~> 1.1.0)
         
     | 
| 
      
 28 
     | 
    
         
            +
                  method_source (~> 0.9.0)
         
     | 
| 
      
 29 
     | 
    
         
            +
                rack (2.0.4)
         
     | 
| 
      
 30 
     | 
    
         
            +
                rake (10.4.2)
         
     | 
| 
      
 31 
     | 
    
         
            +
                rspec (3.7.0)
         
     | 
| 
      
 32 
     | 
    
         
            +
                  rspec-core (~> 3.7.0)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  rspec-expectations (~> 3.7.0)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  rspec-mocks (~> 3.7.0)
         
     | 
| 
      
 35 
     | 
    
         
            +
                rspec-core (3.7.1)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  rspec-support (~> 3.7.0)
         
     | 
| 
      
 37 
     | 
    
         
            +
                rspec-expectations (3.7.0)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 39 
     | 
    
         
            +
                  rspec-support (~> 3.7.0)
         
     | 
| 
      
 40 
     | 
    
         
            +
                rspec-mocks (3.7.0)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 42 
     | 
    
         
            +
                  rspec-support (~> 3.7.0)
         
     | 
| 
      
 43 
     | 
    
         
            +
                rspec-support (3.7.0)
         
     | 
| 
      
 44 
     | 
    
         
            +
                savon (2.12.0)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  akami (~> 1.2)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  builder (>= 2.1.2)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  gyoku (~> 1.2)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  httpi (~> 2.3)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  nokogiri (>= 1.8.1)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  nori (~> 2.4)
         
     | 
| 
      
 51 
     | 
    
         
            +
                  wasabi (~> 3.4)
         
     | 
| 
      
 52 
     | 
    
         
            +
                socksify (1.7.1)
         
     | 
| 
      
 53 
     | 
    
         
            +
                timecop (0.9.1)
         
     | 
| 
      
 54 
     | 
    
         
            +
                wasabi (3.5.0)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  httpi (~> 2.0)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  nokogiri (>= 1.4.2)
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            PLATFORMS
         
     | 
| 
      
 59 
     | 
    
         
            +
              ruby
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            DEPENDENCIES
         
     | 
| 
      
 62 
     | 
    
         
            +
              bundler (~> 1.16)
         
     | 
| 
      
 63 
     | 
    
         
            +
              cgi_party!
         
     | 
| 
      
 64 
     | 
    
         
            +
              pry
         
     | 
| 
      
 65 
     | 
    
         
            +
              rake (~> 10.0)
         
     | 
| 
      
 66 
     | 
    
         
            +
              rspec (~> 3.0)
         
     | 
| 
      
 67 
     | 
    
         
            +
              timecop
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 70 
     | 
    
         
            +
               1.16.0
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            The MIT License (MIT)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2018 Emric
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
      
 6 
     | 
    
         
            +
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
      
 7 
     | 
    
         
            +
            in the Software without restriction, including without limitation the rights
         
     | 
| 
      
 8 
     | 
    
         
            +
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
      
 9 
     | 
    
         
            +
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
      
 10 
     | 
    
         
            +
            furnished to do so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
      
 13 
     | 
    
         
            +
            all copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
      
 21 
     | 
    
         
            +
            THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,110 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # CGIParty
         
     | 
| 
      
 2 
     | 
    
         
            +
            CGIParty is a gem made for integrating against the CGI Group GRP API.
         
     | 
| 
      
 3 
     | 
    
         
            +
            As of now you can only perform BankID authorisation.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            - *You will need an agreement with CGI group in order to user their API. We do not provide this.*
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem 'cgi_party'
         
     | 
| 
      
 13 
     | 
    
         
            +
            ```
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            Or install it yourself as:
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                $ gem install cgi_party
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ### Configuration
         
     | 
| 
      
 24 
     | 
    
         
            +
            To use the gem you must configure some settings.
         
     | 
| 
      
 25 
     | 
    
         
            +
            Here is the settings available:
         
     | 
| 
      
 26 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 27 
     | 
    
         
            +
            CGIParty.configure do |config|
         
     | 
| 
      
 28 
     | 
    
         
            +
              # (Optional) The number of seconds a poll operation will be active before timeout. Recommended is 180 seconds.
         
     | 
| 
      
 29 
     | 
    
         
            +
              config.collect_polling_timeout = 180
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
              # (Optional) The number of seconds a poll operation will wait between each call. Recommended is 3 seconds.
         
     | 
| 
      
 32 
     | 
    
         
            +
              config.collect_polling_delay = 3
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              # (Optional) The path where the WSDL is located. Change to CGIParty::WSDL_TEST_PATH in development and testing
         
     | 
| 
      
 35 
     | 
    
         
            +
              config.wsdl_path = CGIParty::WSDL_PATH
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
              # (Required) The name that will be displayed in the BankID app. "Jag legitimerar mig mot #{display_name}"
         
     | 
| 
      
 38 
     | 
    
         
            +
              config.display_name = "display_name"
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
              # (Required) An identifier for your service provided by the CGI Group
         
     | 
| 
      
 41 
     | 
    
         
            +
              config.service_id = "service_id"
         
     | 
| 
      
 42 
     | 
    
         
            +
            end
         
     | 
| 
      
 43 
     | 
    
         
            +
            ```
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 46 
     | 
    
         
            +
            Before doing any consecutive requests you must first initiate a client and call
         
     | 
| 
      
 47 
     | 
    
         
            +
            the authenticate method. The authenticate response will contain information about
         
     | 
| 
      
 48 
     | 
    
         
            +
            the authentication order.
         
     | 
| 
      
 49 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 50 
     | 
    
         
            +
            client = CGIParty::Client.new
         
     | 
| 
      
 51 
     | 
    
         
            +
            authenticate_response = client.authenticate(social_security_number)
         
     | 
| 
      
 52 
     | 
    
         
            +
            ```
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            You can acquire an url for prompting the BankID application on the device.
         
     | 
| 
      
 55 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 56 
     | 
    
         
            +
            authenticate_response.autostart_url(return_url)
         
     | 
| 
      
 57 
     | 
    
         
            +
            #=> "bankid:///?autostarttoken=[token]&redirect=[return_url]"
         
     | 
| 
      
 58 
     | 
    
         
            +
            ```
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            To poll the collect action you can use the poll collect method. The block will be yielded
         
     | 
| 
      
 61 
     | 
    
         
            +
            every time the API responds. You can take appropriate action in your application by using the provided
         
     | 
| 
      
 62 
     | 
    
         
            +
            progress statuses.
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
            You can read more about them in the CGI Group GRP API documentation:
         
     | 
| 
      
 65 
     | 
    
         
            +
            https://www.cgi.se/sites/default/files/files_se/pdf/grp_api.pdf
         
     | 
| 
      
 66 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 67 
     | 
    
         
            +
            client.poll_collect(authenticate_response.order_ref,
         
     | 
| 
      
 68 
     | 
    
         
            +
                                authenticate_response.transaction_id) do |collect_response|
         
     | 
| 
      
 69 
     | 
    
         
            +
              case collect_response.progress_status
         
     | 
| 
      
 70 
     | 
    
         
            +
              when "OUTSTANDING_TRANSACTION"    # Awaiting BankID application to start. (Might need manual boot)
         
     | 
| 
      
 71 
     | 
    
         
            +
              when "EXPIRED_TRANSACTION"        # No activity from the user after 180s.
         
     | 
| 
      
 72 
     | 
    
         
            +
              when "ALREADY_IN_PROGRESS"        # An order for the user is already in progress.
         
     | 
| 
      
 73 
     | 
    
         
            +
              when "INVALID_PARAMETERS"         # Invalid parameters provided.
         
     | 
| 
      
 74 
     | 
    
         
            +
              when "ACCESS_DENIED_RP"           # Internal access problem. Contact CGI.
         
     | 
| 
      
 75 
     | 
    
         
            +
              when "CERTIFICATE_ERR"            # The users BankID are revoked or invalid.
         
     | 
| 
      
 76 
     | 
    
         
            +
              when "INTERNAL_ERROR"             # An internal BankID error occured.
         
     | 
| 
      
 77 
     | 
    
         
            +
              when "START_FAILED"               # BankID client did't start after 30s
         
     | 
| 
      
 78 
     | 
    
         
            +
              when "USER_CANCEL"                # The order was canceled by the user.
         
     | 
| 
      
 79 
     | 
    
         
            +
              when "CLIENT_ERR"                 # An internal BankID error occurred.
         
     | 
| 
      
 80 
     | 
    
         
            +
              when "CANCELLED"                  # The order was cancelled.
         
     | 
| 
      
 81 
     | 
    
         
            +
              when "NO_CLIENT"                  # Users BankID was not available
         
     | 
| 
      
 82 
     | 
    
         
            +
              when "COMPLETE"                   # The authentication is completed
         
     | 
| 
      
 83 
     | 
    
         
            +
              when "RETRY"                      # A temporary error has occurred. Prompt the user to try again.
         
     | 
| 
      
 84 
     | 
    
         
            +
              end
         
     | 
| 
      
 85 
     | 
    
         
            +
            end
         
     | 
| 
      
 86 
     | 
    
         
            +
            ```
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            A successful collect response will contain attributes about the authenticated person.
         
     | 
| 
      
 89 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 90 
     | 
    
         
            +
            collect_response.attributes
         
     | 
| 
      
 91 
     | 
    
         
            +
            #=>
         
     | 
| 
      
 92 
     | 
    
         
            +
            [
         
     | 
| 
      
 93 
     | 
    
         
            +
              { name: "cn", value: "Bob Basil" },
         
     | 
| 
      
 94 
     | 
    
         
            +
              { name: "serialnumber", value: "680916-1794" },
         
     | 
| 
      
 95 
     | 
    
         
            +
              # ...
         
     | 
| 
      
 96 
     | 
    
         
            +
            ]
         
     | 
| 
      
 97 
     | 
    
         
            +
            ```
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
            ## Development and testing
         
     | 
| 
      
 100 
     | 
    
         
            +
            When testing the functionality against the API it is preferable to not use
         
     | 
| 
      
 101 
     | 
    
         
            +
            the real endpoints. By changing the `wsdl_path` config variable in testing you can
         
     | 
| 
      
 102 
     | 
    
         
            +
            change all requests to enpoints made for testing.
         
     | 
| 
      
 103 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 104 
     | 
    
         
            +
            CGIParty.configure do |config|
         
     | 
| 
      
 105 
     | 
    
         
            +
              config.wsdl_path = CGIParty::WSDL_TEST_PATH
         
     | 
| 
      
 106 
     | 
    
         
            +
              # ...
         
     | 
| 
      
 107 
     | 
    
         
            +
            end
         
     | 
| 
      
 108 
     | 
    
         
            +
            ```
         
     | 
| 
      
 109 
     | 
    
         
            +
            ## License
         
     | 
| 
      
 110 
     | 
    
         
            +
            The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
         
     | 
    
        data/Rakefile
    ADDED
    
    
    
        data/bin/console
    ADDED
    
    | 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "bundler/setup"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "cgi_party"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # You can add fixtures and/or initialization code here to make experimenting
         
     | 
| 
      
 7 
     | 
    
         
            +
            # with your gem easier. You can also use a different console, if you like.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            # (If you use this, don't forget to add pry to your Gemfile!)
         
     | 
| 
      
 10 
     | 
    
         
            +
            # require "pry"
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Pry.start
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require "irb"
         
     | 
| 
      
 14 
     | 
    
         
            +
            IRB.start(__FILE__)
         
     | 
    
        data/bin/setup
    ADDED
    
    
    
        data/cgi_party.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            lib = File.expand_path("../lib", __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "cgi_party/version"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.name          = "cgi_party"
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = CGIParty::VERSION
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.authors       = ["Emric"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.email         = ["w.e.w@live.se"]
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              spec.summary       = %q{Makes CGI Group GRP integration a party! <3}
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.homepage      = "https://github.com/standout/cgi-party"
         
     | 
| 
      
 14 
     | 
    
         
            +
              spec.license       = "MIT"
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
         
     | 
| 
      
 17 
     | 
    
         
            +
              # to allow pushing to a single host or delete this section to allow pushing to any host.
         
     | 
| 
      
 18 
     | 
    
         
            +
              if spec.respond_to?(:metadata)
         
     | 
| 
      
 19 
     | 
    
         
            +
                spec.metadata["allowed_push_host"] = "https://rubygems.org"
         
     | 
| 
      
 20 
     | 
    
         
            +
              else
         
     | 
| 
      
 21 
     | 
    
         
            +
                raise "RubyGems 2.0 or newer is required to protect against " \
         
     | 
| 
      
 22 
     | 
    
         
            +
                  "public gem pushes."
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              spec.files         = `git ls-files -z`.split("\x0").reject do |f|
         
     | 
| 
      
 26 
     | 
    
         
            +
                f.match(%r{^(test|spec|features)/})
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
              spec.bindir        = "exe"
         
     | 
| 
      
 29 
     | 
    
         
            +
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 30 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
              spec.add_dependency "savon", "~> 2.0"
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              spec.add_development_dependency "bundler", "~> 1.16"
         
     | 
| 
      
 35 
     | 
    
         
            +
              spec.add_development_dependency "rake", "~> 10.0"
         
     | 
| 
      
 36 
     | 
    
         
            +
              spec.add_development_dependency "rspec", "~> 3.0"
         
     | 
| 
      
 37 
     | 
    
         
            +
              spec.add_development_dependency "pry"
         
     | 
| 
      
 38 
     | 
    
         
            +
              spec.add_development_dependency "timecop"
         
     | 
| 
      
 39 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,32 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "cgi_party/authenticate_response"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "cgi_party/request"
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 5 
     | 
    
         
            +
              class AuthenticateRequest < CGIParty::Request
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_reader :service_id, :display_name, :provider, :ssn
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(savon_client, ssn, options: {})
         
     | 
| 
      
 9 
     | 
    
         
            +
                  super(savon_client, options)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @ssn = ssn
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                private
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                def available_options
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %i[display_name provider service_id]
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                def serialize_data(data)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  CGIParty::AuthenticateResponse.new(data)
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                def message_hash
         
     | 
| 
      
 24 
     | 
    
         
            +
                  {
         
     | 
| 
      
 25 
     | 
    
         
            +
                    display_name: @options[:display_name],
         
     | 
| 
      
 26 
     | 
    
         
            +
                    provider: @options[:provider],
         
     | 
| 
      
 27 
     | 
    
         
            +
                    policy: @options[:service_id],
         
     | 
| 
      
 28 
     | 
    
         
            +
                    personal_number: @ssn
         
     | 
| 
      
 29 
     | 
    
         
            +
                  }
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,51 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "savon"
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_reader :savon_client, :collect_responses, :polling_started_at
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 9 
     | 
    
         
            +
                  @savon_client = Savon.client(savon_opts)
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def poll_collect(order_ref, transaction_id = nil)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @polling_started_at = Time.now
         
     | 
| 
      
 14 
     | 
    
         
            +
                  loop do
         
     | 
| 
      
 15 
     | 
    
         
            +
                    collect_response = collect(order_ref, transaction_id)
         
     | 
| 
      
 16 
     | 
    
         
            +
                    return collect_response if timeout_polling?
         
     | 
| 
      
 17 
     | 
    
         
            +
                    yield(collect_response)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    return collect_response if collect_response.authentication_finished?
         
     | 
| 
      
 19 
     | 
    
         
            +
                    sleep(CGIParty.config.collect_polling_delay)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                def polling_duration
         
     | 
| 
      
 24 
     | 
    
         
            +
                  Time.now - @polling_started_at
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                def authenticate(ssn, options: {})
         
     | 
| 
      
 28 
     | 
    
         
            +
                  CGIParty::AuthenticateRequest.new(@savon_client, ssn).execute
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                def collect(order_reference, transaction_id, options: {})
         
     | 
| 
      
 32 
     | 
    
         
            +
                  CGIParty::CollectRequest.new(@savon_client, order_reference, transaction_id).execute
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                private
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                def timeout_polling?
         
     | 
| 
      
 38 
     | 
    
         
            +
                  polling_duration >= CGIParty.config.collect_polling_timeout
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def savon_opts
         
     | 
| 
      
 42 
     | 
    
         
            +
                  {
         
     | 
| 
      
 43 
     | 
    
         
            +
                    namespace: CGIParty::WSDL_NAMESPACE,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    namespace_identifier: :v1,
         
     | 
| 
      
 45 
     | 
    
         
            +
                    wsdl: CGIParty.config.wsdl_path,
         
     | 
| 
      
 46 
     | 
    
         
            +
                    env_namespace: :soapenv,
         
     | 
| 
      
 47 
     | 
    
         
            +
                    ssl_verify_mode: :none
         
     | 
| 
      
 48 
     | 
    
         
            +
                  }
         
     | 
| 
      
 49 
     | 
    
         
            +
                end
         
     | 
| 
      
 50 
     | 
    
         
            +
              end
         
     | 
| 
      
 51 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,33 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "cgi_party/collect_response"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "cgi_party/request"
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 5 
     | 
    
         
            +
              class CollectRequest < CGIParty::Request
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_reader :order_reference, :transaction_id
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(savon_client, order_reference, transaction_id = nil, options: {})
         
     | 
| 
      
 9 
     | 
    
         
            +
                  super(savon_client, options)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @order_reference = order_reference
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @transaction_id = transaction_id
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                private
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                def serialize_data(data)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  CGIParty::CollectResponse.new(data)
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                def available_options
         
     | 
| 
      
 21 
     | 
    
         
            +
                  %i[display_name service_id]
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def message_hash
         
     | 
| 
      
 25 
     | 
    
         
            +
                  {
         
     | 
| 
      
 26 
     | 
    
         
            +
                    display_name: @options[:display_name],
         
     | 
| 
      
 27 
     | 
    
         
            +
                    policy: @options[:service_id],
         
     | 
| 
      
 28 
     | 
    
         
            +
                    transaction_id: @transaction_id,
         
     | 
| 
      
 29 
     | 
    
         
            +
                    order_ref: @order_reference
         
     | 
| 
      
 30 
     | 
    
         
            +
                  }
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,19 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "cgi_party/response"
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 4 
     | 
    
         
            +
              class CollectResponse < Response
         
     | 
| 
      
 5 
     | 
    
         
            +
                def authentication_finished?
         
     | 
| 
      
 6 
     | 
    
         
            +
                  !authentication_ongoing?
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def authentication_ongoing?
         
     | 
| 
      
 10 
     | 
    
         
            +
                  ongoing_statuses.include? progress_status
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                private
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                def ongoing_statuses
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %w(OUTSTANDING_TRANSACTION USER_SIGN)
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Request
         
     | 
| 
      
 3 
     | 
    
         
            +
                def initialize(savon_client, options)
         
     | 
| 
      
 4 
     | 
    
         
            +
                  @options = fetch_options(options, available_options)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  @savon_client = savon_client
         
     | 
| 
      
 6 
     | 
    
         
            +
                end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def execute
         
     | 
| 
      
 9 
     | 
    
         
            +
                  serialize_data(
         
     | 
| 
      
 10 
     | 
    
         
            +
                    @savon_client.call(
         
     | 
| 
      
 11 
     | 
    
         
            +
                      action_name,
         
     | 
| 
      
 12 
     | 
    
         
            +
                      message: message_hash,
         
     | 
| 
      
 13 
     | 
    
         
            +
                      message_tag: message_tag
         
     | 
| 
      
 14 
     | 
    
         
            +
                    ).body
         
     | 
| 
      
 15 
     | 
    
         
            +
                  )
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                private
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                def fetch_options(options, available_options)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  available_options.each do |option_name|
         
     | 
| 
      
 22 
     | 
    
         
            +
                    options[option_name] ||= CGIParty.config.public_send(option_name)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  end
         
     | 
| 
      
 24 
     | 
    
         
            +
                  options
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                # Only works for single word actions
         
     | 
| 
      
 28 
     | 
    
         
            +
                def action_name
         
     | 
| 
      
 29 
     | 
    
         
            +
                  message_tag[/(.*)(?:Request)/, 1].downcase.to_sym
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def message_tag
         
     | 
| 
      
 33 
     | 
    
         
            +
                  self.class.name.gsub(/^.*::/, '')
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Response
         
     | 
| 
      
 3 
     | 
    
         
            +
                attr_reader :received_at
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                def initialize(source_data)
         
     | 
| 
      
 6 
     | 
    
         
            +
                  @source_data = source_data
         
     | 
| 
      
 7 
     | 
    
         
            +
                  @received_at = Time.now
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                def method_missing(method_name, *args, &block)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  fetch_value(method_name) || super
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                def respond_to_missing?(method_name, include_private = false)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  key_present?(method_name) || super
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                private
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                def fetch_value(key)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  @source_data.values.first.fetch(key.to_sym, nil)
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def key_present?(key)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @source_data.values.first.key?(key)
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/cgi_party.rb
    ADDED
    
    | 
         @@ -0,0 +1,32 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "cgi_party/authenticate_request"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "cgi_party/collect_request"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "cgi_party/wsdl_paths"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "cgi_party/version"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require "cgi_party/client"
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            module CGIParty
         
     | 
| 
      
 8 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 9 
     | 
    
         
            +
                attr_accessor :config
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              def self.configure
         
     | 
| 
      
 13 
     | 
    
         
            +
                self.config ||= Configuration.new
         
     | 
| 
      
 14 
     | 
    
         
            +
                yield(config)
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              class Configuration
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :collect_polling_timeout
         
     | 
| 
      
 19 
     | 
    
         
            +
                attr_accessor :collect_polling_delay
         
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :display_name
         
     | 
| 
      
 21 
     | 
    
         
            +
                attr_accessor :service_id
         
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :wsdl_path
         
     | 
| 
      
 23 
     | 
    
         
            +
                attr_reader   :provider
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @collect_polling_timeout = 180
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @collect_polling_delay = 3
         
     | 
| 
      
 28 
     | 
    
         
            +
                  @wsdl_path = WSDL_PATH
         
     | 
| 
      
 29 
     | 
    
         
            +
                  @provider = "bankid"
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,150 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: cgi_party
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Emric
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: exe
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-02-06 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: savon
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '2.0'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '2.0'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1.16'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1.16'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 69 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 70 
     | 
    
         
            +
              name: pry
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 72 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 73 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 76 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 77 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 79 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 80 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 83 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 84 
     | 
    
         
            +
              name: timecop
         
     | 
| 
      
 85 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 97 
     | 
    
         
            +
            description: 
         
     | 
| 
      
 98 
     | 
    
         
            +
            email:
         
     | 
| 
      
 99 
     | 
    
         
            +
            - w.e.w@live.se
         
     | 
| 
      
 100 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 101 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 102 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 103 
     | 
    
         
            +
            files:
         
     | 
| 
      
 104 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 105 
     | 
    
         
            +
            - ".rspec"
         
     | 
| 
      
 106 
     | 
    
         
            +
            - ".travis.yml"
         
     | 
| 
      
 107 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 108 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
      
 109 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 110 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 111 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 112 
     | 
    
         
            +
            - bin/console
         
     | 
| 
      
 113 
     | 
    
         
            +
            - bin/setup
         
     | 
| 
      
 114 
     | 
    
         
            +
            - cgi_party.gemspec
         
     | 
| 
      
 115 
     | 
    
         
            +
            - lib/cgi_party.rb
         
     | 
| 
      
 116 
     | 
    
         
            +
            - lib/cgi_party/authenticate_request.rb
         
     | 
| 
      
 117 
     | 
    
         
            +
            - lib/cgi_party/authenticate_response.rb
         
     | 
| 
      
 118 
     | 
    
         
            +
            - lib/cgi_party/client.rb
         
     | 
| 
      
 119 
     | 
    
         
            +
            - lib/cgi_party/collect_request.rb
         
     | 
| 
      
 120 
     | 
    
         
            +
            - lib/cgi_party/collect_response.rb
         
     | 
| 
      
 121 
     | 
    
         
            +
            - lib/cgi_party/request.rb
         
     | 
| 
      
 122 
     | 
    
         
            +
            - lib/cgi_party/response.rb
         
     | 
| 
      
 123 
     | 
    
         
            +
            - lib/cgi_party/version.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - lib/cgi_party/wsdl_paths.rb
         
     | 
| 
      
 125 
     | 
    
         
            +
            homepage: https://github.com/standout/cgi-party
         
     | 
| 
      
 126 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 127 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 128 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 129 
     | 
    
         
            +
              allowed_push_host: https://rubygems.org
         
     | 
| 
      
 130 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 131 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 132 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 133 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 134 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 135 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 136 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 137 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 138 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 139 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 140 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 141 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 142 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 143 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 144 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 145 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 146 
     | 
    
         
            +
            rubygems_version: 2.4.5.1
         
     | 
| 
      
 147 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 148 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 149 
     | 
    
         
            +
            summary: Makes CGI Group GRP integration a party! <3
         
     | 
| 
      
 150 
     | 
    
         
            +
            test_files: []
         
     |