Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

autoload_once fix when using Pathnames on ruby 1.9 #2673

Closed
wants to merge 1,436 commits into from
@jdelStrother

Heya,
I ran into a fun issue on ruby 1.9 where my autoload_once stuff was geting reloaded on each request. Turns out that under 1.9, "/var/log".start_with?(Pathname("/var")) returns false, and I was using :

config.autoload_once_paths += [config.root.join('lib')]

Converting to strings fixed the issue. The attached patch just calls to_s on the autoload_once pathnames in load_once_path?, which is the only problem I've discovered when using Pathnames instead of regular strings.

Any thoughts?

-Jonathan

arunagw and others added some commits
@arunagw arunagw Fixed failing test against with 3-0-stable branch. 89252c4
@josevalim josevalim Merge pull request #1266 from arunagw/deprecation_warning_3_0_fix
Deprecation warning 3 0 fix
f505565
@arunagw arunagw Fixed failing tests. 17c9efb
@josevalim josevalim Merge pull request #1269 from arunagw/fix_load_path_test_3_0
Fix load path test 3 0
f236dbf
@JoeyButler JoeyButler Add failing test case for issue 796 d387a59
@tenderlove tenderlove do not bother with assert_nothing_raised, the test will fail and we g…
…et a better trace without it
99cfdba
@tenderlove tenderlove adding a test for create! with invalid associations f0c09f7
@tenderlove tenderlove add tests surrounding behavior of save and save! for associations tha…
…t have validation errors
1c079c5
@tenderlove tenderlove rescue record invalid exceptions and return false from the save metho…
…d. fixes #796
79abb70
@tenderlove tenderlove make open_log private 2649db7
@spastorino spastorino Gem::Specification#has_rdoc= is deprecated since rubygems 1.7.0 352daff
@spastorino spastorino default_executable is deprecated since rubygems 1.7.0 79ed700
@tenderlove tenderlove fixing psych support in big decimal, fixing tests to support YAML 1.1 929e5c4
@tenderlove tenderlove prefering psych as the yaml parser if possible, fixing assertions for…
… YAML 1.1 compatibility
f55a171
@tenderlove tenderlove load psych by default if possible 8e6b757
@tenderlove tenderlove require Psych if possible, use Psych output when enabled 03f0f3c
@tenderlove tenderlove load and prefer psych as the YAML parser when it is available e4594f7
@tenderlove tenderlove use ! " " YAML string literal syntax rather than removing both quotes 5856fc5
@tenderlove tenderlove add Psych::SyntaxError to the list of rescued YAML exceptions cae1d46
@tenderlove tenderlove updating changelogs eecbc10
@parndt

Changelogs ftw

tenderlove and others added some commits
@tenderlove tenderlove bumping to 3.0.8.rc1 8b0806e
@parndt parndt This fixes rake for me in RefineryCMS. Otherwise, I get: undefined me…
…thod 'prerequisites' for nil:NilClass (from rspec)
9e88b87
@tenderlove tenderlove Merge pull request #1317 from parndt/3-0-stable
This fixes rake for me in RefineryCMS.
072e1ca
@tenderlove tenderlove adding a test for #1322 579d044
@tenderlove tenderlove quoting id columns when doing hm:t joins. fixes #1322 179a8a4
@arunagw arunagw Loading active_support/core_ext/hash/conversions fixed Undefined meth…
…od from_xml
56097c0
@arunagw arunagw Using java_import instead of import. Need with rake 0.9.0 #jruby 993bd32
@arunagw arunagw Loading files if PLATFORM available. #jruby 4c330d6
@josevalim josevalim Merge pull request #1351 from arunagw/3-0-stable-jruby-jdom-fixes
3 0 stable jruby jdom fixes
2ca0ae9
@tenderlove tenderlove extend with Rake::DSL in case of rake 0.9.0. fixes #1322 57958cb
@tenderlove tenderlove bumping to 3.0.8.rc2 d756525
@tenderlove tenderlove fixing test for mysql2 c3cbd2c
@sirlantis sirlantis Through-association owner's primary key wasn't quoted. Generates inva…
…lid SQL (id = ) if the record wasn't saved yet (i.e. the primary key's value is nil).
152c41d
@sirlantis sirlantis added regression test 1df2286
@sirlantis sirlantis call .quote_value with column-parameter in patch #1362 d3cfb93
@arunagw arunagw Fixing XMLMini_JDOM #3-0-stable 6431087
@arunagw arunagw File From Xml is working now. #3-0-stable d8b6fcb
@tenderlove tenderlove Merge pull request #1369 from arunagw/3-0-stable
File From Xml is working now. #3-0-stable
3332b49
@tenderlove tenderlove Merge pull request #1362 from sirlantis/patch-1
Unquoted query generated by through-association scope
f07fd69
@sirlantis sirlantis Really fix #1322 (Rake::DSL issue) d92b22f
@tenderlove tenderlove Merge pull request #1397 from sirlantis/3-0-8
Really fix #1322 (Rake::DSL issue)
60a7c34
@arunagw arunagw Fixed tests for #jruby fe99a81
@tenderlove tenderlove Merge branch '3-0-stable' into 3-0-8
* 3-0-stable:
  File From Xml is working now. #3-0-stable
  Fixing  XMLMini_JDOM #3-0-stable
  fixing test for mysql2
636124e
@tenderlove tenderlove bumping to rc3 f4073d5
@tenderlove tenderlove rebuilding rc because of syck. :'( ce23c6e
@nel

You have been syck !!! :/

rc4 gems are properly installing. My test suite is passing.

What's up with this 'syck' problem ?

tenderlove and others added some commits
@tenderlove tenderlove Merge pull request #1400 from arunagw/query_cache_test
Query cache test
56f13a3
@vatrai vatrai AttributeMethodTest test fix #jruby bd64cc9
@pixeltrix pixeltrix Make MemCacheStore work with Ruby 1.9 and -Ku 91f6fba
@arunagw arunagw Adding comment bddf9ad
@jonleighton jonleighton Merge pull request #1430 from vatrai/jruby_test_fix
test fixes for jruby
7bd8012
@jonleighton jonleighton Fix broken test. You know, the merge button will be the end of us... 4c0bed0
@sikachu sikachu Revert "Fix broken test. You know, the merge button will be the end o…
…f us..."

The fix was intentionaly for this branch, but was applied to another
branches by mistake. This should fix the CI.

This reverts commit 4c0bed0.
4b8b16b
@NZKoz NZKoz Merge pull request #1454 from sikachu/revert_failing_commit
Revert failing commit
9f50123
@jonleighton jonleighton Force RAILS_ENV=development in rackup_test.rb. This fixes a problem o…
…n the CI server. For some reason the RAILS_ENV on the CI server is production, which means that the ActionDispatch::Static middleware is not used, and so the request in 'config.ru can be racked up' returns a 404 rather than a 200.
11da7d3
@jonleighton jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
…UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
93447be
@jonleighton jonleighton Bring back oracle specific crap 9675ad6
@jonleighton jonleighton Fix typo 6764449
@jonleighton jonleighton Fix adapter_test.rb to make no assumptions about the database name 6c1b7dc
@jonleighton jonleighton load_path_test.rb is also dependent on RAILS_ENV=development 1debebc
@arunagw arunagw framework_test.rb also dependent on RAILS_ENV=development 55b52ee
@arunagw arunagw loading_test.rb with RAILS_ENV=development db9ad5e
@arunagw arunagw Fix for CI server. Dependent on RAILS_ENV=development 101f0a6
@josevalim josevalim Merge pull request #1506 from arunagw/3-0-stable
Cherry-picked from master to fix the build
e9b025e
@jonleighton jonleighton Solve the RAILS_ENV problem in the railties tests in a more generic way 6512af2
@vijaydev vijaydev fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0 13c8ed3
@vijaydev vijaydev fixes Rake::RDocTask deprecation warnings from rake 0.9.0 (cherry picked
b921679 for 3-0-stable)
91bdd36
@vijaydev vijaydev cherry picked 24b28a2 for 3-0-stable. Original Author: amatsuda 81b01b7
@vijaydev vijaydev cherry picked 05adf52 for 3-0-stable. Original Author: amatsuda bbfd652
@tenderlove tenderlove Merge pull request #1511 from vijaydev/rake_rdoc_fixes_cherry_picks_3_0
Rake rdoc fixes cherry picks for 3-0-stable
d55cf30
@jonleighton jonleighton Fix another CIfail :zap: :fire: Deleting RAILS_ENV from ENV doesn't produce th…
…e desired result if RACK_ENV is still defined. And in any case it's better to be explicit here, so just set RALS_ENV=development.
5ffd03f
@jonleighton jonleighton Fix double definition of #teardown. Thanks @mike-burns :+1: 7497d27
@jonleighton jonleighton Make sure that the build/drop database rake tasks take account of the…
… test/config.yml config
0a4eb26
@tenderlove tenderlove please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 1241997
@tenderlove tenderlove add test to the include path 29c7258
@tenderlove tenderlove updating configs for oracle e6c2d54
@tenderlove tenderlove do not muck with the load path, that is the test task responsibility 3f3648c
@tenderlove tenderlove more oracle fixes f0cb0ed
@tenderlove tenderlove set the environment variable from the rake file f8301eb
@tenderlove tenderlove oops! add parens so the block is properly bound 1f02e3e
@tenderlove tenderlove make sure AR isolated tests set the environment variable b3b747d
@NZKoz NZKoz Ensure that the strings returned by SafeBuffer#gsub and friends aren'…
…t considered html_safe?

Also make sure that the versions of those methods which modify a string in place such as gsub! can't be called on safe buffers at all.
53a2c0b
@nono nono Do not modify a safe buffer in helpers
Signed-off-by: Michael Koziarski <michael@koziarski.com>
ed37964
@tenderlove tenderlove bumping to 3.0.8 b341e45
@tenderlove tenderlove Merge branch '3-0-8' into 3-0-stable
* 3-0-8:
  bumping to 3.0.8
  Do not modify a safe buffer in helpers
  Ensure that the strings returned by SafeBuffer#gsub and friends aren't considered html_safe?
54d262f
@steveh

This breaks String#squish as defined in activesupport/lib/active_support/core_ext/string/filters.rb for ActiveRecord attributes - is that intentional?

This also breaks #gsub with a block, using the $1 etc. to access captures:

SafeBuffer.new("fe fo fa").gsub(/f(.)/) do
  "z" + $1
end

The above should yield "ze zo za", but with this change instead yields "z z z".

This change breaks escape_javascript helper somehow. I will try to debug more and give some feedback.
I'm using this in ajax request with rendering template as haml, so there is lot of layers.

There is a problem with using escape_javascript and rendering partials.
You can see the problem at https://github.com/morgoth/escape_javascript_bug
Output from escape_javascript(render("partial")) is completely different after this commit (wrong escaping).

@nex3 : afaik, it's not possible to support this on ruby (ruby 1.8 / 1.9). You have to call #to_str before doing #gsub.

We're facing the same issue @morgoth and I've confirmed that the escape_javascript is due to the same breakage of gsub with a $1 matcher reported by @nex3 .. within the gsub block, $1 is nil and does not contain the match.
It's possible to fix escape_javascript by just changing the usage of $1 to instead use explicit block variable i.e. gsub(..){ .. $1 } to gsub(..){ |m| .. m } , but the root cause seems to be that after super.to_str, you no longer have the context for an implicit usage of $1.

I've tested on 3.0-stable and the problem still exists. There doesn't seem to be an issue ticket for this yet .. has anyone logged one?

I opened issue for this: #1553

arunagw and others added some commits
@arunagw arunagw Fixed mailto for SafeBuffer#gsub cdf617e
@arunagw arunagw Cache helper fixed for SafeBuffer 059692a
@tenderlove tenderlove Merge pull request #1541 from arunagw/3-0-stable
Fixed for SafeBuffer
bdc80dd
@sikachu sikachu Adapt [059692a] to make sure we perform correct cloning before manipu…
…lation on `OutputBuffer`.

This has been adapted from [823aa22]. However, after the fragment rendering, `Builder` returns the `String` object instead of `ActionView::OutputBuffer`. Somehow the same procedure which was in [823aa22] does not play nice with the String, and result in the fragment got lost.
114b5e4
@tenderlove tenderlove Merge pull request #1545 from sikachu/30testbuffer
Fix test on 3-0-stable regarding SafeBuffer
2111509
@rsim rsim Fix for Oracle adapter to count SELECT queries for assert_queries ass…
…ertion

Needed just in 3-0-stable branch, query counting is refactored in 3-1-stable and master branches and do not need this patch anymore.
d909693
@jonleighton jonleighton Merge pull request #1554 from rsim/assert_queries_oracle_fix_for_3_0
Assert queries oracle fix for 3 0
eff72b2
@tardate tardate Make escape_javascript happy to handle SafeBuffers
* see GH#1553
* allow for the fact that gsub on SafeBuffer does not pass match variables $1, $2 etc to a block
75ecdfb
@josevalim josevalim Merge pull request #1558 from tardate/3-0-stable
Fix for issue 1553 - escape_javascript to support SafeBuffer strings
910b34d
@sikachu sikachu Update CHANGELOG to mention the new SafeBuffer change 4252a35
@tenderlove tenderlove Merge pull request #1565 from sikachu/3-0-stable-changelog
Update CHANGELOG to mention the new SafeBuffer change
02e65ef
@sikachu sikachu Revert "Fixed mailto for SafeBuffer#gsub"
It was fixing it in a bad way by changing test.

This reverts commit cdf617e.
f57c707
@sikachu sikachu Add proper fix to `mail_to` helper.
* Fix the problem on manipulating on the `ActiveSupport::SafeBuffer`
4b1309e
@tenderlove tenderlove Merge pull request #1568 from sikachu/3-0-stable-mailto
Add proper fix to mail_to helper
1ae9b29
@tenderlove tenderlove bumping to 3.0.9.rc1 0c1608c
@bradrobertson bradrobertson modified table_exists? to always use current search_path or schema if…
… explicitly set
0252376
@sikachu sikachu Make sure `escape_javascript` return `SafeBuffer` if the incoming arg…
…ument is already html_safe
3d82d81
@tenderlove tenderlove Merge pull request #1611 from sikachu/3-0-stable-javascript
Make sure `escape_javascript` return `SafeBuffer` if the incoming argumen
b6a2157
@chopmo chopmo Fix issue #1598 by adding a dependency to the RDoc gem. caa9779
@chopmo chopmo Fix issue #1598 by adding a dependency to the RDoc gem. b002181
@sikachu sikachu Make sure `escape_javascript` return `SafeBuffer` if the incoming arg…
…ument is already html_safe
8fcdc15
@tenderlove tenderlove ensuring that json_escape returns html safe strings when passed an ht…
…ml safe string
88413ef
@tenderlove tenderlove ensuring that json_escape returns html safe strings when passed an ht…
…ml safe string
cce7085
@tenderlove tenderlove bumping to 3.0.9.rc2 0e1ecb2
@tenderlove tenderlove bumping to rc3 since syck is not playing nicely 66ec7e8
@pixeltrix pixeltrix Ensure number helpers can handle HTML safe strings - closes #1597. 9b80f8d
@sikachu sikachu Make sure that we don't perform in-place mutation on SafeBuffer string
This will make sure `render :inline` is working.

Closes #1633
104e200
@sikachu sikachu Update CHANGELOG to mention the json_escape change c4fbb21
@pixeltrix pixeltrix Ensure number helpers can handle HTML safe strings - closes #1597. 60d4dc1
@sikachu sikachu Update CHANGELOG to mention the json_escape change 564a655
@sikachu sikachu Make sure that we don't perform in-place mutation on SafeBuffer string
This will make sure `render :inline` is working.

Closes #1633
fb706c7
@tenderlove tenderlove Merge pull request #1639 from sikachu/3-0-stable-render-inline
Render inline fix for 3-0-stable
70b4ea9
@tenderlove tenderlove Merge pull request #1640 from sikachu/3-0-9-render-inline
Render inline fix for 3-0-9
f169dab
Santiago Pastorino and José Ignacio Costa Revert "Make sure that we don't perform in-place mutation on SafeBuff…
…er string"

This reverts commit 104e200.
0019379
@arunagw arunagw Adding JDBCmysql template for Jruby in 3-0-stable. 4448988
@arunagw arunagw Tests added for activerecord-jdbcmysql 0e0be35
@arunagw arunagw Adding JDBCsqlite3 template for Jruby in 3-0-stable. 871a0fc
@arunagw arunagw Adding jdbcsqlite3 in comment 680e5d2
@arunagw arunagw Adding JDBCpostgresql template for Jruby in 3-0-stable. bcd9145
@arunagw arunagw Adding Jruby-openssl in gemfile for 3-0-stable. 7f4bf01
@arunagw arunagw Fixed error when running db:create with jdbcmysql d5b9ea3
@arunagw arunagw Allow database.rake tasks to perform opreation with jdbcpostgresql 9da2a10
@arunagw arunagw Modified database.rake file to run with jdbcsqlite3 2b4a7ca
@arunagw arunagw Using different constant. 110de0f
@pixeltrix pixeltrix Define ActiveSupport#to_param as to_str - closes #1663 a64b5dd
@jonleighton jonleighton Add support for using an ARCONFIG environment variable to specify the…
… location of the config.yml file for running the tests
968816a
@tenderlove tenderlove Merge branch '3-0-stable' into 3-0-9
* 3-0-stable:
  Add support for using an ARCONFIG environment variable to specify the location of the config.yml file for running the tests
  Define ActiveSupport#to_param as to_str - closes #1663
  Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"
  Make sure that we don't perform in-place mutation on SafeBuffer string
  Update CHANGELOG to mention the json_escape change
  Ensure number helpers can handle HTML safe strings - closes #1597.
  ensuring that json_escape returns html safe strings when passed an html safe string
  Fix issue #1598 by adding a dependency to the RDoc gem.
  Make sure `escape_javascript` return `SafeBuffer` if the incoming argument is already html_safe

Conflicts:
	actionpack/CHANGELOG
d5e28c3
@tenderlove tenderlove bumping to rc4 f283194
@tenderlove tenderlove Merge branch '3-0-9' of github.com:rails/rails into 3-0-9
* '3-0-9' of github.com:rails/rails:
  Make sure that we don't perform in-place mutation on SafeBuffer string
  Update CHANGELOG to mention the json_escape change
  Ensure number helpers can handle HTML safe strings - closes #1597.
d958428
@tenderlove tenderlove Preparing for 3.0.9.rc5 release 6824c5d
@pixeltrix pixeltrix Remove obsolete compatibility module 271bccb
@jonleighton jonleighton Add Gemfile dependency for require_relative on mri18. This is a depen…
…dency of linecache which is a dependency of ruby-debug. However, the latest release of linecache (0.45) omits the dependency from its gemspec, causing the build to fail. I have emailed the maintainer so we should remove this when it's fixed upstream.
4a96ab4
@pixeltrix pixeltrix Make MissingTranslation exception handler respect :rescue_format 190101e
@dmathieu dmathieu simplify to only one condition
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
6cfd1c7
@dmathieu dmathieu encode the uploaded file's name in the default external encoding - Cl…
…oses #869
991e388
@dmathieu dmathieu all requests are utf-8. Don't use the external encoding. 71d7610
@daeltar daeltar Use assert_equal instead of assert in uploaded file test. b869b8c
@josevalim josevalim Merge pull request #1714 from dmathieu/3-0-cherry
Cherry picking encoding for 3.0
95905c5
@tenderlove tenderlove avoid false positives caused by release candidates fad08a6
@tenderlove tenderlove Preparing for 3.0.9 release 15e2b58
@tenderlove tenderlove Merge branch '3-0-9' into 3-0-stable
* 3-0-9:
  Preparing for 3.0.9 release
  avoid false positives caused by release candidates
  Preparing for 3.0.9.rc5 release
  bumping to rc4
  Make sure that we don't perform in-place mutation on SafeBuffer string
  Update CHANGELOG to mention the json_escape change
  Ensure number helpers can handle HTML safe strings - closes #1597.
  bumping to rc3 since syck is not playing nicely
  bumping to 3.0.9.rc2
  ensuring that json_escape returns html safe strings when passed an html safe string
  Make sure `escape_javascript` return `SafeBuffer` if the incoming argument is already html_safe
  Fix issue #1598 by adding a dependency to the RDoc gem.
  bumping to 3.0.9.rc1
5e61d0b
@jonleighton jonleighton Add require 'pathname' as it has not already been required in some ci…
…rcumstances
8742a97
@spastorino spastorino Bump mysql2 up fccacae
@arunagw arunagw Removing require_relative gem. Linecache new version 0.46 is out and
it's loading rbx-require-relative > 0.0.4
48fcd22
@josevalim josevalim Merge pull request #1772 from arunagw/require_rel_remove-3-0-stable
Require rel remove 3 0 stable
8d9bc64
@bensie bensie Add option to omit creating an instance reader method on class_attribute ad06ddd
@josevalim josevalim Merge pull request #1775 from bensie/class-attr-3-0-stable
Instance reader method on class_attribute - 3-0-stable
22cc1e9
@josevalim josevalim Fix SafeBuffers by adding a dirty flag. bc070ba
@josevalim josevalim Removed file added by accident. 8467ea3
@arunagw arunagw For more specific for jdbc postgresql databases. 3e7af42
@arunagw arunagw More specific for jdbc-sqlite 14bfe83
@arunagw arunagw Only mysql and jdbcmysql. 3b05231
@arunagw arunagw Fixed for sqlite3 checking with jdbc 4bfbdd1
@arunagw arunagw Remove superfluous pg driver install instructions 25e5ad2
@arunagw arunagw Add generic 'jdbc' database option 2aeabdc
@arunagw arunagw Convert database names to ones appropriate for JRuby 2fc22bf
@arunagw arunagw Tests added for jdbc option fb495cd
@arunagw arunagw Modified .yml files according to master changes. As this will also work. ecddc65
@arunagw arunagw Test added to check default option with jruby. It should generate
sqlite3 bases app
2771b91
Jeroen Jacobs Tests only after filters in cache sweepers 8ebc17f
Jeroen Jacobs Fixes an issue where cache sweepers with only after filters would hav…
…e no controller object

It would raise undefined method controller_name for nil
2f9bd25
@mikegehard mikegehard Fix issue where assigning a empty string to the _type column of a pol…
…ymorphic association throws an error. Now it returns nil for the association as one would expect.

[Fixes #1824]
5a44c70
@spastorino spastorino Merge pull request #1834 from jeroenj/cachesweeper-fix-3-0
Fixes an issue where cache sweepers
3add2ea
@spastorino spastorino Add CHANGELOG entry 19392cf
@fxn fxn updates the contributing guide 59f19a9
@tenderlove tenderlove Merge pull request #1649 from arunagw/jruby_3_0_stable
Jruby 3 0 stable
a6495af
Maxime RETY Fix JSON decoding of newline character with Yaml backend [#3479 state…
…:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
b3e3c50
@arunagw arunagw Using not effected timezone in tests. 0ed8dea
@vatrai vatrai 3-0-stable fix test when running Jruby. If Jruby Platform is availabl…
…e the gem will change.
557d788
@guilleiguaran guilleiguaran Avoid extra call to Cache#read in case of a fragment cache hit e54d9c1
@tenderlove tenderlove Merge pull request #1896 from guilleiguaran/issue-1893
Avoid extra call to Cache#read in case of a fragment cache hit (3-0-stable)
a657a4b
@arunagw arunagw It should be in Json format to work with JsonGem a13317d
@spastorino spastorino Merge pull request #1901 from arunagw/json_parse
It should be in Json format to work with JsonGem
39d5350
@spastorino spastorino Update CI config 3d0fde5
@spastorino spastorino Allow CI to use the latest rubygems version 9663fad
@bogdan bogdan Fixed ActionView::FormOptionsHelper#select with :multiple => false
(cherry picked from commit 0fdac01)

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
c314203
@simonbaird simonbaird Fix charset/collate in mysql recreate_database
See new method mysql_creation_options. It is used by both
create_database and recreate_database so they are consistent.
3ba3125
@pixeltrix pixeltrix The rails gem doesn't have a lib directory. 3001728
@pixeltrix pixeltrix Revert "The rails gem doesn't have a lib directory."
RubyGems requires at least one require_path.

This reverts commit 3001728.
1b03f7f
@spastorino spastorino Merge pull request #1894 from arunagw/fix_test_for_jruby_db-3-0-stable
Fix test for jruby db 3 0 stable
7ff32e2
@spastorino spastorino Merge pull request #1952 from simonbaird/3-0-stable
rake db:test:purge creates mysql database with wrong charset & collation
2f3eb7a
@spastorino spastorino Merge pull request #1837 from msgehard/3-0-stable
Fix for empty string assigned to _type column of polymorphic association
9e4d156
@knapo knapo Make `ActiveRecord::Batches#find_each` to not return `self`.
This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`.
e2d90bf
@spastorino spastorino Merge pull request #2004 from knapo/3-0-stable
Backport of #1997
e9f2c67
@guilleiguaran guilleiguaran Update to latest rails.js for fix some bugs under IE 8226dfc
Tomas D'Stefano Destroy association habtm record before destroying the record itself.…
… Fixes issue #402.
28f057c
@kuahyeow kuahyeow Fix for 3-0-stable - Conditions specified on through association shou…
…ldn't clobber asssociation join condition.

This fix refactors processing of association join conditions so that both the join condition and the custom condition will be used when called by query_methods.rb, which expects a 1 or 2-sized array (depending on the type of association). Previously, a custom condition specified would create a 2 or 3-sized array which will clobber the association join condition.
caec639
@jonleighton jonleighton Merge pull request #1797 from kuahyeow/3-0-stable
Through association condition clobbers join condition
fc4bce1
@tenderlove tenderlove Merge pull request #1607 from bradrobertson/pg_adapter
fix table_exists? in postgresql adapter to always use current search_path
9a4d2b2
@lhahne lhahne fixed CacheHelper to properly support html_safe output buffers c476a6b
@elight elight Fixes #2064
Backport of cache_key fix from master
b1b5d18
@spastorino spastorino Merge pull request #2064 from elight/3-0-stable
Backports cache_key fix from master
247a50b
@lhahne lhahne Added tests for the output_buffer returned by CacheHelper
The output_buffer returned by CacheHelper should be html_safe if the original buffer is html_safe.
bc5ccd0
@lhahne lhahne made sure that the possible new output_buffer created by CacheHelper …
…is of the same type as the original
39a4f67
@sikachu sikachu Fix a wrong assertion on url_helper_test, and refactor `html_safe` te…
…st to be in its method
2cb29fa
@spastorino spastorino Merge pull request #2047 from sikachu/3-0-stable-test_fix
Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
1220b16
@jstorimer jstorimer Ensure that status codes are logged properly
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
5e64538
@spastorino spastorino Merge pull request #2134 from jstorimer/ensure-status-codes-are-logge…
…d-properly-3-0-stable

Ensure status codes are logged properly (for 3-0-stable)
a6139b9
@joshk joshk This fixes an issue when bundling to a local path (eg. /vendor/bundle).
If you bundle to a local path bundler is not included in it, so
calling "gem 'bundler'" will fail.

Conflicts:

	load_paths.rb
9ade587
@joshk joshk Added a .travis.yml config and travis specific ci script.
Don't install ruby-debug if running the test suite on Travis,
linecache19 is the main offender, very very slow.

And do not install pg if Travis is bundling the gems, pg will be setup
on Travis soon.

Conflicts:

	Gemfile
047b979
@tenderlove

Common bros. Was this patch reviewed or tested?

Owner

My fault, that was a manual merge and I asked for review on Campfire, but did not test it.

I'm giving you a hard time bro. :heart:

fxn and others added some commits
@fxn fxn I actually love well-formed Gemfiles 80b1f9e
@Karunakar Karunakar Duplicate tests removed. bd804d7
@spastorino spastorino Merge pull request #2183 from castlerock/3-0-stable-duplicate_test
3 0 stable duplicate test
c39bd5f
@arunagw arunagw fixed task for rake test:uncommitted b490fd8
@spastorino spastorino Merge pull request #2205 from arunagw/test_un_3_0_stable
rake test:uncommitted for 3-0-stable
19d9689
@spastorino spastorino Merge pull request #2080 from lhahne/3-0-stable
Fix improper detection and handling of html_safe buffer in CacheHelper
eead13f
@arunagw arunagw Fix rake rails:template to tell user to pass LOCATION variable. edfcf47
@spastorino spastorino Merge pull request #2249 from arunagw/rake_template_path_fix
Rake template path fix
56c663b
@joshk joshk enable Travis CI irc notifications to #rails-contrib on irc.freenode.org 64c269a
@spastorino spastorino Merge pull request #2289 from joshk/3-0-stable
More Irc notifications (from Travis with love, again)
e18e896
@spastorino spastorino Remove cruise files 43e6f82
@fxn fxn contrib app minor tweak e93cff8
@amatsuda amatsuda callback methods are Class methods a8aa666
@spastorino spastorino Merge pull request #2320 from amatsuda/callback_deprecation_message
callback methods are Class methods
a33fe79
@tenderlove tenderlove dump IO encoding value along with schema.rb so the file can be reload…
…ed. fixes #1592
6c0beb5
@bhavinkamani bhavinkamani fix connection not established error while running rake task
db:schema:dump
5d7ed7a
@tenderlove tenderlove default writing the schema file as utf-8 3676af4
@tenderlove tenderlove updating changelog with schema.rb changes 6631abd
@tenderlove tenderlove delay backtrace scrubbing until we actually raise an exception. fixes #… b9f6798
@tenderlove tenderlove updating the CHANGELOG 553d9ea
@arunagw arunagw skiping magic comment test. checking encoding_aware?
Loading AS encoding.
b0334db
@spastorino spastorino Merge pull request #2374 from arunagw/30_schema_dumper_test_fix
3-0-stable schema dumper test fix
cb36585
@vijaydev vijaydev fixes #2368. rake about not showing the middleware, db adapter and db…
… schema version
773d219
@spastorino spastorino Merge pull request #2381 from vijaydev/rakeaboutfix3.0
Fix #2368 (3-0-stable)
564d39e
@spastorino spastorino Merge pull request #2393 from bdurand/fix_cache_read_multi
Fix ArgumentError in ActiveSupport::Cache::CacheStore.read_multi
a173bb3
@jonleighton jonleighton Quote these dates to prevent intermittent test failure. Suppose local…
… time is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved.
e42c544
@tenderlove tenderlove we should not ignore all gems in here df6b1e2
@tenderlove tenderlove updating CHANGELOGs f54d0cf
@fxn fxn backports doc fix 9f9446f e0b0da2
@tenderlove tenderlove more changelog updates 9d17458
@tenderlove tenderlove bumping to 3.0.10.rc1 521c9aa
@vanderhoorn

Why is this removed in a 3.0.x point-release? What if someone upgrades from an old release to 3.0? It is not like people are going to upgrade to 3.0.0 to 3.0.1 to 3.0.2, etc. They're going straight to 3.0.10, so they're missing the deprecation warning.

Removing deprecation warnings in a point release doesn't really seem like a good idea. That's what major releases are for.

@vanderhoorn I'm not sure why this was removed. We'll revert it. I'll fold the revert in to 3.0.10, but I won't let this delay the 3.0.10 release.

Owner

@josevalim ah, I didn't see how far back it was deprecated. I'll not revert then. Thanks!

Collaborator

I remember @pixeltrix removing this when someone edited the url in the warning to change .com to .org.

Owner

This code relates to moving an environment.rb file from 0.x to 1.0. If you're moving a 0.x app to 3.0.x whether a noop method still exists is the least of your problems. Also any environment.rb from that era will be using Dependencies.root which doesn't exist - it's ActiveSupport::Dependencies now.

Ok, that wasn't really clear from the commit message. Thanks for the info.

spastorino and others added some commits
@spastorino spastorino Merge pull request #2450 from guilleiguaran/activesupport-gzip-1.8
Fix ActiveSupport::Gzip under Ruby 1.8.7. Closes #2416
65a648b
@jasoncodes jasoncodes Fix marshal round-tripping of fractional seconds (Time#subsec). 1f63606
Gonzalo Rodriguez and Leonardo Capillera Remove 'parameters_for_url' from 'form_tag' method signature 11f6531
@spastorino spastorino Merge pull request #2494 from grzuy/3-0-stable
Porting changes on form_tag method signature to 3-0-stable
f45c372
@jonleighton jonleighton Update travis config on @joshk's instructions 4c8a211
@tenderlove tenderlove Properly escape glob characters. e0c03f8
@tenderlove tenderlove prevent sql injection attacks by escaping quotes in column names fb4747b
@tenderlove tenderlove Tags with invalid names should also be stripped in order to prevent
XSS attacks.  Thanks Sascha Depold for the report.
3480d97
@tenderlove tenderlove properly subsituting bad utf8 characters b45dfc7
@tenderlove tenderlove bumping rails to 3.0.10 4f15f39
@tenderlove tenderlove Merge branch '3-0-10' into 3-0-stable
* 3-0-10:
  bumping rails to 3.0.10
  properly subsituting bad utf8 characters
  Tags with invalid names should also be stripped in order to prevent XSS attacks.  Thanks Sascha Depold for the report.
  prevent sql injection attacks by escaping quotes in column names
  Properly escape glob characters.
  bumping to 3.0.10.rc1
  more changelog updates
  updating CHANGELOGs
0b37704
@Bertg

I have some serious issues with this commit. Bot in my source, and conceptually.

We where using the query method to find which templates are matching a specific patern. This would allow us to use a template on a per customer basis. This behaviour is now broken.

Also, it is not the query's responsibility to fix the possible abuse in the render method. if anything the render method should escape the value passed down.

This is related to this vulnerability so I wouldn't expect it to be changed. The best solution is to write your own template resolver and it's covered in @josevalim's book - Crafting Rails Applications or there's a blog post that provides an overview.

The PathResolver provides the "query" method. It's the asking code that should pass a "safe" string, or to tell the resolver to do it safe.

We already got it fixed locally with a patch that provides the previous methods under a different name. We won't be "properly" investigating this issue until we move to rails 3.1 as that version has a rewrite of path resolving etc...

josevalim and others added some commits
@josevalim josevalim Edited .travis.yml via GitHub 0ebdef2
@spastorino spastorino Merge pull request #2524 from JonathonMA/fix_ecd37084b28a05f05251
Use mysql_creation_options inside rescue block
c8ec8f7
@tenderlove tenderlove Merge pull request #1995 from guilleiguaran/prototype-ujs-fix
Prototype rails.js fixes for 3-0-stable
d7d0c25
@jdelStrother jdelStrother Fix autoload_once_paths when using Pathnames & ruby 1.9
Under ruby 1.9.2 - 
  "/var/log".starts_with?(Pathname.new("/var"))  # => false

so setting config.autoload_once_paths with Pathnames would not work
cf8deeb
@vijaydev
Collaborator

a PR that went bad?

@jdelStrother

Uhh... yeah, no kidding. Let me try reapplying to master & trying again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.