graph_builder 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - jruby-19mode
5
+ - rbx-19mode
6
+
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'rake'
4
+
3
5
  # Specify your gem's dependencies in graph_builder.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # GraphBuilder
2
2
 
3
- DSL to build directed graphs
3
+ [![Build History][2]][1]
4
+
5
+ [1]: http://travis-ci.org/tracksun/graph_builder
6
+ [2]: https://secure.travis-ci.org/tracksun/graph_builder.png?branch=master
7
+
8
+
9
+ DSL to build directed graphs
4
10
 
5
11
  ## Installation
6
12
 
@@ -84,7 +90,7 @@ graph_builder comes with the module GraphBuilder::Linkable which implements
84
90
  link_to( other )
85
91
 
86
92
  # returns an array of objects self is linked to
87
- link_to
93
+ linked_to
88
94
 
89
95
  # returns an array of pairs [ [ self, other1 ], [ self, other2 ], ... ]
90
96
  # for linked objects other1, other2, ...
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+ require 'rake/testtask'
4
+
5
+ task default: [:test]
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.pattern = "test/*.rb"
9
+ end
@@ -1,14 +1,17 @@
1
1
  module GraphBuilder
2
2
  module Linkable
3
3
 
4
+ # links other to self
4
5
  def link_to other
5
6
  linked_to << other
6
7
  end
7
8
 
9
+ # returns array of objects to which self is linked
8
10
  def linked_to
9
11
  @linked_to ||= []
10
12
  end
11
13
 
14
+ # returns array of [ self, object ] where each object linked to self
12
15
  def links
13
16
  linked_to.map{|to|[self,to]}
14
17
  end
@@ -1,3 +1,3 @@
1
1
  module GraphBuilder
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-04 00:00:00.000000000 Z
12
+ date: 2012-06-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: DSL for building directed graphs
15
15
  email:
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
+ - .travis.yml
22
23
  - Gemfile
23
24
  - LICENSE
24
25
  - README.md