dread 0.0.7 → 0.1.0

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: 58f1d635f7dd155d80768ba4bc69cbf6a878b2c0
4
- data.tar.gz: 431970c23d2bb44ac58ea49e5e71cad7405aa7b1
3
+ metadata.gz: ec0d3b7679358d3f9941777420ff7a2792dfd32c
4
+ data.tar.gz: 39291b385b9ab7bc5f316505e4c449b82044371d
5
5
  SHA512:
6
- metadata.gz: 6bfc68d886b19950e957aaa4f5e8a0fc745d1d71c00a580d78a55863240e7e7b2fed650de5a8578429f35d0a1602e0f1018b041b69de80b59a057cb2270b3d7d
7
- data.tar.gz: d897893f97a001b18db6bbf198eed05e6366de58c9582893439d29a405afedc65d0d189ceeef8c2a6823c3d8babaad6d616f96e3bc02fb24c708f8cd0b81fe94
6
+ metadata.gz: 178d16acc3ead4591374a46ddda024abfab3de1a57748837def29a9d584fd37cf3006cb1d9db396343f4acc40b22bbed6818401502eb1e44270d8bff63f5ec14
7
+ data.tar.gz: ba0265f2cf871ab1f7425e2983a7e00e3253c72b9b4366c415d8f172c923d8960a9ba0cf74b5aecddb7ba93d2d8519ba262be450f296942db1a9c3ee2f17cb80
data/README.md CHANGED
@@ -1,4 +1,105 @@
1
1
  # Dread
2
2
 
3
+ // missing_dependents
4
+
3
5
  [![Build Status](https://travis-ci.org/DamirSvrtan/dread.svg?branch=master)](https://travis-ci.org/DamirSvrtan/dread)
4
- [![Code Climate](https://codeclimate.com/github/DamirSvrtan/dread/badges/gpa.svg)](https://codeclimate.com/github/DamirSvrtan/dread)
6
+ [![Code Climate](https://codeclimate.com/github/DamirSvrtan/dread/badges/gpa.svg)](https://codeclimate.com/github/DamirSvrtan/dread)
7
+
8
+ Never dread about (not) destroying your records again!
9
+
10
+ Dread provides ways to:
11
+ 1. Draw a graph of dependently destroyable associations
12
+ 2. Find associations with missing depenent destroys/delets/nullifies
13
+
14
+ Supports Rails 3.2+ and Ruby 1.9.3+.
15
+
16
+ ## Installation
17
+
18
+ Add the Dread gem to your Gemfile:
19
+
20
+ ```ruby
21
+ group :development do
22
+ gem 'dread', '>= 0.0.7'
23
+ end
24
+ ```
25
+
26
+ And run `bundle install` within your app's directory.
27
+
28
+ ## Usage
29
+
30
+ The Dread gem provides a rake task for drawing all dependently destroyable associations.
31
+
32
+ ```bash
33
+ $ rake dread class=user
34
+
35
+ user
36
+ tweets
37
+ comments
38
+ pictures
39
+ pictures
40
+ comments
41
+ pictures
42
+ avatar
43
+ ```
44
+
45
+ #### Self joins
46
+
47
+ ```ruby
48
+ class Employee < ActiveRecord::Base
49
+ has_many :subordinates, class_name: Employee,
50
+ foreign_key: "manager_id",
51
+ dependent: :destroy
52
+
53
+ belongs_to :manager, class_name: Employee
54
+ end
55
+ ```
56
+
57
+ ```shell
58
+ $ rake dread class=employee
59
+
60
+ employee
61
+ subordinates
62
+ ...
63
+ ```
64
+
65
+ #### Circular dependent destroys
66
+
67
+ ```ruby
68
+ class Supplier < ActiveRecord::Base
69
+ has_one :account, dependent: :destroy
70
+ end
71
+
72
+ class Account < ActiveRecord::Base
73
+ belongs_to :supplier, dependent: :destroy
74
+ end
75
+ ```
76
+
77
+ ```shell
78
+ $ rake dread class=supplier
79
+
80
+ supplier
81
+ account
82
+ supplier
83
+ ...
84
+ ```
85
+
86
+
87
+ ### Development
88
+
89
+ Dread uses [appraisals](https://github.com/thoughtbot/appraisal) to test the code base against multiple versions of Rails.
90
+
91
+ When first developing, you should run `bundle install` and `appraisal install` to install the all dependencies accross different gemfiles.
92
+
93
+ Run `appraisal rake` to roll the tests on multiple versions or just run a specific set with `appraisal rails-4.0 rake`.
94
+
95
+ ### Bug reports
96
+
97
+ If you find a problem with the Dread gem, please submit an [issue](https://github.com/DamirSvrtan/dread/issues), along with the version of Rails you're using and the set of associations that are causing the trouble.
98
+
99
+ ### Contributing
100
+
101
+ 1. Fork it ( http://github.com/DamirSvrtan/dread/fork )
102
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
103
+ 3. Commit your changes (`git commit -m 'Add new feature'`)
104
+ 4. Push to the branch (`git push origin my-new-feature`)
105
+ 5. Create new Pull Request
@@ -10,8 +10,8 @@ Gem::Specification.new do |s|
10
10
  s.authors = ["Damir Svrtan"]
11
11
  s.email = ["damir.svrtan@gmail.com"]
12
12
  s.homepage = "https://github.com/DamirSvrtan/dread"
13
- s.summary = "Summary of Dread."
14
- s.description = "Description of Dread."
13
+ s.summary = "Draw a graph of dependently destroyable associations."
14
+ s.description = "Draw a graph of dependently destroyable associations and never dread about destroying your records again!"
15
15
  s.license = "MIT"
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
@@ -1,5 +1,8 @@
1
1
  require 'pry'
2
- require 'dread/graph'
2
+ require 'dread/association_graph'
3
+ require 'dread/missing_graph'
4
+ require 'dread/missing_graphs'
5
+
3
6
 
4
7
  module Dread
5
8
  class Railtie < ::Rails::Railtie
@@ -7,4 +10,8 @@ module Dread
7
10
  load File.join(File.dirname(__FILE__), 'tasks/dread.rake')
8
11
  end
9
12
  end
10
- end
13
+
14
+ def self.ar_models
15
+ ActiveRecord::Base.descendants
16
+ end
17
+ end
@@ -1,7 +1,7 @@
1
1
  require 'dread/error'
2
2
  require 'dread/console_output'
3
3
  module Dread
4
- class Graph
4
+ class AssociationGraph
5
5
 
6
6
  attr_reader :clazz, :dependable_collection, :collected_clazzes
7
7
 
@@ -60,11 +60,11 @@ module Dread
60
60
  relation_hash[assoc_name] = {}
61
61
  when :destroy
62
62
  relation_hash.merge!(
63
- Graph.new(assoc_data, assoc_data.macro == :has_many, collected_clazzes + [self.clazz]).dependable_collection)
63
+ AssociationGraph.new(assoc_data, assoc_data.macro == :has_many, collected_clazzes + [self.clazz]).dependable_collection)
64
64
  end
65
65
  end
66
66
  end
67
67
  end
68
68
 
69
69
  end
70
- end
70
+ end
@@ -12,6 +12,15 @@ module Dread
12
12
  end
13
13
  end
14
14
 
15
+ def generate_missing(klasses_with_missing_dependables)
16
+ klasses_with_missing_dependables.each do |klass, missing_dependables|
17
+ puts klass
18
+ missing_dependables.each do |missing_dependable|
19
+ puts " #{missing_dependable}"
20
+ end
21
+ end
22
+ end
23
+
15
24
  end
16
25
  end
17
- end
26
+ end
@@ -0,0 +1,41 @@
1
+ module Dread
2
+ class MissingGraph
3
+ attr_reader :clazz
4
+
5
+ def initialize(clazz)
6
+ @clazz = clazz.classify.constantize
7
+ end
8
+
9
+ def missing_dependables
10
+ possesionable_associations.map do |assoc_name, assoc_data|
11
+ assoc_name if direct_association_with_no_dependents?(assoc_data)
12
+ end.compact
13
+ end
14
+
15
+ private
16
+
17
+ def direct_association_with_no_dependents?(assoc_data)
18
+ assoc_data.options[:through].nil? && assoc_data.options[:dependent].nil?
19
+ end
20
+
21
+ def possesionable_associations
22
+ has_many_associations.merge(has_one_associations)
23
+ end
24
+
25
+ def has_many_associations
26
+ @has_many_associations ||= begin
27
+ clazz.reflections.select do |assoc_name, assoc_data|
28
+ assoc_data.macro == :has_many
29
+ end
30
+ end
31
+ end
32
+
33
+ def has_one_associations
34
+ @has_one_associations ||= begin
35
+ clazz.reflections.select do |assoc_name, assoc_data|
36
+ assoc_data.macro == :has_one
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,21 @@
1
+ module Dread
2
+ class MissingGraphs
3
+
4
+ def initialize
5
+ Rails.application.eager_load!
6
+ end
7
+
8
+ def all_missing_dependables
9
+ Dread.ar_models.map do |active_record_model|
10
+ missing_dependables = Dread::MissingGraph.new(active_record_model.to_s)
11
+ .missing_dependables
12
+
13
+ { active_record_model => missing_dependables } if missing_dependables.any?
14
+ end.compact.inject {|element, all| all.merge(element)}
15
+ end
16
+
17
+ def draw
18
+ ConsoleOutput.generate_missing(all_missing_dependables)
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module Dread
2
- VERSION = "0.0.7"
3
- end
2
+ VERSION = "0.1.0"
3
+ end
@@ -1,10 +1,15 @@
1
1
  require 'colorize'
2
2
  desc 'list destroyable/deletable dependencies of your ActiveRecord class'
3
- task dread: :environment do
3
+ task association_graph: :environment do
4
4
  begin
5
- dread_graph = Dread::Graph.new(ENV['class'])
6
- dread_graph.draw
5
+ association_graph = Dread::AssociationGraph.new(ENV['class'])
6
+ association_graph.draw
7
7
  rescue Dread::Error => e
8
8
  puts e.message.colorize(:red)
9
9
  end
10
- end
10
+ end
11
+
12
+ desc 'list ActiveRecord relationships with missing dependent destroys/deletes..'
13
+ task missing_dependables: :environment do
14
+ Dread::MissingGraphs.new.draw
15
+ end
@@ -1,16 +1,16 @@
1
1
  require 'test_helper'
2
2
 
3
- class DreadTest < ActiveSupport::TestCase
3
+ class AssociationGraphTest < ActiveSupport::TestCase
4
4
 
5
5
  test 'initialization' do
6
6
  assert_nothing_raised do
7
- dread_graph = Dread::Graph.new('user')
7
+ dread_graph = Dread::AssociationGraph.new('user')
8
8
  end
9
9
  end
10
10
 
11
11
  test 'initialization with missing constant' do
12
12
  assert_raises Dread::Error do
13
- dread_graph = Dread::Graph.new('uzer')
13
+ dread_graph = Dread::AssociationGraph.new('uzer')
14
14
  end
15
15
  end
16
16
 
@@ -19,17 +19,26 @@ class DreadTest < ActiveSupport::TestCase
19
19
  AccountSetting
20
20
  account_settings
21
21
  AccountSettings).each do |model_name|
22
- assert_equal AccountSetting, Dread::Graph.new(model_name).clazz
22
+ assert_equal AccountSetting, Dread::AssociationGraph.new(model_name).clazz
23
+ end
24
+ end
25
+
26
+ test 'various namespaced clazz names' do
27
+ %w(Wtf::Ashtray
28
+ Wtf::Ashtrays
29
+ wtf/ashtray
30
+ wtf/ashtrays).each do |model_name|
31
+ assert_equal Wtf::Ashtray, Dread::AssociationGraph.new(model_name).clazz
23
32
  end
24
33
  end
25
34
 
26
35
  test 'drawing' do
27
- dread_graph = Dread::Graph.new('user')
36
+ dread_graph = Dread::AssociationGraph.new('user')
28
37
  dread_graph.draw
29
38
  end
30
39
 
31
40
  test 'collecting' do
32
- dread_graph = Dread::Graph.new('user')
41
+ dread_graph = Dread::AssociationGraph.new('user')
33
42
  dependable_collection = dread_graph.dependable_collection
34
43
  dependable_collection.assert_valid_keys(:user)
35
44
  dependable_collection[:user].assert_valid_keys(:tweets, :comments, :setting, :avatar)
@@ -37,7 +46,7 @@ class DreadTest < ActiveSupport::TestCase
37
46
  end
38
47
 
39
48
  test 'self-join' do
40
- dread_graph = Dread::Graph.new('employee')
49
+ dread_graph = Dread::AssociationGraph.new('employee')
41
50
  dependable_collection = dread_graph.dependable_collection
42
51
  dependable_collection.assert_valid_keys(:employee)
43
52
  dependable_collection[:employee].assert_valid_keys(:subordinates)
@@ -46,12 +55,12 @@ class DreadTest < ActiveSupport::TestCase
46
55
  end
47
56
 
48
57
  test 'self-join drawing' do
49
- dread_graph = Dread::Graph.new('employee')
58
+ dread_graph = Dread::AssociationGraph.new('employee')
50
59
  dread_graph.draw
51
60
  end
52
61
 
53
62
  test 'circular dependent destroy has one' do
54
- dread_graph = Dread::Graph.new('supplier')
63
+ dread_graph = Dread::AssociationGraph.new('supplier')
55
64
  dependable_collection = dread_graph.dependable_collection
56
65
  dependable_collection.assert_valid_keys(:supplier)
57
66
  dependable_collection[:supplier].assert_valid_keys(:account)
@@ -60,7 +69,7 @@ class DreadTest < ActiveSupport::TestCase
60
69
  end
61
70
 
62
71
  test 'circular dependent destroy belongs_to' do
63
- dread_graph = Dread::Graph.new('account')
72
+ dread_graph = Dread::AssociationGraph.new('account')
64
73
  dependable_collection = dread_graph.dependable_collection
65
74
  dependable_collection.assert_valid_keys(:account)
66
75
  dependable_collection[:account].assert_valid_keys(:supplier)
@@ -69,9 +78,9 @@ class DreadTest < ActiveSupport::TestCase
69
78
  end
70
79
 
71
80
  test 'namespaced associations' do
72
- dread_graph = Dread::Graph.new('Wtf::Ashtray')
81
+ dread_graph = Dread::AssociationGraph.new('Wtf::Ashtray')
73
82
  dependable_collection = dread_graph.dependable_collection
74
83
  dependable_collection.assert_valid_keys(:'wtf/ashtray')
75
84
  dependable_collection[:'wtf/ashtray'].assert_valid_keys(:cigarettes)
76
85
  end
77
- end
86
+ end
@@ -0,0 +1,6 @@
1
+ class Company < ActiveRecord::Base
2
+ has_many :company_organizations
3
+ has_many :organizations, through: :company_organizations
4
+ has_one :headquarter
5
+ has_many :users, dependent: :nullify
6
+ end
@@ -0,0 +1,4 @@
1
+ class CompanyOrganization < ActiveRecord::Base
2
+ belongs_to :company
3
+ belongs_to :organization
4
+ end
@@ -0,0 +1,3 @@
1
+ class Headquarter < ActiveRecord::Base
2
+ belongs_to :company
3
+ end
@@ -0,0 +1,4 @@
1
+ class Organization < ActiveRecord::Base
2
+ has_many :company_organizations
3
+ has_many :companies, through: :company_organizations
4
+ end
@@ -3,4 +3,5 @@ class User < ActiveRecord::Base
3
3
  has_many :comments, dependent: :destroy
4
4
  has_one :avatar, dependent: :destroy, class_name: 'Picture', as: :imageable
5
5
  has_one :setting, dependent: :destroy, class_name: 'AccountSetting'
6
- end
6
+ belongs_to :company
7
+ end
@@ -0,0 +1,9 @@
1
+ class CreateCompanies < ActiveRecord::Migration
2
+ def change
3
+ create_table :companies do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateOrganizations < ActiveRecord::Migration
2
+ def change
3
+ create_table :organizations do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ class CreateCompanyOrganizations < ActiveRecord::Migration
2
+ def change
3
+ create_table :company_organizations do |t|
4
+ t.references :company, index: true
5
+ t.references :organization, index: true
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class CreateHeadquarters < ActiveRecord::Migration
2
+ def change
3
+ create_table :headquarters do |t|
4
+ t.references :company, index: true
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddCompanyIdToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_reference :users, :company, index: true
4
+ end
5
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140918223342) do
14
+ ActiveRecord::Schema.define(version: 20151013211307) do
15
15
 
16
16
  create_table "account_settings", force: true do |t|
17
17
  t.string "time_zone"
@@ -35,6 +35,22 @@ ActiveRecord::Schema.define(version: 20140918223342) do
35
35
  t.datetime "updated_at"
36
36
  end
37
37
 
38
+ create_table "companies", force: true do |t|
39
+ t.string "name"
40
+ t.datetime "created_at"
41
+ t.datetime "updated_at"
42
+ end
43
+
44
+ create_table "company_organizations", force: true do |t|
45
+ t.integer "company_id"
46
+ t.integer "organization_id"
47
+ t.datetime "created_at"
48
+ t.datetime "updated_at"
49
+ end
50
+
51
+ add_index "company_organizations", ["company_id"], name: "index_company_organizations_on_company_id"
52
+ add_index "company_organizations", ["organization_id"], name: "index_company_organizations_on_organization_id"
53
+
38
54
  create_table "countries", force: true do |t|
39
55
  t.string "name"
40
56
  t.datetime "created_at"
@@ -48,6 +64,20 @@ ActiveRecord::Schema.define(version: 20140918223342) do
48
64
  t.datetime "updated_at"
49
65
  end
50
66
 
67
+ create_table "headquarters", force: true do |t|
68
+ t.integer "company_id"
69
+ t.datetime "created_at"
70
+ t.datetime "updated_at"
71
+ end
72
+
73
+ add_index "headquarters", ["company_id"], name: "index_headquarters_on_company_id"
74
+
75
+ create_table "organizations", force: true do |t|
76
+ t.string "name"
77
+ t.datetime "created_at"
78
+ t.datetime "updated_at"
79
+ end
80
+
51
81
  create_table "pictures", force: true do |t|
52
82
  t.string "url"
53
83
  t.integer "imageable_id"
@@ -74,8 +104,11 @@ ActiveRecord::Schema.define(version: 20140918223342) do
74
104
  t.string "email"
75
105
  t.datetime "created_at"
76
106
  t.datetime "updated_at"
107
+ t.integer "company_id"
77
108
  end
78
109
 
110
+ add_index "users", ["company_id"], name: "index_users_on_company_id"
111
+
79
112
  create_table "wtf_ashtrays", force: true do |t|
80
113
  t.string "color"
81
114
  t.datetime "created_at"
@@ -0,0 +1,39 @@
1
+ require 'test_helper'
2
+
3
+ class Dread::MissingGraphTest < ActiveSupport::TestCase
4
+
5
+ test 'initializaties with no problems' do
6
+ assert_nothing_raised do
7
+ Dread::MissingGraph.new('user')
8
+ end
9
+ end
10
+
11
+ test 'user class has no missing dependables' do
12
+ missing_dependables = Dread::MissingGraph.new('user').missing_dependables
13
+ assert_equal [], missing_dependables
14
+ end
15
+
16
+ test 'account settings class has no missing dependables' do
17
+ missing_dependables = Dread::MissingGraph.new('account_setting').missing_dependables
18
+ assert_equal [], missing_dependables
19
+ end
20
+
21
+ test 'can find the model for multiple kinds of notations' do
22
+ %w(account_setting
23
+ AccountSetting).each do |model_name|
24
+ assert_equal AccountSetting, Dread::MissingGraph.new(model_name).clazz
25
+ end
26
+ end
27
+
28
+ test 'can find the model for various namespaced clazz names' do
29
+ %w(Wtf::Ashtray
30
+ wtf/ashtray).each do |model_name|
31
+ assert_equal Wtf::Ashtray, Dread::MissingGraph.new(model_name).clazz
32
+ end
33
+ end
34
+
35
+ test 'company class has missing dependables on company_organization and headquarter' do
36
+ missing_dependables = Dread::MissingGraph.new('company').missing_dependables
37
+ assert_equal [:company_organizations, :headquarter], missing_dependables
38
+ end
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dread
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2015-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -80,7 +80,8 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Description of Dread.
83
+ description: Draw a graph of dependently destroyable associations and never dread
84
+ about destroying your records again!
84
85
  email:
85
86
  - damir.svrtan@gmail.com
86
87
  executables: []
@@ -99,18 +100,24 @@ files:
99
100
  - gemfiles/rails_4.0.gemfile
100
101
  - gemfiles/rails_4.1.gemfile
101
102
  - lib/dread.rb
103
+ - lib/dread/association_graph.rb
102
104
  - lib/dread/console_output.rb
103
105
  - lib/dread/error.rb
104
- - lib/dread/graph.rb
106
+ - lib/dread/missing_graph.rb
107
+ - lib/dread/missing_graphs.rb
105
108
  - lib/dread/version.rb
106
109
  - lib/tasks/dread.rake
107
- - test/dread_test.rb
110
+ - test/association_graph_test.rb
108
111
  - test/dummy/Rakefile
109
112
  - test/dummy/app/models/account.rb
110
113
  - test/dummy/app/models/account_setting.rb
111
114
  - test/dummy/app/models/comment.rb
115
+ - test/dummy/app/models/company.rb
116
+ - test/dummy/app/models/company_organization.rb
112
117
  - test/dummy/app/models/country.rb
113
118
  - test/dummy/app/models/employee.rb
119
+ - test/dummy/app/models/headquarter.rb
120
+ - test/dummy/app/models/organization.rb
114
121
  - test/dummy/app/models/picture.rb
115
122
  - test/dummy/app/models/supplier.rb
116
123
  - test/dummy/app/models/tweet.rb
@@ -151,7 +158,13 @@ files:
151
158
  - test/dummy/db/migrate/20140918220929_create_accounts.rb
152
159
  - test/dummy/db/migrate/20140918223314_create_wtf_ashtrays.rb
153
160
  - test/dummy/db/migrate/20140918223342_create_wtf_cigarettes.rb
161
+ - test/dummy/db/migrate/20151013210055_create_companies.rb
162
+ - test/dummy/db/migrate/20151013210139_create_organizations.rb
163
+ - test/dummy/db/migrate/20151013210204_create_company_organizations.rb
164
+ - test/dummy/db/migrate/20151013210550_create_headquarters.rb
165
+ - test/dummy/db/migrate/20151013211307_add_company_id_to_users.rb
154
166
  - test/dummy/db/schema.rb
167
+ - test/missing_graph_test.rb
155
168
  - test/test_helper.rb
156
169
  homepage: https://github.com/DamirSvrtan/dread
157
170
  licenses:
@@ -173,18 +186,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
186
  version: '0'
174
187
  requirements: []
175
188
  rubyforge_project:
176
- rubygems_version: 2.2.2
189
+ rubygems_version: 2.4.5
177
190
  signing_key:
178
191
  specification_version: 4
179
- summary: Summary of Dread.
192
+ summary: Draw a graph of dependently destroyable associations.
180
193
  test_files:
181
- - test/dread_test.rb
194
+ - test/association_graph_test.rb
182
195
  - test/dummy/Rakefile
183
196
  - test/dummy/app/models/account.rb
184
197
  - test/dummy/app/models/account_setting.rb
185
198
  - test/dummy/app/models/comment.rb
199
+ - test/dummy/app/models/company.rb
200
+ - test/dummy/app/models/company_organization.rb
186
201
  - test/dummy/app/models/country.rb
187
202
  - test/dummy/app/models/employee.rb
203
+ - test/dummy/app/models/headquarter.rb
204
+ - test/dummy/app/models/organization.rb
188
205
  - test/dummy/app/models/picture.rb
189
206
  - test/dummy/app/models/supplier.rb
190
207
  - test/dummy/app/models/tweet.rb
@@ -225,5 +242,11 @@ test_files:
225
242
  - test/dummy/db/migrate/20140918220929_create_accounts.rb
226
243
  - test/dummy/db/migrate/20140918223314_create_wtf_ashtrays.rb
227
244
  - test/dummy/db/migrate/20140918223342_create_wtf_cigarettes.rb
245
+ - test/dummy/db/migrate/20151013210055_create_companies.rb
246
+ - test/dummy/db/migrate/20151013210139_create_organizations.rb
247
+ - test/dummy/db/migrate/20151013210204_create_company_organizations.rb
248
+ - test/dummy/db/migrate/20151013210550_create_headquarters.rb
249
+ - test/dummy/db/migrate/20151013211307_add_company_id_to_users.rb
228
250
  - test/dummy/db/schema.rb
251
+ - test/missing_graph_test.rb
229
252
  - test/test_helper.rb