annotate_models 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/lib/annotate_models/model_annotation_generator.rb +1 -0
- data/lib/annotate_models/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fb388dbc9aa769b9fcc1d2807b79df97f3a407a
|
4
|
+
data.tar.gz: d1255c67fc2f7dbcce4789c92b5f9571b3066e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0282eedcbf64ea8f33af71d86ac8e23367439cd45727150e4193dc1ee8ecbbf7ccb322fe00b4eda5f8e55b4c2f5b97073c26c5a622d0bd7de0bfe9ad8601b388
|
7
|
+
data.tar.gz: 7b5aa82c9f52ae110b517aa546ce4fa0ad4171db40da44da05d3dbd3601e4f0cc5707441d47b538fe57c5b7ad2c48071e9ada42a1a8adc0110b0078d346be5a2
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ gem install annotate_models"
|
|
23
23
|
Run this command from the root folder of your Rails application:
|
24
24
|
|
25
25
|
```
|
26
|
-
rake annotate
|
26
|
+
rake annotate
|
27
27
|
```
|
28
28
|
|
29
29
|
For details, run ```rake -T```.
|
@@ -36,3 +36,11 @@ I first learned to love the functionality of Dave Thomas' annotate_models plugin
|
|
36
36
|
as an exercise.
|
37
37
|
|
38
38
|
So thanks go out to Pragmatic Dave as well as to the author and contributors of ctran/annotate_models.
|
39
|
+
|
40
|
+
## Contribution
|
41
|
+
|
42
|
+
Feel free to fork or clone this repository.
|
43
|
+
|
44
|
+
## Workflow
|
45
|
+
|
46
|
+
I used the following commands in my workflow when working on this gem:
|
@@ -60,6 +60,7 @@ module AnnotateModels
|
|
60
60
|
Dir["app/models/*.rb"].each do |path|
|
61
61
|
result = File.basename(path).scan(/^(.+)\.rb/)[0][0]
|
62
62
|
model = eval(ActiveSupport::Inflector.camelize(result))
|
63
|
+
next if model.respond_to? :abstract_class && model.abstract_class
|
63
64
|
next unless model < ActiveRecord::Base
|
64
65
|
@annotations[model] = generate_annotation(model) unless @annotations.keys.include?(model)
|
65
66
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: annotate_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Brazil
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.5.1
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Simple gem that adds several rake tasks to annotate Rails source files with
|