lynx 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of lynx might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGES.md +4 -0
- data/README.md +2 -0
- data/lib/lynx.rb +4 -0
- data/lib/lynx/pipe.rb +1 -0
- data/lib/lynx/pipe/p_open.rb +20 -0
- data/lib/lynx/version.rb +1 -1
- data/lynx.gemspec +1 -0
- data/test/lib/lynx/pipe/p_open_test.rb +21 -0
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ad240edf3b7fc6dcb2c5d1cbab2e5dbfc57d70
|
4
|
+
data.tar.gz: 053fb2aae52646fac82ec5d57928f5861bf4c054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e634deda6e69aea2d02ffd07c713787979b1b7641f8e7e5da7ff29bcb251d1057ec4e92aa42f6d371161cd26bf4a408a106da88372af8c8ec716be042a56607
|
7
|
+
data.tar.gz: e08cf96f1de1cc92972d412c44e011927640599c3ad878e5651b2b5d11581429f13494f23bb00250d3f95f3c3436600e7db70f372fec56b3312ceeb04812e8e1
|
data/.travis.yml
ADDED
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -27,3 +27,5 @@ Coming soon...
|
|
27
27
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
28
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
29
|
5. Create new Pull Request
|
30
|
+
|
31
|
+
## Build Status [![Build Status](https://secure.travis-ci.org/panthomakos/lynx.png?branch=master)](http://travis-ci.org/panthomakos/lynx)
|
data/lib/lynx.rb
CHANGED
data/lib/lynx/pipe.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'lynx/pipe/basic'
|
2
|
+
|
3
|
+
module Lynx
|
4
|
+
module Pipe
|
5
|
+
class POpen < Basic
|
6
|
+
|
7
|
+
def initialize(logger)
|
8
|
+
@logger = logger
|
9
|
+
end
|
10
|
+
|
11
|
+
def perform(command)
|
12
|
+
IO.popen(command.to_s) do |io|
|
13
|
+
while (line = io.gets) do
|
14
|
+
@logger.info("[Lynx:POpen] #{line}") if @logger
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/lynx/version.rb
CHANGED
data/lynx.gemspec
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'lynx'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'lynx/command/basic'
|
4
|
+
require 'lynx/pipe/p_open'
|
5
|
+
require 'logger'
|
6
|
+
|
7
|
+
describe Lynx::Pipe::POpen do
|
8
|
+
def setup
|
9
|
+
@config = Lynx::Config.new
|
10
|
+
@command = Lynx::Command::Basic.new(@config).mysql
|
11
|
+
@command.batch.no_names.sql("select 100")
|
12
|
+
@pipe = Lynx.popen(Logger.new(STDOUT))
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_perform
|
16
|
+
output = capture_subprocess_io do
|
17
|
+
@pipe.perform(@command)
|
18
|
+
end
|
19
|
+
assert(output.any? { |line| line =~ /POpen.*100/ }, "missing Popen output")
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lynx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pan Thomakos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Ruby command line wrapper for MySQL.
|
28
42
|
email:
|
29
43
|
- pan.thomakos@gmail.com
|
@@ -32,6 +46,7 @@ extensions: []
|
|
32
46
|
extra_rdoc_files: []
|
33
47
|
files:
|
34
48
|
- .gitignore
|
49
|
+
- .travis.yml
|
35
50
|
- CHANGES.md
|
36
51
|
- Gemfile
|
37
52
|
- LICENSE.txt
|
@@ -49,6 +64,7 @@ files:
|
|
49
64
|
- lib/lynx/pipe/debug.rb
|
50
65
|
- lib/lynx/pipe/get.rb
|
51
66
|
- lib/lynx/pipe/import.rb
|
67
|
+
- lib/lynx/pipe/p_open.rb
|
52
68
|
- lib/lynx/pipe/run.rb
|
53
69
|
- lib/lynx/pipe/write.rb
|
54
70
|
- lib/lynx/version.rb
|
@@ -59,6 +75,7 @@ files:
|
|
59
75
|
- test/lib/lynx/d_s_l_test.rb
|
60
76
|
- test/lib/lynx/pipe/append_test.rb
|
61
77
|
- test/lib/lynx/pipe/get_test.rb
|
78
|
+
- test/lib/lynx/pipe/p_open_test.rb
|
62
79
|
- test/lib/lynx/pipe/write_test.rb
|
63
80
|
homepage: https://www.github.com/panthomakos/lynx
|
64
81
|
licenses: []
|
@@ -90,5 +107,6 @@ test_files:
|
|
90
107
|
- test/lib/lynx/d_s_l_test.rb
|
91
108
|
- test/lib/lynx/pipe/append_test.rb
|
92
109
|
- test/lib/lynx/pipe/get_test.rb
|
110
|
+
- test/lib/lynx/pipe/p_open_test.rb
|
93
111
|
- test/lib/lynx/pipe/write_test.rb
|
94
112
|
has_rdoc:
|