pry-coolline 0.2.2 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +33 -0
- data/.gitignore +2 -0
- data/CHANGELOG +11 -0
- data/Gemfile +2 -0
- data/README.md +1 -1
- data/Rakefile +2 -64
- data/lib/pry-coolline/version.rb +1 -1
- data/lib/pry-coolline/wrapper.rb +22 -3
- data/lib/pry-coolline.rb +14 -1
- data/pry-coolline.gemspec +25 -28
- metadata +42 -34
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5dc4becb987244e658ec2a61668a00c198bbd721a8c20558ef936b794c19edef
|
4
|
+
data.tar.gz: b82d19a59c140a9584c1459b1dd4f6fff1fb0b80f0bef91dfe08cf483e8bb664
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 405bdb0b9cda8831be9fa8bc9674e0e3fe458fa40551d3a724a9c39ee51fc99c6be6c36db2e03db4656b79516f4e86c851c116ae432984a222543d3fc00ae91c
|
7
|
+
data.tar.gz: 728bdb276e36f66d28ad2e6d52097ed579f235aa9b3ab92c56f58810cfbf6a8d24c82ac273e3cbfda8a9116733e93427a864ff9394d135473f141ccc27bd9edd
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: pry
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
os: [ubuntu-latest]
|
10
|
+
ruby:
|
11
|
+
- 2.5
|
12
|
+
- 2.6
|
13
|
+
- 2.7
|
14
|
+
- '3.0'
|
15
|
+
- 3.1
|
16
|
+
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
|
22
|
+
- uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
25
|
+
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
|
29
|
+
- name: Display Ruby version
|
30
|
+
run: ruby -v
|
31
|
+
|
32
|
+
- name: Test
|
33
|
+
run: bundle exec rake test
|
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
## 0.2.6 (December 31th, 2021)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
- Support v0.13 Pry config API, fixes #36 (@owst, #37)
|
5
|
+
- Fix versioned experiments when used with allow_multiple_experiments=control (@andrehjr, #613)
|
6
|
+
|
7
|
+
Features:
|
8
|
+
- Enabled the option to actually disable paren matching (@threeifbywhiskey, #30)
|
9
|
+
|
10
|
+
Misc:
|
11
|
+
- change how load path is modified (@stevenchanin, #38)
|
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ After installing `pry-coolline` just start Pry as normal, the coolline
|
|
21
21
|
plugin will be detected and used automatically.
|
22
22
|
|
23
23
|
<center>
|
24
|
-
![Alt text](
|
24
|
+
![Alt text](https://dl.dropboxusercontent.com/u/26521875/pics/coolline.png)
|
25
25
|
|
26
26
|
Features
|
27
27
|
--------
|
data/Rakefile
CHANGED
@@ -1,36 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
dlext = Config::CONFIG['DLEXT']
|
4
|
-
direc = File.dirname(__FILE__)
|
1
|
+
require 'bundler/gem_tasks'
|
5
2
|
|
6
3
|
PROJECT_NAME = "pry-coolline"
|
4
|
+
direc = File.dirname(__FILE__)
|
7
5
|
|
8
6
|
require 'rake/clean'
|
9
|
-
require 'rake/gempackagetask'
|
10
|
-
require "#{PROJECT_NAME}/version"
|
11
7
|
|
12
8
|
CLOBBER.include("**/*~", "**/*#*", "**/*.log")
|
13
9
|
CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake",
|
14
10
|
"**/*.rbc", "**/.#*.*")
|
15
11
|
|
16
|
-
def apply_spec_defaults(s)
|
17
|
-
s.name = PROJECT_NAME
|
18
|
-
s.summary = "Live syntax-highlighting for the Pry REPL"
|
19
|
-
s.version = PryCoolline::VERSION
|
20
|
-
s.date = Time.now.strftime '%Y-%m-%d'
|
21
|
-
s.author = "John Mair (banisterfiend)"
|
22
|
-
s.email = 'jrmair@gmail.com'
|
23
|
-
s.description = s.summary
|
24
|
-
s.add_dependency("coolline","~>0.3")
|
25
|
-
s.add_dependency("io-console","~>0.3.0")
|
26
|
-
s.add_development_dependency("riot")
|
27
|
-
s.required_ruby_version = '>= 1.9.2'
|
28
|
-
s.require_path = 'lib'
|
29
|
-
s.homepage = "https://github.com/pry/pry-coolline"
|
30
|
-
s.files = `git ls-files`.split("\n")
|
31
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
32
|
-
end
|
33
|
-
|
34
12
|
task :default => :test
|
35
13
|
|
36
14
|
desc "run pry with plugin enabled"
|
@@ -47,43 +25,3 @@ desc "Show version"
|
|
47
25
|
task :version do
|
48
26
|
puts "PryCoolline version: #{PryCoolline::VERSION}"
|
49
27
|
end
|
50
|
-
|
51
|
-
desc "Generate gemspec file"
|
52
|
-
task :gemspec => "ruby:gemspec"
|
53
|
-
|
54
|
-
namespace :ruby do
|
55
|
-
spec = Gem::Specification.new do |s|
|
56
|
-
apply_spec_defaults(s)
|
57
|
-
s.platform = Gem::Platform::RUBY
|
58
|
-
end
|
59
|
-
|
60
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
61
|
-
pkg.need_zip = false
|
62
|
-
pkg.need_tar = false
|
63
|
-
end
|
64
|
-
|
65
|
-
desc "Generate gemspec file"
|
66
|
-
task :gemspec do
|
67
|
-
File.open("#{spec.name}.gemspec", "w") do |f|
|
68
|
-
f << spec.to_ruby
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
desc "shorthand for :gems task"
|
74
|
-
task :gem => :gems
|
75
|
-
|
76
|
-
desc "build all platform gems at once"
|
77
|
-
task :gems => [:clean, :rmgems, "ruby:gem"]
|
78
|
-
|
79
|
-
desc "remove all platform gems"
|
80
|
-
task :rmgems => ["ruby:clobber_package"]
|
81
|
-
|
82
|
-
desc "build and push latest gems"
|
83
|
-
task :pushgems => :gems do
|
84
|
-
chdir("#{File.dirname(__FILE__)}/pkg") do
|
85
|
-
Dir["*.gem"].each do |gemfile|
|
86
|
-
sh "gem push #{gemfile}"
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
data/lib/pry-coolline/version.rb
CHANGED
data/lib/pry-coolline/wrapper.rb
CHANGED
@@ -9,6 +9,14 @@ module PryCoolline
|
|
9
9
|
proc.call cool.completed_word
|
10
10
|
end
|
11
11
|
end
|
12
|
+
|
13
|
+
def bond_adapter
|
14
|
+
cool = self.cool
|
15
|
+
Module.new.extend(Module.new{
|
16
|
+
define_method(:setup){ |*| }
|
17
|
+
define_method(:line_buffer){ cool.line }
|
18
|
+
})
|
19
|
+
end
|
12
20
|
end
|
13
21
|
|
14
22
|
module_function
|
@@ -16,11 +24,22 @@ module PryCoolline
|
|
16
24
|
# @return [Coolline]
|
17
25
|
def make_coolline
|
18
26
|
Coolline.new do |cool|
|
19
|
-
cool.
|
20
|
-
|
27
|
+
cool.completion_word_boundaries =
|
28
|
+
[" ", "\t", ",", ";", '"', "'", "`", "<", ">",
|
29
|
+
"=", ";", "|", "{", "}", "(", ")", "-"]
|
30
|
+
|
31
|
+
cool.word_boundaries = cool.completion_word_boundaries +
|
32
|
+
[".", ":"]
|
33
|
+
|
34
|
+
pry_history_file =
|
35
|
+
if Gem::Version.new(Pry::VERSION) >= Gem::Version.new("0.13")
|
36
|
+
Pry.config.history_file
|
37
|
+
else
|
38
|
+
Pry.config.history.file
|
39
|
+
end
|
21
40
|
|
22
41
|
# bring saved history into coolline
|
23
|
-
cool.history_file = File.expand_path(
|
42
|
+
cool.history_file = File.expand_path(pry_history_file)
|
24
43
|
|
25
44
|
cool.transform_proc = proc do
|
26
45
|
if Pry.color
|
data/lib/pry-coolline.rb
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
require 'pry'
|
5
5
|
require 'pry-coolline/version'
|
6
6
|
|
7
|
-
Pry.config.coolline_paren_matching
|
7
|
+
unless defined?(Pry.config.coolline_paren_matching)
|
8
|
+
Pry.config.coolline_paren_matching = true
|
9
|
+
end
|
8
10
|
|
9
11
|
Pry.config.coolline_matched_paren ||= "\e[42m"
|
10
12
|
Pry.config.coolline_mismatched_paren ||= "\e[41m"
|
@@ -16,5 +18,16 @@ begin
|
|
16
18
|
require 'pry-coolline/wrapper'
|
17
19
|
|
18
20
|
Pry.config.input = PryCoolline.make_input
|
21
|
+
|
22
|
+
require 'pry-bond'
|
23
|
+
|
24
|
+
Pry::BondCompleter.start
|
25
|
+
# Fixes a bug with certain gem releases of pry
|
26
|
+
Pry.config.completer = Pry::BondCompleter
|
27
|
+
|
28
|
+
# Let's speak in Bond's metaphor.
|
29
|
+
# Assasinate the agent and replace it with one that uses our weapon.
|
30
|
+
Bond::M.reset
|
31
|
+
Bond.start :readline => Pry.config.input.bond_adapter
|
19
32
|
rescue LoadError
|
20
33
|
end if ENV["TERM"] != "dumb"
|
data/pry-coolline.gemspec
CHANGED
@@ -1,34 +1,31 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
+
$:.push File.expand_path('../lib', __FILE__)
|
4
|
+
require 'pry-coolline/version'
|
5
|
+
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = "pry-coolline"
|
5
|
-
|
6
|
-
|
7
|
-
s.
|
8
|
-
|
9
|
-
s.date = "2012-04-03"
|
10
|
-
s.description = "Live syntax-highlighting for the Pry REPL"
|
11
|
-
s.email = "jrmair@gmail.com"
|
12
|
-
s.files = [".gemtest", ".gitignore", ".yardopts", "CHANGELOG", "LICENSE", "README.md", "Rakefile", "lib/pry-coolline.rb", "lib/pry-coolline/version.rb", "pry-coolline.gemspec", "test/test.rb"]
|
13
|
-
s.homepage = "https://github.com/pry/pry-coolline"
|
14
|
-
s.require_paths = ["lib"]
|
15
|
-
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
|
16
|
-
s.rubygems_version = "1.8.16"
|
8
|
+
|
9
|
+
s.version = PryCoolline::VERSION
|
10
|
+
s.date = Time.now.strftime '%Y-%m-%d'
|
11
|
+
|
17
12
|
s.summary = "Live syntax-highlighting for the Pry REPL"
|
18
|
-
s.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
13
|
+
s.description = s.summary
|
14
|
+
|
15
|
+
s.email = 'jrmair@gmail.com'
|
16
|
+
s.author = "John Mair (banisterfiend)"
|
17
|
+
|
18
|
+
s.license = "MIT"
|
19
|
+
|
20
|
+
s.homepage = "https://github.com/pry/pry-coolline"
|
21
|
+
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
24
|
+
|
25
|
+
s.add_dependency "coolline", "~>0.5"
|
26
|
+
s.add_dependency "pry", "~> 0.13"
|
27
|
+
s.add_development_dependency "riot"
|
28
|
+
s.add_development_dependency "rake", "~> 10.0"
|
29
|
+
s.required_ruby_version = '>= 1.9.2'
|
30
|
+
s.require_path = 'lib'
|
34
31
|
end
|
metadata
CHANGED
@@ -1,74 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-coolline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- John Mair (banisterfiend)
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-12-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: coolline
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
19
|
+
version: '0.5'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
26
|
+
version: '0.5'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: pry
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
33
|
+
version: '0.13'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
40
|
+
version: '0.13'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: riot
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
62
69
|
description: Live syntax-highlighting for the Pry REPL
|
63
70
|
email: jrmair@gmail.com
|
64
71
|
executables: []
|
65
72
|
extensions: []
|
66
73
|
extra_rdoc_files: []
|
67
74
|
files:
|
68
|
-
- .gemtest
|
69
|
-
- .
|
70
|
-
- .
|
75
|
+
- ".gemtest"
|
76
|
+
- ".github/workflows/ci.yml"
|
77
|
+
- ".gitignore"
|
78
|
+
- ".yardopts"
|
71
79
|
- CHANGELOG
|
80
|
+
- Gemfile
|
72
81
|
- LICENSE
|
73
82
|
- README.md
|
74
83
|
- Rakefile
|
@@ -81,28 +90,27 @@ files:
|
|
81
90
|
- test/paren_match_test.rb
|
82
91
|
- test/run_all.rb
|
83
92
|
homepage: https://github.com/pry/pry-coolline
|
84
|
-
licenses:
|
85
|
-
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
86
97
|
rdoc_options: []
|
87
98
|
require_paths:
|
88
99
|
- lib
|
89
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
101
|
requirements:
|
92
|
-
- -
|
102
|
+
- - ">="
|
93
103
|
- !ruby/object:Gem::Version
|
94
104
|
version: 1.9.2
|
95
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
106
|
requirements:
|
98
|
-
- -
|
107
|
+
- - ">="
|
99
108
|
- !ruby/object:Gem::Version
|
100
109
|
version: '0'
|
101
110
|
requirements: []
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
specification_version: 3
|
111
|
+
rubygems_version: 3.2.32
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
106
114
|
summary: Live syntax-highlighting for the Pry REPL
|
107
115
|
test_files:
|
108
116
|
- test/helpers.rb
|