rails-erd 1.4.5 → 1.4.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e936dc2f84cd3264efc39a2835403813003e1422
4
- data.tar.gz: e1da2f8dbdbcc4da4a13826242db83c27bcfbf1c
3
+ metadata.gz: 1cff8c4febb03921cfffca5079b6f5deb56fbf07
4
+ data.tar.gz: 69861d0ef513b5b8bc60df935fca6931b02e9aaa
5
5
  SHA512:
6
- metadata.gz: 9a4d0f1753d7411500afdf241d6941b042f92a40c012ac7b75362cd8710bd7a4755ccb4fad41aec1d4ce93399474eec875293779a6596ced807f9f25452a3d4a
7
- data.tar.gz: 7190fca96730605ae0a8f3fe2aefd9c21a6d4818722d388d8ba3fa278f89bdc29db93bbbb849f6cacb1e0af218eb0bbf58489cfc46696a4bfd996519917b90ce
6
+ metadata.gz: b960e026b757827e0a7ec486916578390b269a6acf2a9597dcda73c69ebbf7aa01850a83090d49064f79973cf120205c75a79c0a33f1a254c481f8c238f3e5ca
7
+ data.tar.gz: 4ac3b8cae5bb82b5f6270396e3b7a44b4089e504bfd2370e5ecca1a787087a2ddc6157f8a5da7a917c24651aed55535ccd390629e8a690945924c3bd453112c4
@@ -2,5 +2,5 @@
2
2
  # NOTE: are sensitive to local FS writes, and besides -- it's just not proper
3
3
  # NOTE: to have a dev-mode tool do its thing in production.
4
4
  if Rails.env.development?
5
- RailsERD::Engine.load_tasks
5
+ Erd.load_tasks
6
6
  end
@@ -1,6 +1,5 @@
1
1
  require "active_support/ordered_options"
2
2
  require "rails_erd/railtie" if defined? Rails
3
- require "rails_erd/engine" if defined? Rails
4
3
  require "rails_erd/config"
5
4
 
6
5
  # Welcome to the API documentation of Rails ERD. If you wish to extend or
@@ -152,6 +152,7 @@ module RailsERD
152
152
  # TODO: Add support for different kinds of environment.
153
153
  require "#{path}/config/environment"
154
154
  Rails.application.eager_load!
155
+ rescue TypeError
155
156
  end
156
157
 
157
158
  def create_diagram
@@ -37,7 +37,7 @@ module RailsERD
37
37
  private
38
38
 
39
39
  def load_file(path)
40
- if File.exists?(path)
40
+ if File.exist?(path)
41
41
  YAML.load_file(path).each do |key, value|
42
42
  key = key.to_sym
43
43
  @options[key] = normalize_value(key, value)
@@ -123,7 +123,7 @@ module RailsERD
123
123
  # Generates the diagram, but does not save the output. It is called
124
124
  # internally by Diagram#create.
125
125
  def generate
126
- instance_eval &callbacks[:setup]
126
+ instance_eval(&callbacks[:setup])
127
127
 
128
128
  filtered_entities.each do |entity|
129
129
  instance_exec entity, filtered_attributes(entity), &callbacks[:each_entity]
@@ -139,7 +139,7 @@ module RailsERD
139
139
  end
140
140
 
141
141
  def save
142
- instance_eval &callbacks[:save]
142
+ instance_eval(&callbacks[:save])
143
143
  end
144
144
 
145
145
  private
@@ -150,8 +150,8 @@ module RailsERD
150
150
 
151
151
  def filtered_entities
152
152
  @domain.entities.reject { |entity|
153
- options.exclude && entity.model && [options.exclude].flatten.map(&:to_sym).include?(entity.name.to_sym) or
154
- options.only && entity.model && ![options.only].flatten.map(&:to_sym).include?(entity.name.to_sym) or
153
+ options.exclude.present? && entity.model && [options.exclude].flatten.map(&:to_sym).include?(entity.name.to_sym) or
154
+ options.only.present? && entity.model && ![options.only].flatten.map(&:to_sym).include?(entity.name.to_sym) or
155
155
  !options.inheritance && entity.specialized? or
156
156
  !options.polymorphism && entity.generalized? or
157
157
  !options.disconnected && entity.disconnected?
@@ -1,4 +1,4 @@
1
1
  module RailsERD
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  BANNER = "RailsERD #{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-erd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rolf Timmermans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-14 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -95,7 +95,6 @@ files:
95
95
  - lib/rails_erd/domain/relationship.rb
96
96
  - lib/rails_erd/domain/relationship/cardinality.rb
97
97
  - lib/rails_erd/domain/specialization.rb
98
- - lib/rails_erd/engine.rb
99
98
  - lib/rails_erd/railtie.rb
100
99
  - lib/rails_erd/tasks.rake
101
100
  - lib/rails_erd/version.rb
@@ -1,4 +0,0 @@
1
- module RailsERD
2
- class Engine < ::Rails::Engine
3
- end
4
- end