shellable 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/Gemfile +2 -1
- data/Rakefile +2 -1
- data/lib/shellable/version.rb +2 -1
- data/lib/shellable.rb +3 -2
- data/shellable.gemspec +14 -14
- data/spec/lib/shellable_spec.rb +32 -0
- data/spec/spec_helper.rb +1 -1
- metadata +4 -4
- data/spec/shellable_spec.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 007ff75c825b9fee8251ea24fb45d20463678bcbd662a77e026521a9ef7dbd53
|
4
|
+
data.tar.gz: 16554a18505120ecfdb2d3e679cac67576276b3a5dcd6876f45959eade190eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0bdd24d597b08080d5890be810e38c1e684ab8a1fad906ab968a6d3482e1b4b1e2ab4e727cc75bae4e0384ec01e350c1a42d6ced3657799272b829306b56822
|
7
|
+
data.tar.gz: 10810a8a9ac3da84acbd20c1a846e157fe44dab3ef4f59dfb48fc4d4aabbbb5aa7d2771051673ccdfe456d18a98f91efc4018a955426781f0aaaace19b9ee7db
|
data/.github/workflows/ruby.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/lib/shellable/version.rb
CHANGED
data/lib/shellable.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "shellable/version"
|
3
4
|
|
4
5
|
# Shellable
|
@@ -8,10 +9,10 @@ module Shellable
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def open_shell
|
11
|
-
require
|
12
|
+
require "irb"
|
12
13
|
IRB.setup nil
|
13
14
|
IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
|
14
|
-
require
|
15
|
+
require "irb/ext/multi-irb"
|
15
16
|
IRB.irb nil, self
|
16
17
|
end
|
17
18
|
end
|
data/shellable.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path(
|
2
|
+
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require
|
5
|
+
require "shellable/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
12
|
-
spec.summary
|
13
|
-
spec.description
|
14
|
-
spec.homepage
|
15
|
-
spec.license
|
8
|
+
spec.name = "shellable"
|
9
|
+
spec.version = Shellable::VERSION
|
10
|
+
spec.authors = ["Kevin McDonald"]
|
11
|
+
spec.email = ["kevinstuffandthings@gmail.com"]
|
12
|
+
spec.summary = "Open a REPL inside any Ruby object"
|
13
|
+
spec.description = spec.summary
|
14
|
+
spec.homepage = "https://github.com/kevinstuffandthings/shellable"
|
15
|
+
spec.license = "MIT"
|
16
16
|
|
17
|
-
spec.files
|
18
|
-
spec.executables
|
19
|
-
spec.test_files
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# these tests stink
|
2
|
+
|
3
|
+
module Shellable
|
4
|
+
module RSpec
|
5
|
+
class ShellTarget
|
6
|
+
def thing
|
7
|
+
47
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe Shellable do
|
14
|
+
describe "#open_shell" do
|
15
|
+
class ShellableTarget < described_class::RSpec::ShellTarget
|
16
|
+
include Shellable
|
17
|
+
end
|
18
|
+
let(:subject) { ShellableTarget.new }
|
19
|
+
|
20
|
+
it "can open a shell within its own context" do
|
21
|
+
expect(subject).to respond_to :open_shell
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "::open" do
|
26
|
+
let(:target) { described_class::RSpec::ShellTarget.new }
|
27
|
+
|
28
|
+
it "can open a shell within the context of its argument" do
|
29
|
+
expect(described_class).to respond_to :open
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shellable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McDonald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,7 +131,7 @@ files:
|
|
131
131
|
- lib/shellable.rb
|
132
132
|
- lib/shellable/version.rb
|
133
133
|
- shellable.gemspec
|
134
|
-
- spec/shellable_spec.rb
|
134
|
+
- spec/lib/shellable_spec.rb
|
135
135
|
- spec/spec_helper.rb
|
136
136
|
homepage: https://github.com/kevinstuffandthings/shellable
|
137
137
|
licenses:
|
@@ -157,5 +157,5 @@ signing_key:
|
|
157
157
|
specification_version: 4
|
158
158
|
summary: Open a REPL inside any Ruby object
|
159
159
|
test_files:
|
160
|
-
- spec/shellable_spec.rb
|
160
|
+
- spec/lib/shellable_spec.rb
|
161
161
|
- spec/spec_helper.rb
|
data/spec/shellable_spec.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# these tests stink
|
2
|
-
|
3
|
-
describe Shellable do
|
4
|
-
class ShellTarget
|
5
|
-
def thing
|
6
|
-
47
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '#open_shell' do
|
11
|
-
class ShellableTarget < ShellTarget
|
12
|
-
include Shellable
|
13
|
-
end
|
14
|
-
let(:subject) { ShellableTarget.new }
|
15
|
-
|
16
|
-
it 'can open a shell within its own context' do
|
17
|
-
expect(subject).to respond_to :open_shell
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe '::open' do
|
22
|
-
let(:target) { ShellTarget.new }
|
23
|
-
|
24
|
-
it 'can open a shell within the context of its argument' do
|
25
|
-
expect(described_class).to respond_to :open
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|