cabbage 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +2 -2
  2. data/VERSION +1 -1
  3. data/cabbage.gemspec +1 -1
  4. data/lib/cabbage.rb +4 -4
  5. metadata +10 -10
@@ -1,10 +1,10 @@
1
1
  = cabbage
2
2
 
3
- Cabbage is a simple gem that perses Graphviz DOT files.
3
+ Cabbage is a simple gem that parses Graphviz DOT files.
4
4
 
5
5
  use:
6
6
  install the gem named 'cabbage', and parse a dotfile by invoking 'Cabbage.dotfile(arg)' in your script.
7
- (where 'arg' is either a string containing either a path to a a dotfile or a dotfile itself in the form of a string)
7
+ (where 'arg' is either a string containing either the path to a dotfile or a dot-formatted string)
8
8
 
9
9
  == Contributing to cabbage
10
10
  Send me a message if you feel the urge to contribute.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cabbage"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Josh Lauer"]
@@ -17,7 +17,7 @@ module Cabbage
17
17
  # a DOTfile.
18
18
  def initialize(source = nil)
19
19
  @raw_dotfile = "" # unparsed DOTfile
20
- @graph_type = "" #
20
+ @graph_type = "" #
21
21
  @title = ""
22
22
  @header = {}
23
23
  @nodes = []
@@ -85,7 +85,7 @@ module Cabbage
85
85
  if n[1].include?("=")
86
86
  temp[n[0]] = parse_header(n[1], ",")
87
87
  else
88
- temp[n[0]] = n[1]
88
+ temp[n[0]] = n[1].strip
89
89
  end
90
90
  end
91
91
  return temp
@@ -119,8 +119,8 @@ module Cabbage
119
119
  node_chunk.split("\n").each do |this_line|
120
120
  this_connection = {}
121
121
  temp = this_line.split("->")
122
- this_connection[:start_node] = temp[0].gsub('"', '').gsub('\\', '').strip
123
- this_connection[:end_node] = temp[1].split("[")[0].gsub('"', '').gsub('\\', '').strip
122
+ this_connection[:start_node] = temp[0].gsub('"', '').gsub('\\', '').sub('m_', '').strip
123
+ this_connection[:end_node] = temp[1].split("[")[0].gsub('"', '').gsub('\\', '').sub('m_', '').strip
124
124
  tokens = temp[1].split("[")[1].split("]")[0].split(",")
125
125
  tokens.each do |token_string|
126
126
  token_pair = token_string.split("=")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cabbage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &20776840 !ruby/object:Gem::Requirement
16
+ requirement: &15137480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *20776840
24
+ version_requirements: *15137480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &20774100 !ruby/object:Gem::Requirement
27
+ requirement: &15135640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *20774100
35
+ version_requirements: *15135640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &20772580 !ruby/object:Gem::Requirement
38
+ requirement: &15133500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *20772580
46
+ version_requirements: *15133500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rcov
49
- requirement: &20767660 !ruby/object:Gem::Requirement
49
+ requirement: &15128820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *20767660
57
+ version_requirements: *15128820
58
58
  description: More to come.
59
59
  email: josh.lauer75@gmail.com
60
60
  executables: []
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: -4588039299790151145
92
+ hash: 1830193836739110796
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements: