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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee98601b391221d3f66f6e299106289e7c7f7b66
4
- data.tar.gz: 1e7114148981d5bdae8fb6b24043e571d9e07191
3
+ metadata.gz: 07ad240edf3b7fc6dcb2c5d1cbab2e5dbfc57d70
4
+ data.tar.gz: 053fb2aae52646fac82ec5d57928f5861bf4c054
5
5
  SHA512:
6
- metadata.gz: d4b85781f67c26527814d90c20a354518fa46c8e328e1b24823d7a3f564f1cdeb84df551d042da8430b0e5b7b671fb8c0771f95cd5a550cbd3eef2c1a2f4a973
7
- data.tar.gz: 6715eb9bbee48d5412d6948dc86b3f748196bfdd885c343b49d737468092bdc431acc60a0d21434f924a11cedc2bb008240adfd331f979e94d5ceeb6cdc95929
6
+ metadata.gz: 9e634deda6e69aea2d02ffd07c713787979b1b7641f8e7e5da7ff29bcb251d1057ec4e92aa42f6d371161cd26bf4a408a106da88372af8c8ec716be042a56607
7
+ data.tar.gz: e08cf96f1de1cc92972d412c44e011927640599c3ad878e5651b2b5d11581429f13494f23bb00250d3f95f3c3436600e7db70f372fec56b3312ceeb04812e8e1
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ script: "bundle exec rake"
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1.0
7
+ - 2.2.0
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.0
2
+
3
+ * Added `Lynx::popen` pipe. (jakeokt)
4
+
1
5
  # 0.2.1
2
6
 
3
7
  * Added `socket` configuration option. (panthomakos)
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
@@ -34,6 +34,10 @@ module Lynx
34
34
  Pipe::Run.new
35
35
  end
36
36
 
37
+ def popen(*args)
38
+ Pipe::POpen.new(*args)
39
+ end
40
+
37
41
  def get
38
42
  Pipe::Get.new
39
43
  end
data/lib/lynx/pipe.rb CHANGED
@@ -5,3 +5,4 @@ require 'lynx/pipe/get'
5
5
  require 'lynx/pipe/debug'
6
6
  require 'lynx/pipe/import'
7
7
  require 'lynx/pipe/run'
8
+ require 'lynx/pipe/p_open'
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Lynx
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/lynx.gemspec CHANGED
@@ -18,4 +18,5 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_development_dependency('minitest')
21
+ gem.add_development_dependency('rake')
21
22
  end
@@ -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.2.1
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-02-23 00:00:00.000000000 Z
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: