Sha256: 835300a129ccf70062117f0428183b3244427b744d7c7f41ce11e5edc580587f

Contents?: true

Size: 692 Bytes

Versions: 92

Compression:

Stored size: 692 Bytes

Contents

require 'location-one'
require 'geocoder'

module Calabash
  module Cucumber
    module Location
      include Calabash::Cucumber::Core

      def set_location(options)
        uri = url_for('uia')
        client = LocationOne::Client.new({:host => uri.host, :port => uri.port, :path => '/uia'}, @http)
        res = client.change_location(options)
        res = JSON.parse(res)
        if res['outcome'] != 'SUCCESS'
          screenshot_and_raise "set_location #{options}, failed because: #{res['reason']}\n#{res['details']}"
        end
        res['results']
      end

      def location_for_place(place)
         LocationOne::Client.location_by_place place
      end

    end
  end
end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
testautoi-0.9.144 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.146 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre6 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre5 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre4 lib/calabash-cucumber/location.rb
testautoi-0.9.143 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre3 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre2 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.145.pre1 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.144 lib/calabash-cucumber/location.rb
testautoi-0.9.142 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.141 lib/calabash-cucumber/location.rb
testautoi-0.9.135 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.140 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.140.pre2 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.140.pre1 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.139 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.138 lib/calabash-cucumber/location.rb
calabash-cucumber-0.9.136 lib/calabash-cucumber/location.rb