graph-reader 0.1.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad71bfe3a331ad39aa3e77f7f0f8d777a58afb69
4
- data.tar.gz: c060c7c0e3d62d51aa44752570fde29c3933b5b3
3
+ metadata.gz: 8cf27c421a8f749e2fdc85b069c1ef0d43d8f143
4
+ data.tar.gz: 0544abcfa39b7a92d6e5057a02987c24eba6e48e
5
5
  SHA512:
6
- metadata.gz: 3e9bad65b84640394a69872a63ff7bdd0aa36176c557d2bb5fdc94b2d8e0170efb69f51d7f4feb43b14e4afe9f5cab2a0bbe3d870eb098e16229dc6495ade0c3
7
- data.tar.gz: 44acbe1eed7897ec5a304e73b46479ff5c40eb0833b5cd1a95259ca0fb7d4f15ed111ba166778dc5bcd3cf39ab99cca5d3e2f0cb474da62975a43744bc7e93ce
6
+ metadata.gz: 2f743ef2f2f873a1198a88af38bdd19b67fd3316bd7b1f0e28005307fcc8119fa3d9643de10194fa88e8d680c08778b245bec0d871c8c77e194233fc0ea491cb
7
+ data.tar.gz: da07a2b24be31e19910a004bd0de36b3954917d5f1183f532da99b0475e1558a4901ad9ad0e26598e5e17e0c3da5e606b15aeb581c5d89cd4febe63b4bc124ef
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ before_install: gem install bundler -v 1.12.5
3
+ rvm:
4
+ - 2.3.1
5
+ - 2.3.0
6
+ - jruby-9.0.4.0
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
+ <a href="https://codeclimate.com/github/shadow3x3x3/graph-reader"><img src="https://codeclimate.com/github/shadow3x3x3/graph-reader/badges/gpa.svg" /></a>
2
+ [![Build Status](https://travis-ci.org/shadow3x3x3/graph-reader.svg?branch=master)](https://travis-ci.org/shadow3x3x3/graph-reader)
3
+ [![Gem Version](https://badge.fury.io/rb/graph-reader.svg)](https://badge.fury.io/rb/graph-reader)
1
4
  # Graph-Reader
2
5
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/graph/reader`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
6
  ## Installation
8
7
 
9
8
  Add this line to your application's Gemfile:
@@ -22,8 +21,6 @@ Or install it yourself as:
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
26
-
27
24
  ## Development
28
25
 
29
26
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/graph-reader.rb CHANGED
@@ -36,7 +36,7 @@ module GraphReader
36
36
  end
37
37
 
38
38
  def add_edge(edge)
39
- new_edge = Edge.new(edge)
39
+ new_edge = GraphReader::Edge.new(edge)
40
40
  unless duplicate_edge?(new_edge)
41
41
  @edges << new_edge
42
42
  add_node(new_edge.src)
@@ -1,11 +1,14 @@
1
- # Record Edge
2
- class Edge
3
- attr_accessor :id, :src, :dst, :attrs
1
+ module GraphReader
2
+ # Record Edge
3
+ class Edge
4
+ attr_accessor :id, :src, :dst, :attrs
4
5
 
5
- def initialize(params)
6
- @id = params.shift.to_i
7
- @src = params.shift.to_i
8
- @dst = params.shift.to_i
9
- @attrs = params
6
+ def initialize(params)
7
+ @id = params.shift.to_i
8
+ @src = params.shift.to_i
9
+ @dst = params.shift.to_i
10
+ @attrs = params
11
+ end
10
12
  end
11
13
  end
14
+
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GraphReader
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph-reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - shadow3x3x3
@@ -61,6 +61,7 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
+ - ".travis.yml"
64
65
  - CODE_OF_CONDUCT.md
65
66
  - Gemfile
66
67
  - LICENSE.txt