bones 3.6.2 → 3.6.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/History.txt +9 -0
- data/Rakefile +4 -0
- data/lib/bones.rb +13 -5
- data/lib/bones/app/create.rb +5 -2
- data/lib/bones/plugins/bones_plugin.rb +1 -2
- data/lib/bones/rake_override_task.rb +25 -0
- data/version.txt +1 -1
- metadata +21 -4
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 3.6.4 / 2011-02-05
|
2
|
+
|
3
|
+
Enhancements
|
4
|
+
- Added an "override_task" method for working with rake tasks
|
5
|
+
|
6
|
+
Bug Fixes
|
7
|
+
- Copying version from ENV to avoid frozen strings [Douglas A. Seifert]
|
8
|
+
- Check for tasks before attempting to execute them
|
9
|
+
|
1
10
|
== 3.6.2 / 2011-01-27
|
2
11
|
|
3
12
|
Bug Fixes
|
data/Rakefile
CHANGED
@@ -5,6 +5,8 @@ require 'bones'
|
|
5
5
|
task :default => 'spec:run'
|
6
6
|
task 'gem:release' => 'spec:run'
|
7
7
|
|
8
|
+
begin gem('rspec', '~> 1.3.0'); rescue LoadError; end
|
9
|
+
|
8
10
|
Bones {
|
9
11
|
name 'bones'
|
10
12
|
authors 'Tim Pease'
|
@@ -29,6 +31,8 @@ Bones {
|
|
29
31
|
depend_on 'little-plugger'
|
30
32
|
depend_on 'loquacious'
|
31
33
|
|
34
|
+
depend_on 'rspec', '~> 1.3.0', :development => true
|
35
|
+
|
32
36
|
# These are commented out to avoid circular dependencies when install
|
33
37
|
# bones-git or bones-rspec in development mode
|
34
38
|
# depend_on 'bones-git', :development => true
|
data/lib/bones.rb
CHANGED
@@ -13,8 +13,9 @@ module Bones
|
|
13
13
|
extend LittlePlugger
|
14
14
|
|
15
15
|
# :stopdoc:
|
16
|
-
PATH = File.expand_path(
|
17
|
-
LIBPATH = File.expand_path(
|
16
|
+
PATH = File.expand_path('../..', __FILE__) + File::SEPARATOR
|
17
|
+
LIBPATH = File.expand_path('..', __FILE__) + File::SEPARATOR
|
18
|
+
VERSION = File.read(PATH + '/version.txt').strip
|
18
19
|
HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
|
19
20
|
|
20
21
|
# Ruby Interpreter location - taken from Rake source code
|
@@ -27,7 +28,7 @@ module Bones
|
|
27
28
|
# Returns the version of the Mr Bones library.
|
28
29
|
#
|
29
30
|
def self.version
|
30
|
-
|
31
|
+
VERSION
|
31
32
|
end
|
32
33
|
|
33
34
|
# Returns the path for Mr Bones. If any arguments are given,
|
@@ -84,8 +85,15 @@ module Bones
|
|
84
85
|
end # module Bones
|
85
86
|
|
86
87
|
Bones.libpath {
|
87
|
-
|
88
|
-
|
88
|
+
require 'bones/colors'
|
89
|
+
require 'bones/helpers'
|
90
|
+
require 'bones/rake_override_task'
|
91
|
+
require 'bones/gem_package_task'
|
92
|
+
require 'bones/annotation_extractor'
|
93
|
+
require 'bones/smtp_tls'
|
94
|
+
require 'bones/app'
|
95
|
+
require 'bones/app/command'
|
96
|
+
require 'bones/app/file_manager'
|
89
97
|
|
90
98
|
Bones.config {}
|
91
99
|
Loquacious.remove :gem, :file, :test, :timeout
|
data/lib/bones/app/create.rb
CHANGED
@@ -82,6 +82,9 @@ be used as the skeleton if the '--repository' flag is given.
|
|
82
82
|
def fixme
|
83
83
|
return unless test ?f, 'Rakefile'
|
84
84
|
|
85
|
+
tasks = %x{#{::Bones::RUBY} -S rake -T}
|
86
|
+
return unless tasks =~ %r/^(rake )?notes/m
|
87
|
+
|
85
88
|
stdout.puts
|
86
89
|
stdout.puts colorize('-'*31, :yellow)
|
87
90
|
stdout.puts 'Now you need to fix these files'
|
@@ -89,6 +92,6 @@ be used as the skeleton if the '--repository' flag is given.
|
|
89
92
|
system "#{::Bones::RUBY} -S rake notes"
|
90
93
|
end
|
91
94
|
|
92
|
-
end #
|
93
|
-
end #
|
95
|
+
end # Create
|
96
|
+
end # Bones::App
|
94
97
|
|
@@ -157,7 +157,7 @@ module Bones::Plugins::BonesPlugin
|
|
157
157
|
end
|
158
158
|
config.summary ||= config.description[%r/^[^.]*\.?/]
|
159
159
|
|
160
|
-
config.version ||= ENV['VERSION']
|
160
|
+
config.version ||= (ENV['VERSION'] ? ENV['VERSION'].dup : nil)
|
161
161
|
if test(?f, 'version.txt') and !config.version
|
162
162
|
config.version = File.read('version.txt').strip
|
163
163
|
end
|
@@ -206,4 +206,3 @@ module Bones::Plugins::BonesPlugin
|
|
206
206
|
|
207
207
|
end # module Bones::Plugins::BonesPlugin
|
208
208
|
|
209
|
-
# EOF
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# I would love to claim credit for this code, but I cannot. It comes from the
|
3
|
+
# good folk over at metaskills.net
|
4
|
+
#
|
5
|
+
# http://www.metaskills.net/2010/5/26/the-alias_method_chain-of-rake-override-rake-task
|
6
|
+
#
|
7
|
+
|
8
|
+
Rake::TaskManager.class_eval do
|
9
|
+
def alias_task(fq_name)
|
10
|
+
new_name = "#{fq_name}:original"
|
11
|
+
@tasks[new_name] = @tasks.delete(fq_name)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def alias_task(fq_name)
|
16
|
+
Rake.application.alias_task(fq_name)
|
17
|
+
end
|
18
|
+
|
19
|
+
def override_task(*args, &block)
|
20
|
+
name, params, deps = Rake.application.resolve_args(args.dup)
|
21
|
+
fq_name = Rake.application.instance_variable_get(:@scope).dup.push(name).join(':')
|
22
|
+
alias_task(fq_name)
|
23
|
+
Rake::Task.define_task(*args, &block)
|
24
|
+
end
|
25
|
+
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.6.
|
1
|
+
3.6.4
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 3.6.
|
9
|
+
- 4
|
10
|
+
version: 3.6.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Pease
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-05 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -66,6 +66,22 @@ dependencies:
|
|
66
66
|
version: 1.7.0
|
67
67
|
type: :runtime
|
68
68
|
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 27
|
78
|
+
segments:
|
79
|
+
- 1
|
80
|
+
- 3
|
81
|
+
- 0
|
82
|
+
version: 1.3.0
|
83
|
+
type: :development
|
84
|
+
version_requirements: *id004
|
69
85
|
description: |-
|
70
86
|
Mr Bones is a handy tool that creates new Ruby projects from a code
|
71
87
|
skeleton. The skeleton contains some starter code and a collection of rake
|
@@ -122,6 +138,7 @@ files:
|
|
122
138
|
- lib/bones/plugins/notes.rb
|
123
139
|
- lib/bones/plugins/rdoc.rb
|
124
140
|
- lib/bones/plugins/test.rb
|
141
|
+
- lib/bones/rake_override_task.rb
|
125
142
|
- lib/bones/smtp_tls.rb
|
126
143
|
- spec/bones/app/file_manager_spec.rb
|
127
144
|
- spec/bones/app_spec.rb
|