spreewald 0.4.6 → 0.5.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.
- data/README.md +15 -8
- data/lib/spreewald/web_steps.rb +21 -1
- data/lib/spreewald_support/version.rb +1 -1
- data/support/documentation_generator.rb +2 -1
- metadata +75 -62
    
        data/README.md
    CHANGED
    
    | @@ -148,7 +148,7 @@ Check the content of tables in your HTML. | |
| 148 148 |  | 
| 149 149 | 
             
            See [this article](https://makandracards.com/makandra/763-cucumber-step-to-match-table-rows-with-capybara) for details.
         | 
| 150 150 |  | 
| 151 | 
            -
            * **Then I should( not)? see a table with the following rows( in any order)?**
         | 
| 151 | 
            +
            * **Then I should( not)? see a table with (exactly )?the following rows( in any order)?**
         | 
| 152 152 |  | 
| 153 153 |  | 
| 154 154 |  | 
| @@ -160,19 +160,19 @@ Steps to travel through time using [Timecop](https://github.com/jtrupiano/timeco | |
| 160 160 |  | 
| 161 161 | 
             
            See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps-to-travel-through-time-with-timecop) for details.
         | 
| 162 162 |  | 
| 163 | 
            -
            * **When the (date|time) is "(\d{4}-\d{2}-\d{2}( \d{1,2}:\d{2})?)" | 
| 163 | 
            +
            * **When the (date|time) is "?(\d{4}-\d{2}-\d{2}( \d{1,2}:\d{2})?)"?**
         | 
| 164 164 |  | 
| 165 165 | 
             
              Example:
         | 
| 166 166 |  | 
| 167 | 
            -
                    Given the date is  | 
| 168 | 
            -
                    Given the time is  | 
| 167 | 
            +
                    Given the date is 2012-02-10
         | 
| 168 | 
            +
                    Given the time is 2012-02-10 13:40
         | 
| 169 169 |  | 
| 170 170 |  | 
| 171 | 
            -
            * **When the time is "(\d{1,2}:\d{2})" | 
| 171 | 
            +
            * **When the time is "?(\d{1,2}:\d{2})"?**
         | 
| 172 172 |  | 
| 173 173 | 
             
              Example:
         | 
| 174 174 |  | 
| 175 | 
            -
                    Given the time is  | 
| 175 | 
            +
                    Given the time is 13:40
         | 
| 176 176 |  | 
| 177 177 |  | 
| 178 178 | 
             
            * **When it is (\d+|a|some|a few) (seconds?|minutes?|hours?|days?|weeks?|months?|years?) (later|earlier)**
         | 
| @@ -279,7 +279,7 @@ deprecation notice. Decide for yourself whether you want to use them: | |
| 279 279 | 
             
              Note that this does not detect if the text might be hidden via CSS
         | 
| 280 280 |  | 
| 281 281 |  | 
| 282 | 
            -
            * **Then I should see  | 
| 282 | 
            +
            * **Then I should see /([^/]*)/**
         | 
| 283 283 |  | 
| 284 284 | 
             
              Checks that a regexp appears on the page
         | 
| 285 285 |  | 
| @@ -291,7 +291,7 @@ deprecation notice. Decide for yourself whether you want to use them: | |
| 291 291 |  | 
| 292 292 |  | 
| 293 293 |  | 
| 294 | 
            -
            * **Then I should not see  | 
| 294 | 
            +
            * **Then I should not see /([^/]*)/**
         | 
| 295 295 |  | 
| 296 296 |  | 
| 297 297 |  | 
| @@ -504,3 +504,10 @@ deprecation notice. Decide for yourself whether you want to use them: | |
| 504 504 |  | 
| 505 505 | 
             
              More details [here](https://makandracards.com/makandra/12139-waiting-for-page-loads-and-ajax-requests-to-finish-with-capybara).
         | 
| 506 506 |  | 
| 507 | 
            +
             | 
| 508 | 
            +
            * **When I perform basic authentication as ".../..." and go to ...**
         | 
| 509 | 
            +
             | 
| 510 | 
            +
              Performs HTTP basic authentication with the given credentials and visits the given path.
         | 
| 511 | 
            +
              
         | 
| 512 | 
            +
              More details [here](https://makandracards.com/makandra/971-perform-http-basic-authentication-in-cucumber).
         | 
| 513 | 
            +
             | 
    
        data/lib/spreewald/web_steps.rb
    CHANGED
    
    | @@ -477,7 +477,7 @@ end | |
| 477 477 | 
             
            #       When I follow "Read more" inside any ".text_snippet"
         | 
| 478 478 | 
             
            #
         | 
| 479 479 | 
             
            When /^I follow "([^"]*)" inside any "([^"]*)"$/ do |label, selector|
         | 
| 480 | 
            -
              node =  | 
| 480 | 
            +
              node = find("#{selector} a", :text => label)
         | 
| 481 481 | 
             
              node.click
         | 
| 482 482 | 
             
            end
         | 
| 483 483 |  | 
| @@ -576,3 +576,23 @@ When /^I wait for the page to load$/ do | |
| 576 576 | 
             
              end
         | 
| 577 577 | 
             
              page.has_content? ''
         | 
| 578 578 | 
             
            end
         | 
| 579 | 
            +
             | 
| 580 | 
            +
            # Performs HTTP basic authentication with the given credentials and visits the given path.
         | 
| 581 | 
            +
            #
         | 
| 582 | 
            +
            # More details [here](https://makandracards.com/makandra/971-perform-http-basic-authentication-in-cucumber).
         | 
| 583 | 
            +
            When /^I perform basic authentication as "([^\"]*)\/([^\"]*)" and go to (.*)$/ do |user, password, page_name|
         | 
| 584 | 
            +
              path = _path_to(page_name)
         | 
| 585 | 
            +
              if Capybara::current_driver == :selenium
         | 
| 586 | 
            +
                visit("http://#{user}:#{password}@#{page.driver.rack_server.host}:#{page.driver.rack_server.port}#{path}")
         | 
| 587 | 
            +
              else
         | 
| 588 | 
            +
                authorizers = [
         | 
| 589 | 
            +
                  (page.driver.browser if page.driver.respond_to?(:browser)),
         | 
| 590 | 
            +
                  (self),
         | 
| 591 | 
            +
                  (page.driver)
         | 
| 592 | 
            +
                ].compact
         | 
| 593 | 
            +
                authorizer = authorizers.detect { |authorizer| authorizer.respond_to?(:basic_authorize) }
         | 
| 594 | 
            +
                authorizer.basic_authorize(user, password)
         | 
| 595 | 
            +
                visit path
         | 
| 596 | 
            +
              end
         | 
| 597 | 
            +
            end
         | 
| 598 | 
            +
             | 
    
        metadata
    CHANGED
    
    | @@ -1,72 +1,75 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: spreewald
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 11
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 5
         | 
| 9 | 
            +
              - 0
         | 
| 10 | 
            +
              version: 0.5.0
         | 
| 6 11 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors:
         | 
| 12 | 
            +
            authors: 
         | 
| 8 13 | 
             
            - Tobias Kraze
         | 
| 9 14 | 
             
            autorequire: 
         | 
| 10 15 | 
             
            bindir: bin
         | 
| 11 16 | 
             
            cert_chain: []
         | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 17 | 
            +
             | 
| 18 | 
            +
            date: 2013-02-22 00:00:00 +01:00
         | 
| 19 | 
            +
            default_executable: 
         | 
| 20 | 
            +
            dependencies: 
         | 
| 21 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 15 22 | 
             
              name: cucumber-rails
         | 
| 16 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            -
                none: false
         | 
| 18 | 
            -
                requirements:
         | 
| 19 | 
            -
                - - ! '>='
         | 
| 20 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            -
                    version: '0'
         | 
| 22 | 
            -
              type: :runtime
         | 
| 23 23 | 
             
              prerelease: false
         | 
| 24 | 
            -
               | 
| 24 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 25 25 | 
             
                none: false
         | 
| 26 | 
            -
                requirements:
         | 
| 27 | 
            -
                - -  | 
| 28 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            -
                     | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
                none: false
         | 
| 34 | 
            -
                requirements:
         | 
| 35 | 
            -
                - - ! '>='
         | 
| 36 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 37 | 
            -
                    version: '0'
         | 
| 26 | 
            +
                requirements: 
         | 
| 27 | 
            +
                - - ">="
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            +
                    hash: 3
         | 
| 30 | 
            +
                    segments: 
         | 
| 31 | 
            +
                    - 0
         | 
| 32 | 
            +
                    version: "0"
         | 
| 38 33 | 
             
              type: :runtime
         | 
| 34 | 
            +
              version_requirements: *id001
         | 
| 35 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 36 | 
            +
              name: cucumber
         | 
| 39 37 | 
             
              prerelease: false
         | 
| 40 | 
            -
               | 
| 38 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 41 39 | 
             
                none: false
         | 
| 42 | 
            -
                requirements:
         | 
| 43 | 
            -
                - -  | 
| 44 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 45 | 
            -
                     | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
                none: false
         | 
| 50 | 
            -
                requirements:
         | 
| 51 | 
            -
                - - ! '>='
         | 
| 52 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version: '0'
         | 
| 40 | 
            +
                requirements: 
         | 
| 41 | 
            +
                - - ">="
         | 
| 42 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            +
                    hash: 3
         | 
| 44 | 
            +
                    segments: 
         | 
| 45 | 
            +
                    - 0
         | 
| 46 | 
            +
                    version: "0"
         | 
| 54 47 | 
             
              type: :runtime
         | 
| 48 | 
            +
              version_requirements: *id002
         | 
| 49 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 50 | 
            +
              name: capybara
         | 
| 55 51 | 
             
              prerelease: false
         | 
| 56 | 
            -
               | 
| 52 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 57 53 | 
             
                none: false
         | 
| 58 | 
            -
                requirements:
         | 
| 59 | 
            -
                - -  | 
| 60 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                     | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 54 | 
            +
                requirements: 
         | 
| 55 | 
            +
                - - ">="
         | 
| 56 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 57 | 
            +
                    hash: 3
         | 
| 58 | 
            +
                    segments: 
         | 
| 59 | 
            +
                    - 0
         | 
| 60 | 
            +
                    version: "0"
         | 
| 61 | 
            +
              type: :runtime
         | 
| 62 | 
            +
              version_requirements: *id003
         | 
| 63 | 
            +
            description: A collection of cucumber steps we use in our projects, including steps to check HTML, tables, emails and some utility methods.
         | 
| 64 | 
            +
            email: 
         | 
| 65 65 | 
             
            - tobias@kraze.eu
         | 
| 66 66 | 
             
            executables: []
         | 
| 67 | 
            +
             | 
| 67 68 | 
             
            extensions: []
         | 
| 69 | 
            +
             | 
| 68 70 | 
             
            extra_rdoc_files: []
         | 
| 69 | 
            -
             | 
| 71 | 
            +
             | 
| 72 | 
            +
            files: 
         | 
| 70 73 | 
             
            - .gitignore
         | 
| 71 74 | 
             
            - Gemfile
         | 
| 72 75 | 
             
            - LICENSE
         | 
| @@ -89,29 +92,39 @@ files: | |
| 89 92 | 
             
            - lib/spreewald_support/version.rb
         | 
| 90 93 | 
             
            - spreewald.gemspec
         | 
| 91 94 | 
             
            - support/documentation_generator.rb
         | 
| 95 | 
            +
            has_rdoc: true
         | 
| 92 96 | 
             
            homepage: https://github.com/makandra/spreewald
         | 
| 93 97 | 
             
            licenses: []
         | 
| 98 | 
            +
             | 
| 94 99 | 
             
            post_install_message: 
         | 
| 95 100 | 
             
            rdoc_options: []
         | 
| 96 | 
            -
             | 
| 101 | 
            +
             | 
| 102 | 
            +
            require_paths: 
         | 
| 97 103 | 
             
            - lib
         | 
| 98 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 104 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 99 105 | 
             
              none: false
         | 
| 100 | 
            -
              requirements:
         | 
| 101 | 
            -
              - -  | 
| 102 | 
            -
                - !ruby/object:Gem::Version
         | 
| 103 | 
            -
                   | 
| 104 | 
            -
             | 
| 106 | 
            +
              requirements: 
         | 
| 107 | 
            +
              - - ">="
         | 
| 108 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 109 | 
            +
                  hash: 3
         | 
| 110 | 
            +
                  segments: 
         | 
| 111 | 
            +
                  - 0
         | 
| 112 | 
            +
                  version: "0"
         | 
| 113 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 105 114 | 
             
              none: false
         | 
| 106 | 
            -
              requirements:
         | 
| 107 | 
            -
              - -  | 
| 108 | 
            -
                - !ruby/object:Gem::Version
         | 
| 109 | 
            -
                   | 
| 115 | 
            +
              requirements: 
         | 
| 116 | 
            +
              - - ">="
         | 
| 117 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 118 | 
            +
                  hash: 3
         | 
| 119 | 
            +
                  segments: 
         | 
| 120 | 
            +
                  - 0
         | 
| 121 | 
            +
                  version: "0"
         | 
| 110 122 | 
             
            requirements: []
         | 
| 123 | 
            +
             | 
| 111 124 | 
             
            rubyforge_project: 
         | 
| 112 | 
            -
            rubygems_version: 1. | 
| 125 | 
            +
            rubygems_version: 1.3.9.5
         | 
| 113 126 | 
             
            signing_key: 
         | 
| 114 127 | 
             
            specification_version: 3
         | 
| 115 128 | 
             
            summary: Collection of useful cucumber steps.
         | 
| 116 129 | 
             
            test_files: []
         | 
| 117 | 
            -
             | 
| 130 | 
            +
             |