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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 184d08a11090e8bd9d9d4e83aff9323f13c003ec
4
- data.tar.gz: 309a4a90edb9aea169198585ad1ec1ed247c8797
3
+ metadata.gz: 62e9a07372c469b3beea2aaa1b0aae5464b34458
4
+ data.tar.gz: 4859cfe69674bf57fc3fb77a9446f0493a6e964f
5
5
  SHA512:
6
- metadata.gz: 93170988da55b445e19743d7d627888c355df51861c14b72f78e71d42fffd5dc51f084481575e3b5402dc2daeaed5433d81fd4270db9dc3da37e81aa89dc80d0
7
- data.tar.gz: 39fbba81d3b8b3d8de4f171c553a6272df9499f8c40c951c98d122dd096606519b6dd722f3fb5376e1d193b19f6473db5c4f591ff3f32b5b245d26f6fd9addae
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.3'
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
- dumper(connection).send(:table, table_name, string_io)
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Annotate
3
- VERSION = '0.3'
3
+ VERSION = '0.4'
4
4
  end
5
5
  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.3'
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-02-07 00:00:00.000000000 Z
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.0
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