bash-session 0.0.1 → 0.0.2

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: 4056da143568e57bd5614284b04bae039535297e
4
- data.tar.gz: 97ba82055cfb37fa3fdfc2cf6525d0cf30c55a9a
3
+ metadata.gz: 94112c5160f83b5173687f7233a8891ad4bea404
4
+ data.tar.gz: c02ca274af118e6ae761a581c22fea56e31082df
5
5
  SHA512:
6
- metadata.gz: f489dbb73045762cb9051030cbf81dd9b4053c484f4d5e2a22ff8eb6cfac7c53247872a8b784b28cd334bd7838b69619cd8927685024765add71d5e2c85cb6c5
7
- data.tar.gz: a063c08d0c5fea4f68c0609642487abae631ee6e6d7e26d8c6b8a39d50dcec87396575a4144a105cde37727d5efe43d7674828310006a4f614e4be469f30a72c
6
+ metadata.gz: 2c5203f8578c42c5eef1afdeec16244213ef85fa4033faaf648a85181211c7fe03ba96e48353bf412f10f5ec1f4e8bb9b6e1676c134809bbf4f3a5991169a15a
7
+ data.tar.gz: bf36bb9de2287b23a4cc8bec4a40e6a5e6298efbe14f3b4356cd02b0b0858beb96914f8c59267f03f4c46041511a826deb71d6c8bab5ff47608f227a563b7fac
@@ -58,7 +58,7 @@ module Bash
58
58
  private
59
59
 
60
60
  def start_session
61
- @stdin, @outstr, @wait_thr = Open3.popen2e("bash")
61
+ @stdin, @outstr, @wait_thr = Open3.popen2e("bash --login")
62
62
  end
63
63
  end
64
64
  end
@@ -1,5 +1,5 @@
1
1
  module Bash
2
2
  class Session
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -102,4 +102,12 @@ describe Bash::Session do
102
102
 
103
103
  expect(reader.read_nonblock(1000)).to eq("hi......bye\n")
104
104
  end
105
+
106
+ it 'should start a non-interactive login shell session' do
107
+ exit_status = @session.execute("[[ $- != *i* ]]")
108
+ expect(exit_status).to eq(0)
109
+
110
+ exit_status = @session.execute("shopt -q login_shell")
111
+ expect(exit_status).to eq(0)
112
+ end
105
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bash-session
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akshay Karle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler