Coder Social home page Coder Social logo

Comments (2)

dnonnenm avatar dnonnenm commented on September 26, 2024

Hi,

I quickly check the code and the teams information retrieved from the Apple Member Center web page is put into a dictionary - the key is the name and the value is the id.
The displayed teams are the keys of this dictionary, and when you are using ruby 1.8, there's no guaranteed order for the elements in the dictionary.

So it means that you're using ruby 1.8.2 - maybe the one installed by default on your mac machine. Could you run the command ruby --version, please ?

If this is the case, you have two ways to solve your problem,

  • you can upgrade to ruby 1.9.3 or 2.0
  • you can edit the file cupertino/provisioning_portal/helpers.rb and change the method team with the following:
            def team
              teams_by_name = []
              page.form_with(:name => 'saveTeamSelection').radiobuttons.each do |radio|
                name = page.search("label[for=\"#{radio.dom_id}\"]").first.text.strip
                teams_by_name << [name, radio.value]
              end

              name = choose "Select a team:", *teams_by_name.map { |e| e[0] }
              @team ||= teams_by_name.find { |e| e[0] == name }[1]
            end

from cupertino.

mattt avatar mattt commented on September 26, 2024

Fixed by 7dc549d.

from cupertino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.