Giter Club home page Giter Club logo

drinkr's People

Contributors

oneill38 avatar phlco avatar rew38 avatar talalc avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rew38

drinkr's Issues

Getting Venmo Access Token

Context:
-As a user I would like to be able to sign into Venmo so I can split my payments with friends.
-Problem: right now the only way I can get to the account authorization page and have it redirect back to my page is by setting up an href link to the page, which will then redirect back to my homepage. This sends back an access token in the url however I do not know how to access that, since it's only in the url and not params.

What I've tried:
-I tried using ajax to set up the get request however it would not even redirect to the venmo authorization page, and the error it was throwing was: "No 'Access-Control-Allow-Origin' header is present on the requested resource".
-I then tried setting up a link which as I said above will redirect to venmo, authorize, and then redirect back to our page with the access token in the url. I know you can do document.URL to get the url and then I can set up a method to just parse out the token info however, I'm not sure where I would set that up because it won't capture if I try to set up an "on click" function, since it occurs after the redirect.

Gem Dependency Issue

CONTEXT


User story

As a developer I would like to test my code.

What I'm trying to do

Trying to create our testing environment.

Error

Could not find gem 'mini_portile (~> 0.5.0 (>= 0) ruby', which is required by gem 'capybara (>= 0) ruby', in any of the sources.

Occurs on both my computer as well as Colin's computer.

Happens when we ran bundle install, bundle exec install, as well as when we run rails g rspec:install

What I've tried

This is what the gem file looks like


source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'devise', '~> 3.2.4'

gem 'omniauth', '~> 1.2.1'

gem 'omniauth-facebook', '~> 1.6.0'

gem 'geocoder'

gem 'httparty'

group :development, :test do
  # gem 'jasmine' 
  # gem 'rubocop'
  # gem 'shoulda-matchers'
  # gem 'selenium-webdriver'
  gem 'pry-rails'
  gem 'rspec'
  gem 'rspec-rails'
  gem 'capybara'
  gem 'simplecov', '~> 0.7.1', :require => false
end

Above in the gem file, jasmine, rubocop, shoulda-matchers, and selenium-webdriver
all cause the error to occur when running bundle install

We deleted the repo and re-cloned, originally assuming it was an issue on my computer.
When we ran into the same error we tried adding the gems on Colin's machine and bundling and ran into the same error.

We then tried isolating each gem and installing them individually.

We also tried bundling with the gems in different orders (above and below capybara) as well as bundling with the gems outside of our :development, :test group

We then checked the Gemfile.lock to see if the gems were even included. They are and look as follows:

screen shot 2014-04-28 at 7 56 30 pm

  • note the mini-portile gem is not nested within capybara *

screen shot 2014-04-28 at 7 56 47 pm

We also just tried installing the gem normally... gem install mini-portile which installed but didn't fix the issue.

We tried googling, but we couldn't find any issue that resembled the error we're getting.

Testing button clicking with capybara

CONTEXT


USER STORY

As a user I would like to add items to my cart.

What I'm trying to do

Trying to test adding an item to the users cart.

Error

1) visiting the site a new user visits the hompage gets a guest token
    Failure/Error: expect(page).to have_selector('#item_count', text: '1 item(s)')
    Capybara::ExpectationNotMet:
      expected to find css "#item_count" with text "1 item(s)" but there were no matches. Also found "0 item(s)", which matched the selector but not all filters.
    # ./spec/features/landing_spec.rb:30:in `block (3 levels) in <top (required)>'

What we've tried

This is currently what the test looks like that returns the above error

it "gets a guest token", :js => true do
      visit root_path
      fill_in 'search_merchants', with: 'soho'
      find_field('search_merchants').native.send_key(:return)
      find('#merchant-30782').native.send_keys(:down)
      within(:css, '#merchant-30782 #item-N292 section') do
        click_button('Add to Cart')
      end
      expect(page).to have_selector(:css, '#item_count', text: '1 item(s)')

We were originally thinking it was a scoping issue. But we seem to be able to peer into the proper css child.

e.g. If we change the line in the within block to expect(page).to have_content('Add to Cart')

The test passes.

We've tried all the variations we can find

  • click_button('Add to Cart')
  • click('Add to Cart')
  • find_button('Add to Cart').click

the code is available here... http://drink-r.herokuapp.com/

But this is the html of the button we're trying to click

screen shot 2014-05-01 at 1 53 26 pm

Travis CI ruby version

CONTEXT


We have to specify the ruby version in the travis.yml file as 1.9.3 however, in the gemfile to push to Heroku you have to specify the ruby version in the gemfile as 2.1.0.

This causes the below issue.

screen shot 2014-05-01 at 2 08 56 pm

Update Master Readme

Please update readme on master branch to include Travis Badge, link to ERD, link to Pivotal, and Team members!

Implement Coveralls

Sign up for and add Coveralls to your project to include a code coverage badge on your project!

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.