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

44 participants

Jonathan del Strother Vijay Dev Bert Goethals Andrew White vanderhoorn Aaron Patterson José Valim Xavier Noria Wojciech Wnętrzak Paul Gallagher Bruno Michel Natalie Weizenbaum Steve Hoeksema Robert Pankowecki Renaud Morvan Philip Arndt Arun Agrawal Joey B Santiago Pastorino Marcel Jackwerth Vishnu Atrai Jon Leighton Prem Sichanugrist Michael Koziarski and others
Jonathan del Strother

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

Changelogs ftw

tenderlove and others added some commits
Aaron Patterson tenderlove bumping to 3.0.8.rc1 8b0806e
Philip Arndt parndt This fixes rake for me in RefineryCMS. Otherwise, I get: undefined me…
…thod 'prerequisites' for nil:NilClass (from rspec)
9e88b87
Aaron Patterson tenderlove Merge pull request #1317 from parndt/3-0-stable
This fixes rake for me in RefineryCMS.
072e1ca
Aaron Patterson tenderlove adding a test for #1322 579d044
Aaron Patterson tenderlove quoting id columns when doing hm:t joins. fixes #1322 179a8a4
Arun Agrawal arunagw Loading active_support/core_ext/hash/conversions fixed Undefined meth…
…od from_xml
56097c0
Arun Agrawal arunagw Using java_import instead of import. Need with rake 0.9.0 #jruby 993bd32
Arun Agrawal arunagw Loading files if PLATFORM available. #jruby 4c330d6
José Valim josevalim Merge pull request #1351 from arunagw/3-0-stable-jruby-jdom-fixes
3 0 stable jruby jdom fixes
2ca0ae9
Aaron Patterson tenderlove extend with Rake::DSL in case of rake 0.9.0. fixes #1322 57958cb
Aaron Patterson tenderlove bumping to 3.0.8.rc2 d756525
Aaron Patterson tenderlove fixing test for mysql2 c3cbd2c
Marcel Jackwerth 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
Marcel Jackwerth sirlantis added regression test 1df2286
Marcel Jackwerth sirlantis call .quote_value with column-parameter in patch #1362 d3cfb93
Arun Agrawal arunagw Fixing XMLMini_JDOM #3-0-stable 6431087
Arun Agrawal arunagw File From Xml is working now. #3-0-stable d8b6fcb
Aaron Patterson tenderlove Merge pull request #1369 from arunagw/3-0-stable
File From Xml is working now. #3-0-stable
3332b49
Aaron Patterson tenderlove Merge pull request #1362 from sirlantis/patch-1
Unquoted query generated by through-association scope
f07fd69
Marcel Jackwerth sirlantis Really fix #1322 (Rake::DSL issue) d92b22f
Aaron Patterson tenderlove Merge pull request #1397 from sirlantis/3-0-8
Really fix #1322 (Rake::DSL issue)
60a7c34
Arun Agrawal arunagw Fixed tests for #jruby fe99a81
Aaron Patterson 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
Aaron Patterson tenderlove bumping to rc3 f4073d5
Aaron Patterson tenderlove rebuilding rc because of syck. :'( ce23c6e
Renaud Morvan

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
Aaron Patterson tenderlove Merge pull request #1400 from arunagw/query_cache_test
Query cache test
56f13a3
Vishnu Atrai vatrai AttributeMethodTest test fix #jruby bd64cc9
Andrew White pixeltrix Make MemCacheStore work with Ruby 1.9 and -Ku 91f6fba
Arun Agrawal arunagw Adding comment bddf9ad
Jon Leighton jonleighton Merge pull request #1430 from vatrai/jruby_test_fix
test fixes for jruby
7bd8012
Jon Leighton jonleighton Fix broken test. You know, the merge button will be the end of us... 4c0bed0
Prem Sichanugrist 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
Michael Koziarski NZKoz Merge pull request #1454 from sikachu/revert_failing_commit
Revert failing commit
9f50123
Jon Leighton 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
Jon Leighton 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
Jon Leighton jonleighton Bring back oracle specific crap 9675ad6
Jon Leighton jonleighton Fix typo 6764449
Jon Leighton jonleighton Fix adapter_test.rb to make no assumptions about the database name 6c1b7dc
Jon Leighton jonleighton load_path_test.rb is also dependent on RAILS_ENV=development 1debebc
Arun Agrawal arunagw framework_test.rb also dependent on RAILS_ENV=development 55b52ee
Arun Agrawal arunagw loading_test.rb with RAILS_ENV=development db9ad5e
Arun Agrawal arunagw Fix for CI server. Dependent on RAILS_ENV=development 101f0a6
José Valim josevalim Merge pull request #1506 from arunagw/3-0-stable
Cherry-picked from master to fix the build
e9b025e
Jon Leighton jonleighton Solve the RAILS_ENV problem in the railties tests in a more generic way 6512af2
Vijay Dev vijaydev fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0 13c8ed3
Vijay Dev vijaydev fixes Rake::RDocTask deprecation warnings from rake 0.9.0 (cherry picked
b921679 for 3-0-stable)
91bdd36
Vijay Dev vijaydev cherry picked 24b28a2 for 3-0-stable. Original Author: amatsuda 81b01b7
Vijay Dev vijaydev cherry picked 05adf52 for 3-0-stable. Original Author: amatsuda bbfd652
Aaron Patterson tenderlove Merge pull request #1511 from vijaydev/rake_rdoc_fixes_cherry_picks_3_0
Rake rdoc fixes cherry picks for 3-0-stable
d55cf30
Jon Leighton 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
Jon Leighton jonleighton Fix double definition of #teardown. Thanks @mike-burns :+1: 7497d27
Jon Leighton jonleighton Make sure that the build/drop database rake tasks take account of the…
… test/config.yml config
0a4eb26
Aaron Patterson tenderlove please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 1241997
Aaron Patterson tenderlove add test to the include path 29c7258
Aaron Patterson tenderlove updating configs for oracle e6c2d54
Aaron Patterson tenderlove do not muck with the load path, that is the test task responsibility 3f3648c
Aaron Patterson tenderlove more oracle fixes f0cb0ed
Aaron Patterson tenderlove set the environment variable from the rake file f8301eb
Aaron Patterson tenderlove oops! add parens so the block is properly bound 1f02e3e
Aaron Patterson tenderlove make sure AR isolated tests set the environment variable b3b747d
Michael Koziarski 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
Bruno Michel nono Do not modify a safe buffer in helpers
Signed-off-by: Michael Koziarski <michael@koziarski.com>
ed37964
Aaron Patterson tenderlove bumping to 3.0.8 b341e45
Aaron Patterson 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
Steve Hoeksema

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
Arun Agrawal arunagw Fixed mailto for SafeBuffer#gsub cdf617e
Arun Agrawal arunagw Cache helper fixed for SafeBuffer 059692a
Aaron Patterson tenderlove Merge pull request #1541 from arunagw/3-0-stable
Fixed for SafeBuffer
bdc80dd
Prem Sichanugrist 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
Aaron Patterson tenderlove Merge pull request #1545 from sikachu/30testbuffer
Fix test on 3-0-stable regarding SafeBuffer
2111509
Raimonds Simanovskis 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
Jon Leighton jonleighton Merge pull request #1554 from rsim/assert_queries_oracle_fix_for_3_0
Assert queries oracle fix for 3 0
eff72b2
Paul Gallagher 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
José Valim josevalim Merge pull request #1558 from tardate/3-0-stable
Fix for issue 1553 - escape_javascript to support SafeBuffer strings
910b34d
Prem Sichanugrist sikachu Update CHANGELOG to mention the new SafeBuffer change 4252a35
Aaron Patterson tenderlove Merge pull request #1565 from sikachu/3-0-stable-changelog
Update CHANGELOG to mention the new SafeBuffer change
02e65ef
Prem Sichanugrist sikachu Revert "Fixed mailto for SafeBuffer#gsub"
It was fixing it in a bad way by changing test.

This reverts commit cdf617e.
f57c707
Prem Sichanugrist sikachu Add proper fix to `mail_to` helper.
* Fix the problem on manipulating on the `ActiveSupport::SafeBuffer`
4b1309e
Aaron Patterson tenderlove Merge pull request #1568 from sikachu/3-0-stable-mailto
Add proper fix to mail_to helper
1ae9b29
Aaron Patterson tenderlove bumping to 3.0.9.rc1 0c1608c
Brad Robertson bradrobertson modified table_exists? to always use current search_path or schema if…
… explicitly set
0252376
Prem Sichanugrist sikachu Make sure `escape_javascript` return `SafeBuffer` if the incoming arg…
…ument is already html_safe
3d82d81
Aaron Patterson tenderlove Merge pull request #1611 from sikachu/3-0-stable-javascript
Make sure `escape_javascript` return `SafeBuffer` if the incoming argumen
b6a2157
Jacob Tjoernholm chopmo Fix issue #1598 by adding a dependency to the RDoc gem. caa9779
Jacob Tjoernholm chopmo Fix issue #1598 by adding a dependency to the RDoc gem. b002181
Prem Sichanugrist sikachu Make sure `escape_javascript` return `SafeBuffer` if the incoming arg…
…ument is already html_safe
8fcdc15
Aaron Patterson tenderlove ensuring that json_escape returns html safe strings when passed an ht…
…ml safe string
88413ef
Aaron Patterson tenderlove ensuring that json_escape returns html safe strings when passed an ht…
…ml safe string
cce7085
Aaron Patterson tenderlove bumping to 3.0.9.rc2 0e1ecb2
Aaron Patterson tenderlove bumping to rc3 since syck is not playing nicely 66ec7e8
Andrew White pixeltrix Ensure number helpers can handle HTML safe strings - closes #1597. 9b80f8d
Prem Sichanugrist 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
Prem Sichanugrist sikachu Update CHANGELOG to mention the json_escape change c4fbb21
Andrew White pixeltrix Ensure number helpers can handle HTML safe strings - closes #1597. 60d4dc1
Prem Sichanugrist sikachu Update CHANGELOG to mention the json_escape change 564a655
Prem Sichanugrist 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
Aaron Patterson tenderlove Merge pull request #1639 from sikachu/3-0-stable-render-inline
Render inline fix for 3-0-stable
70b4ea9
Aaron Patterson 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
Arun Agrawal arunagw Adding JDBCmysql template for Jruby in 3-0-stable. 4448988
Arun Agrawal arunagw Tests added for activerecord-jdbcmysql 0e0be35
Arun Agrawal arunagw Adding JDBCsqlite3 template for Jruby in 3-0-stable. 871a0fc
Arun Agrawal arunagw Adding jdbcsqlite3 in comment 680e5d2
Arun Agrawal arunagw Adding JDBCpostgresql template for Jruby in 3-0-stable. bcd9145
Arun Agrawal arunagw Adding Jruby-openssl in gemfile for 3-0-stable. 7f4bf01
Arun Agrawal arunagw Fixed error when running db:create with jdbcmysql d5b9ea3
Arun Agrawal arunagw Allow database.rake tasks to perform opreation with jdbcpostgresql 9da2a10
Arun Agrawal arunagw Modified database.rake file to run with jdbcsqlite3 2b4a7ca
Arun Agrawal arunagw Using different constant. 110de0f
Andrew White pixeltrix Define ActiveSupport#to_param as to_str - closes #1663 a64b5dd
Jon Leighton jonleighton Add support for using an ARCONFIG environment variable to specify the…
… location of the config.yml file for running the tests
968816a
Aaron Patterson 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
Aaron Patterson tenderlove bumping to rc4 f283194
Aaron Patterson 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
Aaron Patterson tenderlove Preparing for 3.0.9.rc5 release 6824c5d
Andrew White pixeltrix Remove obsolete compatibility module 271bccb
Jon Leighton 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
Andrew White pixeltrix Make MissingTranslation exception handler respect :rescue_format 190101e
Damien Mathieu dmathieu simplify to only one condition
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
6cfd1c7
Damien Mathieu dmathieu encode the uploaded file's name in the default external encoding - Cl…
…oses #869
991e388
Damien Mathieu dmathieu all requests are utf-8. Don't use the external encoding. 71d7610
Lukáš Konarovský daeltar Use assert_equal instead of assert in uploaded file test. b869b8c
José Valim josevalim Merge pull request #1714 from dmathieu/3-0-cherry
Cherry picking encoding for 3.0
95905c5
Aaron Patterson tenderlove avoid false positives caused by release candidates fad08a6
Aaron Patterson tenderlove Preparing for 3.0.9 release 15e2b58
Aaron Patterson 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
Jon Leighton jonleighton Add require 'pathname' as it has not already been required in some ci…
…rcumstances
8742a97
Santiago Pastorino spastorino Bump mysql2 up fccacae
Arun Agrawal arunagw Removing require_relative gem. Linecache new version 0.46 is out and
it's loading rbx-require-relative > 0.0.4
48fcd22
José Valim josevalim Merge pull request #1772 from arunagw/require_rel_remove-3-0-stable
Require rel remove 3 0 stable
8d9bc64
James Miller bensie Add option to omit creating an instance reader method on class_attribute ad06ddd
José Valim josevalim Merge pull request #1775 from bensie/class-attr-3-0-stable
Instance reader method on class_attribute - 3-0-stable
22cc1e9
José Valim josevalim Fix SafeBuffers by adding a dirty flag. bc070ba
José Valim josevalim Removed file added by accident. 8467ea3
Arun Agrawal arunagw For more specific for jdbc postgresql databases. 3e7af42
Arun Agrawal arunagw More specific for jdbc-sqlite 14bfe83
Arun Agrawal arunagw Only mysql and jdbcmysql. 3b05231
Arun Agrawal arunagw Fixed for sqlite3 checking with jdbc 4bfbdd1
Arun Agrawal arunagw Remove superfluous pg driver install instructions 25e5ad2
Arun Agrawal arunagw Add generic 'jdbc' database option 2aeabdc
Arun Agrawal arunagw Convert database names to ones appropriate for JRuby 2fc22bf
Arun Agrawal arunagw Tests added for jdbc option fb495cd
Arun Agrawal arunagw Modified .yml files according to master changes. As this will also work. ecddc65
Arun Agrawal 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
Mike Gehard 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
Santiago Pastorino spastorino Merge pull request #1834 from jeroenj/cachesweeper-fix-3-0
Fixes an issue where cache sweepers
3add2ea
Santiago Pastorino spastorino Add CHANGELOG entry 19392cf
Xavier Noria fxn updates the contributing guide 59f19a9
Aaron Patterson 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
Arun Agrawal arunagw Using not effected timezone in tests. 0ed8dea
Vishnu Atrai vatrai 3-0-stable fix test when running Jruby. If Jruby Platform is availabl…
…e the gem will change.
557d788
Guillermo Iguaran guilleiguaran Avoid extra call to Cache#read in case of a fragment cache hit e54d9c1
Aaron Patterson 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
Arun Agrawal arunagw It should be in Json format to work with JsonGem a13317d
Santiago Pastorino spastorino Merge pull request #1901 from arunagw/json_parse
It should be in Json format to work with JsonGem
39d5350
Santiago Pastorino spastorino Update CI config 3d0fde5
Santiago Pastorino spastorino Allow CI to use the latest rubygems version 9663fad
Bogdan Gusiev bogdan Fixed ActionView::FormOptionsHelper#select with :multiple => false
(cherry picked from commit 0fdac01)

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
c314203
Simon Baird 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
Andrew White pixeltrix The rails gem doesn't have a lib directory. 3001728
Andrew White pixeltrix Revert "The rails gem doesn't have a lib directory."
RubyGems requires at least one require_path.

This reverts commit 3001728.
1b03f7f
Santiago Pastorino spastorino Merge pull request #1894 from arunagw/fix_test_for_jruby_db-3-0-stable
Fix test for jruby db 3 0 stable
7ff32e2
Santiago Pastorino spastorino Merge pull request #1952 from simonbaird/3-0-stable
rake db:test:purge creates mysql database with wrong charset & collation
2f3eb7a
Santiago Pastorino spastorino Merge pull request #1837 from msgehard/3-0-stable
Fix for empty string assigned to _type column of polymorphic association
9e4d156
Krzysztof Knapik 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
Santiago Pastorino spastorino Merge pull request #2004 from knapo/3-0-stable
Backport of #1997
e9f2c67
Guillermo Iguaran 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
Thong Kuah 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
Jon Leighton jonleighton Merge pull request #1797 from kuahyeow/3-0-stable
Through association condition clobbers join condition
fc4bce1
Aaron Patterson tenderlove Merge pull request #1607 from bradrobertson/pg_adapter
fix table_exists? in postgresql adapter to always use current search_path
9a4d2b2
Lauri Hahne lhahne fixed CacheHelper to properly support html_safe output buffers c476a6b
Evan Light elight Fixes #2064
Backport of cache_key fix from master
b1b5d18
Santiago Pastorino spastorino Merge pull request #2064 from elight/3-0-stable
Backports cache_key fix from master
247a50b
Lauri Hahne 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
Lauri Hahne lhahne made sure that the possible new output_buffer created by CacheHelper …
…is of the same type as the original
39a4f67
Prem Sichanugrist sikachu Fix a wrong assertion on url_helper_test, and refactor `html_safe` te…
…st to be in its method
2cb29fa
Santiago Pastorino 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
Jesse Storimer 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
Santiago Pastorino 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
Josh Kalderimis 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
Josh Kalderimis 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
Aaron Patterson

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
Xavier Noria fxn I actually love well-formed Gemfiles 80b1f9e
Karunakar (Ruby) Karunakar Duplicate tests removed. bd804d7
Santiago Pastorino spastorino Merge pull request #2183 from castlerock/3-0-stable-duplicate_test
3 0 stable duplicate test
c39bd5f
Arun Agrawal arunagw fixed task for rake test:uncommitted b490fd8
Santiago Pastorino spastorino Merge pull request #2205 from arunagw/test_un_3_0_stable
rake test:uncommitted for 3-0-stable
19d9689
Santiago Pastorino spastorino Merge pull request #2080 from lhahne/3-0-stable
Fix improper detection and handling of html_safe buffer in CacheHelper
eead13f
Arun Agrawal arunagw Fix rake rails:template to tell user to pass LOCATION variable. edfcf47
Santiago Pastorino spastorino Merge pull request #2249 from arunagw/rake_template_path_fix
Rake template path fix
56c663b
Josh Kalderimis joshk enable Travis CI irc notifications to #rails-contrib on irc.freenode.org 64c269a
Santiago Pastorino spastorino Merge pull request #2289 from joshk/3-0-stable
More Irc notifications (from Travis with love, again)
e18e896
Santiago Pastorino spastorino Remove cruise files 43e6f82
Xavier Noria fxn contrib app minor tweak e93cff8
Akira Matsuda amatsuda callback methods are Class methods a8aa666
Santiago Pastorino spastorino Merge pull request #2320 from amatsuda/callback_deprecation_message
callback methods are Class methods
a33fe79
Aaron Patterson tenderlove dump IO encoding value along with schema.rb so the file can be reload…
…ed. fixes #1592
6c0beb5
Bhavin bhavinkamani fix connection not established error while running rake task
db:schema:dump
5d7ed7a
Aaron Patterson tenderlove default writing the schema file as utf-8 3676af4
Aaron Patterson tenderlove updating changelog with schema.rb changes 6631abd
Aaron Patterson tenderlove delay backtrace scrubbing until we actually raise an exception. fixes #… b9f6798
Aaron Patterson tenderlove updating the CHANGELOG 553d9ea
Arun Agrawal arunagw skiping magic comment test. checking encoding_aware?
Loading AS encoding.
b0334db
Santiago Pastorino spastorino Merge pull request #2374 from arunagw/30_schema_dumper_test_fix
3-0-stable schema dumper test fix
cb36585
Vijay Dev vijaydev fixes #2368. rake about not showing the middleware, db adapter and db…
… schema version
773d219
Santiago Pastorino spastorino Merge pull request #2381 from vijaydev/rakeaboutfix3.0
Fix #2368 (3-0-stable)
564d39e
Santiago Pastorino spastorino Merge pull request #2393 from bdurand/fix_cache_read_multi
Fix ArgumentError in ActiveSupport::Cache::CacheStore.read_multi
a173bb3
Jon Leighton 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
Aaron Patterson tenderlove we should not ignore all gems in here df6b1e2
Aaron Patterson tenderlove updating CHANGELOGs f54d0cf
Xavier Noria fxn backports doc fix 9f9446f e0b0da2
Aaron Patterson tenderlove more changelog updates 9d17458
Aaron Patterson 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
Santiago Pastorino spastorino Merge pull request #2450 from guilleiguaran/activesupport-gzip-1.8
Fix ActiveSupport::Gzip under Ruby 1.8.7. Closes #2416
65a648b
Jason Weathered 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
Santiago Pastorino spastorino Merge pull request #2494 from grzuy/3-0-stable
Porting changes on form_tag method signature to 3-0-stable
f45c372
Jon Leighton jonleighton Update travis config on @joshk's instructions 4c8a211
Aaron Patterson tenderlove Properly escape glob characters. e0c03f8
Aaron Patterson tenderlove prevent sql injection attacks by escaping quotes in column names fb4747b
Aaron Patterson tenderlove Tags with invalid names should also be stripped in order to prevent
XSS attacks.  Thanks Sascha Depold for the report.
3480d97
Aaron Patterson tenderlove properly subsituting bad utf8 characters b45dfc7
Aaron Patterson tenderlove bumping rails to 3.0.10 4f15f39
Aaron Patterson 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
Bert Goethals

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
José Valim josevalim Edited .travis.yml via GitHub 0ebdef2
Santiago Pastorino spastorino Merge pull request #2524 from JonathonMA/fix_ecd37084b28a05f05251
Use mysql_creation_options inside rescue block
c8ec8f7
Aaron Patterson tenderlove Merge pull request #1995 from guilleiguaran/prototype-ujs-fix
Prototype rails.js fixes for 3-0-stable
d7d0c25
Jonathan del Strother 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
Vijay Dev
Collaborator

a PR that went bad?

Jonathan del Strother

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.