bones 3.8.3 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -1
- data/History.txt +16 -0
- data/LICENSE +22 -0
- data/Rakefile +4 -3
- data/bones.gemspec +41 -0
- data/default/LICENSE.bns +22 -0
- data/default/Rakefile.bns +1 -0
- data/lib/bones/app/file_manager.rb +1 -1
- data/lib/bones/app/plugins.rb +78 -84
- data/lib/bones/gem_package_task.rb +6 -10
- data/lib/bones/plugins/bones_plugin.rb +9 -6
- data/lib/bones/plugins/gem.rb +12 -23
- data/lib/bones.rb +1 -4
- data/version.txt +1 -1
- metadata +16 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 27c3824dec2977a60b838ff4473dbb68963f13dc101c1eb9841f03192a06e8f5
|
4
|
+
data.tar.gz: 2c6ebdb1e83bee76d51a47658472ed65b64503581911783ecd3e562664d67ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6999ffc409afbc2d09539ffae0bb98e6646d17074217ab9b32fcecd14e0931ce6047095349b535380c294d641d3032442ed83ffe7019d046760aeb72096a18a1
|
7
|
+
data.tar.gz: '0195eaf178b36cbeb5d90e4cc3e611c4e57dc9b9ea88097d465f57121ffc34cf5378ba321e4d4c13341ac66bb3d9f03b37e996ad7a6a5a4f448093f30013363d'
|
data/.gitignore
CHANGED
data/History.txt
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
== 3.9.0 / 2022-05-26
|
2
|
+
|
3
|
+
Enhancements
|
4
|
+
- use feature detection for rubygems package loading - #45 [thanks @kares]
|
5
|
+
- adding license option to the top-level bones configuration - #49
|
6
|
+
|
7
|
+
Bug Fixes
|
8
|
+
- fixing gem naming issue on Ruby 3 - #48
|
9
|
+
- fixing the plugins command - #50
|
10
|
+
|
11
|
+
== 3.8.5 / 2020-09-27
|
12
|
+
|
13
|
+
Bug Fixes
|
14
|
+
- updating gem dependencies
|
15
|
+
- cleaning up ERB usage
|
16
|
+
|
1
17
|
== 3.8.1 / 2013-10-10
|
2
18
|
|
3
19
|
Bug Fixes
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2007-2022 Tim Pease
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -12,6 +12,7 @@ Bones {
|
|
12
12
|
authors 'Tim Pease'
|
13
13
|
email 'tim.pease@gmail.com'
|
14
14
|
url 'http://rubygems.org/gems/bones'
|
15
|
+
license 'MIT'
|
15
16
|
|
16
17
|
spec.opts.concat %w[--color --format documentation]
|
17
18
|
notes.exclude %w[^README\.rdoc$ ^data/]
|
@@ -26,12 +27,12 @@ Bones {
|
|
26
27
|
|
27
28
|
use_gmail
|
28
29
|
|
29
|
-
depend_on 'rake', '~>
|
30
|
-
depend_on 'rdoc', '~>
|
30
|
+
depend_on 'rake', '~> 13.0'
|
31
|
+
depend_on 'rdoc', '~> 6.0'
|
31
32
|
depend_on 'little-plugger', '~> 1.1'
|
32
33
|
depend_on 'loquacious', '~> 1.9'
|
33
34
|
|
34
|
-
depend_on 'rspec', '~> 3.
|
35
|
+
depend_on 'rspec', '~> 3.5', :development => true
|
35
36
|
|
36
37
|
# These are commented out to avoid circular dependencies when installing
|
37
38
|
# bones-git or bones-rspec in development mode
|
data/bones.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# stub: bones 3.9.0 ruby lib
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "bones".freeze
|
6
|
+
s.version = "3.9.0"
|
7
|
+
|
8
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
|
+
s.require_paths = ["lib".freeze]
|
10
|
+
s.authors = ["Tim Pease".freeze]
|
11
|
+
s.date = "2022-05-27"
|
12
|
+
s.description = "Mr Bones is a handy tool that creates new Ruby projects from a code\nskeleton. The skeleton contains some starter code and a collection of rake\ntasks to ease the management and deployment of your source code. Several Mr\nBones plugins are available for creating git repositories, creating GitHub\nprojects, running various test suites and source code analysis tools.".freeze
|
13
|
+
s.email = "tim.pease@gmail.com".freeze
|
14
|
+
s.executables = ["bones".freeze]
|
15
|
+
s.extra_rdoc_files = ["History.txt".freeze, "README.rdoc".freeze, "bin/bones".freeze, "default/version.txt".freeze, "spec/data/markdown.txt".freeze, "spec/data/rdoc.txt".freeze]
|
16
|
+
s.files = [".autotest".freeze, ".gitignore".freeze, "History.txt".freeze, "LICENSE".freeze, "README.rdoc".freeze, "Rakefile".freeze, "bin/bones".freeze, "default/.bnsignore".freeze, "default/History.txt.bns".freeze, "default/LICENSE.bns".freeze, "default/README.md.bns".freeze, "default/Rakefile.bns".freeze, "default/bin/NAME.bns".freeze, "default/lib/NAME.rb.bns".freeze, "default/spec/NAME_spec.rb.bns".freeze, "default/spec/spec_helper.rb.bns".freeze, "default/test/test_NAME.rb".freeze, "default/version.txt".freeze, "lib/bones.rb".freeze, "lib/bones/annotation_extractor.rb".freeze, "lib/bones/app.rb".freeze, "lib/bones/app/command.rb".freeze, "lib/bones/app/create.rb".freeze, "lib/bones/app/file_manager.rb".freeze, "lib/bones/app/freeze.rb".freeze, "lib/bones/app/info.rb".freeze, "lib/bones/app/plugins.rb".freeze, "lib/bones/app/unfreeze.rb".freeze, "lib/bones/colors.rb".freeze, "lib/bones/gem_package_task.rb".freeze, "lib/bones/helpers.rb".freeze, "lib/bones/plugins/ann.rb".freeze, "lib/bones/plugins/bones_plugin.rb".freeze, "lib/bones/plugins/gem.rb".freeze, "lib/bones/plugins/notes.rb".freeze, "lib/bones/plugins/rdoc.rb".freeze, "lib/bones/plugins/test.rb".freeze, "lib/bones/rake_override_task.rb".freeze, "script/bootstrap".freeze, "spec/bones/app/file_manager_spec.rb".freeze, "spec/bones/app_spec.rb".freeze, "spec/bones/helpers_spec.rb".freeze, "spec/bones_spec.rb".freeze, "spec/data/default/.bnsignore".freeze, "spec/data/default/.rvmrc.bns".freeze, "spec/data/default/History".freeze, "spec/data/default/NAME/NAME.rb.bns".freeze, "spec/data/default/README.md.bns".freeze, "spec/data/default/Rakefile.bns".freeze, "spec/data/default/bin/NAME.bns".freeze, "spec/data/default/lib/NAME.rb.bns".freeze, "spec/data/foo/README.md".freeze, "spec/data/foo/Rakefile".freeze, "spec/data/markdown.txt".freeze, "spec/data/rdoc.txt".freeze, "spec/spec_helper.rb".freeze, "version.txt".freeze]
|
17
|
+
s.homepage = "http://rubygems.org/gems/bones".freeze
|
18
|
+
s.licenses = ["MIT".freeze]
|
19
|
+
s.post_install_message = "--------------------------\n Keep rattlin' dem bones!\n--------------------------\n".freeze
|
20
|
+
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
|
21
|
+
s.rubygems_version = "3.1.2".freeze
|
22
|
+
s.summary = "Mr Bones is a handy tool that creates new Ruby projects from a code skeleton.".freeze
|
23
|
+
|
24
|
+
if s.respond_to? :specification_version then
|
25
|
+
s.specification_version = 4
|
26
|
+
end
|
27
|
+
|
28
|
+
if s.respond_to? :add_runtime_dependency then
|
29
|
+
s.add_runtime_dependency(%q<rake>.freeze, ["~> 13.0"])
|
30
|
+
s.add_runtime_dependency(%q<rdoc>.freeze, ["~> 6.0"])
|
31
|
+
s.add_runtime_dependency(%q<little-plugger>.freeze, ["~> 1.1"])
|
32
|
+
s.add_runtime_dependency(%q<loquacious>.freeze, ["~> 1.9"])
|
33
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5"])
|
34
|
+
else
|
35
|
+
s.add_dependency(%q<rake>.freeze, ["~> 13.0"])
|
36
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 6.0"])
|
37
|
+
s.add_dependency(%q<little-plugger>.freeze, ["~> 1.1"])
|
38
|
+
s.add_dependency(%q<loquacious>.freeze, ["~> 1.9"])
|
39
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5"])
|
40
|
+
end
|
41
|
+
end
|
data/default/LICENSE.bns
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) <%= Time.now.year %> FIXME (author)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/default/Rakefile.bns
CHANGED
@@ -128,7 +128,7 @@ class FileManager
|
|
128
128
|
new_fn = fn.sub(%r/\.bns$/, '')
|
129
129
|
creating(new_fn)
|
130
130
|
|
131
|
-
txt = ERB.new(File.read(fn),
|
131
|
+
txt = ERB.new(File.read(fn), trim_mode: '-').result(binding)
|
132
132
|
File.open(new_fn, 'w') {|fd| fd.write(txt)}
|
133
133
|
FileUtils.chmod(File.stat(fn).mode, new_fn)
|
134
134
|
FileUtils.rm_f(fn)
|
data/lib/bones/app/plugins.rb
CHANGED
@@ -1,112 +1,106 @@
|
|
1
1
|
|
2
2
|
module Bones::App
|
3
|
-
class Plugins < Command
|
3
|
+
class Plugins < Command
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
def self.initialize_plugins
|
6
|
+
synopsis 'bones plugins [options]'
|
7
7
|
|
8
|
-
|
8
|
+
summary 'list available Mr Bones plugins'
|
9
9
|
|
10
|
-
|
10
|
+
description <<-__
|
11
11
|
Parse the installed gems and then search for Mr Bones plugins related to
|
12
12
|
those gems. Passing in the 'all' flag will show plugins even if the related
|
13
13
|
gems are not installed.
|
14
|
-
|
14
|
+
__
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
def run
|
21
|
-
stdout.write 'Looking up avaialble Mr Bones plugins ... '
|
22
|
-
stdout.flush
|
23
|
-
plugins = find_bones_plugins
|
24
|
-
stdout.puts 'done!'
|
25
|
-
stdout.puts
|
26
|
-
|
27
|
-
if all?
|
28
|
-
plugins.each { |name, version| show_plugin(name, version) }
|
29
|
-
else
|
30
|
-
gemspecs = find_gemspecs
|
31
|
-
plugins.each { |name, version|
|
32
|
-
gemspecs.each { |gem_name, gem_version|
|
33
|
-
next unless name.downcase == gem_name.downcase
|
34
|
-
next if version && version != gem_version
|
35
|
-
show_plugin(name, version)
|
36
|
-
}
|
37
|
-
}
|
16
|
+
option('-a', '--all', 'Show all plugins.', lambda { |_| config[:all] = true })
|
17
|
+
option(standard_options[:colorize])
|
38
18
|
end
|
39
19
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
20
|
+
def run
|
21
|
+
stdout.write 'Looking up avaialble Mr Bones plugins ... '
|
22
|
+
stdout.flush
|
23
|
+
plugins = find_bones_plugins
|
24
|
+
stdout.puts 'done!'
|
25
|
+
stdout.puts
|
26
|
+
|
27
|
+
if all?
|
28
|
+
plugins.each {|name, version| show_plugin(name, version)}
|
29
|
+
else
|
30
|
+
gemspecs = find_gemspecs
|
31
|
+
plugins.each { |name, version|
|
32
|
+
gemspecs.each { |gem_name, gem_version|
|
33
|
+
next unless name.downcase == gem_name.downcase
|
34
|
+
next if version && version != gem_version
|
35
|
+
show_plugin(name, version)
|
36
|
+
}
|
37
|
+
}
|
38
|
+
end
|
46
39
|
|
47
|
-
|
48
|
-
|
49
|
-
name << "-#{version}" if version
|
40
|
+
stdout.puts
|
41
|
+
end
|
50
42
|
|
51
|
-
|
52
|
-
|
43
|
+
def all?
|
44
|
+
config[:all]
|
45
|
+
end
|
53
46
|
|
54
|
-
|
47
|
+
def show_plugin(name, version)
|
48
|
+
name = "bones-#{name}"
|
49
|
+
name << "-#{version}" if version
|
55
50
|
|
56
|
-
|
57
|
-
if Gem::Specification.respond_to? :map
|
58
|
-
specs = Gem::Specification.map { |spec| spec }
|
59
|
-
else
|
60
|
-
specs = Gem.source_index.map { |_, spec| spec }
|
51
|
+
stdout.puts(" [%s] %s" % [installed?(name) ? colorize('installed', :green) : colorize('available', :cyan), name])
|
61
52
|
end
|
62
53
|
|
63
|
-
|
64
|
-
specs.sort! { |a, b|
|
65
|
-
names = a.first <=> b.first
|
66
|
-
next names if names.nonzero?
|
67
|
-
b.last <=> a.last
|
68
|
-
}
|
54
|
+
private
|
69
55
|
|
70
|
-
|
71
|
-
|
72
|
-
|
56
|
+
def find_gemspecs
|
57
|
+
if Gem::Specification.respond_to? :map
|
58
|
+
specs = Gem::Specification.map { |spec| spec }
|
59
|
+
else
|
60
|
+
specs = Gem.source_index.map { |_, spec| spec }
|
61
|
+
end
|
62
|
+
|
63
|
+
specs.map! { |s| [s.name, s.version.segments.first] }
|
64
|
+
specs.sort! { |a, b|
|
65
|
+
names = a.first <=> b.first
|
66
|
+
next names if names.nonzero?
|
67
|
+
b.last <=> a.last
|
68
|
+
}
|
73
69
|
|
74
|
-
|
75
|
-
|
76
|
-
# FIXME: this needs to change when rubygems removes the option to pass a regular expression to the Gem::Dependency initializer
|
77
|
-
dep = Gem::Deprecate.skip_during { Gem::Dependency.new(%r/^bones/i, Gem::Requirement.default) }
|
78
|
-
else
|
79
|
-
dep = Gem::Dependency.new(%r/^bones/i, Gem::Requirement.default)
|
70
|
+
specs.uniq!
|
71
|
+
return specs
|
80
72
|
end
|
81
73
|
|
82
|
-
|
83
|
-
|
74
|
+
def find_bones_plugins
|
75
|
+
fetcher = Gem::SpecFetcher.fetcher
|
76
|
+
specs = fetcher.detect(:latest) do |name_tuple|
|
77
|
+
%r/\Abones/.match?(name_tuple.name)
|
78
|
+
end
|
84
79
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
80
|
+
specs.map! do |tuple, _|
|
81
|
+
next unless tuple.name =~ %r/\Abones-(.*?)(?:-(\d+))?\Z/i
|
82
|
+
$2 ? [$1, $2.to_i] : $1
|
83
|
+
end
|
89
84
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
85
|
+
specs.compact!
|
86
|
+
specs.uniq!
|
87
|
+
return specs
|
88
|
+
end
|
94
89
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
90
|
+
def installed?(name, version = Gem::Requirement.default)
|
91
|
+
# FIXME: check for rubygems version 1.8.X
|
92
|
+
if Gem::Specification.respond_to? :find_by_name
|
93
|
+
begin
|
94
|
+
Gem::Specification.find_by_name(name, version)
|
95
|
+
true
|
96
|
+
rescue Gem::LoadError
|
97
|
+
false
|
98
|
+
end
|
99
|
+
else
|
100
|
+
dep = Gem::Dependency.new name, version
|
101
|
+
!Gem.source_index.search(dep).empty?
|
103
102
|
end
|
104
|
-
else
|
105
|
-
dep = Gem::Dependency.new name, version
|
106
|
-
!Gem.source_index.search(dep).empty?
|
107
103
|
end
|
108
104
|
end
|
109
|
-
|
110
|
-
end # class Plugins
|
111
|
-
end # module Bones::App
|
105
|
+
end
|
112
106
|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
require 'find'
|
3
3
|
require 'rake/packagetask'
|
4
4
|
require 'rubygems/user_interaction'
|
5
|
-
|
5
|
+
begin
|
6
6
|
require 'rubygems/package'
|
7
|
-
|
7
|
+
rescue LoadError
|
8
8
|
require 'rubygems/builder'
|
9
9
|
end
|
10
10
|
|
@@ -47,7 +47,7 @@ class Bones::GemPackageTask < Rake::PackageTask
|
|
47
47
|
file "#{package_dir_path}/#{gem_file}" => [package_dir_path] + package_files do
|
48
48
|
when_writing("Creating GEM") {
|
49
49
|
chdir(package_dir_path) do
|
50
|
-
if
|
50
|
+
if defined? Gem::Package.build
|
51
51
|
Gem::Package.build(gem_spec)
|
52
52
|
else
|
53
53
|
Gem::Builder.new(gem_spec).build
|
@@ -64,16 +64,12 @@ class Bones::GemPackageTask < Rake::PackageTask
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
-
#
|
68
|
-
#
|
69
67
|
def gem_file
|
70
68
|
if @gem_spec.platform == Gem::Platform::RUBY
|
71
|
-
"#{
|
69
|
+
"#{gem_spec.full_name}.gem"
|
72
70
|
else
|
73
|
-
"#{
|
71
|
+
"#{gem_spec.full_name}-#{gem_spec.platform}.gem"
|
74
72
|
end
|
75
73
|
end
|
74
|
+
end
|
76
75
|
|
77
|
-
end # class Bones::GemPackageTask
|
78
|
-
|
79
|
-
# EOF
|
@@ -38,6 +38,13 @@ module Bones::Plugins::BonesPlugin
|
|
38
38
|
most current release are included.
|
39
39
|
__
|
40
40
|
|
41
|
+
license nil, :desc => <<-__
|
42
|
+
This should just be the name of your license. The full text of the
|
43
|
+
license should be in a LICENSE file at the top-level of your gem when
|
44
|
+
you build it. The simplest way is to specify the standard SPDX ID
|
45
|
+
https://spdx.org/licenses/ for the license.
|
46
|
+
__
|
47
|
+
|
41
48
|
authors nil, :desc => <<-__
|
42
49
|
This can be a single author (as a string) or an array of authors
|
43
50
|
if more than one person is working on the project.
|
@@ -173,8 +180,6 @@ module Bones::Plugins::BonesPlugin
|
|
173
180
|
end
|
174
181
|
|
175
182
|
def define_tasks
|
176
|
-
config = ::Bones.config
|
177
|
-
|
178
183
|
namespace :bones do
|
179
184
|
desc 'Show the current Mr Bones configuration'
|
180
185
|
task :debug do |t|
|
@@ -202,9 +207,7 @@ module Bones::Plugins::BonesPlugin
|
|
202
207
|
|
203
208
|
::Bones.help.show(atr, :descriptions => false, :values => false)
|
204
209
|
end
|
205
|
-
|
206
|
-
end # namespace :bones
|
210
|
+
end
|
207
211
|
end
|
208
|
-
|
209
|
-
end # module Bones::Plugins::BonesPlugin
|
212
|
+
end
|
210
213
|
|
data/lib/bones/plugins/gem.rb
CHANGED
@@ -11,8 +11,7 @@ module Bones::Plugins::Gem
|
|
11
11
|
# Adds the given gem _name_ to the current project's dependency list. An
|
12
12
|
# optional gem _version_ can be given. If omitted, the newest gem version
|
13
13
|
# will be used.
|
14
|
-
|
15
|
-
def depend_on( name, *args )
|
14
|
+
def depend_on(name, *args)
|
16
15
|
opts = Hash === args.last ? args.pop : {}
|
17
16
|
version = args.first || opts[:version]
|
18
17
|
development = opts.key?(:development) ? opts[:development] : opts.key?(:dev) ? opts[:dev] : false
|
@@ -21,13 +20,13 @@ module Bones::Plugins::Gem
|
|
21
20
|
if Gem::Specification.respond_to? :find_by_name
|
22
21
|
begin
|
23
22
|
spec = Gem::Specification.find_by_name(name)
|
24
|
-
rescue Gem::LoadError
|
23
|
+
rescue Gem::LoadError
|
25
24
|
end
|
26
25
|
else
|
27
26
|
spec = Gem.source_index.find_name(name).last
|
28
27
|
end
|
29
28
|
|
30
|
-
version = "
|
29
|
+
version = "~> #{spec.version.to_s}" if version.nil? and !spec.nil?
|
31
30
|
|
32
31
|
dep = case version
|
33
32
|
when nil; [name]
|
@@ -40,9 +39,8 @@ module Bones::Plugins::Gem
|
|
40
39
|
nil
|
41
40
|
end
|
42
41
|
|
43
|
-
# Add the given
|
44
|
-
|
45
|
-
def source( url )
|
42
|
+
# Add the given `url` to the list of gem sources.
|
43
|
+
def source(url)
|
46
44
|
sources = ::Bones.config.gem.sources
|
47
45
|
sources << url unless sources.include? url
|
48
46
|
nil
|
@@ -133,7 +131,7 @@ module Bones::Plugins::Gem
|
|
133
131
|
unless $bones_external_spec
|
134
132
|
config.gem.files ||= manifest
|
135
133
|
config.gem.executables ||= config.gem.files.find_all {|fn| fn =~ %r/^bin/}
|
136
|
-
config.gem.development_dependencies << ['bones', "
|
134
|
+
config.gem.development_dependencies << ['bones', "~> #{Bones.version}"]
|
137
135
|
end
|
138
136
|
end
|
139
137
|
|
@@ -149,13 +147,8 @@ module Bones::Plugins::Gem
|
|
149
147
|
s.authors = Array(config.authors)
|
150
148
|
s.email = config.email
|
151
149
|
s.homepage = Array(config.url).first
|
152
|
-
s.rubyforge_project = config.name
|
153
|
-
|
154
|
-
if !config.rubyforge.nil? and config.rubyforge.name
|
155
|
-
s.rubyforge_project = config.rubyforge.name
|
156
|
-
end
|
157
|
-
|
158
150
|
s.description = config.description
|
151
|
+
s.license = config.license
|
159
152
|
|
160
153
|
config.gem.dependencies.each do |dep|
|
161
154
|
s.add_dependency(*dep)
|
@@ -246,10 +239,7 @@ module Bones::Plugins::Gem
|
|
246
239
|
|
247
240
|
desc 'Install the gem'
|
248
241
|
task :install => [:clobber, 'gem:package'] do
|
249
|
-
sh "#{SUDO} #{GEM} install pkg/#{config.gem._spec.full_name}"
|
250
|
-
|
251
|
-
# use this version of the command for rubygems > 1.0.0
|
252
|
-
# sh "#{SUDO} #{GEM} install --no-update-sources pkg/#{config.gem._spec.full_name}"
|
242
|
+
sh "#{SUDO} #{GEM} install pkg/#{config.gem._spec.full_name}.gem"
|
253
243
|
end
|
254
244
|
|
255
245
|
desc 'Uninstall the gem'
|
@@ -343,7 +333,7 @@ module Bones::Plugins::Gem
|
|
343
333
|
|
344
334
|
# Import configuration from the given gemspec file.
|
345
335
|
#
|
346
|
-
def import_gemspec(
|
336
|
+
def import_gemspec(filename)
|
347
337
|
$bones_external_spec = false
|
348
338
|
spec = load_gemspec(filename)
|
349
339
|
return if spec.nil?
|
@@ -361,7 +351,7 @@ module Bones::Plugins::Gem
|
|
361
351
|
config.description = spec.description
|
362
352
|
config.files = spec.files
|
363
353
|
config.libs = spec.require_paths
|
364
|
-
config.
|
354
|
+
config.license = spec.license
|
365
355
|
|
366
356
|
config.gem.executables = spec.executables
|
367
357
|
if have? :rdoc
|
@@ -390,7 +380,7 @@ module Bones::Plugins::Gem
|
|
390
380
|
# This method is stolen from the Bundler gem. It loads the gemspec from a
|
391
381
|
# file if available.
|
392
382
|
#
|
393
|
-
def load_gemspec(
|
383
|
+
def load_gemspec(filename)
|
394
384
|
path = Pathname.new(filename)
|
395
385
|
# Eval the gemspec from its parent directory
|
396
386
|
Dir.chdir(path.dirname) do
|
@@ -415,6 +405,5 @@ module Bones::Plugins::Gem
|
|
415
405
|
end
|
416
406
|
end
|
417
407
|
end
|
418
|
-
|
419
|
-
end # Bones::Plugins::Gem
|
408
|
+
end
|
420
409
|
|
data/lib/bones.rb
CHANGED
@@ -17,10 +17,7 @@ module Bones
|
|
17
17
|
LIBPATH = File.expand_path('..', __FILE__) + File::SEPARATOR
|
18
18
|
VERSION = File.read(PATH + '/version.txt').strip
|
19
19
|
HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
|
20
|
-
|
21
|
-
# Ruby Interpreter location - taken from Rake source code
|
22
|
-
RUBY = File.join(RbConfig::CONFIG['bindir'],
|
23
|
-
RbConfig::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')
|
20
|
+
RUBY = 'ruby'
|
24
21
|
|
25
22
|
module Plugins; end
|
26
23
|
# :startdoc:
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.9.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '13.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: little-plugger
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.5'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.5'
|
83
83
|
description: |-
|
84
84
|
Mr Bones is a handy tool that creates new Ruby projects from a code
|
85
85
|
skeleton. The skeleton contains some starter code and a collection of rake
|
@@ -101,11 +101,14 @@ files:
|
|
101
101
|
- ".autotest"
|
102
102
|
- ".gitignore"
|
103
103
|
- History.txt
|
104
|
+
- LICENSE
|
104
105
|
- README.rdoc
|
105
106
|
- Rakefile
|
106
107
|
- bin/bones
|
108
|
+
- bones.gemspec
|
107
109
|
- default/.bnsignore
|
108
110
|
- default/History.txt.bns
|
111
|
+
- default/LICENSE.bns
|
109
112
|
- default/README.md.bns
|
110
113
|
- default/Rakefile.bns
|
111
114
|
- default/bin/NAME.bns
|
@@ -154,7 +157,8 @@ files:
|
|
154
157
|
- spec/spec_helper.rb
|
155
158
|
- version.txt
|
156
159
|
homepage: http://rubygems.org/gems/bones
|
157
|
-
licenses:
|
160
|
+
licenses:
|
161
|
+
- MIT
|
158
162
|
metadata: {}
|
159
163
|
post_install_message: |
|
160
164
|
--------------------------
|
@@ -176,9 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
180
|
- !ruby/object:Gem::Version
|
177
181
|
version: '0'
|
178
182
|
requirements: []
|
179
|
-
|
180
|
-
|
181
|
-
signing_key:
|
183
|
+
rubygems_version: 3.1.2
|
184
|
+
signing_key:
|
182
185
|
specification_version: 4
|
183
186
|
summary: Mr Bones is a handy tool that creates new Ruby projects from a code skeleton.
|
184
187
|
test_files: []
|