reqres_rspec 0.0.3 → 0.0.5
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/lib/reqres_rspec.rb +1 -1
 - data/lib/reqres_rspec/collector.rb +4 -1
 - data/lib/reqres_rspec/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: d2dac284279b7dd4e194485c094b6ef33287fcfd
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 68c90e2f6bdb662a9102119840eed3a7f2aa3808
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a78310460a2b679adefefc8dcae5853e1bfd73ab5cfa4cb2f73ab7f5500d16f0309bdaca4a01f00de144707ae28daf17a3a3f7a92056e9a462ad02d5b36151c5
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 7bc542dce81126cfc49958443b3f813446173d9e3759aeb13b6fe20887e0ff6b4ca5e5062eba7cbea037fca4a1514c75f396f5302b46d526a311b77cf9548b69
         
     | 
    
        data/lib/reqres_rspec.rb
    CHANGED
    
    | 
         @@ -9,7 +9,7 @@ if defined?(RSpec) && ENV['REQRES_RSPEC'] == '1' 
     | 
|
| 
       9 
9 
     | 
    
         
             
              RSpec.configure do |config|
         
     | 
| 
       10 
10 
     | 
    
         
             
                config.after(:each) do
         
     | 
| 
       11 
11 
     | 
    
         
             
                  if defined?(request) && defined?(response)
         
     | 
| 
       12 
     | 
    
         
            -
                    unless self.example.options.has_key?(: 
     | 
| 
      
 12 
     | 
    
         
            +
                    unless self.example.options.has_key?(:collect_for_doc) && !self.example.options[:collect_for_doc]
         
     | 
| 
       13 
13 
     | 
    
         
             
                      collector.collect(self, request, response)
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -103,7 +103,10 @@ module ReqresRspec 
     | 
|
| 
       103 
103 
     | 
    
         
             
                    reject { |param| %w[controller action].include? param }.
         
     | 
| 
       104 
104 
     | 
    
         
             
                    each do |key, value|
         
     | 
| 
       105 
105 
     | 
    
         
             
                    if value.is_a? String
         
     | 
| 
       106 
     | 
    
         
            -
                       
     | 
| 
      
 106 
     | 
    
         
            +
                      index = request_path.index(value)
         
     | 
| 
      
 107 
     | 
    
         
            +
                      if index && index >= 0
         
     | 
| 
      
 108 
     | 
    
         
            +
                        request_path = request_path.sub(value, ":#{key}")
         
     | 
| 
      
 109 
     | 
    
         
            +
                      end
         
     | 
| 
       107 
110 
     | 
    
         
             
                    end
         
     | 
| 
       108 
111 
     | 
    
         
             
                  end
         
     | 
| 
       109 
112 
     | 
    
         | 
    
        data/lib/reqres_rspec/version.rb
    CHANGED