annotate 2.5.0.pre3 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -7
- data/README.rdoc +1 -1
- data/lib/annotate/annotate_models.rb +4 -3
- data/lib/annotate/version.rb +1 -1
- metadata +6 -6
data/History.txt
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
* Works better with Rails 3
|
4
4
|
* Bugfix: schema kept prepending additional newlines
|
5
5
|
* Updates to make annotate smarter about when to touch a model
|
6
|
-
* Recognize column+type, and don't change a file unless the column+type combination of the new schema are different than that of the old (i.e., don't regenerate if columns happen to be in a different order. That's just how life is sometimes)
|
6
|
+
* Recognize column+type, and don't change a file unless the column+type combination of the new schema are different than that of the old (i.e., don't regenerate if columns happen to be in a different order. That's just how life is sometimes.)
|
7
7
|
* Grab old specification even if it has \r\n as line endings rather than pure \ns
|
8
8
|
* Various warning and specification fixes
|
9
9
|
* Fix "no such file to load -- annotate/annotate_models (MissingSourceFile)" error (require statements in tasks now use full path to lib files)
|
@@ -17,7 +17,6 @@
|
|
17
17
|
* Leave magic encoding comment intact
|
18
18
|
* Fix issue #14 - RuntimeError: Already memoized
|
19
19
|
* Count a model as 'annotated' if any of its tests/fixtures are annotated
|
20
|
-
* Support FactoryGirl
|
21
20
|
* Support :change migrations (Rails 3.1)
|
22
21
|
* Allow models with non-standard capitalization
|
23
22
|
* Widen type column so we can handle longtexts with chopping things off.
|
@@ -39,13 +38,10 @@
|
|
39
38
|
non-standard capitalization.
|
40
39
|
Note that this still requires that the inflector be configured to understand
|
41
40
|
the special case.
|
42
|
-
* Shore up test cases a bit.
|
43
41
|
* Merge against many of the older branches on Github whose functionality is
|
44
42
|
already reflected to reduce confusion about what is and is not implemented
|
45
43
|
here.
|
46
44
|
* Accept String or Symbol for :position (et al) options.
|
47
|
-
* Rename "annotate" bin to "annotate_models" to avoid conflicting with
|
48
|
-
ImageMagick.
|
49
45
|
* Add RDoc output formatting as an option.
|
50
46
|
* Add Markdown output formatting as an option.
|
51
47
|
* Add option to force annotation regeneration.
|
@@ -58,10 +54,12 @@
|
|
58
54
|
* Fix handling of files with no trailing newline when putting annotations at
|
59
55
|
the end of the file.
|
60
56
|
* Now works on tables with no primary key.
|
61
|
-
*
|
57
|
+
* --format=markdown option
|
58
|
+
* --trace option to help debug "Unable to annotate" errors
|
62
59
|
* "Table name" annotation (if table name is different from model name)
|
63
60
|
* "Human name" annotation (enabling translation to non-English locales)
|
64
|
-
*
|
61
|
+
* Fix JRuby ObjectSpace compatibility bug (https://github.com/ctran/annotate_models/pull/85)
|
62
|
+
* Fix FactoryGirl compatibility bug (https://github.com/ctran/annotate_models/pull/82)
|
65
63
|
|
66
64
|
== 2.4.2 2009-11-21
|
67
65
|
|
data/README.rdoc
CHANGED
@@ -316,11 +316,12 @@ module AnnotateModels
|
|
316
316
|
|
317
317
|
# Retrieve loaded model class by path to the file where it's supposed to be defined.
|
318
318
|
def get_loaded_model(model_path)
|
319
|
-
ObjectSpace.each_object.
|
320
|
-
select
|
319
|
+
ObjectSpace.each_object(::Class).
|
320
|
+
select do |c|
|
321
321
|
Class === c and # note: we use === to avoid a bug in activesupport 2.3.14 OptionMerger vs. is_a?
|
322
|
+
c.ancestors.respond_to?(:include?) and # to fix FactoryGirl bug, see https://github.com/ctran/annotate_models/pull/82
|
322
323
|
c.ancestors.include?(ActiveRecord::Base)
|
323
|
-
|
324
|
+
end.
|
324
325
|
detect { |c| ActiveSupport::Inflector.underscore(c) == model_path }
|
325
326
|
end
|
326
327
|
|
data/lib/annotate/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: annotate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.0
|
5
|
-
prerelease:
|
4
|
+
version: 2.5.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cuong Tran
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-07-
|
15
|
+
date: 2012-07-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -74,13 +74,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash:
|
77
|
+
hash: 3303794202298947958
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
81
|
-
- - ! '
|
81
|
+
- - ! '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project: annotate
|
86
86
|
rubygems_version: 1.8.21
|