annotate_models 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/lib/annotate_models/model_annotation_generator.rb +1 -1
- data/lib/annotate_models/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c86f26d19656e179ca6c93a814e03e28994a561d
|
|
4
|
+
data.tar.gz: 4351b8d7bd27c9c6001bedc396fe2deb0733b23c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1dc443ab73686ffe1e87e0781a78003e92d97364015ab38a33ec475c94412d83781943fab6a9f440f8211ee6c9c999026d5909710a51523c1bcfc86b4f874b0c
|
|
7
|
+
data.tar.gz: 927a21e253f73e822ff5162812a4587b855531f09b56a7d2b74007dd3233a0d9937793a4fa083c2ce88b45375bc4c5aae6b7bbbab3037acf949175d99b7b7e9f
|
data/README.md
CHANGED
|
@@ -43,4 +43,15 @@ Feel free to fork or clone this repository.
|
|
|
43
43
|
|
|
44
44
|
## Workflow
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
To build the gem, execute these commands:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
gem build annotate_models.gemspec
|
|
50
|
+
mv annotate_models-*.gem pkg/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
To publish the gem, execute this command:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
gem push pkg/annotate_models-<version>.gem
|
|
57
|
+
```
|
|
@@ -60,7 +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?
|
|
63
|
+
next if model.respond_to?(:abstract_class) && model.abstract_class
|
|
64
64
|
next unless model < ActiveRecord::Base
|
|
65
65
|
@annotations[model] = generate_annotation(model) unless @annotations.keys.include?(model)
|
|
66
66
|
end
|