cocaine 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NmY5NWQ4N2NiMDRiZjU4NDExMzU5Y2M0YzU3YzZlMDdkYzcyZDgzMA==
5
- data.tar.gz: !binary |-
6
- ODg5YjRhZDEzMmI0NWUxOWMxN2ZjZTkwNjdlNGVjOWMwMGIwNTIyYg==
2
+ SHA1:
3
+ metadata.gz: 183bb99b2dc331acae17ae06bba9497305f62871
4
+ data.tar.gz: 7588340c94577ccc9cfbdb3061de34c0a0dbe7a7
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MGZkM2I3YmI2YmE5ODZjZGIzZDVmOWQwZTJkYjMwOGMwN2MzNmI5YmM5OTZl
10
- MmQ3YWZiYTY3M2I2MWJkNDgxOGE5ZTI0NGY5ZTYwZTdkZDlkNDg0MWMxOTdj
11
- ZGIzOGIxNmUzYzJkYWY5OTUyOGI1ZDZjZGQ2NzczNTc4MGJkMDg=
12
- data.tar.gz: !binary |-
13
- MjFmNTZhMjA5NWI4MjUyNWI2NzM3YjI3MmI0NzIzODJmM2UyNWRjOTg4NDky
14
- OTU4NzY4ZTg3OTc3OTFiMTc0OGVjZDNiYmUyYTdmNTBlMjVkYmIxNzgxYzQz
15
- MzIxYzc1MmIzMWExNGMzNTEwYzM1YzE2NTQ4N2Q4NGYwYmVmMzg=
6
+ metadata.gz: 044ce7602066d9464d844aecd01219d9f6c1a0a37e6cd3ad0a72094edbf6812770c5e98ab2d6b125be3475d4dedc336a4c603a719f3dae1fb6de8a1a01210162
7
+ data.tar.gz: fc8fa3d67672811b19145d4e1ef14f73d7965a2db6f4202ed2f98b8346b993521bbaf4e55d0aa2fcf18cee15cdc166813f67320b90e515033d4d2c2e5d52d594
@@ -13,7 +13,7 @@ module Cocaine
13
13
 
14
14
  def call(command, env = {}, options = {})
15
15
  with_modified_environment(env) do
16
- IO.popen(env_command(command), "r", options) do |pipe|
16
+ IO.popen(command, "r", options) do |pipe|
17
17
  pipe.read
18
18
  end
19
19
  end
@@ -21,26 +21,6 @@ module Cocaine
21
21
 
22
22
  private
23
23
 
24
- def env_command(command)
25
- windows_command(command) || java_command(command) || default_command(command)
26
- end
27
-
28
- def windows_command(command)
29
- if OS.windows?
30
- command
31
- end
32
- end
33
-
34
- def java_command(command)
35
- if OS.java?
36
- "env #{command}"
37
- end
38
- end
39
-
40
- def default_command(command)
41
- command
42
- end
43
-
44
24
  def with_modified_environment(env, &block)
45
25
  ClimateControl.modify(env, &block)
46
26
  end
@@ -44,7 +44,7 @@ module Cocaine
44
44
  def self.posix_spawn_gem_available?
45
45
  require 'posix/spawn'
46
46
  true
47
- rescue
47
+ rescue LoadError
48
48
  false
49
49
  end
50
50
 
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Cocaine
4
- VERSION = "0.5.6".freeze
4
+ VERSION = "0.5.7".freeze
5
5
  end
@@ -86,7 +86,8 @@ describe 'When running an executable in the supplemental path' do
86
86
  describe '#run' do
87
87
  it 'finds the correct executable' do
88
88
  Cocaine::CommandLine.runner = runner_class.new
89
- result = Cocaine::CommandLine.new('ls').run
89
+ command = Cocaine::CommandLine.new('ls')
90
+ result = command.run
90
91
  expect(result.strip).to eq('overridden-ls')
91
92
  end
92
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocaine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Yurek
@@ -14,110 +14,110 @@ dependencies:
14
14
  name: climate_control
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.0.3
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '1.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ! '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.0.3
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ! '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ! '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bourne
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ! '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ! '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: mocha
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ! '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ! '>='
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ! '>='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ! '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: activesupport
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ! '>='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: 3.0.0
96
- - - <
96
+ - - "<"
97
97
  - !ruby/object:Gem::Version
98
98
  version: '5.0'
99
99
  type: :development
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ! '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: 3.0.0
106
- - - <
106
+ - - "<"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '5.0'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: pry
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ! '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ! '>='
120
+ - - ">="
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  description: A small library for doing (command) lines
@@ -126,8 +126,8 @@ executables: []
126
126
  extensions: []
127
127
  extra_rdoc_files: []
128
128
  files:
129
- - .gitignore
130
- - .travis.yml
129
+ - ".gitignore"
130
+ - ".travis.yml"
131
131
  - GOALS
132
132
  - Gemfile
133
133
  - LICENSE
@@ -171,17 +171,17 @@ require_paths:
171
171
  - lib
172
172
  required_ruby_version: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - ! '>='
174
+ - - ">="
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
- - - ! '>='
179
+ - - ">="
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.4.5
184
+ rubygems_version: 2.2.2
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: A small library for doing (command) lines