ytools 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -51,10 +51,7 @@ module YTools
51
51
  yaml_object.merge(YAML::load(options[:literal]))
52
52
  end
53
53
  if YTools::Utils.stdin?
54
- # We need to make sure there are no files that
55
- # ARGF will try to read from
56
- ARGV.clear
57
- yaml_object.merge(YAML::load(ARGF.read))
54
+ yaml_object.merge(YAML::load(STDIN.read))
58
55
  end
59
56
  options[:yaml_object] = yaml_object
60
57
  rescue Exception => e
data/lib/ytools/utils.rb CHANGED
@@ -17,7 +17,7 @@ module YTools
17
17
  def self.stdin?
18
18
  begin
19
19
  require 'fcntl'
20
- STDIN.fcntl(Fcntl::F_GETFL, 0) == 0
20
+ STDIN.fcntl(Fcntl::F_GETFL, 0) == 0 && $stdin.tty?
21
21
  rescue
22
22
  $stdin.stat.size != 0
23
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ytools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabe McArthur