active_record-annotate 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/active_record/annotate/dumper.rb +6 -1
- data/lib/active_record/annotate/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e9a07372c469b3beea2aaa1b0aae5464b34458
|
4
|
+
data.tar.gz: 4859cfe69674bf57fc3fb77a9446f0493a6e964f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2e480f54714178032bdd29f1045ec5130652ac25ce85e931176c49df84eeffd5bb1eda0bc8b0c9188b9900d870b4c6601e74fb799fbe267bb27d7d4e0a59b20
|
7
|
+
data.tar.gz: bb94743fc8ece867c74e5e5e7d4c221a4eb96bc599f8341dad30c300ea25efbcb6f8fbe7e548866b537c4c0bf0666a04dab4c9783a8a3e3dd1d1651973948ba4
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Trivial.
|
|
10
10
|
# Gemfile
|
11
11
|
group :development do
|
12
12
|
# you don't want to annotate your models in production, do you?
|
13
|
-
gem 'active_record-annotate', '~> 0.
|
13
|
+
gem 'active_record-annotate', '~> 0.4'
|
14
14
|
end
|
15
15
|
```
|
16
16
|
|
@@ -63,6 +63,7 @@ It creates an initializer at `config/initializers/annotate.rb` which contains de
|
|
63
63
|
* 0.1.1 Support for several models per table
|
64
64
|
* 0.2 Auto-annotation after `db:migrate` & `db:rollback`, basic output
|
65
65
|
* 0.3 Configuration and YARD code blocks support
|
66
|
+
* 0.4 Checking table existance before dumping
|
66
67
|
|
67
68
|
## Roadmap
|
68
69
|
|
@@ -4,7 +4,12 @@ module ActiveRecord
|
|
4
4
|
class << self
|
5
5
|
def dump(table_name, connection = ActiveRecord::Base.connection)
|
6
6
|
string_io = StringIO.new
|
7
|
-
|
7
|
+
|
8
|
+
if connection.table_exists?(table_name)
|
9
|
+
dumper(connection).send(:table, table_name, string_io)
|
10
|
+
else
|
11
|
+
string_io.write(" # can't find table `#{table_name}`")
|
12
|
+
end
|
8
13
|
|
9
14
|
process_annotation(string_io)
|
10
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-annotate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vsevolod Romashov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.2.
|
161
|
+
rubygems_version: 2.2.2
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: ActiveRecord models annotator based on rails' schema dumper
|