ruby_expect 1.6.0 → 1.7.5

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: 64ab7f0e6b76231b1d7d190291a40dc31cc2f7c9
4
- data.tar.gz: 57c2411697a5f8360015d23906403a2f56094090
3
+ metadata.gz: 7782ab2750feed2b59c444c0b57f88a41596b4a0
4
+ data.tar.gz: 146c87774d725efbc4ae31055b106187b30dac0e
5
5
  SHA512:
6
- metadata.gz: 0c0e90e541aaab4c945292ba687d1dc416ea5453ee3746aff47cd23054fe43f80744f12f0579ac8f0f0f3908f6751d161b22ae0ac52c8fc4fd18ec836c1a4d7b
7
- data.tar.gz: b45370d25213967730c4e023b7e87747f9296bfe11776174eaf5c7feeef57f2d5eddb8d94e7590e481f36b734742f2358a0745f3a100821eaa26b706bdfc1255
6
+ metadata.gz: bcf05927a04ca66709de48b06aa0f4ae826d655ee9d68bc7021e8ad5763028c19a7b573a9d4ab29d9ac505d4a7781cdbaa4cc2f12887d9fc671daef1b9ad9c82
7
+ data.tar.gz: 59d4cafcad854989a07e6dac9adbfc2c0f00d341cb543d3976b44bfdf3ce17802f24c4d06f2e5b063e2e3775e15bdf6049b18c3621b84dc641bb96300fa0721c
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruby_expect.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2012 Andrew Bates
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/NOTICE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2012 Andrew Bates
2
+ Licensed under the Apache License, Version 2.0 (the "License");
3
+ you may not use this file except in compliance with the License.
4
+ You may obtain a copy of the License at
5
+
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ Unless required by applicable law or agreed to in writing, software
9
+ distributed under the License is distributed on an "AS IS" BASIS,
10
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ See the License for the specific language governing permissions and
12
+ limitations under the License.
13
+
@@ -0,0 +1,153 @@
1
+ RubyExpect
2
+ ==========
3
+ [![Gem Version](https://badge.fury.io/rb/ruby_expect.svg)](https://badge.fury.io/rb/ruby_expect)
4
+ [![Build Status](https://travis-ci.org/abates/ruby_expect.svg?branch=develop)](https://travis-ci.org/abates/ruby_expect)
5
+
6
+ Introduction
7
+ ------------
8
+
9
+ This is a simple expect API written in pure ruby. Part of this library includes a simple procedure DSL
10
+ for creating sequences of expect/send behavior.
11
+
12
+ Examples
13
+ --------
14
+
15
+ ### SSH to a host and run a command
16
+ This example will use the system ssh binary and connect to a host. Upon connecting it will
17
+ execute a command and wait for the response then exit. The response from the command will be
18
+ parsed and printed to the screen.
19
+
20
+ ```ruby
21
+ #!/usr/bin/ruby
22
+
23
+ require 'ruby_expect'
24
+
25
+ username = 'username'
26
+ password = 'password'
27
+ hostname = 'hostname'
28
+
29
+ exp = RubyExpect::Expect.spawn("/usr/bin/ssh #{username}@#{hostname}")
30
+
31
+ exp.procedure do
32
+ retval = 0
33
+ while (retval != 2)
34
+ retval = any do
35
+ expect /Are you sure you want to continue connecting \(yes\/no\)\?/ do
36
+ send 'yes'
37
+ end
38
+
39
+ expect /password:\s*$/ do
40
+ send password
41
+ end
42
+
43
+ expect /\$\s*$/ do
44
+ send 'uptime'
45
+ end
46
+ end
47
+ end
48
+
49
+ # Expect each of the following
50
+ each do
51
+ expect /load\s+average:\s+\d+\.\d+,\s+\d+\.\d+,\s+\d+\.\d+/ do # expect the output of uptime
52
+ puts last_match.to_s
53
+ end
54
+
55
+ expect /\$\s+$/ do # shell prompt
56
+ send 'exit'
57
+ end
58
+ end
59
+ end
60
+ ```
61
+
62
+ ### Interact with a local script
63
+ This example runs a script and interacts with it
64
+ ```ruby
65
+ #!/usr/bin/ruby
66
+
67
+ require 'ruby_expect'
68
+
69
+ root_password = 'root_password'
70
+ new_root_password = 'new_password'
71
+
72
+ exp = RubyExpect::Expect.spawn('mysql_secure_installation', :debug => true)
73
+
74
+ exp.procedure do
75
+ each do
76
+ expect "Enter current password for root (enter for none):" do
77
+ send root_password
78
+ end
79
+
80
+ expect "Change the root password? [Y/n]" do
81
+ send "y"
82
+ end
83
+
84
+ expect "New password:" do
85
+ send new_root_password
86
+ end
87
+
88
+ expect "Re-enter new password:" do
89
+ send new_root_password
90
+ end
91
+
92
+ expect "Remove anonymous users?" do
93
+ send "y"
94
+ end
95
+
96
+ expect "Disallow root login remotely?" do
97
+ send "y"
98
+ end
99
+
100
+ expect "Remove test database and access to it?" do
101
+ send "y"
102
+ end
103
+
104
+ expect "Reload privilege tables now?" do
105
+ send "y"
106
+ end
107
+ end
108
+ end
109
+
110
+ puts "Ended expect script."
111
+ ```
112
+
113
+
114
+ ### SSH to a host and interact
115
+ This example will spawn ssh and login to the host. Once logged in, the interact
116
+ method is called which returns control to the user and allows them to interact
117
+ directly with the remote system
118
+
119
+ ```ruby
120
+ #!/usr/bin/ruby
121
+
122
+ require 'ruby_expect'
123
+
124
+ username = 'username'
125
+ password = 'password'
126
+ hostname = 'hostname'
127
+
128
+ exp = RubyExpect::Expect.spawn("/usr/bin/ssh #{username}@#{hostname}")
129
+ exp.procedure do
130
+ retval = 0
131
+ while (retval != 2)
132
+ retval = any do
133
+ # Accept the key if it isn't already known
134
+ expect /Are you sure you want to continue connecting \(yes\/no\)\?/ do
135
+ send 'yes'
136
+ end
137
+
138
+ # Send the password at the prompt
139
+ expect /password:\s*$/ do
140
+ send password
141
+ end
142
+
143
+ # Expect the shell prompt
144
+ expect /\$\s*$/ do
145
+ send ""
146
+ end
147
+ end
148
+ end
149
+ end
150
+
151
+ # Pass control back to the user
152
+ exp.interact
153
+ ```
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ruby_expect"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -13,4 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
  #
16
+ require "ruby_expect/version"
16
17
  require 'ruby_expect/expect'
18
+ require 'ruby_expect/errors'
@@ -0,0 +1,7 @@
1
+ module RubyExpect
2
+ #####
3
+ # Raised when attempt is made to interact with a closed filehandle
4
+ #
5
+ class ClosedError < StandardError
6
+ end
7
+ end
@@ -18,6 +18,7 @@ require 'thread'
18
18
  require 'ruby_expect/procedure'
19
19
  require 'pty'
20
20
  require 'io/console'
21
+ require 'logger'
21
22
 
22
23
  #####
23
24
  #
@@ -42,8 +43,9 @@ module RubyExpect
42
43
  # know what you are doing!
43
44
  attr_reader :buffer
44
45
 
45
- # Set debug in order to see the output being read from the spawned process
46
- attr_accessor :debug
46
+ # Any supplied logger will be used both for errors and warnings as well
47
+ # as debug information (I/O when sending and expecting)
48
+ attr_accessor :logger
47
49
 
48
50
  #####
49
51
  # Create a new Expect object for the given IO object
@@ -96,7 +98,14 @@ module RubyExpect
96
98
 
97
99
  @child_pid = options[:child_pid]
98
100
  @debug = options[:debug] || false
101
+ @logger = options[:logger]
102
+ if @logger.nil?
103
+ @logger = Logger.new(STDERR)
104
+ @logger.level = Logger::FATAL
105
+ end
106
+
99
107
  @buffer = ''
108
+ @log_buffer = ''
100
109
  @before = ''
101
110
  @match = ''
102
111
  @timeout = 0
@@ -142,6 +151,27 @@ module RubyExpect
142
151
  return RubyExpect::Expect.new(client, options, &block)
143
152
  end
144
153
 
154
+ #####
155
+ # Set debug in order to see the output being read from the spawned process
156
+ def debug= debug
157
+ warn "`debug` is deprecated. Use a logger instead"
158
+ if debug
159
+ @logger.level = Logger::DEBUG
160
+ else
161
+ @logger.level = -1
162
+ end
163
+ end
164
+
165
+ def debug
166
+ warn "`debug` is deprecated. Use a logger instead"
167
+ @logger.debug?
168
+ end
169
+
170
+ def debug?
171
+ warn "`debug` is deprecated. Use a logger instead"
172
+ @logger.debug?
173
+ end
174
+
145
175
  #####
146
176
  # Perform a series of 'expects' using the DSL defined in Procedure
147
177
  #
@@ -228,6 +258,7 @@ module RubyExpect
228
258
  # end
229
259
  #
230
260
  def expect *patterns, &block
261
+ @logger.debug("Expecting: #{patterns.inspect}") if @logger.debug?
231
262
  patterns = pattern_escape(*patterns)
232
263
  @end_time = 0
233
264
  if (@timeout != 0)
@@ -237,11 +268,13 @@ module RubyExpect
237
268
  @before = ''
238
269
  matched_index = nil
239
270
  while (@end_time == 0 || Time.now < @end_time)
240
- return nil if (@read_fh.closed?)
271
+ raise ClosedError.new("Read filehandle is closed") if (@read_fh.closed?)
241
272
  break unless (read_proc)
242
273
  @last_match = nil
243
274
  patterns.each_index do |i|
244
275
  if (match = patterns[i].match(@buffer))
276
+ log_buffer(true)
277
+ @logger.debug(" Matched: #{match}") if @logger.debug?
245
278
  @last_match = match
246
279
  @before = @buffer.slice!(0...match.begin(0))
247
280
  @match = @buffer.slice!(0...match.to_s.length)
@@ -256,6 +289,7 @@ module RubyExpect
256
289
  return matched_index
257
290
  end
258
291
  end
292
+ @logger.debug("Timeout")
259
293
  return nil
260
294
  end
261
295
 
@@ -291,6 +325,22 @@ module RubyExpect
291
325
  end
292
326
 
293
327
  private
328
+ def log_buffer incomplete_lines=false
329
+ return unless @logger.info?
330
+ if @log_buffer =~ /[\r\n]/
331
+ lines = @log_buffer.split(/[\r\n]+/, -1)
332
+ @log_buffer = lines.pop
333
+ lines.each do |line|
334
+ @logger.info(" Received: #{line.scan(/[[:print:]]/).join}")
335
+ end
336
+ end
337
+
338
+ if incomplete_lines and @log_buffer !~ /^\s*$/
339
+ @logger.info(" Received: #{@log_buffer.scan(/[[:print:]]/).join}")
340
+ @log_buffer = ''
341
+ end
342
+ end
343
+
294
344
  def interact_loop stdin
295
345
  done = false
296
346
  while (! done)
@@ -327,9 +377,9 @@ module RubyExpect
327
377
  else
328
378
  input = @read_fh.readpartial(4096)
329
379
  @buffer << input
330
- if (@debug)
331
- STDERR.print input
332
- STDERR.flush
380
+ if @logger.info?
381
+ @log_buffer << input
382
+ log_buffer
333
383
  end
334
384
  end
335
385
  end
@@ -339,9 +389,9 @@ module RubyExpect
339
389
  return false
340
390
  rescue Exception => e
341
391
  unless (e.to_s == 'stream closed')
342
- STDERR.puts "Exception in read_loop:"
343
- STDERR.puts "#{e}"
344
- STDERR.puts "\t#{e.backtrace.join("\n\t")}"
392
+ @logger.error("Exception in read_loop:")
393
+ @logger.error("#{e}")
394
+ @logger.error("\t#{e.backtrace.join("\n\t")}")
345
395
  end
346
396
  @read_fh.close
347
397
  return false
@@ -0,0 +1,3 @@
1
+ module RubyExpect
2
+ VERSION = "1.7.4"
3
+ end
@@ -0,0 +1,40 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: ruby_expect 1.7.4 ruby lib
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "ruby_expect"
6
+ s.version = "1.7.5"
7
+
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib"]
10
+ s.authors = ["Andrew Bates"]
11
+ s.bindir = "exe"
12
+ s.date = "2016-01-06"
13
+ s.description = "Ruby implementation for send/expect interaction"
14
+ s.email = ["abates@omeganetserv.com"]
15
+ s.files = [".gitignore", ".rspec", ".travis.yml", "Gemfile", "LICENSE", "NOTICE", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ruby_expect.rb", "lib/ruby_expect/errors.rb", "lib/ruby_expect/expect.rb", "lib/ruby_expect/procedure.rb", "lib/ruby_expect/version.rb", "ruby_expect.gemspec"]
16
+ s.homepage = "https://github.com/abates/ruby_expect"
17
+ s.rubygems_version = "2.4.8"
18
+ s.summary = "This is a simple expect implementation that provides interactive access to IO objects"
19
+
20
+ if s.respond_to? :specification_version then
21
+ s.specification_version = 4
22
+
23
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
+ s.add_development_dependency(%q<bundler>, ["~> 1.10"])
25
+ s.add_development_dependency(%q<rake>, [">= 12.3.3"])
26
+ s.add_development_dependency(%q<rspec>, [">= 0"])
27
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
28
+ else
29
+ s.add_dependency(%q<bundler>, ["~> 1.10"])
30
+ s.add_development_dependency(%q<rake>, [">= 12.3.3"])
31
+ s.add_dependency(%q<rspec>, [">= 0"])
32
+ s.add_dependency(%q<simplecov>, [">= 0"])
33
+ end
34
+ else
35
+ s.add_dependency(%q<bundler>, ["~> 1.10"])
36
+ s.add_development_dependency(%q<rake>, [">= 12.3.3"])
37
+ s.add_dependency(%q<rspec>, [">= 0"])
38
+ s.add_dependency(%q<simplecov>, [">= 0"])
39
+ end
40
+ end
metadata CHANGED
@@ -1,38 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_expect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bates
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2014-10-27 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.3'
19
+ version: '1.10'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.3'
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 12.3.3
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 12.3.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
27
69
  description: Ruby implementation for send/expect interaction
28
- email: abates@omeganetserv.com
70
+ email:
71
+ - abates@omeganetserv.com
29
72
  executables: []
30
73
  extensions: []
31
74
  extra_rdoc_files: []
32
75
  files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - LICENSE
81
+ - NOTICE
82
+ - README.md
83
+ - Rakefile
84
+ - bin/console
85
+ - bin/setup
33
86
  - lib/ruby_expect.rb
87
+ - lib/ruby_expect/errors.rb
34
88
  - lib/ruby_expect/expect.rb
35
89
  - lib/ruby_expect/procedure.rb
90
+ - lib/ruby_expect/version.rb
91
+ - ruby_expect.gemspec
36
92
  homepage: https://github.com/abates/ruby_expect
37
93
  licenses: []
38
94
  metadata: {}
@@ -42,17 +98,17 @@ require_paths:
42
98
  - lib
43
99
  required_ruby_version: !ruby/object:Gem::Requirement
44
100
  requirements:
45
- - - '>='
101
+ - - ">="
46
102
  - !ruby/object:Gem::Version
47
103
  version: '0'
48
104
  required_rubygems_version: !ruby/object:Gem::Requirement
49
105
  requirements:
50
- - - '>='
106
+ - - ">="
51
107
  - !ruby/object:Gem::Version
52
108
  version: '0'
53
109
  requirements: []
54
110
  rubyforge_project:
55
- rubygems_version: 2.2.2
111
+ rubygems_version: 2.4.8
56
112
  signing_key:
57
113
  specification_version: 4
58
114
  summary: This is a simple expect implementation that provides interactive access to