This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test "image url" do | |
| ok = %w{ blah.gif blah.jpg blah.png BLAH.JPG | |
| BLAH.Jpg abb/xyz/blah.gif} | |
| bad = %w{ blah.doc blah.gif/more blah.gif.more | |
| blah.gif.more } | |
| ok.each do |name| | |
| assert new_product(name).valid?, | |
| "#{name} shouldn't be invalid'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create | |
| omniauth = request.env["omniauth.auth"] | |
| authentication = Authentication.find_by_provider_and_uid_and_token(omniauth['provider'], omniauth['uid'], omniauth['credentials']['token'] ) | |
| if authentication | |
| flash[:notice] = "Signed in successfully." | |
| sign_in_and_redirect(:user, authentication.user) | |
| elsif current_user | |
| current_user.authentications.create!(:provider => omniauth['provider'], :uid => omniauth['uid'], :token => omniauth['credentials']['token']) | |
| flash[:notice] = "Authentication successful." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Twitter::Unauthorized in Pages#home | |
| POST https://api.twitter.com/1/statuses/update.json: 401: Could not authenticate you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FbGraph::InvalidRequest in User/authentications#index | |
| OAuthException :: An active access token must be used to query information about the current user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| julio@ubuntu:~/rails/sandboxcart $ git push heroku master | |
| Counting objects: 502, done. | |
| Delta compression using up to 2 threads. | |
| Compressing objects: 100% (475/475), done. | |
| Writing objects: 100% (502/502), 2.63 MiB | 458 KiB/s, done. | |
| Total 502 (delta 44), reused 0 (delta 0) | |
| -----> Heroku receiving push | |
| -----> Ruby/Rails app detected | |
| -----> Detected Rails is not set to serve static_assets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| julio@ubuntu:~/rails/sandboxcart $ git push heroku master | |
| Counting objects: 502, done. | |
| Delta compression using up to 2 threads. | |
| Compressing objects: 100% (475/475), done. | |
| Writing objects: 100% (502/502), 2.63 MiB | 458 KiB/s, done. | |
| Total 502 (delta 44), reused 0 (delta 0) | |
| -----> Heroku receiving push | |
| -----> Ruby/Rails app detected | |
| -----> Detected Rails is not set to serve static_assets |