Skip to content

Commit

Permalink
Dependency bumps and documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
preston committed Jun 28, 2016
1 parent 994a44b commit 5de6bf5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 210 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
PATH
remote: .
specs:
railroady (1.4.2)
railroady (1.4.3)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.5)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
i18n (0.7.0)
json (1.8.3)
minitest (5.8.3)
rake (10.4.2)
minitest (5.9.0)
rake (11.2.2)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
Expand All @@ -31,4 +31,4 @@ DEPENDENCIES
rake

BUNDLED WITH
1.10.6
1.12.5
194 changes: 0 additions & 194 deletions README.rdoc

This file was deleted.

2 changes: 1 addition & 1 deletion lib/railroady/aasm_diagram.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def process_acts_as_state_machine_class(current_class)

STDERR.print "\t\tprocessing as acts_as_state_machine\n" if @options.verbose
current_class.states.each do |state_name|
state = current_class.read_inheritable_attribute(:states)[state_name]
# state = current_class.read_inheritable_attribute(:states)[state_name]
node_shape = (current_class.initial_state == state_name) ? ', peripheries = 2' : ''
node_attribs << "#{current_class.name.downcase}_#{state_name} [label=#{state_name} #{node_shape}];"
end
Expand Down
14 changes: 7 additions & 7 deletions lib/railroady/models_diagram.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ def get_files(prefix = '')
def engine_files
engines.collect { |engine| Dir.glob("#{engine.root}/app/models/**/*.rb") }.flatten
end

def extract_class_name(filename)
filename_was, class_name = filename, nil
filename = "app/models/#{filename.split('app/models')[1]}"

filename = "app/models/#{filename.split('app/models')[1]}"

while filename.split('/').length > 2
begin
class_name = filename.match(/.*\/models\/(.*).rb$/)[1].camelize
class_name.constantize

break
rescue Exception => e
rescue Exception # => e
class_name = nil
filename_end = filename.split('/')[2..-1]
filename_end.shift
filename = "#{filename.split('/')[0, 2].join('/')}/#{filename_end.join('/')}"
end
end

if class_name.nil?
filename_was.match(/.*\/models\/(.*).rb$/)[1].camelize
else
Expand Down
2 changes: 1 addition & 1 deletion lib/railroady/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RailRoady
VERSION = '1.4.2'
VERSION = '1.4.3'
end
4 changes: 2 additions & 2 deletions railroady.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Gem::Specification.new do |spec|
spec.name = 'railroady'
spec.version = RailRoady::VERSION
spec.authors = ['Preston Lee', 'Tobias Crawley', 'Peter Hoeg', 'Javier Smaldone']
spec.description = "Ruby on Rails 3/4 model and controller UML class diagram generator. Originally based on the 'railroad' plugin and contributions of many others. (`sudo port install graphviz` before use!)"
spec.description = "Ruby on Rails 3/4 model and controller UML class diagram generator. Originally based on the 'railroad' plugin and contributions of many others. (`brew install graphviz` before use!)"
spec.email = ['preston.lee@prestonlee.com', 'tcrawley@gmail.com', 'peter@hoeg.com', 'p.hoeg@northwind.sg', 'javier@smaldone.com.ar']
spec.summary = 'Ruby on Rails 3/4 model and controller UML class diagram generator.'
spec.homepage = 'http://github.com/preston/railroady'
spec.license = 'GPLv2'

spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
spec.files = `git ls-files`.split("\n")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
Expand Down

0 comments on commit 5de6bf5

Please sign in to comment.