tty-command 0.3.2 → 0.3.3

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: 94f05c48b5dc4ffb259eed2cca53727acfa59f45
4
- data.tar.gz: 5dcbf108c255ba4e743e2a12df20c81d98813c83
3
+ metadata.gz: 858fdf67fb28440aac840d0d2cddcc619d2b8d57
4
+ data.tar.gz: e643017a30586492fa9f4f36fd8837d4cee920ea
5
5
  SHA512:
6
- metadata.gz: fb756ff22fcb8d4cc721b86f01955cbd880f69ec0780a43a3eeab3c46341f23d8e38fb911a42d5a98825e6144c55e69fbf734637db2545de15d088ffc59fbb7c
7
- data.tar.gz: d812bd31345c16df4226f17d7edb0e7ff56dc5b5d7e3f706222e458c2b22ce66b255bafe33ce399065e7557a77ba4048d873138e46c44962171429bb60bde7b3
6
+ metadata.gz: 30dc457a331aaf5cf8111264053f47860aca76bf3acd20f613ab73cad938fa878e3990d47eadc0a4b45b2a12bdff18d376c070118834cc2e808a82bf6db633be
7
+ data.tar.gz: d22d2094e22c85851ed3f4f479a6873bf2543f0b3dbd64ef9a658d6e345a1ba72d59e745b79ff218724931bb57cd23123f76512d6a8b59763a2cc43590a5fc2d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.3.3] - 2017-02-10
4
+
5
+ ### Changed
6
+ * Update deprecated Fixnum class to Integer for Ruby 2.4 compatability by Edmund Larden(@admund)
7
+ * Remove self extension from Execute
8
+
3
9
  ## [v0.3.2] - 2017-02-06
4
10
 
5
11
  ### Fixed
@@ -33,6 +39,7 @@
33
39
 
34
40
  * Initial implementation and release
35
41
 
42
+ [v0.3.3]: https://github.com/piotrmurach/tty-command/compare/v0.3.2...v0.3.3
36
43
  [v0.3.2]: https://github.com/piotrmurach/tty-command/compare/v0.3.1...v0.3.2
37
44
  [v0.3.1]: https://github.com/piotrmurach/tty-command/compare/v0.3.0...v0.3.1
38
45
  [v0.3.0]: https://github.com/piotrmurach/tty-command/compare/v0.2.0...v0.3.0
data/README.md CHANGED
@@ -249,7 +249,7 @@ You can directly use shell redirection facility like so:
249
249
  cmd.run("ls 1&>2")
250
250
  ```
251
251
 
252
- You can provide the streams as additional hash options where the key is one of `:in`, `:out`, `:err`, a fixnum(a file descriptor for the child process), an IO or array. The pair value can be a filename for redirection.
252
+ You can provide the streams as additional hash options where the key is one of `:in`, `:out`, `:err`, an integer (a file descriptor for the child process), an IO or array. The pair value can be a filename for redirection.
253
253
 
254
254
  ```ruby
255
255
  cmd.run(:ls, :in => "/dev/null") # read mode
@@ -6,8 +6,6 @@ require 'securerandom'
6
6
  module TTY
7
7
  class Command
8
8
  module Execute
9
- extend self
10
-
11
9
  # Execute command in a child process
12
10
  #
13
11
  # The caller should ensure that all IO objects are closed
@@ -62,7 +60,7 @@ module TTY
62
60
  if process_key.to_s == 'in'
63
61
  value = convert_to_fd(value)
64
62
  end
65
- opts[process_key]= value
63
+ opts[process_key] = value
66
64
  end
67
65
  opts
68
66
  end
@@ -77,7 +75,7 @@ module TTY
77
75
  true
78
76
  when ::IO
79
77
  true
80
- when ::Fixnum
78
+ when ::Integer
81
79
  object >= 0
82
80
  when respond_to?(:to_i) && !object.to_io.nil?
83
81
  true
@@ -99,7 +97,7 @@ module TTY
99
97
  def convert_to_fd(object)
100
98
  return object if fd?(object)
101
99
 
102
- if object.is_a?(::String) && ::File.exists?(object)
100
+ if object.is_a?(::String) && ::File.exist?(object)
103
101
  return object
104
102
  end
105
103
 
@@ -119,7 +117,7 @@ module TTY
119
117
  :out
120
118
  when STDERR, $stderr, :err, :stderr, 2
121
119
  :err
122
- when Fixnum
120
+ when Integer
123
121
  object >= 0 ? IO.for_fd(object) : nil
124
122
  when IO
125
123
  object
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class Command
5
- VERSION = '0.3.2'
5
+ VERSION = '0.3.3'
6
6
  end # Command
7
7
  end # TTY
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pastel