praxis 2.0.pre.39 → 2.0.pre.40

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: 2be7b40ec996f685c3d87a407523002b18415bd783f5b0aee34a76c329e479ff
4
- data.tar.gz: 9de2e06a84e0004c5ab224c8ae70f9bf5fc246520e432f0c6a01bcd8540e2837
3
+ metadata.gz: 19745c4d9f6ebe88d95a2118df3b7a41343a2076b2a17d051793fed535575b9d
4
+ data.tar.gz: af9eb1d60cf4367f0ceb0e7aadc589b7f7d862fa161815ccc05c46eaa08f8881
5
5
  SHA512:
6
- metadata.gz: 29f899358dde8d2f661334a883f0dc5c2a4580d8bdfa001860d580a54233bca1557adf3d685dcdbdeba94bade1a9245d05e9db193cd281ef3fba098e95a969f7
7
- data.tar.gz: ba0718401b772eea6fcaab758157c2180a8196c4f1bb2e1b59afe4033626e2cd97ecd2363a724b36c509efe99c17bbbdc986058db8fd1816cbcd0c9a3ea074ac
6
+ metadata.gz: 4a0a13bfeb6d1fd4512483fd4d341e1f606f1b391d0eda220019b5032f2593be4e79bd7061d375de2b97630eecd19feffa89db594d7c553c11163084b6bb00e1
7
+ data.tar.gz: e0ef5e1cc96d638496ef60f0ae4aaf82ccc2cecbf49cae5794642525283e201bfb600b4f02f4a85d1cd7b16988e6dc05a5a08162c7d9f894906017beba271de3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Praxis Changelog
2
2
 
3
+ ## 2.0.pre40
4
+
5
+ - Prevent IRB from running console in a new Thread (#405)
6
+
3
7
  ## 2.0.pre.39
4
8
 
5
9
  - Revert JSON handler back to `json` gem, as `oj` was too unstable when used with ActiveSupport.
@@ -0,0 +1,3 @@
1
+ /.bundle
2
+ /vendor
3
+ w
@@ -4,7 +4,10 @@
4
4
 
5
5
  source 'https://rubygems.org'
6
6
 
7
- gem 'activerecord', '>=7'
7
+ # TODO: figure out incompatibility between ActiveRecord 7.1 and SQLite
8
+ # @see https://github.com/praxis/praxis/pull/405#issuecomment-1780570599
9
+ # Until then, we're pinned to 7.0.x for purposes of testing.
10
+ gem 'activerecord', '~> 7.0.8'
8
11
  gem 'rubocop'
9
12
  gem 'sequel', '~> 5'
10
13
 
@@ -5,38 +5,35 @@ namespace :praxis do
5
5
  task :console do
6
6
  # Use irb if available (which it almost always is).
7
7
  require 'irb'
8
+ # Ensure that we save history just like normal IRB
9
+ require 'irb/ext/save-history'
8
10
 
9
11
  Rake::Task['praxis:environment'].invoke
10
12
 
13
+ basedir = ::Praxis::Application.instance.root
14
+ nickname = File.basename(basedir)
15
+
11
16
  # Keep IRB.setup from complaining about bad ARGV options
12
17
  old_argv = ARGV.dup
13
18
  ARGV.clear
14
- IRB.setup nil
19
+ IRB.setup(basedir)
15
20
  ARGV.concat(old_argv)
16
21
 
17
- # Ensure that multi-irb has a context to work with (and, indirectly an instance of IRB::Irb).
18
- IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
19
-
20
- # Allow reentrant IRB
21
- require 'irb/ext/multi-irb'
22
-
23
- # Ensure that we save history just like normal IRB
24
- require 'irb/ext/save-history'
25
-
26
22
  # Remove main object from prompt (its stringify is not useful)
27
- nickname = File.basename(::Praxis::Application.instance.root)
28
23
  IRB.conf[:PROMPT][:DEFAULT] = {
29
24
  PROMPT_I: "%N(#{nickname}):%03n:%i> ",
30
25
  PROMPT_N: "%N(#{nickname}):%03n:%i> ",
31
26
  PROMPT_S: "%N(#{nickname}):%03n:%i%l ",
32
27
  PROMPT_C: "%N(#{nickname}):%03n:%i* ",
33
28
  }
34
-
35
29
  # Disable inefficient, distracting autocomplete
36
30
  IRB.conf[:USE_AUTOCOMPLETE] = false
37
31
 
38
- # Invoke the REPL, then cleanly shut down
39
- IRB.irb(nil, Praxis::Application.instance)
32
+ # Invoke the REPL, setting the workspace binding to the application object.
33
+ IRB::Irb.new(IRB::WorkSpace.new(::Praxis::Application.instance)).run(
34
+ IRB.conf,
35
+ )
36
+ # Cleanly shut down to ensure we save history
40
37
  IRB.irb_at_exit
41
38
  end
42
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Praxis
4
- VERSION = '2.0.pre.39'
4
+ VERSION = '2.0.pre.40'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: praxis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.pre.39
4
+ version: 2.0.pre.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep M. Blanquer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-06 00:00:00.000000000 Z
12
+ date: 2023-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -387,6 +387,7 @@ files:
387
387
  - Rakefile
388
388
  - SELECTOR_NOTES.txt
389
389
  - bin/praxis
390
+ - gemfiles/.gitignore
390
391
  - gemfiles/active_6.gemfile
391
392
  - gemfiles/active_7.gemfile
392
393
  - lib/praxis.rb