grapht 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c81c4cd2f0ae2bead5fae5316a8f4143a81a5f7
4
- data.tar.gz: bbfcabd60418b98db230be8ee8a2b4d374fc1359
3
+ metadata.gz: 28b0d92ac5111da4102fa9375ed2ff8cd031c36f
4
+ data.tar.gz: 92e20cc9d8968b744a9e07764620541f5070fc23
5
5
  SHA512:
6
- metadata.gz: 746748c55ed22100d08010c4ce3c48fe1339a2af7d03d57ba7ce9bacdc8290be16ab56d9d7bf12b3f618ab39ef6df98b48f844ed5cbc160fc91fe836f0010afb
7
- data.tar.gz: 1a864c3901bf0d638db817c969ba69e437e979b9398cf3342d63a60301cb4dd56020bf384b6d46a5965bf7366a1620221d860de999846bee8071f3a2c5842743
6
+ metadata.gz: d0c14b3abd8022f504200a9c64a4de95291ec02c57dfa482165868179ab897309e1b37105e2ab2281e780cf7a7b40f18176cbb7698ecd514d470947b776fc4e2
7
+ data.tar.gz: abf23e58cacfa00294bc257a3bbf57d9778ec88b8d5cb76b7a47679f7aa8fa2ed195827cc21e93c77c05fa35a62d9f268f0400d40bf5ac4b30270ba572793249
data/bin/grapht CHANGED
@@ -8,7 +8,13 @@ if [ $? -ne 0 ]; then
8
8
  fi
9
9
 
10
10
  if [ "$#" -ge 1 ]; then
11
- phantomjs $script $@ < /dev/stdin
11
+ if [ ! -t 0 ]; then
12
+ phantomjs $script $@ < /dev/stdin
13
+ else
14
+ echo "ERROR:"
15
+ echo "-- grapht was called without STDIN data."
16
+ exit 1
17
+ fi
12
18
  else
13
19
  echo "ERROR:"
14
20
  echo "-- grapht was called with unknown arguments:"
@@ -6,8 +6,8 @@ require 'grapht/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "grapht"
8
8
  spec.version = Grapht::VERSION
9
- spec.authors = ["Tim Lowrimore"]
10
- spec.email = ["tim@plia.com"]
9
+ spec.authors = ["Tim Lowrimore", "Josh Lewis"]
10
+ spec.email = ["tim@plia.com", "josh@plia.com"]
11
11
  spec.description = %q{Grapht is a server-side graphing library built on PhantomJS and utilizing D3.js. Grapht provides a CLI for simple Bash scripting. It also profides a light-weight Ruby API to make service-level integration simple.}
12
12
  spec.summary = %q{Grapht is a server-side graphing library built on PhantomJS and utilizing D3.js.}
13
13
  spec.homepage = "https://github.com/trade-informatics/grapht"
@@ -11,8 +11,8 @@ module Grapht
11
11
  options = *options.select { |k,v| ALLOWED_OPTIONS.include? k }.flatten
12
12
 
13
13
  out, err, status =
14
- Open3.capture3 CMD, type, *options, stdin_data: json_data, binmode: true
15
-
14
+ Open3.capture3 CMD, type, *options, stdin_data: json_data
15
+
16
16
  raise Grapht::Shell::Error, err unless status.success?
17
17
  out
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Grapht
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -79,10 +79,10 @@ fns =
79
79
 
80
80
  readDataIn: ->
81
81
  try
82
- if fs.size('/dev/stdin') == 0
83
- fns.logError('No graph data was received!')
82
+ if (data = fs.read('/dev/stdin')).length
83
+ data
84
84
  else
85
- fs.read('/dev/stdin')
85
+ fns.logError('No graph data was received!')
86
86
 
87
87
  catch err
88
88
  @logError err
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grapht
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Lowrimore
8
+ - Josh Lewis
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-08-13 00:00:00.000000000 Z
12
+ date: 2014-08-14 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -57,6 +58,7 @@ description: Grapht is a server-side graphing library built on PhantomJS and uti
57
58
  Ruby API to make service-level integration simple.
58
59
  email:
59
60
  - tim@plia.com
61
+ - josh@plia.com
60
62
  executables:
61
63
  - grapht
62
64
  extensions: []