jw-rails-erd 1.4.5 → 1.4.6

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: 479e99642119a6eb335c9b9c97eed2e0e59ebf86
4
- data.tar.gz: a3593fb95a3f2d816660964734e20356921917c1
3
+ metadata.gz: a7bc35cdcbfb0cb3da6c96b41e509b7c14468f0f
4
+ data.tar.gz: 6d98a169ca59799104d21e1a175737794ab24280
5
5
  SHA512:
6
- metadata.gz: 2460431f9ec8fc7daa093b4ecb86e12bea5a7ab471e6db8e309b2c3ecf37f1f9c9acfe87ec2c66e88b7780c0d5701cfeaddaf10e1b54a3221d80d3025ada50ef
7
- data.tar.gz: ef125a202ce97ba684ddea1b4344656d54f025a45e857d24e97c35ba42373b4d810bbb4327b58805ffbd04a19b7a0d7780f51b340be9f1847fbaf5754fd5c8bc
6
+ metadata.gz: f3c8ee7e759999e54b2b9a6c7106d365b7b2c70012a30751c64425f0ce4a7963fea22b9de81ea6660833fc4d630bb1597bacd870cc1fe9b1e15b9207961e7c57
7
+ data.tar.gz: e0416296efe057e1a96068143b7e20223548872bfe84fdfecb1286c4d6f6c0f1c5115600568bf242997493585b87c208ec333db9235d3d98a792662084d23c62
File without changes
@@ -1,3 +1,6 @@
1
+ require 'rails_erd/custom'
2
+
3
+
1
4
  def say(message)
2
5
  puts message unless Rake.application.options.silent
3
6
  end
@@ -45,14 +48,15 @@ namespace :erd do
45
48
  end
46
49
 
47
50
  desc "Generate an Entity-Relationship Diagram based on your models"
48
- task :erd => "erd:generate", :arg1, :arg2, :arg3 do |t, args|
49
- say "Usage: rake erd <classname> <outputfile> <traversal depth>"
50
- if args[0] == nil
51
+ task :erd => "erd:generate" do
52
+ say "Usage: rake erd class=<classname> output=-<outputfile> depth=<traversal depth>"
53
+ if ENV['class'] == nil
51
54
  say "Required field: Root Class node to start with"
52
- end
53
- if args[1] == nil
55
+ elsif ENV['output'] == nil
54
56
  say "Required field: output file name"
57
+ elsif ENV['depth'] == nil
58
+ say "Required field: depth to find child classes"
55
59
  end
56
- args[2] ||= 1
57
- RailsERD::Custom.new(args[0], args[1], args[2])
60
+
61
+ RailsERD::Custom.new(ENV['class'], ENV['output'], ENV['depth'].to_i)
58
62
  end
@@ -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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jw-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
@@ -81,7 +81,7 @@ files:
81
81
  - lib/generators/erd/USAGE
82
82
  - lib/generators/erd/install_generator.rb
83
83
  - lib/generators/erd/templates/auto_generate_diagram.rake
84
- - lib/rails-erd.rb
84
+ - lib/jw-rails-erd.rb
85
85
  - lib/rails_erd.rb
86
86
  - lib/rails_erd/cli.rb
87
87
  - lib/rails_erd/config.rb