Skip to content

Instantly share code, notes, and snippets.

View prathamesh-sonpatki's full-sized avatar
🏠
Working from home

प्रथमेश Sonpatki prathamesh-sonpatki

🏠
Working from home
View GitHub Profile
* Rails
** https://github.com/rails/rails/issues/12793
** https://github.com/rails/rails/issues/12856
** https://github.com/rails/rails/issues/12860
** https://github.com/rails/rails/issues/13241
** https://github.com/rails/rails/issues/11761
** https://github.com/rails/rails/issues/12211
** https://github.com/rails/rails/issues?labels=Level%3AIntermediary&state=open
* Codetriage
require 'active_support/core_ext/big_decimal/conversions'
module ActiveRecord
module ConnectionAdapters # :nodoc:
module Quoting
# Quotes the column value to help prevent
# {SQL injection attacks}[http://en.wikipedia.org/wiki/SQL_injection].
def quote(value, column = nil)
# records are quoted as their primary key
return value.quoted_id if value.respond_to?(:quoted_id)
require 'active_support/core_ext/big_decimal/conversions'
module ActiveRecord
module ConnectionAdapters # :nodoc:
module Quoting
NUM_REGEX = Regexp.new(/\A[+-]?\d+\.?\d*\Z/).freeze
# Quotes the column value to help prevent
# {SQL injection attacks}[http://en.wikipedia.org/wiki/SQL_injection].
def quote(value, column = nil)
# records are quoted as their primary key
require 'active_support/core_ext/big_decimal/conversions'
module ActiveRecord
module ConnectionAdapters # :nodoc:
module Quoting
NUMERIC_REGEX = Regexp.new(/\A[+-]?\d+\.?\d*\Z/).freeze
# Quotes the column value to help prevent
# {SQL injection attacks}[http://en.wikipedia.org/wiki/SQL_injection].
def quote(value, column = nil)
@prathamesh-sonpatki
prathamesh-sonpatki / gist:d6e2f5efd7a59d2d8228
Created May 30, 2014 19:19
Codetriag build failing on Rails 4.1.2rc1
1) Error:
AddingReposTest#test_adding_a_new_valid_repo:
ActionController::RoutingError: No route matches [GET] "/bemurphy%2Fissue_triage_sandbox"
test/integration/adding_repos_test.rb:19:in `block (3 levels) in <class:AddingReposTest>'
test/integration/adding_repos_test.rb:18:in `block (2 levels) in <class:AddingReposTest>'
test/integration/adding_repos_test.rb:11:in `block in <class:AddingReposTest>'
2) Error:
AddingReposTest#test_adding_a_new_valid_repo_passing_the_URL:
@prathamesh-sonpatki
prathamesh-sonpatki / gist:cf56e196796d23538692
Created May 31, 2014 13:04
Codetriage errors with route *name
1) Error:
UserUpdateTest#test_updating_the_user_daily_issue_limit:
ActionView::Template::Error: No route matches {:action=>"show", :controller=>"users", :id=>nil} missing required keys: [:id]
app/views/users/edit.html.erb:1:in `_app_views_users_edit_html_erb___4244652278967640252_70129275332060'
test/integration/user_update_test.rb:15:in `block in <class:UserUpdateTest>'
2) Error:
UserUpdateTest#test_updating_the_user_daily_issue_limit_to_unlimited:
ActionView::Template::Error: No route matches {:action=>"show", :controller=>"users", :id=>nil} missing required keys: [:id]
$ be rake test:all
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>'
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:2: warning: already initialized constant GitHubBub::Request::USER_AGENT
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:7: warning: previous definition of USER_AGENT was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:3: warning: already initialized constant GitHubBub::Request::RETRIES
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:12: warning: previous definition of RETRIES was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:4: warning: already initialized constant GitHubBub::Request::GITHUB_VERSION
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/g
$ be rake test:all
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>'
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:2: warning: already initialized constant GitHubBub::Request::USER_AGENT
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:7: warning: previous definition of USER_AGENT was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:3: warning: already initialized constant GitHubBub::Request::RETRIES
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:12: warning: previous definition of RETRIES was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:4: warning: already initialized constant GitHubBub::Request::GITHUB_VERSION
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/g
$ be rake test:all
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>'
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:2: warning: already initialized constant GitHubBub::Request::USER_AGENT
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:7: warning: previous definition of USER_AGENT was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:3: warning: already initialized constant GitHubBub::Request::RETRIES
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/git_hub_bub-0.0.4/lib/git_hub_bub/request.rb:12: warning: previous definition of RETRIES was here
/Users/prathamesh/Projects/sources/codetriage/config/initializers/git_hub_bub.rb:4: warning: already initialized constant GitHubBub::Request::GITHUB_VERSION
/Users/prathamesh/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/g