irbtools 4.0.0 → 4.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e9a398324ec34c6a93632f3eb26f84be51607b45e1e06e311a3c7507e11e15b
4
- data.tar.gz: bb9072432d1e2404e9bcb1a763d338458d97d8126bbdd6e26b773aaff98c514e
3
+ metadata.gz: 4c962628e77711b94b8b2c4f1c9324d5b35c1f0b92419519fd6caa0509214219
4
+ data.tar.gz: d58171b0e82e5aba322a790c8ed9d51f96ce0606ddbfca60f44391719cfc07b3
5
5
  SHA512:
6
- metadata.gz: 33c1fd0e1ee8b60cccbc8cc10620341826aaaebaed527bea9e4a046347d2a1753c91bdb69204619de6624981ed58e838d5b0fdf7c08cf26ce24375ec0d9a39ce
7
- data.tar.gz: 2c8c5a3668896580a9f0e6f6e8a959eff7b80caacbfb3b6632114063ad1f511e03d56b3dccf84f0d6f5ccc42e3c16c8f065315feed9022f41a3ffd15f182083f
6
+ metadata.gz: bd488a948771e30dcab7dfc91c2e29fe223ac92976f4111c8e9154517107a92859b3d8f9da6713ec4c8439f453ec928031265053fbe761e37e749666a3b355fc
7
+ data.tar.gz: c5ee0a94b72e07441b774ba8fa795b61be1a116252736d7ec605ff3d9a6ea9b3092cc1839fa4eb340085bb0d09f2cc26f8ce4653355600fd130946da3108e646
data/.editorconfig ADDED
@@ -0,0 +1,11 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+
10
+ [*.{md,rdoc,txt}]
11
+ indent_size = 4
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ /pkg
data/CHANGELOG-MORE.md ADDED
@@ -0,0 +1,78 @@
1
+ # Irbtools (More) Changelog
2
+
3
+ ## 3.0 (final)
4
+
5
+ Retire irbtools-more:
6
+
7
+ * Move looksee to core irbtools
8
+ * Move core_docs to core irbtools
9
+ * Remove bond (outdated)
10
+ * Leave binding_of_caller optional
11
+
12
+ ## 2.5.0
13
+ * Bump binding_of_caller & core_docs for Ruby 3.0
14
+
15
+ ## 2.4.1
16
+ * Loosen Ruby dependency to allow Ruby 3.0
17
+
18
+ ## 2.4.0
19
+ * Bump looksee & core_docs for Ruby 2.7
20
+
21
+ ## 2.3.1
22
+ * Loosen irbrtools-more dependency to irbtools (allow 3.x)
23
+
24
+ ## 2.3.0
25
+ * Remove dependency to did_you_mean, since it is now a default gem anyways
26
+ * Version bump: irbtools, looksee, core_docs, and binding_of_caller
27
+
28
+ ## 2.2.1
29
+ * Add core_docs dependency
30
+
31
+ ## 2.2.0
32
+ * Re-enable looksee (not comptible with Ruby 2.3, but does not crash anymore during install)
33
+
34
+ ## 2.1.0
35
+ * Ruby 2.3 compat: Upgrade did_you_mean to ~> 1.0
36
+ * Ruby 2.3 compat: Disable looksee gem as long it is not adapted for 2.3
37
+
38
+ ## 2.0.0
39
+ * Integrate more-repo into irbtools main repo
40
+ * Improve auto-completion
41
+ * Remove Object#l alias for looksee, use Object#lp
42
+
43
+ ## 1.7.2
44
+ * Bump did_you_mean and looksee (Ruby 2.2 compat)
45
+
46
+ ## 1.7.1
47
+ * Bump did_you_mean version
48
+
49
+ ## 1.7.0
50
+ * Bump looksee
51
+ * Ruby 1.9.3 required
52
+ * Add did_you_mean gem
53
+
54
+ ## 1.6.1
55
+ * Add binding_of_caller
56
+ * Alias looksee to Object#lp instead of Object#ls
57
+
58
+ ## 1.6.0
59
+ * (nothing)
60
+
61
+ ## 1.5.2
62
+ * Ruby 2.1 Compatibility / Update looksee gem
63
+ * Be less restrictive in gem dependencies
64
+
65
+ ## 1.5.1
66
+ * (nothing)
67
+
68
+ ## 1.5.0
69
+ * Ruby 2.0 Compatibility
70
+ * Drop 1.8 Support
71
+ * Drop DrX gem
72
+
73
+ ## 1.2.0
74
+ * add looksee
75
+
76
+ ## 0.3.2
77
+ * load in threads (irbtools 1.0)
78
+ * remove jeweler
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Irbtools Changelog
2
2
 
3
- ## 4.0
3
+ ## 4.0.1
4
+
5
+ * Bump ruby_engine gem
6
+
7
+ ## 4.0.0
4
8
 
5
9
  * Requires IRB 1.6 (Ruby 3.2 bundles IRB 1.6.2)
6
10
  * Requires Ruby 3.0
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at opensource@janlelis.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec name: "irbtools"
4
+
5
+ gem "rspec"
6
+ gem "rake"
7
+ gem "irb"
data/Gemfile.lock ADDED
@@ -0,0 +1,93 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ irbtools (4.0.0)
5
+ clipboard (~> 1.3)
6
+ code (>= 0.9.4, < 2.0)
7
+ coderay (~> 1.1)
8
+ core_docs (~> 0.9.9)
9
+ debugging (~> 2.1)
10
+ every_day_irb (~> 2.2)
11
+ fancy_irb (~> 1.2, >= 1.2.1)
12
+ hirb (~> 0.7, >= 0.7.3)
13
+ interactive_editor (~> 0.0, >= 0.0.10)
14
+ irb (~> 1.6.2)
15
+ looksee (~> 5.0)
16
+ methodfinder (~> 2.2, >= 2.2.5)
17
+ object_shadow (~> 1.1)
18
+ os (~> 1.1, >= 1.1.4)
19
+ paint (>= 0.9, < 3.0)
20
+ ruby_engine (~> 1.0)
21
+ ruby_version (~> 1.0)
22
+ wirb (~> 2.0, >= 2.2.1)
23
+
24
+ GEM
25
+ remote: https://rubygems.org/
26
+ specs:
27
+ cd (1.0.1)
28
+ clipboard (1.3.6)
29
+ code (0.9.4)
30
+ coderay (~> 1.1)
31
+ method_source (>= 0.9, < 2.0)
32
+ coderay (1.1.3)
33
+ core_docs (0.9.9)
34
+ yard (~> 0.9.11)
35
+ debugging (2.1.0)
36
+ paint (>= 0.9, < 3.0)
37
+ diff-lcs (1.5.0)
38
+ every_day_irb (2.2.0)
39
+ cd (~> 1.0)
40
+ fancy_irb (1.4.3)
41
+ paint (>= 0.9, < 3.0)
42
+ unicode-display_width (>= 1.1)
43
+ ffi (1.15.5)
44
+ hirb (0.7.3)
45
+ interactive_editor (0.0.11)
46
+ spoon (>= 0.0.1)
47
+ io-console (0.6.0)
48
+ irb (1.6.2)
49
+ reline (>= 0.3.0)
50
+ looksee (5.0.0)
51
+ method_source (1.0.0)
52
+ methodfinder (2.2.5)
53
+ object_shadow (1.1.1)
54
+ os (1.1.4)
55
+ paint (2.3.0)
56
+ rake (13.0.6)
57
+ reline (0.3.2)
58
+ io-console (~> 0.5)
59
+ rspec (3.12.0)
60
+ rspec-core (~> 3.12.0)
61
+ rspec-expectations (~> 3.12.0)
62
+ rspec-mocks (~> 3.12.0)
63
+ rspec-core (3.12.0)
64
+ rspec-support (~> 3.12.0)
65
+ rspec-expectations (3.12.1)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.12.0)
68
+ rspec-mocks (3.12.1)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.12.0)
71
+ rspec-support (3.12.0)
72
+ ruby_engine (1.0.1)
73
+ ruby_version (1.0.2)
74
+ spoon (0.0.6)
75
+ ffi
76
+ unicode-display_width (2.3.0)
77
+ webrick (1.7.0)
78
+ wirb (2.2.2)
79
+ paint (>= 0.9, < 3.0)
80
+ yard (0.9.28)
81
+ webrick (~> 1.7.0)
82
+
83
+ PLATFORMS
84
+ ruby
85
+
86
+ DEPENDENCIES
87
+ irb
88
+ irbtools!
89
+ rake
90
+ rspec
91
+
92
+ BUNDLED WITH
93
+ 2.4.1
data/Rakefile CHANGED
@@ -11,27 +11,19 @@ def gemspec2
11
11
  @gemspec2 ||= eval(File.read('irbtools.gemspec'), binding, 'irbtools.gemspec')
12
12
  end
13
13
 
14
- def gemspec3
15
- @gemspec3 ||= eval(File.read('irbtools-more.gemspec'), binding, 'irbtools-more.gemspec')
16
- end
17
-
18
14
  desc "Build the gems"
19
15
  task :gem => :gemspec do
20
16
  sh "gem build #{gemspec2.name}.gemspec"
21
- sh "gem build #{gemspec3.name}.gemspec"
22
17
  FileUtils.mkdir_p 'pkg'
23
18
  FileUtils.mv "#{gemspec2.name}-#{gemspec2.version}.gem", 'pkg'
24
- FileUtils.mv "#{gemspec3.name}-#{gemspec3.version}.gem", 'pkg'
25
19
  end
26
20
 
27
21
  desc "Install the gem locally (without docs)"
28
22
  task :install => :gem do
29
23
  sh %{gem install pkg/#{gemspec2.name}-#{gemspec2.version}.gem --no-document}
30
- sh %{gem install pkg/#{gemspec3.name}-#{gemspec3.version}.gem --no-document}
31
24
  end
32
25
 
33
26
  desc "Validate the gemspec"
34
27
  task :gemspec do
35
28
  gemspec2.validate
36
- gemspec3.validate
37
29
  end
data/irbtools.gemspec CHANGED
@@ -10,31 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["hi@ruby.consulting"]
11
11
  s.summary = 'Irbtools happy IRB.'
12
12
  s.description = "The Irbtools make working with Ruby's IRB console more fun & productive."
13
- s.files = %w[
14
- lib/irbtools.rb
15
- lib/irbtools/version.rb
16
- lib/irbtools/configure.rb
17
- lib/irbtools/implementation.rb
18
- lib/irbtools/libraries.rb
19
- lib/irbtools/non_fancy.rb
20
- lib/irbtools/hirb.rb
21
- lib/irbtools/minimal.rb
22
- lib/irbtools/binding.rb
23
- lib/irbtools/commands.rb
24
- lib/irbtools/commands/code.rb
25
- lib/irbtools/commands/howtocall.rb
26
- lib/irbtools/commands/look.rb
27
- lib/irbtools/commands/shadow.rb
28
- lib/irbtools/commands/sys.rb
29
- Rakefile
30
- irbtools.gemspec
31
- ]
32
- s.extra_rdoc_files = %w[
33
- README.md
34
- CONFIGURE.md
35
- CHANGELOG.md
36
- MIT-LICENSE.txt
37
- ]
13
+ s.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ }
38
14
  s.metadata = { "rubygems_mfa_required" => "true" }
39
15
  s.license = 'MIT'
40
16
 
@@ -64,6 +40,6 @@ Gem::Specification.new do |s|
64
40
  s.add_dependency %q<core_docs>, "~> 0.9.9"
65
41
  s.add_dependency %q<methodfinder>, "~> 2.2", ">= 2.2.5"
66
42
  s.add_dependency %q<ruby_version>, "~> 1.0"
67
- s.add_dependency %q<ruby_engine>, "~> 1.0"
43
+ s.add_dependency %q<ruby_engine>, "~> 2.0"
68
44
  s.add_dependency %q<os>, "~> 1.1", ">= 1.1.4"
69
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Irbtools
4
- VERSION = "4.0.0"
4
+ VERSION = "4.0.1"
5
5
  end
@@ -0,0 +1,17 @@
1
+ require "irbtools/commands"
2
+
3
+ describe "irbtools commands" do
4
+ describe "[introspection]" do
5
+ describe "howtocall / code" do
6
+ it "support ri Syntax like String.name or String#gsub" do
7
+ expect(
8
+ IRB::ExtendCommand::Howtocall.transform_args("String.name")
9
+ ).to eq "String, :name"
10
+
11
+ expect(
12
+ IRB::ExtendCommand::Code.transform_args("String#gsub")
13
+ ).to eq "String, String.instance_method(:gsub)"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,81 @@
1
+ require "irbtools"
2
+
3
+ describe "irbtools extra methods" do
4
+ describe "[introspection]" do
5
+ describe "code()" do
6
+ it "delegates to Code.for() to show the method's source code" do
7
+ allow(Code).to receive(:for)
8
+ code "require"
9
+ expect(Code).to have_received(:for)
10
+ end
11
+ end
12
+
13
+ describe "mf()" do
14
+ it "returns the MethodFinder class object when no arguments given" do
15
+ expect(mf).to equal(MethodFinder)
16
+ end
17
+
18
+ it "delegates to MethodFinder.find() when arguments given" do
19
+ allow(MethodFinder).to receive(:find)
20
+ mf("bla")
21
+ expect(MethodFinder).to have_received(:find)
22
+ end
23
+ end
24
+ end
25
+
26
+ describe "[utils]" do
27
+ describe "page()" do
28
+ it "will page long content" do
29
+ allow(Hirb::Pager).to receive(:command_pager)
30
+ page "idiosyncratic"
31
+ expect(Hirb::Pager).to have_received(:command_pager)
32
+ end
33
+ end
34
+
35
+ describe "colorize()" do
36
+ it "delegate to CodeRay.scan to syntax highlight given string" do
37
+ allow(CodeRay).to receive(:scan).and_return(CodeRay::TokensProxy.new("", :ruby))
38
+ colorize "def hello() end"
39
+ expect(CodeRay).to have_received(:scan)
40
+ end
41
+ end
42
+
43
+ describe "ray()" do
44
+ it "delegate to CodeRay.scan to syntax highlight given file" do
45
+ allow(CodeRay).to receive(:scan).and_return(CodeRay::TokensProxy.new("", :ruby))
46
+ allow(File).to receive(:read).and_return("stuff")
47
+ ray "/tmp/something"
48
+ expect(File).to have_received(:read)
49
+ expect(CodeRay).to have_received(:scan)
50
+ end
51
+ end
52
+
53
+ describe "copy()" do
54
+ it "delegate to Clipboard.copy to copy string to clipboard" do
55
+ allow(Clipboard).to receive(:copy)
56
+ copy "idiosyncratic"
57
+ expect(Clipboard).to have_received(:copy)
58
+ end
59
+ end
60
+
61
+ describe "paste()" do
62
+ it "delegate to Clipboard.paste to paste clipboard contents" do
63
+ allow(Clipboard).to receive(:paste)
64
+ paste
65
+ expect(Clipboard).to have_received(:paste)
66
+ end
67
+ end
68
+
69
+ describe "copy_input()" do
70
+ it "Copies everything you have entered in this IRB session to the clipboard" do
71
+ # pending
72
+ end
73
+ end
74
+
75
+ describe "copy_output()" do
76
+ it "Copies the output of all IRB commands from the current IRB session to the clipboard" do
77
+ # pending
78
+ end
79
+ end
80
+ end
81
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irbtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
@@ -282,14 +282,14 @@ dependencies:
282
282
  requirements:
283
283
  - - "~>"
284
284
  - !ruby/object:Gem::Version
285
- version: '1.0'
285
+ version: '2.0'
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: '1.0'
292
+ version: '2.0'
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: os
295
295
  requirement: !ruby/object:Gem::Requirement
@@ -315,14 +315,16 @@ email:
315
315
  - hi@ruby.consulting
316
316
  executables: []
317
317
  extensions: []
318
- extra_rdoc_files:
319
- - README.md
320
- - CONFIGURE.md
321
- - CHANGELOG.md
322
- - MIT-LICENSE.txt
318
+ extra_rdoc_files: []
323
319
  files:
320
+ - ".editorconfig"
321
+ - ".gitignore"
322
+ - CHANGELOG-MORE.md
324
323
  - CHANGELOG.md
324
+ - CODE_OF_CONDUCT.md
325
325
  - CONFIGURE.md
326
+ - Gemfile
327
+ - Gemfile.lock
326
328
  - MIT-LICENSE.txt
327
329
  - README.md
328
330
  - Rakefile
@@ -342,6 +344,8 @@ files:
342
344
  - lib/irbtools/minimal.rb
343
345
  - lib/irbtools/non_fancy.rb
344
346
  - lib/irbtools/version.rb
347
+ - spec/irbtools_commands_spec.rb
348
+ - spec/irbtools_extra_methods_spec.rb
345
349
  homepage: https://github.com/janlelis/irbtools
346
350
  licenses:
347
351
  - MIT
@@ -365,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
369
  - !ruby/object:Gem::Version
366
370
  version: '0'
367
371
  requirements: []
368
- rubygems_version: 3.4.1
372
+ rubygems_version: 3.3.7
369
373
  signing_key:
370
374
  specification_version: 4
371
375
  summary: Irbtools happy IRB.