Skip to content

Instantly share code, notes, and snippets.

Avatar
🕵️‍♂️
Looking for bugs 🦟

प्रथमेश Sonpatki prathamesh-sonpatki

🕵️‍♂️
Looking for bugs 🦟
View GitHub Profile
View gist:8749453
* 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
View quoting.rb
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)
View quoting.rb
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
View quoting.rb
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)
View speaker.md
@prathamesh-sonpatki
prathamesh-sonpatki / gist:d6e2f5efd7a59d2d8228
Created May 30, 2014
Codetriag build failing on Rails 4.1.2rc1
View gist:d6e2f5efd7a59d2d8228
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
Codetriage errors with route *name
View gist:cf56e196796d23538692
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]
View gist:d9f4d3ddd8cf36dc824d
$ 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
View gist:15493e17a7a31ac24cf0
$ 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
View gist:e713d72e73a7eaf73323
$ 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