bj 0.0.3 → 0.0.4
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.
- data/TODO +6 -2
- data/bin/bj +23 -17
- data/lib/bj.rb +1 -2
- metadata +2 -2
data/TODO
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
-
|
2
|
+
- signals not operating properly on windows , non critical error tho...
|
3
3
|
|
4
|
-
|
4
|
+
|
5
|
+
- need to figure out how to cache connections for Bj.in(...)
|
5
6
|
|
6
7
|
- ttl will be added. maxing it out will cause auto-resubmission (Steve Midgley)
|
7
8
|
|
@@ -22,6 +23,9 @@
|
|
22
23
|
|
23
24
|
================================================================================
|
24
25
|
|
26
|
+
X the whole gem_path thing is still fubar
|
27
|
+
X commands need quoting, esp for windows, "c:\Documents And..." etc
|
28
|
+
X ./script/console submission hangs on windows
|
25
29
|
X default PATH setting
|
26
30
|
X install issues for dave? - gem_path...
|
27
31
|
X main only loaded for (bin|script)/bj
|
data/bin/bj
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
require "main"
|
4
3
|
require "bj"
|
4
|
+
require "main"
|
5
5
|
|
6
6
|
Main {
|
7
7
|
usage["description"] = <<-txt
|
@@ -418,8 +418,8 @@ BEGIN {
|
|
418
418
|
#
|
419
419
|
# see if we're running out of RAILS_ROOT/script/
|
420
420
|
#
|
421
|
-
unless defined?(
|
422
|
-
|
421
|
+
unless defined?(BJ_SCRIPT)
|
422
|
+
BJ_SCRIPT =
|
423
423
|
if %w[ script config app ].map{|d| test ?d, "#{ File.dirname __FILE__ }/../#{ d }"}.all?
|
424
424
|
__FILE__
|
425
425
|
else
|
@@ -440,7 +440,7 @@ unless defined?(RAILS_ROOT)
|
|
440
440
|
|
441
441
|
### we know the rails_root if we are in RAILS_ROOT/script/
|
442
442
|
unless rails_root
|
443
|
-
if
|
443
|
+
if BJ_SCRIPT
|
444
444
|
rails_root = File.expand_path "#{ File.dirname __FILE__ }/.."
|
445
445
|
end
|
446
446
|
end
|
@@ -476,18 +476,6 @@ unless defined?(RAILS_ENV)
|
|
476
476
|
RAILS_ENV = rails_env
|
477
477
|
end
|
478
478
|
#
|
479
|
-
# setup $LOAD_PATH to detect plugin - iff it is installed and running out of
|
480
|
-
# RAILS_ROOT/script
|
481
|
-
#
|
482
|
-
if RAILS_ROOT and BJ_IS_SCRIPT
|
483
|
-
if test(?d, "#{ RAILS_ROOT }/vendor/plugins/bj/lib")
|
484
|
-
$LOAD_PATH.unshift "#{ RAILS_ROOT }/vendor/plugins/bj/lib"
|
485
|
-
end
|
486
|
-
if test(?s, "#{ RAILS_ROOT }/vendor/plugins/bj/init.rb")
|
487
|
-
load "#{ RAILS_ROOT }/vendor/plugins/bj/init.rb"
|
488
|
-
end
|
489
|
-
end
|
490
|
-
#
|
491
479
|
# ensure that rubygems is loaded
|
492
480
|
#
|
493
481
|
begin
|
@@ -496,7 +484,25 @@ end
|
|
496
484
|
42
|
497
485
|
end
|
498
486
|
#
|
499
|
-
#
|
487
|
+
# load gems from plugin dir iff installed as plugin - otherwise load normally
|
488
|
+
#
|
489
|
+
if RAILS_ROOT and BJ_SCRIPT
|
490
|
+
=begin
|
491
|
+
dir = Gem.dir
|
492
|
+
path = Gem.path
|
493
|
+
gem_home = File.join RAILS_ROOT, "vendor", "plugins", "bj", "gem_home"
|
494
|
+
gem_path = [gem_home]
|
495
|
+
Gem.send :use_paths, gem_home, gem_path
|
496
|
+
gem "bj"
|
497
|
+
require "bj"
|
498
|
+
gem "main"
|
499
|
+
require "main"
|
500
|
+
=end
|
501
|
+
libdir = File.join(RAILS_ROOT, "vendor", "plugins", "bj", "lib")
|
502
|
+
$LOAD_PATH.unshift libdir
|
503
|
+
end
|
504
|
+
#
|
505
|
+
# hack of #to_s of STDERR/STDOUT for nice help messages
|
500
506
|
#
|
501
507
|
class << STDERR
|
502
508
|
def to_s() 'STDERR' end
|
data/lib/bj.rb
CHANGED
@@ -3,8 +3,7 @@ unless defined? Bj
|
|
3
3
|
#
|
4
4
|
# constants and associated attrs
|
5
5
|
#
|
6
|
-
Bj::VERSION = "0.0.
|
7
|
-
defined? Bj::VERSION
|
6
|
+
Bj::VERSION = "0.0.4" #unless defined? Bj::VERSION
|
8
7
|
def self.version() Bj::VERSION end
|
9
8
|
|
10
9
|
Bj::LIBDIR = File.expand_path(File::join(File.dirname(__FILE__), "bj")) + File::SEPARATOR unless
|