annotated 0.0.2 → 0.1.0
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 +19 -13
- data/bin/annotate +2 -2
- data/lib/annotated/version.rb +1 -1
- data/lib/annotated.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c85b0403da4d884cb9bcad2c582deea76061b27f6cc5698eb71412d6dcacf63e
|
4
|
+
data.tar.gz: 4deb819b9a5c8c6a17a5c8acf93f33d3a2c6d10c5c536a18503b81fdfbb03669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1cd2a160906a20a2e3e5ff6d334424acd2dbcad7d22711995cd04981cc0395b1a4e463e2ddcfd1d0042dc21746462dee0bd4a0e6a94f3b113aabb574aae7c42
|
7
|
+
data.tar.gz: 187a89fca82c468eece48c5302686fcb7ea10b387a0ac62e8981cca0be073aa66119eeff593a5db6f42e4f03d391a4b6db26a91aec5672d8fe53e7cd540b74f7
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
> This is a fork of the [annotate](https://github.com/ctran/annotate_models) gem, created to provide ongoing maintenance and updates while maintaining drop-in compatibility. This fork was created in response to the original gem's maintenance status (see [discussion](https://github.com/ctran/annotate_models/issues/1028)) and serves as an alternative to [annotaterb](https://github.com/drwl/annotaterb) which introduces breaking changes.
|
4
4
|
>
|
5
|
-
> Unlike annotaterb, this gem aims to be a direct drop-in replacement for the original annotate gem, allowing users to migrate without any
|
5
|
+
> Unlike annotaterb, this gem aims to be a direct drop-in replacement for the original annotate gem, allowing users to migrate without any changes to their existing configuration or workflow.
|
6
6
|
|
7
7
|
|
8
8
|
[](http://badge.fury.io/rb/annotated)
|
@@ -111,29 +111,35 @@ Into environment gems from rubygems.org:
|
|
111
111
|
### Usage in Rails
|
112
112
|
|
113
113
|
To annotate all your models, tests, fixtures, and factories:
|
114
|
-
|
114
|
+
```bash
|
115
115
|
cd /path/to/app
|
116
|
-
annotate
|
116
|
+
bundle exec annotate
|
117
|
+
```
|
117
118
|
|
118
119
|
To annotate just your models, tests, and factories:
|
119
|
-
|
120
|
-
annotate --models --exclude fixtures
|
120
|
+
```bash
|
121
|
+
bundle exec annotate --models --exclude fixtures
|
122
|
+
```
|
121
123
|
|
122
124
|
To annotate just your models:
|
123
|
-
|
124
|
-
annotate --models
|
125
|
+
```bash
|
126
|
+
bundle exec annotate --models
|
127
|
+
```
|
125
128
|
|
126
129
|
To annotate routes.rb:
|
127
|
-
|
128
|
-
annotate --routes
|
130
|
+
```bash
|
131
|
+
bundle exec annotate --routes
|
132
|
+
```
|
129
133
|
|
130
134
|
To remove model/test/fixture/factory/serializer annotations:
|
131
|
-
|
132
|
-
annotate --delete
|
135
|
+
```bash
|
136
|
+
bundle exec annotate --delete
|
137
|
+
```
|
133
138
|
|
134
139
|
To remove routes.rb annotations:
|
135
|
-
|
136
|
-
annotate --routes --delete
|
140
|
+
```bash
|
141
|
+
bundle exec annotate --routes --delete
|
142
|
+
```
|
137
143
|
|
138
144
|
To automatically annotate every time you run `db:migrate`,
|
139
145
|
either run `rails g annotated:install`
|
data/bin/annotate
CHANGED
@@ -28,5 +28,5 @@ options = Annotated.setup_options(
|
|
28
28
|
)
|
29
29
|
Annotated.eager_load(options) if Annotated::Helpers.include_models?
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
AnnotateModels.send(options_result[:target_action], options) if Annotated::Helpers.include_models?
|
32
|
+
AnnotateRoutes.send(options_result[:target_action], options) if Annotated::Helpers.include_routes?
|
data/lib/annotated/version.rb
CHANGED
data/lib/annotated.rb
CHANGED