scmd 3.0.2 → 3.0.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
- SHA1:
3
- metadata.gz: 5e48e0e6abec09c2d488171bf2ffd04031b7efbe
4
- data.tar.gz: f359070c4b73bb593beeeef403bfc14646bf5cce
5
2
  SHA512:
6
- metadata.gz: dd6d817e173b8ce52076b82cd2ef58ac7951d640284466f06bedb98640479e272822a7d1c46c11f84c34df48513dc4ecd34b4f4d93fd109e3f4c39df45d89512
7
- data.tar.gz: 258d7604511058d00fce7787a5e9d1f37f5ae06bfe4f2e59a4e656a31dfb0b07987714a16797b55fb8185678a802a11a05e55e3d566a97a33080e4b84b75b61b
3
+ data.tar.gz: ed9ca292a7ab5bacd4b612125296145d99fd3d20b1d4c3c55fc3da46a11426211ceac1f8f6972297c03ed22e423a95217c82d32b7e964360336c728cad0c8c4d
4
+ metadata.gz: ad853af953c41c5abffd384004a4859a5257ed7aaaaf9bcc7f63a23b7a672814f8b96133bdcd567607217c86ee2a6627552a83a91961a4a9fde65d09fc8d5fb0
5
+ SHA1:
6
+ data.tar.gz: 09b25fe5cd8e3be7e5612292c988ca45fde59368
7
+ metadata.gz: d0c86ff35195eeef15b79dc55e82bb8966d7506b
data/Gemfile CHANGED
@@ -4,3 +4,5 @@ gemspec
4
4
 
5
5
  gem 'pry', "~> 0.9.0"
6
6
  gem 'whysoslow'
7
+
8
+ gem 'ggem'
@@ -25,7 +25,7 @@ module Scmd
25
25
 
26
26
  def run(input = nil)
27
27
  @run_calls.push(InputCall.new(input))
28
- Scmd.calls.push(Scmd::Call.new(self, input))
28
+ Scmd.calls.push(Scmd::Call.new(self, input)) if ENV['SCMD_TEST_MODE']
29
29
  self
30
30
  end
31
31
 
@@ -35,7 +35,7 @@ module Scmd
35
35
 
36
36
  def run!(input = nil)
37
37
  @run_bang_calls.push(InputCall.new(input))
38
- Scmd.calls.push(Scmd::Call.new(self, input))
38
+ Scmd.calls.push(Scmd::Call.new(self, input)) if ENV['SCMD_TEST_MODE']
39
39
  self
40
40
  end
41
41
 
@@ -45,7 +45,7 @@ module Scmd
45
45
 
46
46
  def start(input = nil)
47
47
  @start_calls.push(InputCall.new(input))
48
- Scmd.calls.push(Scmd::Call.new(self, input))
48
+ Scmd.calls.push(Scmd::Call.new(self, input)) if ENV['SCMD_TEST_MODE']
49
49
  @running = true
50
50
  end
51
51
 
@@ -1,3 +1,3 @@
1
1
  module Scmd
2
- VERSION = "3.0.2"
2
+ VERSION = "3.0.3"
3
3
  end
@@ -5,7 +5,7 @@ require "scmd/version"
5
5
 
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = "scmd"
8
- gem.version = "3.0.2"
8
+ gem.version = Scmd::VERSION
9
9
  gem.authors = ["Kelly Redding", "Collin Redding"]
10
10
  gem.email = ["kelly@kellyredding.com", "collin.redding@me.com"]
11
11
  gem.summary = %q{Build and run system commands.}
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_development_dependency("assert", ["~> 2.16.1"])
21
+ gem.add_development_dependency("assert", ["~> 2.16.2"])
22
22
 
23
23
  gem.add_dependency("posix-spawn", ["~> 0.3.11"])
24
24
 
@@ -161,6 +161,22 @@ class Scmd::CommandSpy
161
161
  assert_equal 2, Scmd.calls.size
162
162
  end
163
163
 
164
+ should "not track global run, run! or start calls if not in test mode" do
165
+ ENV.delete('SCMD_TEST_MODE')
166
+
167
+ input = Factory.string
168
+ # if `Scmd.calls` is called when not in test mode it will raise an error,
169
+ # so if no error is raised then it didn't try to add the call
170
+ assert_raises(NoMethodError){ Scmd.calls }
171
+ assert_nothing_raised do
172
+ subject.run(input)
173
+ subject.run!(input)
174
+ subject.start(input)
175
+ end
176
+
177
+ ENV['SCMD_TEST_MODE'] = '1'
178
+ end
179
+
164
180
  should "track its wait calls" do
165
181
  timeout = Factory.string
166
182
  subject.wait(timeout)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,28 +10,28 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2016-06-01 00:00:00 Z
13
+ date: 2016-08-09 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: assert
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ version_requirements: &id001 !ruby/object:Gem::Requirement
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
22
- version: 2.16.1
20
+ version: 2.16.2
23
21
  type: :development
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: posix-spawn
22
+ requirement: *id001
23
+ name: assert
27
24
  prerelease: false
28
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ - !ruby/object:Gem::Dependency
26
+ version_requirements: &id002 !ruby/object:Gem::Requirement
29
27
  requirements:
30
28
  - - ~>
31
29
  - !ruby/object:Gem::Version
32
30
  version: 0.3.11
33
31
  type: :runtime
34
- version_requirements: *id002
32
+ requirement: *id002
33
+ name: posix-spawn
34
+ prerelease: false
35
35
  description: Build and run system commands.
36
36
  email:
37
37
  - kelly@kellyredding.com
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements: []
90
90
 
91
91
  rubyforge_project:
92
- rubygems_version: 2.6.4
92
+ rubygems_version: 2.5.1
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: Build and run system commands.