calabash-cucumber 0.9.127.pre1 → 0.9.128
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/bin/calabash-ios-build.rb +6 -21
- data/bin/calabash-ios-generate.rb +0 -3
- data/calabash-cucumber.gemspec +1 -0
- data/features/step_definitions/calabash_steps.rb +16 -4
- data/lib/calabash-cucumber/core.rb +2 -1
- data/lib/calabash-cucumber/version.rb +1 -1
- data/{features-skeleton → scripts}/.irbrc +2 -0
- metadata +23 -8
- data/features-skeleton/irb_ios4.sh +0 -2
- data/features-skeleton/irb_ios5.sh +0 -2
    
        data/bin/calabash-ios-build.rb
    CHANGED
    
    | @@ -44,28 +44,13 @@ def build(options={:build_dir=>"Calabash", | |
| 44 44 | 
             
              res
         | 
| 45 45 | 
             
            end
         | 
| 46 46 |  | 
| 47 | 
            -
            def console | 
| 48 | 
            -
               | 
| 49 | 
            -
             | 
| 50 | 
            -
                 | 
| 51 | 
            -
                new_str = File.read(path)
         | 
| 52 | 
            -
                if old_str != new_str
         | 
| 53 | 
            -
                  puts "Moving old .irbrc file to .irbrc.old"
         | 
| 54 | 
            -
                  FileUtils.mv(".irbrc", ".irbrc.old")
         | 
| 55 | 
            -
                  puts "Copying calabash-ios .irbrc file to current directory..."
         | 
| 56 | 
            -
                  FileUtils.cp(path, ".")
         | 
| 57 | 
            -
                end
         | 
| 58 | 
            -
              else
         | 
| 59 | 
            -
                puts "Copying calabash-ios .irbrc file to current directory..."
         | 
| 60 | 
            -
                FileUtils.cp(path, ".")
         | 
| 61 | 
            -
              end
         | 
| 62 | 
            -
             | 
| 63 | 
            -
              if !File.exists?(options[:script])
         | 
| 64 | 
            -
                puts "Copying calabash-ios #{options[:script]} file to current directory..."
         | 
| 65 | 
            -
                FileUtils.cp(File.join(@source_dir,options[:script]), ".")
         | 
| 47 | 
            +
            def console
         | 
| 48 | 
            +
              unless ENV['IRBRC']
         | 
| 49 | 
            +
                path = File.expand_path(File.join(@script_dir,".irbrc"))
         | 
| 50 | 
            +
                ENV['IRBRC'] = path
         | 
| 66 51 | 
             
              end
         | 
| 67 | 
            -
              puts "Running irb | 
| 68 | 
            -
               | 
| 52 | 
            +
              puts "Running irb..."
         | 
| 53 | 
            +
              exec("irb")
         | 
| 69 54 | 
             
            end
         | 
| 70 55 |  | 
| 71 56 |  | 
| @@ -13,9 +13,6 @@ def calabash_scaffold | |
| 13 13 | 
             
              exit 2 unless STDIN.gets.chomp == ''
         | 
| 14 14 |  | 
| 15 15 | 
             
              FileUtils.cp_r(@source_dir, @features_dir)
         | 
| 16 | 
            -
              FileUtils.mv "#{@features_dir}/.irbrc", "."
         | 
| 17 | 
            -
              FileUtils.mv "#{@features_dir}/irb_ios4.sh", "."
         | 
| 18 | 
            -
              FileUtils.mv "#{@features_dir}/irb_ios5.sh", "."
         | 
| 19 16 |  | 
| 20 17 | 
             
              msg("Info") do
         | 
| 21 18 | 
             
                puts "Features subdirectory created. \n"
         | 
    
        data/calabash-cucumber.gemspec
    CHANGED
    
    
| @@ -33,6 +33,13 @@ Then /^I (?:press|touch) the "([^\"]*)" button$/ do |name| | |
| 33 33 | 
             
              sleep(STEP_PAUSE)
         | 
| 34 34 | 
             
            end
         | 
| 35 35 |  | 
| 36 | 
            +
            Then /^I (?:press|touch) (?:input|text) field number (\d+)$/ do |index|
         | 
| 37 | 
            +
              index = index.to_i
         | 
| 38 | 
            +
              screenshot_and_raise "Index should be positive (was: #{index})" if (index<=0)
         | 
| 39 | 
            +
              touch("textField index:#{index-1}")
         | 
| 40 | 
            +
              sleep(STEP_PAUSE)  
         | 
| 41 | 
            +
            end
         | 
| 42 | 
            +
             | 
| 36 43 | 
             
            Then /^I (?:press|touch) the "([^\"]*)" (?:input|text) field$/ do |name|
         | 
| 37 44 | 
             
              touch("textField placeholder:'#{name}'")
         | 
| 38 45 | 
             
              sleep(STEP_PAUSE)
         | 
| @@ -90,7 +97,10 @@ Then /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |text_field, text_to_type| | |
| 90 97 | 
             
            end
         | 
| 91 98 |  | 
| 92 99 | 
             
            Then /^I use the native keyboard to enter "([^\"]*)" into the "([^\"]*)" (?:text|input) field$/ do |text_to_type, field_name|
         | 
| 93 | 
            -
               | 
| 100 | 
            +
              macro %Q|I touch the "#{field_name}" text field|
         | 
| 101 | 
            +
              await_keyboard()
         | 
| 102 | 
            +
              keyboard_enter_text(text_to_type)
         | 
| 103 | 
            +
              sleep(STEP_PAUSE)
         | 
| 94 104 | 
             
            end
         | 
| 95 105 |  | 
| 96 106 | 
             
            Then /^I fill in text fields as follows:$/ do |table|
         | 
| @@ -105,11 +115,13 @@ Then /^I enter "([^\"]*)" into (?:input|text) field number (\d+)$/ do |text, ind | |
| 105 115 | 
             
              set_text("textField index:#{index-1}",text)
         | 
| 106 116 | 
             
            end
         | 
| 107 117 |  | 
| 108 | 
            -
            Then /^I use the native keyboard to enter "([^\"]*)" into (?:input|text) field number (\d+)$/ do | | 
| 109 | 
            -
               | 
| 118 | 
            +
            Then /^I use the native keyboard to enter "([^\"]*)" into (?:input|text) field number (\d+)$/ do |text_to_type, index|
         | 
| 119 | 
            +
              macro %Q|I touch text field number #{index}|
         | 
| 120 | 
            +
              await_keyboard()
         | 
| 121 | 
            +
              keyboard_enter_text(text_to_type)
         | 
| 122 | 
            +
              sleep(STEP_PAUSE)
         | 
| 110 123 | 
             
            end
         | 
| 111 124 |  | 
| 112 | 
            -
             | 
| 113 125 | 
             
            When /^I clear "([^\"]*)"$/ do |name|
         | 
| 114 126 | 
             
              macro %Q|I enter "" into the "#{name}" text field|
         | 
| 115 127 | 
             
            end
         | 
| @@ -507,7 +507,7 @@ EOF | |
| 507 507 | 
             
                          body = @http.get(options[:uri], options[:body]).body
         | 
| 508 508 | 
             
                        end
         | 
| 509 509 | 
             
                        break
         | 
| 510 | 
            -
                      rescue HTTPClient::TimeoutError => e
         | 
| 510 | 
            +
                      rescue HTTPClient::TimeoutError, HTTPClient::KeepAliveDisconnected => e
         | 
| 511 511 | 
             
                        if count < CAL_HTTP_RETRY_COUNT-1
         | 
| 512 512 | 
             
                          sleep(0.5)
         | 
| 513 513 | 
             
                          @http.reset_all
         | 
| @@ -519,6 +519,7 @@ EOF | |
| 519 519 | 
             
                          puts "Failing... #{e.class}"
         | 
| 520 520 | 
             
                          raise e
         | 
| 521 521 | 
             
                        end
         | 
| 522 | 
            +
             | 
| 522 523 | 
             
                      rescue Exception => e
         | 
| 523 524 | 
             
                        if retryable_errors.include?(e)
         | 
| 524 525 | 
             
                          if count < CAL_HTTP_RETRY_COUNT-1
         | 
    
        metadata
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: calabash-cucumber
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.9. | 
| 5 | 
            -
              prerelease:  | 
| 4 | 
            +
              version: 0.9.128
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| 8 8 | 
             
            - Karl Krukow
         | 
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2013-01-21 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: cucumber
         | 
| @@ -155,6 +155,22 @@ dependencies: | |
| 155 155 | 
             
                - - '='
         | 
| 156 156 | 
             
                  - !ruby/object:Gem::Version
         | 
| 157 157 | 
             
                    version: 0.0.3
         | 
| 158 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 159 | 
            +
              name: awesome_print
         | 
| 160 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 161 | 
            +
                none: false
         | 
| 162 | 
            +
                requirements:
         | 
| 163 | 
            +
                - - ! '>='
         | 
| 164 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 165 | 
            +
                    version: '0'
         | 
| 166 | 
            +
              type: :runtime
         | 
| 167 | 
            +
              prerelease: false
         | 
| 168 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 169 | 
            +
                none: false
         | 
| 170 | 
            +
                requirements:
         | 
| 171 | 
            +
                - - ! '>='
         | 
| 172 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 173 | 
            +
                    version: '0'
         | 
| 158 174 | 
             
            description: calabash-cucumber drives tests for native iOS apps. You must link your
         | 
| 159 175 | 
             
              app with calabash-ios-server framework to execute tests.
         | 
| 160 176 | 
             
            email:
         | 
| @@ -180,9 +196,6 @@ files: | |
| 180 196 | 
             
            - calabash-cucumber.gemspec
         | 
| 181 197 | 
             
            - doc/calabash-ios-help.txt
         | 
| 182 198 | 
             
            - epl-v10.html
         | 
| 183 | 
            -
            - features-skeleton/.irbrc
         | 
| 184 | 
            -
            - features-skeleton/irb_ios4.sh
         | 
| 185 | 
            -
            - features-skeleton/irb_ios5.sh
         | 
| 186 199 | 
             
            - features-skeleton/my_first.feature
         | 
| 187 200 | 
             
            - features-skeleton/step_definitions/calabash_steps.rb
         | 
| 188 201 | 
             
            - features-skeleton/step_definitions/my_first_steps.rb
         | 
| @@ -280,6 +293,7 @@ files: | |
| 280 293 | 
             
            - lib/calabash-cucumber/tests_helpers.rb
         | 
| 281 294 | 
             
            - lib/calabash-cucumber/version.rb
         | 
| 282 295 | 
             
            - lib/calabash-cucumber/wait_helpers.rb
         | 
| 296 | 
            +
            - scripts/.irbrc
         | 
| 283 297 | 
             
            - scripts/data/.GlobalPreferences.plist
         | 
| 284 298 | 
             
            - scripts/data/clients.plist
         | 
| 285 299 | 
             
            - scripts/data/com.apple.Accessibility.plist
         | 
| @@ -299,9 +313,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 299 313 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 300 314 | 
             
              none: false
         | 
| 301 315 | 
             
              requirements:
         | 
| 302 | 
            -
              - - ! ' | 
| 316 | 
            +
              - - ! '>='
         | 
| 303 317 | 
             
                - !ruby/object:Gem::Version
         | 
| 304 | 
            -
                  version:  | 
| 318 | 
            +
                  version: '0'
         | 
| 305 319 | 
             
            requirements: []
         | 
| 306 320 | 
             
            rubyforge_project: 
         | 
| 307 321 | 
             
            rubygems_version: 1.8.23
         | 
| @@ -310,3 +324,4 @@ specification_version: 3 | |
| 310 324 | 
             
            summary: Client for calabash-ios-server for automated functional testing on iOS
         | 
| 311 325 | 
             
            test_files:
         | 
| 312 326 | 
             
            - features/step_definitions/calabash_steps.rb
         | 
| 327 | 
            +
            has_rdoc: 
         |