1. 19 4月, 2017 10 次提交
    • R
      Fix `extract_expression_for_virtual_column` for MariaDB · 7695f35b
      Ryuta Kamizono 提交于
      I'm not sure why `Mysql2VirtualColumnTest#test_schema_dumping` passed
      previously. But now the test not pass at least in MariaDB 10.1.9.
      I fixed the regexp to respect `COLLATE`.
      
      ```
      % ARCONN=mysql2 be ruby -w -Itest test/cases/adapters/mysql2/virtual_column_test.rb -n test_schema_dumping
      Using mysql2
      Run options: -n test_schema_dumping --seed 7131
      
      F
      
      Finished in 0.466304s, 2.1445 runs/s, 4.2890 assertions/s.
      
        1) Failure:
      Mysql2VirtualColumnTest#test_schema_dumping [test/cases/adapters/mysql2/virtual_column_test.rb:55]:
      Expected /t\.virtual\s+"upper_name",\s+type: :string,\s+as: "UPPER\(`name`\)"$/i to match "# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementally modify your database, and then regenerate this schema definition.\n#\n# Note that this schema.rb definition is the authoritative source for your\n# database schema. If you need to create the application database on another\n# system, you should be using db:schema:load, not running all the migrations\n# from scratch. The latter is a flawed and unsustainable approach (the more migrations\n# you'll amass, the slower it'll run and the greater likelihood for issues).\n#\n# It's strongly recommended that you check this file into your version control system.\n\nActiveRecord::Schema.define(version: 0) do\n\n  create_table \"virtual_columns\", force: :cascade, options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\" do |t|\n    t.string \"name\"\n    t.virtual \"upper_name\", type: :string, as: \n    t.virtual \"name_length\", type: :integer, as: \"LENGTH(`name`)\", stored: true\n  end\n\nend\n".
      
      1 runs, 2 assertions, 1 failures, 0 errors, 0 skips
      ```
      
      ```
      > select @@version;
      +--------------------+
      | @@version          |
      +--------------------+
      | 10.1.9-MariaDB-log |
      +--------------------+
      1 row in set (0.00 sec)
      ```
      7695f35b
    • R
      791f2016
    • R
      Merge pull request #28791 from y-yagi/date_time_fields_from_list · dc107956
      Rafael França 提交于
      Remove datetime fields from helper list [ci skip]
      dc107956
    • Y
      Remove datetime fields from helper list [ci skip] · 2b82e965
      yuuji.yaginuma 提交于
      The `datetime_field` is an alias of the `datetime_local_field`, there is
      no helper to generate datetime fields.
      Ref: #25469
      2b82e965
    • R
      Merge pull request #28161 from bogdanvlviv/add_test_attributes · a2ab5ffa
      Rafael França 提交于
      Add test for  method `#attributes`
      a2ab5ffa
    • R
      Merge pull request #28790 from tjschuck/require_as_time_in_testing_time_helpers · 48c5139a
      Rafael França 提交于
      Explicitly require AS::Time in AS::Testing::TimeHelpers
      48c5139a
    • R
      Merge pull request #28781 from mtsmfm/sum · c30eddb8
      Rafael França 提交于
      Fix Enumerable#sum redefined warning
      c30eddb8
    • T
      Explicitly require AS::Time in AS::Testing::TimeHelpers · 1d82b7ce
      T.J. Schuck 提交于
      If you just try to use `ActiveSupport::Testing::TimeHelpers` standalone by requiring `active_support/testing/time_helpers`, you currently get an error: `NoMethodError: undefined method `change' for 2017-12-14 01:04:44 -0500:Time`
      
      9f6e82ee added a dependency on `AS::Time` by using `AS::Time#change`.
      
      Here's a script to reproduce the error:
      
      ```ruby
      require "bundler/inline"
      
      gemfile(true) do
        source "https://rubygems.org"
        gem "activesupport", github: "rails/rails"
      end
      
      require "active_support/testing/time_helpers"
      
      require "minitest/autorun"
      
      class BugTest < Minitest::Test
        include ActiveSupport::Testing::TimeHelpers
      
        def test_stuff
          travel_to Time.new(2017, 12, 14, 01, 04, 44) do
            assert true
          end
        end
      end
      ```
      
      It currently fails for all 5.x.x versions and master.  Ideally, this would be backported to `5-0-stable` and `5-1-stable` as well.
      1d82b7ce
    • R
      Revert "Merge pull request #28788 from tjschuck/require_as_notifications_in_cache" · 5e2b4197
      Rafael Mendonça França 提交于
      This reverts commit b86631d9, reversing
      changes made to 8776a713.
      
      ActiveSupport::Notifications is loaded using autoload that is defined by
      the top level file of `active_support`. All the frameworks of Rails
      requires the top level files before using any of the others files inside
      the framework because the top level file is what setup the autoload
      hooks and require the common dependencies.
      5e2b4197
    • A
      Merge pull request #28788 from tjschuck/require_as_notifications_in_cache · b86631d9
      Andrew White 提交于
      Explicitly require AS::Notifications in AS::Cache
      b86631d9
  2. 18 4月, 2017 7 次提交
  3. 17 4月, 2017 10 次提交
  4. 16 4月, 2017 9 次提交
  5. 15 4月, 2017 4 次提交