pryx 0.3.0 → 0.3.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: a9d67d15a83b0d92beee0841d429cb42bc2c91ce2c0aea21b4a8ebb68cc88125
4
- data.tar.gz: 828770b2b1bb5e958058d74136e9c759b461eac7ad8ff12c907ab92fa6b943f2
3
+ metadata.gz: dcb416c6abf10f2f3445ba1f230cc22f2839fd2056e0eb789d292bc611a463c5
4
+ data.tar.gz: 560f480272bee2673cb6b415267dc224f30d618015123734f75d9a97ed3be311
5
5
  SHA512:
6
- metadata.gz: 1d6f3688c0709bc039167c55aea81b6cee322381631b40f1507abdb4d18067c8e92a196d5deeb2899df61588a8bfd4397f8954301507c0e0357ab849995831fb
7
- data.tar.gz: 8540e5b11640d70305e6f21f94459b7756bf13260ea441a87f62c89d3c4c90b308c021d0c5c59ea5d119300b31bbf1cba668620b394a316b8ae872c3a24728fb
6
+ metadata.gz: f042cb7cbe7d0ca0ceec859a39ef85d90fe871ca45fe1d34151a4fb87f094a9658f0ee35ef70a4900bd1a0f7e957e766127c82e4083f219b46150ba7f9b07b2a
7
+ data.tar.gz: e695d828a869dd19a654e91d087ea3c3ad777a5c951b2f07cb54e832e721d7a4d0f4f3e54a993cde6dedc86a2957b5f51a0417d5393ef7f43c8d83934e8ec706
data/bin/irbx ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # irb.rb - interactive ruby
4
+ # $Release Version: 0.9.6 $
5
+ # $Revision$
6
+ # by Keiju ISHITSUKA(keiju@ruby-lang.org)
7
+ #
8
+
9
+ require 'irb'
10
+ require 'pryx_irb'
11
+
12
+ IRB.start(__FILE__)
data/bin/pryx ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # (C) John Mair (banisterfiend)
5
+ # MIT license
6
+
7
+ $0 = 'pry'
8
+
9
+ require 'pry'
10
+ require 'pryx'
11
+
12
+ # Process command line options and run Pry
13
+ opts = Pry::CLI.parse_options
14
+ Pry::CLI.start(opts)
data/lib/pryx/ap_hack.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'awesome_print'
2
2
 
3
- AwesomePrint.defaults = {
4
- index: false
5
- }
3
+ # AwesomePrint.defaults = {
4
+ # index: false
5
+ # }
6
6
 
7
7
  if defined? AwesomePrint
8
8
  if defined? Pry
@@ -1,2 +1,6 @@
1
1
  require 'break'
2
2
  load "#{__dir__}/../break/pry/extensions.rb"
3
+
4
+ Pry.commands.alias_command 'n', 'next'
5
+ Pry.commands.alias_command 's', 'step'
6
+ Pry.commands.alias_command 'w', 'watch' # watch is pry builtin
data/lib/pryx/pry_hack.rb CHANGED
@@ -93,20 +93,34 @@ end
93
93
 
94
94
  # Hack for roda/rails, 在每一次发送请求之前,总是设定 ENV['Pry_was_started'] to nil.
95
95
  # 这可以确保,pry! 总是会被拦截,但是仅仅只会被拦截一次。
96
+
97
+ class Pryx::PryHackForRodaRailsMiddleware
98
+ attr_reader :app
99
+
100
+ def initialize(app)
101
+ @app = app
102
+ end
103
+
104
+ def call(env)
105
+ ENV['Pry_was_started'] = nil
106
+ @app.call(env)
107
+ end
108
+ end
109
+
96
110
  begin
97
111
  require 'roda'
98
- class PryHackRodaMiddleware
99
- attr_reader :app
100
-
101
- def initialize(app)
102
- @app = app
103
- end
112
+ Roda.use Pryx::PryHackForRodaRailsMiddleware
113
+ rescue LoadError
114
+ end
104
115
 
105
- def call(env)
106
- ENV['Pry_was_started'] = nil
107
- @app.call(env)
108
- end
116
+ begin
117
+ require 'active_support/lazy_load_hooks'
118
+ ActiveSupport.on_load(:before_configuration) do
119
+ # because exits less command error when use in container, use irb instead.
120
+ # require 'pry'
121
+ # require 'pryx'
122
+ # Rails.application.config.console = Pry
123
+ Rails.application.config.middleware.use Pryx::PryHackForRodaRailsMiddleware
109
124
  end
110
- Roda.use PryHackRodaMiddleware
111
125
  rescue LoadError
112
126
  end
data/lib/pryx/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pryx
4
- VERSION = [0, 3, 0]
4
+ VERSION = [0, 3, 1]
5
5
 
6
6
  class << VERSION
7
7
  include Comparable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pryx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billy.Zheng(zw963)
@@ -140,13 +140,17 @@ description: ''
140
140
  email:
141
141
  - vil963@gmail.com
142
142
  executables:
143
+ - irbx
143
144
  - pry!
145
+ - pryx
144
146
  extensions: []
145
147
  extra_rdoc_files: []
146
148
  files:
147
149
  - LICENSE
148
150
  - README.md
151
+ - bin/irbx
149
152
  - bin/pry!
153
+ - bin/pryx
150
154
  - lib/break/pry/extensions.rb
151
155
  - lib/pry-byebug.rb
152
156
  - lib/pry-byebug/WARN
@@ -191,5 +195,5 @@ requirements: []
191
195
  rubygems_version: 3.3.3
192
196
  signing_key:
193
197
  specification_version: 4
194
- summary: ''
198
+ summary: pry extension tools!
195
199
  test_files: []