1. 28 6月, 2016 14 次提交
  2. 27 6月, 2016 8 次提交
  3. 26 6月, 2016 8 次提交
  4. 25 6月, 2016 10 次提交
    • R
      Tiny documentation fixes [ci skip] · eb1c0e22
      Robin Dupret 提交于
      Fix a tiny typo and vertical-align some return results in the
      ActiveModel::Errors documentation.
      eb1c0e22
    • R
      Define `Pathname#as_json` · abbf00e5
      Ryunosuke Sato 提交于
      When the Pathname object is converted as JSON,
      it should be a string that means itself.
      
      Expected:
      ```
      >> Pathname.new('/path/to/somewhere.txt').as_json
      "/path/to/somewhere.txt"
      ```
      
      Actual:
      ```
      >> Pathname.new('/path/to/somewhere.txt').as_json
      {"path"=>"/path/to/somewhere.txt"}
      ```
      abbf00e5
    • R
      Remove unnecessary `assert_valid_default` · 59c218ea
      Ryuta Kamizono 提交于
      This was added at c7c3f73f but it never raised because MySQL cannot
      create text/blob columns with a default value.
      59c218ea
    • G
      Merge pull request #25350 from tricknotes/uri-generic-as-json · 6da5f6b4
      Godfrey Chan 提交于
      Define `URI::Generic#as_json`
      6da5f6b4
    • K
      Extract method to share path expansion logic. · cbceb78f
      Kasper Timm Hansen 提交于
      Then just yield the location for the place where we need some extra processing.
      cbceb78f
    • K
      Simplify `as` passed check. · 0e8b4e11
      Kasper Timm Hansen 提交于
      `if !var.nil?` is the same as just `if var`
      0e8b4e11
    • K
      Merge pull request #25435 from y-yagi/make_as_option_work_with_get_parameters · 17c1c9f1
      Kasper Timm Hansen 提交于
      make `as` option work with get parameters
      17c1c9f1
    • R
      Define `URI::Generic#as_json` · 236e6166
      Ryunosuke Sato 提交于
      When the URI object is converted as JSON,
      it is expected that it is a string that means its URI.
      
      Expected:
      ```
      >> URI.parse('http://example.com').as_json
      "http://example.com"
      ```
      
      Actual:
      ```
      >> URI.parse('http://example.com').as_json
      {"scheme"=>"http",
       "user"=>nil,
       "password"=>nil,
       "host"=>"example.com",
       "port"=>80,
       "path"=>"",
       "query"=>nil,
       "opaque"=>nil,
       "fragment"=>nil,
       "parser"=>
        {"regexp"=>
          {"SCHEME"=>"(?-mix:\\A[A-Za-z][A-Za-z0-9+\\-.]*\\z)",
           "USERINFO"=>"(?-mix:\\A(?:%\\h\\h|[!$&-.0-;=A-Z_a-z~])*\\z)",
           "HOST"=>
            "(?-mix:\\A(?:(?<IP-literal>\\[(?:(?<IPv6address>(?:\\h{1,4}:){6}(?<ls32>\\h{1,4}:\\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]|\\d)\\.\\g<dec-octet>\\.\\g<dec-octet>\\.\\g<dec-octet>))|::(?:\\h{1,4}:){5}\\g<ls32>|\\h{,4}::(?:\\h{1,4}:){4}\\g<ls32>|(?:(?:\\h{1,4}:)?\\h{1,4})?::(?:\\h{1,4}:){3}\\g<ls32>|(?:(?:\\h{1,4}:){,2}\\h{1,4})?::(?:\\h{1,4}:){2}\\g<ls32>|(?:(?:\\h{1,4}:){,3}\\h{1,4})?::\\h{1,4}:\\g<ls32>|(?:(?:\\h{1,4}:){,4}\\h{1,4})?::\\g<ls32>|(?:(?:\\h{1,4}:){,5}\\h{1,4})?::\\h{1,4}|(?:(?:\\h{1,4}:){,6}\\h{1,4})?::)|(?<IPvFuture>v\\h+\\.[!$&-.0-;=A-Z_a-z~]+))\\])|\\g<IPv4address>|(?<reg-name>(?:%\\h\\h|[!$&-.0-9;=A-Z_a-z~])*))\\z)",
           "ABS_PATH"=>
            "(?-mix:\\A\\/(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~])*(?:\\/(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~])*)*\\z)",
           "REL_PATH"=>
            "(?-mix:\\A(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~])+(?:\\/(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~])*)*\\z)",
           "QUERY"=>"(?-mix:\\A(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~\\/?])*\\z)",
           "FRAGMENT"=>"(?-mix:\\A(?:%\\h\\h|[!$&-.0-;=@-Z_a-z~\\/?])*\\z)",
           "OPAQUE"=>"(?-mix:\\A(?:[^\\/].*)?\\z)",
           "PORT"=>
            "(?-mix:\\A[\\x09\\x0a\\x0c\\x0d ]*\\d*[\\x09\\x0a\\x0c\\x0d ]*\\z)"}}}
      ```
      236e6166
    • G
      Merge pull request #23011 from arnvald/bugfix/correctly_parse_date · 3a9428df
      Godfrey Chan 提交于
      Use correct timezone when parsing date in json
      3a9428df
    • Y
      make `as` option work with get parameters · e130ce45
      yuuji.yaginuma 提交于
      Currently, if path is a relative path, add format without the discrimination of the query.
      Therefore, if there is a query, format at end of the query would been added,
      format was not be specified correctly.
      
      This fix add format to end of path rather than query.
      e130ce45