rails 4.1.11 → 4.1.12.rc1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7480dd0e66b5b820ec3332183de3c7a8774ca09
|
4
|
+
data.tar.gz: 34da0760c632cd79dce741b346a76bdfdb5cd8cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 354dca3ce0f20dea63f113d9e90053b7f1f59ad166f2d2c0103ff0892ab72a5f4226d4647c4e581b3836be3e538acf3d27e32ca803875c5d53b5faeb018a5f22
|
7
|
+
data.tar.gz: 401b8d34aa1d5e4edddecdcbbf51469c0d3b33de8f591bb017065960a86298ae4e00afde71f809699cb2dad76a5390adb17479c2739f842975617f8cec04f803
|
data/guides/CHANGELOG.md
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Activate the gems you are reporting the issue against.
|
2
|
+
gem 'activesupport', '4.0.0'
|
3
|
+
require 'active_support'
|
4
|
+
require 'active_support/core_ext/object/blank'
|
5
|
+
require 'minitest/autorun'
|
6
|
+
|
7
|
+
# Ensure backward compatibility with Minitest 4
|
8
|
+
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
9
|
+
|
10
|
+
class BugTest < Minitest::Test
|
11
|
+
def test_stuff
|
12
|
+
assert "zomg".present?
|
13
|
+
refute "".present?
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
unless File.exist?('Gemfile')
|
2
|
+
File.write('Gemfile', <<-GEMFILE)
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
gem 'rails', github: 'rails/rails'
|
5
|
+
gem 'arel', github: 'rails/arel'
|
6
|
+
GEMFILE
|
7
|
+
|
8
|
+
system 'bundle'
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'bundler'
|
12
|
+
Bundler.setup(:default)
|
13
|
+
|
14
|
+
require 'active_support'
|
15
|
+
require 'active_support/core_ext/object/blank'
|
16
|
+
require 'minitest/autorun'
|
17
|
+
|
18
|
+
# Ensure backward compatibility with Minitest 4
|
19
|
+
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
20
|
+
|
21
|
+
class BugTest < Minitest::Test
|
22
|
+
def test_stuff
|
23
|
+
assert "zomg".present?
|
24
|
+
refute "".present?
|
25
|
+
end
|
26
|
+
end
|
@@ -3003,53 +3003,6 @@ The method `Range#overlaps?` says whether any two given ranges have non-void int
|
|
3003
3003
|
|
3004
3004
|
NOTE: Defined in `active_support/core_ext/range/overlaps.rb`.
|
3005
3005
|
|
3006
|
-
Extensions to `Proc`
|
3007
|
-
--------------------
|
3008
|
-
|
3009
|
-
### `bind`
|
3010
|
-
|
3011
|
-
As you surely know Ruby has an `UnboundMethod` class whose instances are methods that belong to the limbo of methods without a self. The method `Module#instance_method` returns an unbound method for example:
|
3012
|
-
|
3013
|
-
```ruby
|
3014
|
-
Hash.instance_method(:delete) # => #<UnboundMethod: Hash#delete>
|
3015
|
-
```
|
3016
|
-
|
3017
|
-
An unbound method is not callable as is, you need to bind it first to an object with `bind`:
|
3018
|
-
|
3019
|
-
```ruby
|
3020
|
-
clear = Hash.instance_method(:clear)
|
3021
|
-
clear.bind({a: 1}).call # => {}
|
3022
|
-
```
|
3023
|
-
|
3024
|
-
Active Support defines `Proc#bind` with an analogous purpose:
|
3025
|
-
|
3026
|
-
```ruby
|
3027
|
-
Proc.new { size }.bind([]).call # => 0
|
3028
|
-
```
|
3029
|
-
|
3030
|
-
As you see that's callable and bound to the argument, the return value is indeed a `Method`.
|
3031
|
-
|
3032
|
-
NOTE: To do so `Proc#bind` actually creates a method under the hood. If you ever see a method with a weird name like `__bind_1256598120_237302` in a stack trace you know now where it comes from.
|
3033
|
-
|
3034
|
-
Action Pack uses this trick in `rescue_from` for example, which accepts the name of a method and also a proc as callbacks for a given rescued exception. It has to call them in either case, so a bound method is returned by `handler_for_rescue`, thus simplifying the code in the caller:
|
3035
|
-
|
3036
|
-
```ruby
|
3037
|
-
def handler_for_rescue(exception)
|
3038
|
-
_, rescuer = Array(rescue_handlers).reverse.detect do |klass_name, handler|
|
3039
|
-
...
|
3040
|
-
end
|
3041
|
-
|
3042
|
-
case rescuer
|
3043
|
-
when Symbol
|
3044
|
-
method(rescuer)
|
3045
|
-
when Proc
|
3046
|
-
rescuer.bind(self)
|
3047
|
-
end
|
3048
|
-
end
|
3049
|
-
```
|
3050
|
-
|
3051
|
-
NOTE: Defined in `active_support/core_ext/proc.rb`.
|
3052
|
-
|
3053
3006
|
Extensions to `Date`
|
3054
3007
|
--------------------
|
3055
3008
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.12.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.
|
19
|
+
version: 4.1.12.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.
|
26
|
+
version: 4.1.12.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionpack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.
|
33
|
+
version: 4.1.12.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.
|
40
|
+
version: 4.1.12.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionview
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.1.
|
47
|
+
version: 4.1.12.rc1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.1.
|
54
|
+
version: 4.1.12.rc1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activemodel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.1.
|
61
|
+
version: 4.1.12.rc1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.1.
|
68
|
+
version: 4.1.12.rc1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activerecord
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.1.
|
75
|
+
version: 4.1.12.rc1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.1.
|
82
|
+
version: 4.1.12.rc1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: actionmailer
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 4.1.
|
89
|
+
version: 4.1.12.rc1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 4.1.
|
96
|
+
version: 4.1.12.rc1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: railties
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 4.1.
|
103
|
+
version: 4.1.12.rc1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 4.1.
|
110
|
+
version: 4.1.12.rc1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: bundler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -294,6 +294,8 @@ files:
|
|
294
294
|
- guides/bug_report_templates/action_controller_master.rb
|
295
295
|
- guides/bug_report_templates/active_record_gem.rb
|
296
296
|
- guides/bug_report_templates/active_record_master.rb
|
297
|
+
- guides/bug_report_templates/generic_gem.rb
|
298
|
+
- guides/bug_report_templates/generic_master.rb
|
297
299
|
- guides/code/getting_started/Gemfile
|
298
300
|
- guides/code/getting_started/Gemfile.lock
|
299
301
|
- guides/code/getting_started/README.rdoc
|