fortitude 0.9.2-java → 0.9.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/CONTRIBUTORS.md +3 -0
- data/fortitude.gemspec +1 -0
- data/lib/fortitude/version.rb +1 -1
- data/lib/fortitude/widget/modules_and_subclasses.rb +8 -3
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 467436a25faae7e85366ea30823ff7347b3db824
|
4
|
+
data.tar.gz: ab92630c1074a321afd13e52d525b065cf964df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b36a5556e62012835d1b0c283cdb6457eb2d292137ae153e3c0da268df71334a64082fa29698742f2973e702ea9c305ef70ed888a8ca777865dc1929deb25e6f
|
7
|
+
data.tar.gz: e7eb439ae801b5defebc88d85fa5c2a02fe67f5c7f2e06098e6819f524abd462629a30a878a246c40bd59862de14b7f6d9cc62a56c8a26d7677c9cffbd488686
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Fortitude Releases
|
2
2
|
|
3
|
+
## 0.9.3, 2 February 2015
|
4
|
+
|
5
|
+
* Fixed a memory leak when using `render :inline`, or certain other cases triggered by a user. (Fortitude widget
|
6
|
+
classes know about all their subclasses, in order to enable proper propagation of configuration changes.
|
7
|
+
If you created a subclass of a Fortitude widget that was intended to be single-use or otherwise temporary, it would
|
8
|
+
not get garbage-collected, since its superclass would still maintain a reference to it. Fortitude now uses the
|
9
|
+
[ref](https://github.com/ruby-concurrency/ref) gem in order to make this a weak reference, hence allowing it to
|
10
|
+
be garbage-collected. `render :inline` creates a temporary subclass of a Fortitude widget, thus triggering exactly
|
11
|
+
this issue.)
|
12
|
+
|
3
13
|
## 0.9.2, 22 January 2015
|
4
14
|
|
5
15
|
* Began writing lots of documentation for Fortitude, beginning with the reasons why you should use it.
|
data/CONTRIBUTORS.md
CHANGED
@@ -32,6 +32,9 @@ Fortitude is written by [Andrew Geweke](https://github.com/ageweke), with contri
|
|
32
32
|
* Reporting a bug where doing something like `div(nil, :class => 'foo')` would produce just `<div></div>` instead of
|
33
33
|
the desired `<div class="foo"></div>`.
|
34
34
|
* Reporting an issue where `return`ing from inside a block passed to a tag method would not render the closing tags.
|
35
|
+
* Reporting, and helping verify, an issue where creating anonymous subclasses of a Fortitude widget class (like
|
36
|
+
those used by `render :inline`) would cause those anonymous subclasses to never be garbage collected, causing
|
37
|
+
a memory leak.
|
35
38
|
* [Adam Becker](https://github.com/ajb) for:
|
36
39
|
* Discussion and details around exactly what `:attribute => true`, `:attribute => false`, and so on should render
|
37
40
|
from Fortitude.
|
data/fortitude.gemspec
CHANGED
data/lib/fortitude/version.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'active_support'
|
2
2
|
require 'active_support/concern'
|
3
3
|
|
4
|
+
require 'ref'
|
5
|
+
|
4
6
|
require 'fortitude/tags/tags_module'
|
5
7
|
|
6
8
|
module Fortitude
|
@@ -28,14 +30,17 @@ module Fortitude
|
|
28
30
|
|
29
31
|
# INTERNAL USE ONLY
|
30
32
|
def direct_subclasses
|
31
|
-
@direct_subclasses
|
33
|
+
@direct_subclasses ||= [ ]
|
34
|
+
@direct_subclasses.delete_if { |ref| (! ref.object) }
|
35
|
+
@direct_subclasses.map { |ref| ref.object }
|
32
36
|
end
|
33
37
|
private :direct_subclasses
|
34
38
|
|
35
39
|
# INTERNAL USE ONLY -- RUBY CALLBACK
|
36
40
|
def inherited(subclass)
|
37
|
-
|
38
|
-
|
41
|
+
unless direct_subclasses.detect { |sc| sc.equal?(subclass) }
|
42
|
+
@direct_subclasses << ::Ref::WeakReference.new(subclass)
|
43
|
+
end
|
39
44
|
end
|
40
45
|
|
41
46
|
# INTERNAL USE ONLY
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortitude
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Andrew Geweke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
version: '3.0'
|
25
25
|
prerelease: false
|
26
26
|
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ref
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.5
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 1.0.5
|
39
|
+
prerelease: false
|
40
|
+
type: :runtime
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
version_requirements: !ruby/object:Gem::Requirement
|