railroady 1.0.9 → 1.1.0
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.
- data/VERSION.yml +2 -2
- data/tasks/railroady.rake +17 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/tasks/railroady.rake
CHANGED
@@ -8,6 +8,9 @@
|
|
8
8
|
# Author: Preston Lee, http://railroady.prestonlee.com
|
9
9
|
|
10
10
|
# wrap helper methods so they don't conflict w/ methods on Object
|
11
|
+
|
12
|
+
require 'rbconfig'
|
13
|
+
|
11
14
|
module RailRoady
|
12
15
|
class RakeHelpers
|
13
16
|
def self.format
|
@@ -19,6 +22,19 @@ module RailRoady
|
|
19
22
|
f = File.join(Rails.root.to_s.gsub(' ', '\ '), 'doc', name)
|
20
23
|
f.to_s
|
21
24
|
end
|
25
|
+
|
26
|
+
def self.sed
|
27
|
+
regex = 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g'
|
28
|
+
case RbConfig::CONFIG['host_os']
|
29
|
+
when /linux|cygwin/
|
30
|
+
return "sed -r '#{regex}'"
|
31
|
+
when /mac|darwin|bsd/
|
32
|
+
return "sed -E '#{regex}'"
|
33
|
+
else
|
34
|
+
raise NotImplementedError
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
22
38
|
end
|
23
39
|
end
|
24
40
|
|
@@ -28,8 +44,7 @@ namespace :diagram do
|
|
28
44
|
@MODELS_BRIEF = RailRoady::RakeHelpers.full_path("models_brief.#{RailRoady::RakeHelpers.format}").freeze
|
29
45
|
@CONTROLLERS_ALL = RailRoady::RakeHelpers.full_path("controllers_complete.#{RailRoady::RakeHelpers.format}").freeze
|
30
46
|
@CONTROLLERS_BRIEF = RailRoady::RakeHelpers.full_path("controllers_brief.#{RailRoady::RakeHelpers.format}").freeze
|
31
|
-
|
32
|
-
@SED = 'sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"'
|
47
|
+
@SED = RailRoady::RakeHelpers.sed
|
33
48
|
|
34
49
|
namespace :models do
|
35
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railroady
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-09-
|
15
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description: Ruby on Rails 3 model and controller UML class diagram generator. Originally
|
18
18
|
based on the 'railroad' plugin and contributions of many others. (`sudo port install
|