annotated 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -27
- data/annotated.gemspec +1 -1
- data/bin/{annotated → annotate} +2 -2
- data/lib/annotated/version.rb +1 -1
- data/lib/annotated.rb +0 -2
- data/lib/generators/{annotate → annotated}/install_generator.rb +1 -1
- metadata +6 -6
- /data/lib/generators/{annotate → annotated}/USAGE +0 -0
- /data/lib/generators/{annotate → annotated}/templates/auto_annotate_models.rake +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 234cffd4332e9173022d1c644686205b444f88a6526cc7770ba25d4ca7d2bb0a
|
4
|
+
data.tar.gz: 80e0347ce4b6ed394fa7a3768844f39e3f831b215dbfb638cd44855b1547295d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a50b1e0aa1e41c55ce7a95d8d97a00c621861f06130c8342269960913317cd1dbf456e9224507b79e0c78062bb0b398c936b7e45f7870060ca4bb1db46feb056
|
7
|
+
data.tar.gz: cd129ad31470998d38d7973ae67364eeec25c1441562660d9762be36452baf2456c4c0eba6c0ac99eb5a5131b80263f8f27bea2f448d76165ce2a4a416262d52
|
data/README.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
## Annotated (fork of Annotate aka AnnotateModels)
|
1
|
+
## Annotated (drop-in fork of Annotate aka AnnotateModels)
|
2
|
+
|
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
|
+
>
|
5
|
+
> Unlike annotaterb, this gem aims to be a direct drop-in replacement for the original annotate gem, allowing users to migrate without any minimal to their existing configuration or workflow.
|
6
|
+
|
7
|
+
|
8
|
+
[![Gem Version](https://badge.fury.io/rb/annotated.svg)](http://badge.fury.io/rb/annotated)
|
9
|
+
[![Downloads count](https://img.shields.io/gem/dt/annotated.svg?style=flat)](https://rubygems.org/gems/annotated)
|
10
|
+
[![CI Status](https://github.com/thedumbtechguy/annotated/workflows/CI/badge.svg)](https://github.com/thedumbtechguy/annotated/actions?workflow=CI)
|
2
11
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/annotate.svg)](http://badge.fury.io/rb/annotate)
|
4
|
-
[![Downloads count](https://img.shields.io/gem/dt/annotate.svg?style=flat)](https://rubygems.org/gems/annotate)
|
5
|
-
[![CI Status](https://github.com/ctran/annotate_models/workflows/CI/badge.svg)](https://github.com/ctran/annotate_models/actions?workflow=CI)
|
6
|
-
[![Coveralls](https://coveralls.io/repos/ctran/annotate_models/badge.svg?branch=develop)](https://coveralls.io/r/ctran/annotate_models?branch=develop)
|
7
|
-
[![Maintenability](https://codeclimate.com/github/ctran/annotate_models/badges/gpa.svg)](https://codeclimate.com/github/ctran/annotate_models)
|
8
12
|
|
9
13
|
Add a comment summarizing the current schema to the top or bottom of each of your...
|
10
14
|
|
@@ -82,7 +86,7 @@ Into Gemfile from rubygems.org:
|
|
82
86
|
|
83
87
|
```ruby
|
84
88
|
group :development do
|
85
|
-
gem '
|
89
|
+
gem 'annotated'
|
86
90
|
end
|
87
91
|
```
|
88
92
|
|
@@ -90,20 +94,15 @@ Into Gemfile from Github:
|
|
90
94
|
|
91
95
|
```ruby
|
92
96
|
group :development do
|
93
|
-
gem '
|
97
|
+
gem 'annotated', git: 'https://github.com/thedumbtechguy/annotated.git'
|
94
98
|
end
|
95
99
|
```
|
96
100
|
|
97
101
|
Into environment gems from rubygems.org:
|
98
102
|
|
99
|
-
gem install
|
103
|
+
gem install annotated
|
100
104
|
|
101
|
-
Into environment gems from Github checkout:
|
102
105
|
|
103
|
-
git clone https://github.com/ctran/annotate_models.git annotate_models
|
104
|
-
cd annotate_models
|
105
|
-
rake gem
|
106
|
-
gem install dist/annotate-*.gem
|
107
106
|
|
108
107
|
## Usage
|
109
108
|
|
@@ -112,32 +111,38 @@ Into environment gems from Github checkout:
|
|
112
111
|
### Usage in Rails
|
113
112
|
|
114
113
|
To annotate all your models, tests, fixtures, and factories:
|
115
|
-
|
114
|
+
```bash
|
116
115
|
cd /path/to/app
|
117
|
-
annotate
|
116
|
+
bundle exec annotate
|
117
|
+
```
|
118
118
|
|
119
119
|
To annotate just your models, tests, and factories:
|
120
|
-
|
121
|
-
annotate --models --exclude fixtures
|
120
|
+
```bash
|
121
|
+
bundle exec annotate --models --exclude fixtures
|
122
|
+
```
|
122
123
|
|
123
124
|
To annotate just your models:
|
124
|
-
|
125
|
-
annotate --models
|
125
|
+
```bash
|
126
|
+
bundle exec annotate --models
|
127
|
+
```
|
126
128
|
|
127
129
|
To annotate routes.rb:
|
128
|
-
|
129
|
-
annotate --routes
|
130
|
+
```bash
|
131
|
+
bundle exec annotate --routes
|
132
|
+
```
|
130
133
|
|
131
134
|
To remove model/test/fixture/factory/serializer annotations:
|
132
|
-
|
133
|
-
annotate --delete
|
135
|
+
```bash
|
136
|
+
bundle exec annotate --delete
|
137
|
+
```
|
134
138
|
|
135
139
|
To remove routes.rb annotations:
|
136
|
-
|
137
|
-
annotate --routes --delete
|
140
|
+
```bash
|
141
|
+
bundle exec annotate --routes --delete
|
142
|
+
```
|
138
143
|
|
139
144
|
To automatically annotate every time you run `db:migrate`,
|
140
|
-
either run `rails g
|
145
|
+
either run `rails g annotated:install`
|
141
146
|
or add `Annotated.load_tasks` to your `Rakefile`.
|
142
147
|
|
143
148
|
See the [configuration in Rails](#configuration-in-rails) section for more info.
|
data/annotated.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.files = Dir.glob(%w[LICENSE.txt *.md *.gemspec bin/* lib/**/*])
|
40
40
|
spec.bindir = "bin"
|
41
|
-
spec.executables = ["
|
41
|
+
spec.executables = ["annotate"]
|
42
42
|
spec.require_paths = ["lib"]
|
43
43
|
|
44
44
|
spec.add_dependency "activerecord", ">= 3.2"
|
data/bin/{annotated → annotate}
RENAMED
@@ -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
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: annotated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
@@ -39,7 +39,7 @@ email:
|
|
39
39
|
- turadg@aleahmad.net
|
40
40
|
- jon@cloudability.com
|
41
41
|
executables:
|
42
|
-
-
|
42
|
+
- annotate
|
43
43
|
extensions: []
|
44
44
|
extra_rdoc_files: []
|
45
45
|
files:
|
@@ -49,7 +49,7 @@ files:
|
|
49
49
|
- README.md
|
50
50
|
- RELEASE.md
|
51
51
|
- annotated.gemspec
|
52
|
-
- bin/
|
52
|
+
- bin/annotate
|
53
53
|
- lib/annotated.rb
|
54
54
|
- lib/annotated/active_record_patch.rb
|
55
55
|
- lib/annotated/annotate_models.rb
|
@@ -62,9 +62,9 @@ files:
|
|
62
62
|
- lib/annotated/parser.rb
|
63
63
|
- lib/annotated/tasks.rb
|
64
64
|
- lib/annotated/version.rb
|
65
|
-
- lib/generators/
|
66
|
-
- lib/generators/
|
67
|
-
- lib/generators/
|
65
|
+
- lib/generators/annotated/USAGE
|
66
|
+
- lib/generators/annotated/install_generator.rb
|
67
|
+
- lib/generators/annotated/templates/auto_annotate_models.rake
|
68
68
|
- lib/tasks/annotate_models.rake
|
69
69
|
- lib/tasks/annotate_models_migrate.rake
|
70
70
|
- lib/tasks/annotate_routes.rake
|
File without changes
|
File without changes
|