bones 2.4.0 → 2.4.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.
- data/History.txt +5 -0
- data/Rakefile +1 -1
- data/lib/bones.rb +10 -4
- data/lib/bones/app/command.rb +1 -2
- data/lib/bones/app/create_command.rb +1 -1
- data/lib/bones/debug.rb +1 -0
- data/lib/bones/tasks/setup.rb +11 -19
- data/tasks/setup.rb +11 -19
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ PROJ.authors = 'Tim Pease'
|
|
9
9
|
PROJ.email = 'tim.pease@gmail.com'
|
10
10
|
PROJ.url = 'http://codeforpeople.rubyforge.org/bones'
|
11
11
|
PROJ.version = Bones::VERSION
|
12
|
-
PROJ.release_name = '
|
12
|
+
PROJ.release_name = 'Lacrimal'
|
13
13
|
PROJ.ruby_opts = %w[-W0]
|
14
14
|
PROJ.readme_file = 'README.rdoc'
|
15
15
|
PROJ.ignore_file = '.gitignore'
|
data/lib/bones.rb
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
|
2
|
+
require 'rbconfig'
|
3
|
+
|
2
4
|
module Bones
|
3
5
|
|
4
6
|
# :stopdoc:
|
5
|
-
VERSION = '2.4.
|
7
|
+
VERSION = '2.4.1'
|
6
8
|
PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
7
|
-
|
8
|
-
DEV_NULL =
|
9
|
+
HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
|
10
|
+
DEV_NULL = File.exist?('/dev/null') ? '/dev/null' : 'NUL:'
|
11
|
+
|
12
|
+
# Ruby Interpreter location - taken from Rake source code
|
13
|
+
RUBY = File.join(Config::CONFIG['bindir'],
|
14
|
+
Config::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')
|
9
15
|
# :startdoc:
|
10
16
|
|
11
17
|
# Returns the path for Mr Bones. If any arguments are given,
|
@@ -48,7 +54,7 @@ module Bones
|
|
48
54
|
load bones_setup
|
49
55
|
|
50
56
|
rakefiles = Dir.glob(File.join(Dir.pwd, %w[tasks *.rake])).sort
|
51
|
-
import(*rakefiles)
|
57
|
+
import(*rakefiles) unless rakefiles.empty?
|
52
58
|
end
|
53
59
|
|
54
60
|
# TODO: fix file lists for Test::Unit and RSpec
|
data/lib/bones/app/command.rb
CHANGED
@@ -81,8 +81,7 @@ class Command
|
|
81
81
|
def mrbones_dir
|
82
82
|
return @mrbones_dir if defined? @mrbones_dir
|
83
83
|
|
84
|
-
path = (::Bones::
|
85
|
-
path = File.join(path, '.mrbones')
|
84
|
+
path = File.join(::Bones::HOME, '.mrbones')
|
86
85
|
@mrbones_dir = File.expand_path(path)
|
87
86
|
end
|
88
87
|
|
data/lib/bones/debug.rb
CHANGED
data/lib/bones/tasks/setup.rb
CHANGED
@@ -6,7 +6,7 @@ require 'fileutils'
|
|
6
6
|
require 'ostruct'
|
7
7
|
require 'find'
|
8
8
|
|
9
|
-
class OpenStruct; undef :gem; end
|
9
|
+
class OpenStruct; undef :gem if defined? :gem; end
|
10
10
|
|
11
11
|
# TODO: make my own openstruct type object that includes descriptions
|
12
12
|
# TODO: use the descriptions to output help on the available bones options
|
@@ -124,9 +124,7 @@ import(*rakefiles)
|
|
124
124
|
%w(lib ext).each {|dir| PROJ.libs << dir if test ?d, dir}
|
125
125
|
|
126
126
|
# Setup some constants
|
127
|
-
|
128
|
-
|
129
|
-
DEV_NULL = WIN32 ? 'NUL:' : '/dev/null'
|
127
|
+
DEV_NULL = File.exist?('/dev/null') ? '/dev/null' : 'NUL:'
|
130
128
|
|
131
129
|
def quiet( &block )
|
132
130
|
io = [STDOUT.dup, STDERR.dup]
|
@@ -139,21 +137,15 @@ ensure
|
|
139
137
|
$stdout, $stderr = STDOUT, STDERR
|
140
138
|
end
|
141
139
|
|
142
|
-
DIFF = if
|
143
|
-
else
|
144
|
-
|
145
|
-
|
146
|
-
end unless defined?
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
else '' end
|
152
|
-
end
|
153
|
-
|
154
|
-
RCOV = WIN32 ? 'rcov.bat' : 'rcov'
|
155
|
-
RDOC = WIN32 ? 'rdoc.bat' : 'rdoc'
|
156
|
-
GEM = WIN32 ? 'gem.bat' : 'gem'
|
140
|
+
DIFF = if system("gdiff '#{__FILE__}' '#{__FILE__}' > #{DEV_NULL} 2>&1") then 'gdiff'
|
141
|
+
else 'diff' end unless defined? DIFF
|
142
|
+
|
143
|
+
SUDO = if system("which sudo > #{DEV_NULL} 2>&1") then 'sudo'
|
144
|
+
else '' end unless defined? SUDO
|
145
|
+
|
146
|
+
RCOV = "#{RUBY} -S rcov"
|
147
|
+
RDOC = "#{RUBY} -S rdoc"
|
148
|
+
GEM = "#{RUBY} -S gem"
|
157
149
|
|
158
150
|
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode).each do |lib|
|
159
151
|
begin
|
data/tasks/setup.rb
CHANGED
@@ -6,7 +6,7 @@ require 'fileutils'
|
|
6
6
|
require 'ostruct'
|
7
7
|
require 'find'
|
8
8
|
|
9
|
-
class OpenStruct; undef :gem; end
|
9
|
+
class OpenStruct; undef :gem if defined? :gem; end
|
10
10
|
|
11
11
|
# TODO: make my own openstruct type object that includes descriptions
|
12
12
|
# TODO: use the descriptions to output help on the available bones options
|
@@ -124,9 +124,7 @@ import(*rakefiles)
|
|
124
124
|
%w(lib ext).each {|dir| PROJ.libs << dir if test ?d, dir}
|
125
125
|
|
126
126
|
# Setup some constants
|
127
|
-
|
128
|
-
|
129
|
-
DEV_NULL = WIN32 ? 'NUL:' : '/dev/null'
|
127
|
+
DEV_NULL = File.exist?('/dev/null') ? '/dev/null' : 'NUL:'
|
130
128
|
|
131
129
|
def quiet( &block )
|
132
130
|
io = [STDOUT.dup, STDERR.dup]
|
@@ -139,21 +137,15 @@ ensure
|
|
139
137
|
$stdout, $stderr = STDOUT, STDERR
|
140
138
|
end
|
141
139
|
|
142
|
-
DIFF = if
|
143
|
-
else
|
144
|
-
|
145
|
-
|
146
|
-
end unless defined?
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
else '' end
|
152
|
-
end
|
153
|
-
|
154
|
-
RCOV = WIN32 ? 'rcov.bat' : 'rcov'
|
155
|
-
RDOC = WIN32 ? 'rdoc.bat' : 'rdoc'
|
156
|
-
GEM = WIN32 ? 'gem.bat' : 'gem'
|
140
|
+
DIFF = if system("gdiff '#{__FILE__}' '#{__FILE__}' > #{DEV_NULL} 2>&1") then 'gdiff'
|
141
|
+
else 'diff' end unless defined? DIFF
|
142
|
+
|
143
|
+
SUDO = if system("which sudo > #{DEV_NULL} 2>&1") then 'sudo'
|
144
|
+
else '' end unless defined? SUDO
|
145
|
+
|
146
|
+
RCOV = "#{RUBY} -S rcov"
|
147
|
+
RDOC = "#{RUBY} -S rdoc"
|
148
|
+
GEM = "#{RUBY} -S gem"
|
157
149
|
|
158
150
|
%w(rcov spec/rake/spectask rubyforge bones facets/ansicode).each do |lib|
|
159
151
|
begin
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02
|
12
|
+
date: 2009-03-02 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|