soaspec 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/ChangeLog +4 -0
 - data/Gemfile.lock +1 -1
 - data/exe/soaspec-generate +9 -9
 - data/lib/soaspec/exchange_handlers/exchange_handler.rb +9 -1
 - data/lib/soaspec/exe_helpers.rb +5 -9
 - data/lib/soaspec/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 9ddb0eda9d752b59276956004c66015963908802
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d2c27c83af359df6abc3ff500c68978691de6d7a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 25eef262b5bd7e23c9c6f638bb8854abf2c3047bd65b4a4a697fc6e88ff541c4b894b6f9800b44de215b759d6a9f23c3efa7c416ebb2bff87365632dc88828ae
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a71d53563e3f39659532bbd438c47d112591bb87d3e8874c8a9e058cfc93f215d79fa18c25be419d20c2869d2d8d0ac8eb41682073aed6bc647879228e3ca9f1
         
     | 
    
        data/ChangeLog
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/exe/soaspec-generate
    CHANGED
    
    | 
         @@ -104,17 +104,17 @@ end 
     | 
|
| 
       104 
104 
     | 
    
         | 
| 
       105 
105 
     | 
    
         
             
            @class_content = <<-EOF
         
     | 
| 
       106 
106 
     | 
    
         | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
              class <%= @name %> < Soaspec::SoapHandler
         
     | 
| 
       110 
     | 
    
         
            -
                # Add to or override default Savon client options
         
     | 
| 
       111 
     | 
    
         
            -
                def savon_options
         
     | 
| 
       112 
     | 
    
         
            -
                  {
         
     | 
| 
       113 
     | 
    
         
            -
                    wsdl: '<%= @wsdl %>'        
         
     | 
| 
       114 
     | 
    
         
            -
                  }
         
     | 
| 
       115 
     | 
    
         
            -
                end
         
     | 
| 
      
 107 
     | 
    
         
            +
            require 'soaspec'
         
     | 
| 
       116 
108 
     | 
    
         | 
| 
      
 109 
     | 
    
         
            +
            class <%= @name %> < Soaspec::SoapHandler
         
     | 
| 
      
 110 
     | 
    
         
            +
              # Add to or override default Savon client options
         
     | 
| 
      
 111 
     | 
    
         
            +
              def savon_options
         
     | 
| 
      
 112 
     | 
    
         
            +
                {
         
     | 
| 
      
 113 
     | 
    
         
            +
                  wsdl: '<%= @wsdl %>'        
         
     | 
| 
      
 114 
     | 
    
         
            +
                }
         
     | 
| 
       117 
115 
     | 
    
         
             
              end
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            end
         
     | 
| 
       118 
118 
     | 
    
         
             
            EOF
         
     | 
| 
       119 
119 
     | 
    
         | 
| 
       120 
120 
     | 
    
         
             
            @soap_spec_content = <<-EOF
         
     | 
| 
         @@ -11,13 +11,21 @@ module Soaspec 
     | 
|
| 
       11 
11 
     | 
    
         
             
                # @param [String, Symbol] name Name used when describing API test
         
     | 
| 
       12 
12 
     | 
    
         
             
                # @param [Hash] options Parameters defining handler. Used in descendants
         
     | 
| 
       13 
13 
     | 
    
         
             
                def initialize(name, options)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  use
         
     | 
| 
       14 
15 
     | 
    
         
             
                  @name = name
         
     | 
| 
       15 
16 
     | 
    
         
             
                end
         
     | 
| 
       16 
17 
     | 
    
         | 
| 
      
 18 
     | 
    
         
            +
                # Set Api handler used by Exchange class to this handler
         
     | 
| 
      
 19 
     | 
    
         
            +
                # @return [Self]
         
     | 
| 
      
 20 
     | 
    
         
            +
                def use
         
     | 
| 
      
 21 
     | 
    
         
            +
                  Soaspec.api_handler = self
         
     | 
| 
      
 22 
     | 
    
         
            +
                  self
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
       17 
25 
     | 
    
         
             
                # Sets api handler variable globally. This is used in 'Exchange' class
         
     | 
| 
       18 
26 
     | 
    
         
             
                # @return [String] Name set upon initialisation
         
     | 
| 
       19 
27 
     | 
    
         
             
                def to_s
         
     | 
| 
       20 
     | 
    
         
            -
                   
     | 
| 
      
 28 
     | 
    
         
            +
                  use
         
     | 
| 
       21 
29 
     | 
    
         
             
                  @name.to_s
         
     | 
| 
       22 
30 
     | 
    
         
             
                end
         
     | 
| 
       23 
31 
     | 
    
         | 
    
        data/lib/soaspec/exe_helpers.rb
    CHANGED
    
    | 
         @@ -121,14 +121,7 @@ end 
     | 
|
| 
       121 
121 
     | 
    
         
             
                def readme_content
         
     | 
| 
       122 
122 
     | 
    
         
             
                  <<-EOF
         
     | 
| 
       123 
123 
     | 
    
         | 
| 
       124 
     | 
    
         
            -
            #  
     | 
| 
       125 
     | 
    
         
            -
            This creates files within an existing folder. It could add onto an existing project.
         
     | 
| 
       126 
     | 
    
         
            -
            For a new project create a folder and be at it's location on the command line
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
            ```
         
     | 
| 
       129 
     | 
    
         
            -
            mkdir soaspec_test
         
     | 
| 
       130 
     | 
    
         
            -
            cd soaspec_test
         
     | 
| 
       131 
     | 
    
         
            -
            ```
         
     | 
| 
      
 124 
     | 
    
         
            +
            # Installation
         
     | 
| 
       132 
125 
     | 
    
         | 
| 
       133 
126 
     | 
    
         
             
            Run `bundle install` to install the gems mentioned in the Gemfile.
         
     | 
| 
       134 
127 
     | 
    
         | 
| 
         @@ -148,11 +141,14 @@ Tests are within the 'spec' folder and end in '_spec'. Setup and teardown for te 
     | 
|
| 
       148 
141 
     | 
    
         
             
            ## Templates
         
     | 
| 
       149 
142 
     | 
    
         
             
            These are the base requests with ERB inside them to create smartly changing requests accoring to the test.yml
         
     | 
| 
       150 
143 
     | 
    
         | 
| 
      
 144 
     | 
    
         
            +
            ## Data
         
     | 
| 
      
 145 
     | 
    
         
            +
            Data used in the test is stored in `config/data` folder. The `data_magic` gem is used by default to read files here.
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
       151 
147 
     | 
    
         
             
            ## Libaries
         
     | 
| 
       152 
148 
     | 
    
         
             
            Libaries to be installed are in 'Gemfile'. Specific gem versions can be specified here and enforeced with `bundle exec rake`
         
     | 
| 
       153 
149 
     | 
    
         | 
| 
       154 
150 
     | 
    
         
             
            ## Reports
         
     | 
| 
       155 
     | 
    
         
            -
            Reports are shown in the 'logs' folder. By default Rake produces a junit, an html report, and a traffic.log file with the API request and responses in it
         
     | 
| 
      
 151 
     | 
    
         
            +
            Reports are shown in the 'logs' folder. By default Rake produces a junit, an html report, and a `traffic.log` file with the API request and responses in it
         
     | 
| 
       156 
152 
     | 
    
         | 
| 
       157 
153 
     | 
    
         
             
                EOF
         
     | 
| 
       158 
154 
     | 
    
         
             
                end
         
     | 
    
        data/lib/soaspec/version.rb
    CHANGED