pry 0.15.0 → 0.15.1

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
  SHA256:
3
- metadata.gz: e614551c579377a965416df68c4e2a90f0e0e6731d78010f7a570d4b730cfb2a
4
- data.tar.gz: 86ed82a2dc55f826d38ae2a20f22929dbbf11b7f5d79dcfc0740a20f6779ca01
3
+ metadata.gz: a6483faa5517e3b0461a3c491e5d37eaf56f5db0bbe151432a7019766a5b95ee
4
+ data.tar.gz: a3956d43c1d5733f4e09362e0e251d3b2182cd4237bd132243d4479dbdf38efd
5
5
  SHA512:
6
- metadata.gz: 902a35c83b2b00518504054939ab688f883ecf78f2358f90462a6b06290a80de7c52735d4d71e40e27e1d47914fd7bac6b537bdf916a322d7da35483b21afef9
7
- data.tar.gz: b03f296f12ed93fb92e7b6f7243f250cc4ada6c08b70e52a5b8df81c6707aa9c3124d60b03e0e922b5626b543c59059c7300e626858b59706140df7cd19d9fb8
6
+ metadata.gz: 2b5752e1b8ff039e9ba4821b1b6f9ccf9a4b73988f626199a3d5325bf47117a0cdf173c14d229782e54c5e4bdce4997059a930f819d29fd196cb8cbaf0cf2977
7
+ data.tar.gz: ce971fc59838f97522e4653772199e46ae7b3ef9b9bacb86e40e8975a6b07652af1b7b3a76c396de2f574903041c86d9c657f847a9f194892378318717da4def
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### [v0.15.1](v0.15.1) (December 24, 2024)
2
+
3
+ #### Bug Fixes
4
+
5
+ * Restore Pry.config.ls compatibility
6
+ ([#2335](https://github.com/pry/pry/pull/2335))
7
+ * Avoid breaking reading inputs if Prism is not available
8
+ ([#2338](https://github.com/pry/pry/pull/2338))
9
+
1
10
  ### [v0.15.0][v0.15.0] (November 15, 2024)
2
11
 
3
12
  #### Features
@@ -1,49 +1,52 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'forwardable'
4
+
3
5
  class Pry
4
6
  class Command
5
7
  class Ls < Pry::ClassCommand
6
8
  class Config
7
- attr_accessor :heading_color,
8
- :public_method_color,
9
- :private_method_color,
10
- :protected_method_color,
11
- :method_missing_color,
12
- :local_var_color,
13
- :pry_var_color, # e.g. _, pry_instance, _file_
14
- :instance_var_color, # e.g. @foo
15
- :class_var_color, # e.g. @@foo
16
- :global_var_color, # e.g. $CODERAY_DEBUG, $foo
17
- :builtin_global_color, # e.g. $stdin, $-w, $PID
18
- :pseudo_global_color, # e.g. $~, $1..$9, $LAST_MATCH_INFO
19
- :constant_color, # e.g. VERSION, ARGF
20
- :class_constant_color, # e.g. Object, Kernel
21
- :exception_constant_color, # e.g. Exception, RuntimeError
22
- :unloaded_constant_color, # Constant that is still in .autoload?
23
- :separator,
24
- :ceiling
9
+ extend Forwardable
10
+
11
+ DEFAULT_OPTIONS = {
12
+ heading_color: :bright_blue,
13
+ public_method_color: :default,
14
+ private_method_color: :blue,
15
+ protected_method_color: :blue,
16
+ method_missing_color: :bright_red,
17
+ local_var_color: :yellow,
18
+ pry_var_color: :default, # e.g. _, pry_instance, _file_
19
+ instance_var_color: :blue, # e.g. @foo
20
+ class_var_color: :bright_blue, # e.g. @@foo
21
+ global_var_color: :default, # e.g. $CODERAY_DEBUG, $eventmachine_library
22
+ builtin_global_color: :cyan, # e.g. $stdin, $-w, $PID
23
+ pseudo_global_color: :cyan, # e.g. $~, $1..$9, $LAST_MATCH_INFO
24
+ constant_color: :default, # e.g. VERSION, ARGF
25
+ class_constant_color: :blue, # e.g. Object, Kernel
26
+ exception_constant_color: :magenta, # e.g. Exception, RuntimeError
27
+ unloaded_constant_color: :yellow, # Constant still in .autoload? state
28
+ separator: " ",
29
+ ceiling: [Object, Module, Class]
30
+ }.freeze
31
+
32
+ DEFAULT_OPTIONS.each_key do |key|
33
+ define_method key do
34
+ @config[key]
35
+ end
36
+
37
+ define_method "#{key}=" do |value|
38
+ @config[key] = value
39
+ end
40
+ end
41
+
42
+ def_delegators :@config, :[], :[]=, :each, :each_pair, :values, :keys, :to_a
43
+
44
+ def initialize(config)
45
+ @config = config
46
+ end
25
47
 
26
48
  def self.default
27
- config = new
28
- config.heading_color = :bright_blue
29
- config.public_method_color = :default
30
- config.private_method_color = :blue
31
- config.protected_method_color = :blue
32
- config.method_missing_color = :bright_red
33
- config.local_var_color = :yellow
34
- config.pry_var_color = :default
35
- config.instance_var_color = :blue
36
- config.class_var_color = :bright_blue
37
- config.global_var_color = :default
38
- config.builtin_global_color = :cyan
39
- config.pseudo_global_color = :cyan
40
- config.constant_color = :default
41
- config.class_constant_color = :blue
42
- config.exception_constant_color = :magenta
43
- config.unloaded_constant_color = :yellow
44
- config.separator = " "
45
- config.ceiling = [Object, Module, Class]
46
- config
49
+ new(DEFAULT_OPTIONS.dup)
47
50
  end
48
51
  end
49
52
  end
data/lib/pry/repl.rb CHANGED
@@ -248,10 +248,17 @@ class Pry
248
248
  end
249
249
 
250
250
  def prism_available?
251
- require 'prism'
251
+ @prism_available ||= begin
252
+ # rubocop:disable Lint/SuppressedException
253
+ begin
254
+ require 'prism'
255
+ rescue LoadError
256
+ end
257
+ # rubocop:enable Lint/SuppressedException
252
258
 
253
- @prism_available ||= defined?(Prism) &&
254
- Gem::Version.new(Prism::VERSION) >= Gem::Version.new('0.25.0')
259
+ defined?(Prism) &&
260
+ Gem::Version.new(Prism::VERSION) >= Gem::Version.new('0.25.0')
261
+ end
255
262
  end
256
263
 
257
264
  # If `$stdout` is not a tty, it's probably a pipe.
data/lib/pry/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Pry
4
- VERSION = '0.15.0'.freeze
4
+ VERSION = '0.15.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair (banisterfiend)
8
8
  - Conrad Irwin
9
9
  - Ryan Fitzgerald
10
10
  - Kyrylo Silin
11
+ autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2024-11-15 00:00:00.000000000 Z
14
+ date: 2024-12-24 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: coderay
@@ -201,6 +202,7 @@ metadata:
201
202
  changelog_uri: https://github.com/pry/pry/blob/master/CHANGELOG.md
202
203
  source_code_uri: https://github.com/pry/pry
203
204
  bug_tracker_uri: https://github.com/pry/pry/issues
205
+ post_install_message:
204
206
  rdoc_options: []
205
207
  require_paths:
206
208
  - lib
@@ -215,7 +217,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
217
  - !ruby/object:Gem::Version
216
218
  version: '0'
217
219
  requirements: []
218
- rubygems_version: 3.6.0.dev
220
+ rubygems_version: 3.4.14
221
+ signing_key:
219
222
  specification_version: 4
220
223
  summary: A runtime developer console and IRB alternative with powerful introspection
221
224
  capabilities.