erd_map 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: d9e69fe8377878e310f87605d04b56cefe6584a0350d91b5f8e7e4aab53fd4dc
4
- data.tar.gz: 1693047c4a7ea2a3b55aea08c74600a5bf4f125038c2b71edd678fc29a1b750c
3
+ metadata.gz: 860c0712604342f0e495b6ff55da67a041d7b886bfc7e561aa96c0bf848a3290
4
+ data.tar.gz: 89d513411e0732f0583c1613d7ebb961519f0d1248166204289d0c30419578b2
5
5
  SHA512:
6
- metadata.gz: 709c47b70db579119fcf67bd9775c43889d6035bf6ae6abed7c9d02afec77628ede105bd58cae97a4ed212c2300e469c0a039622cae734ef6d76ecdd5bfd3c77
7
- data.tar.gz: 655107b287dadef687eb5ae2c5526747bf7156c44b2a2e9f81ceb629d3f908434af4e11842dc2f57864f015f79f495fe9b5f00ca45a1020474ef9546102519c0
6
+ metadata.gz: eba427423e7d20c9246b45a7e87a4785da9ebe38a91c303bcbbfe5203013ab47808aa651857f631383cf46414a21319f294e4c2dbd700379451e49b2107595e0
7
+ data.tar.gz: 26700b51e97658e85f0cab1f3c4056c50836d4d1a3d60f1cbc4b15ca2e8f4604e25c882d9a91dc5ead1295cca7dc16734fc41316ad7a3395104b4420f67f1acd
data/README.md CHANGED
@@ -30,13 +30,15 @@ echo 'eval "$(pyenv init - zsh)"' >> ~/.zshrc
30
30
  # Install latest version of python
31
31
  pyenv install $(pyenv install --list | grep -E '^\s*[0-9]+\.[0-9]+\.[0-9]+$' | tail -n 1)
32
32
  pyenv global $(pyenv install --list | grep -E '^\s*[0-9]+\.[0-9]+\.[0-9]+$' | tail -n 1)
33
-
34
- # Install packages using pip
35
- pip install networkx bokeh scipy
36
33
  ```
37
34
 
38
35
  </details>
39
36
 
37
+ ```bash
38
+ # Install packages, for example with pip
39
+ pip install networkx bokeh scipy
40
+ ```
41
+
40
42
  ## Installation
41
43
 
42
44
  Add this line to your application's Gemfile:
@@ -4,7 +4,7 @@ module ErdMap
4
4
  class ErdMapController < ApplicationController
5
5
  FILE_PATH = Rails.root.join("tmp", "erd_map", "map.html")
6
6
 
7
- skip_before_action :verify_authenticity_token, only: [:update]
7
+ skip_forgery_protection
8
8
 
9
9
  def index
10
10
  if File.exist?(FILE_PATH)
data/lib/erd_map/graph.rb CHANGED
@@ -159,9 +159,8 @@ module ErdMap
159
159
  model
160
160
  .reflect_on_all_associations(association_type)
161
161
  .select { |mod| !mod.options[:polymorphic] && !mod.options[:anonymous_class] }
162
- .map(&:class_name)
162
+ .map { |mod| mod.klass.name }
163
163
  .uniq
164
- .select { |target| target.constantize.respond_to?(:column_names) }
165
164
  .map do |target|
166
165
  if association_type == :belongs_to
167
166
  whole_graph.add_edge(target, model.name)
@@ -66,7 +66,7 @@ class GraphManager {
66
66
  return isConnectedNode ? HIGHLIGHT_NODE_COLOR : originalColors[i]
67
67
  })
68
68
  this.nodeSource.data["radius"] = this.#nodesIndex.map((nodeName, i) => {
69
- return nodeName === closestNodeName ? EMPTHASIS_NODE_SIZE : originalRadius[i]
69
+ return nodeName === closestNodeName ? EMPHASIS_NODE_SIZE : originalRadius[i]
70
70
  })
71
71
  this.edgeSource.data["line_color"] = this.#sourceNodes.map((start, i) => {
72
72
  return [start, this.#targetNodes[i]].includes(closestNodeName) ? HIGHLIGHT_EDGE_COLOR : BASIC_COLOR
@@ -13,7 +13,7 @@ module ErdMap
13
13
  HIGHLIGHT_EDGE_COLOR = "orange"
14
14
  HIGHLIGHT_TEXT_COLOR = "white"
15
15
  BASIC_COLOR = "darkslategray"
16
- EMPTHASIS_NODE_SIZE = 80
16
+ EMPHASIS_NODE_SIZE = 80
17
17
 
18
18
  def renderers
19
19
  [circle_renderer, rect_renderer]
@@ -59,7 +59,7 @@ module ErdMap
59
59
  HIGHLIGHT_EDGE_COLOR: HIGHLIGHT_EDGE_COLOR,
60
60
  HIGHLIGHT_TEXT_COLOR: HIGHLIGHT_TEXT_COLOR,
61
61
  BASIC_COLOR: BASIC_COLOR,
62
- EMPTHASIS_NODE_SIZE: EMPTHASIS_NODE_SIZE,
62
+ EMPHASIS_NODE_SIZE: EMPHASIS_NODE_SIZE,
63
63
  }
64
64
  end
65
65
 
@@ -1,3 +1,3 @@
1
1
  module ErdMap
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erd_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - makicamel
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.6.2
105
+ rubygems_version: 3.7.0.dev
106
106
  specification_version: 4
107
107
  summary: An ERD map viewer as a Rails engine.
108
108
  test_files: []