ore 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +4 -0
- data/.rspec +1 -0
- data/.yardopts +1 -0
- data/ChangeLog.md +31 -0
- data/GemspecYML.md +252 -0
- data/LICENSE.txt +21 -0
- data/README.md +104 -0
- data/Rakefile +9 -0
- data/bin/mine +12 -0
- data/bin/ore +12 -0
- data/data/ore/templates/base/.document +3 -0
- data/data/ore/templates/base/.gitignore.erb +3 -0
- data/data/ore/templates/base/:name:.gemspec.erb +10 -0
- data/data/ore/templates/base/ChangeLog.md.erb +4 -0
- data/data/ore/templates/base/ChangeLog.rdoc.erb +4 -0
- data/data/ore/templates/base/ChangeLog.tt.erb +4 -0
- data/data/ore/templates/base/LICENSE.txt.erb +20 -0
- data/data/ore/templates/base/README.md.erb +42 -0
- data/data/ore/templates/base/README.rdoc.erb +38 -0
- data/data/ore/templates/base/README.tt.erb +44 -0
- data/data/ore/templates/base/Rakefile.erb +23 -0
- data/data/ore/templates/base/gemspec.yml.erb +23 -0
- data/data/ore/templates/base/lib/:namespace_dir:.rb.erb +1 -0
- data/data/ore/templates/base/lib/:namespace_dir:/version.rb.erb +8 -0
- data/data/ore/templates/bundler/Gemfile.erb +20 -0
- data/data/ore/templates/bundler/_dependencies.erb +1 -0
- data/data/ore/templates/jeweler_tasks/_dependencies.erb +3 -0
- data/data/ore/templates/jeweler_tasks/_tasks.erb +17 -0
- data/data/ore/templates/ore_tasks/_dependencies.erb +1 -0
- data/data/ore/templates/ore_tasks/_tasks.erb +12 -0
- data/data/ore/templates/rdoc/_tasks.erb +6 -0
- data/data/ore/templates/rspec/.rspec +1 -0
- data/data/ore/templates/rspec/_dependencies.erb +3 -0
- data/data/ore/templates/rspec/_tasks.erb +14 -0
- data/data/ore/templates/rspec/spec/:namespace_dir:_spec.rb.erb +8 -0
- data/data/ore/templates/rspec/spec/spec_helper.rb.erb +7 -0
- data/data/ore/templates/test_unit/test/helper.rb.erb +24 -0
- data/data/ore/templates/test_unit/test/test_:name:.rb.erb +5 -0
- data/data/ore/templates/yard/.yardopts.erb +1 -0
- data/data/ore/templates/yard/_dependencies.erb +1 -0
- data/data/ore/templates/yard/_gem.erb +1 -0
- data/data/ore/templates/yard/_tasks.erb +13 -0
- data/gemspec.yml +21 -0
- data/lib/ore.rb +3 -0
- data/lib/ore/checks.rb +85 -0
- data/lib/ore/cli.rb +120 -0
- data/lib/ore/config.rb +52 -0
- data/lib/ore/defaults.rb +137 -0
- data/lib/ore/dependency.rb +62 -0
- data/lib/ore/document_file.rb +118 -0
- data/lib/ore/exceptions.rb +3 -0
- data/lib/ore/exceptions/exception.rb +4 -0
- data/lib/ore/exceptions/invalid_metadata.rb +6 -0
- data/lib/ore/exceptions/project_not_found.rb +6 -0
- data/lib/ore/generator.rb +247 -0
- data/lib/ore/naming.rb +95 -0
- data/lib/ore/paths.rb +143 -0
- data/lib/ore/project.rb +568 -0
- data/lib/ore/settings.rb +236 -0
- data/lib/ore/specification.rb +29 -0
- data/lib/ore/template.rb +3 -0
- data/lib/ore/template/directory.rb +179 -0
- data/lib/ore/template/helpers.rb +144 -0
- data/lib/ore/template/interpolations.rb +31 -0
- data/lib/ore/versions.rb +3 -0
- data/lib/ore/versions/exceptions.rb +1 -0
- data/lib/ore/versions/exceptions/invalid_version.rb +8 -0
- data/lib/ore/versions/version.rb +75 -0
- data/lib/ore/versions/version_constant.rb +126 -0
- data/lib/ore/versions/version_file.rb +66 -0
- data/lib/rubygems_plugin.rb +40 -0
- data/ore.gemspec +6 -0
- data/spec/dependency_spec.rb +36 -0
- data/spec/document_file_spec.rb +29 -0
- data/spec/helpers/files.rb +7 -0
- data/spec/helpers/files/.document +5 -0
- data/spec/helpers/files/VERSION +1 -0
- data/spec/helpers/files/VERSION.yml +5 -0
- data/spec/helpers/projects.rb +13 -0
- data/spec/helpers/projects/dm-plugin/Gemfile +3 -0
- data/spec/helpers/projects/dm-plugin/VERSION +1 -0
- data/spec/helpers/projects/dm-plugin/dm-plugin.gemspec +10 -0
- data/spec/helpers/projects/dm-plugin/gemspec.yml +7 -0
- data/spec/helpers/projects/dm-plugin/lib/dm-plugin.rb +1 -0
- data/spec/helpers/projects/explicit/gemspec.yml +10 -0
- data/spec/helpers/projects/explicit/lib/explicit/version.rb +15 -0
- data/spec/helpers/projects/ffi-binding/gemspec.yml +7 -0
- data/spec/helpers/projects/ffi-binding/lib/ffi/binding/version.rb +5 -0
- data/spec/helpers/projects/jewelery/VERSION +1 -0
- data/spec/helpers/projects/jewelery/bin/jewelery +3 -0
- data/spec/helpers/projects/jewelery/gemspec.yml +4 -0
- data/spec/helpers/projects/jewelery/jewelery.gemspec +10 -0
- data/spec/helpers/projects/jewelery/lib/jewelery.rb +4 -0
- data/spec/helpers/projects/jewelery/lib/jewelery/rubies.rb +4 -0
- data/spec/helpers/projects/minimal/gemspec.yml +4 -0
- data/spec/helpers/projects/minimal/lib/minimal.rb +2 -0
- data/spec/naming_spec.rb +48 -0
- data/spec/projects/dm_plugin_project_spec.rb +29 -0
- data/spec/projects/explicit_project_spec.rb +33 -0
- data/spec/projects/ffi_binding_project_spec.rb +21 -0
- data/spec/projects/jeweler_project_spec.rb +17 -0
- data/spec/projects/minimal_project_spec.rb +17 -0
- data/spec/projects/project_examples.rb +34 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/versions/version_file_spec.rb +28 -0
- data/spec/versions/version_spec.rb +53 -0
- metadata +226 -0
data/bin/ore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) <%= @year %> <%= @author %>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# <%= @name %>
|
2
|
+
|
3
|
+
<%- if @homepage -%>
|
4
|
+
* [Homepage](<%= @homepage %>)
|
5
|
+
<%- end -%>
|
6
|
+
<%- if @safe_email -%>
|
7
|
+
* [Email](<%= @safe_email %>)
|
8
|
+
<%- end -%>
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
<%= @description %>
|
13
|
+
|
14
|
+
## Features
|
15
|
+
|
16
|
+
## Examples
|
17
|
+
|
18
|
+
## Requirements
|
19
|
+
|
20
|
+
## Install
|
21
|
+
|
22
|
+
$ gem install <%= @name %>
|
23
|
+
|
24
|
+
<%- if @bin -%>
|
25
|
+
## Synopsis
|
26
|
+
|
27
|
+
$ <%= @name %>
|
28
|
+
|
29
|
+
<%- end -%>
|
30
|
+
## Copyright
|
31
|
+
|
32
|
+
<%- if @author -%>
|
33
|
+
Copyright (c) <%= @year %> <%= @author %>
|
34
|
+
<%- else -%>
|
35
|
+
Copyright (c) <%= @year %>
|
36
|
+
<%- end -%>
|
37
|
+
|
38
|
+
<%- if yard? -%>
|
39
|
+
See {file:LICENSE.txt} for details.
|
40
|
+
<%- else -%>
|
41
|
+
See LICENSE.txt for details.
|
42
|
+
<%- end -%>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
= <%= @name %>
|
2
|
+
|
3
|
+
<%- if @homepage -%>
|
4
|
+
* {Homepage}[<%= @homepage %>]
|
5
|
+
<%- end
|
6
|
+
if @safe_email -%>
|
7
|
+
* {Email}[<%= @safe_email %>]
|
8
|
+
<%- end -%>
|
9
|
+
|
10
|
+
== Description
|
11
|
+
|
12
|
+
<%= @description %>
|
13
|
+
|
14
|
+
== Features
|
15
|
+
|
16
|
+
== Examples
|
17
|
+
|
18
|
+
== Requirements
|
19
|
+
|
20
|
+
== Install
|
21
|
+
|
22
|
+
$ gem install <%= @name %>
|
23
|
+
|
24
|
+
<%- if @bin -%>
|
25
|
+
== Synopsis
|
26
|
+
|
27
|
+
$ <%= @name %>
|
28
|
+
|
29
|
+
<%- end -%>
|
30
|
+
== Copyright
|
31
|
+
|
32
|
+
<%- if @author -%>
|
33
|
+
Copyright (c) <%= @year %> <%= @author %>
|
34
|
+
<%- else -%>
|
35
|
+
Copyright (c) <%= @year %>
|
36
|
+
<%- end -%>
|
37
|
+
|
38
|
+
See LICENSE.txt for details.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
h1. <%= @name %>
|
2
|
+
|
3
|
+
<%- if @homepage -%>
|
4
|
+
* [Homepage](<%= @homepage %>)
|
5
|
+
<%- end -%>
|
6
|
+
<%- if @safe_email -%>
|
7
|
+
* [Email](<%= @safe_email %>)
|
8
|
+
<%- end -%>
|
9
|
+
|
10
|
+
h2. Description
|
11
|
+
|
12
|
+
<%= @description %>
|
13
|
+
|
14
|
+
h2. Features
|
15
|
+
|
16
|
+
h2. Examples
|
17
|
+
|
18
|
+
h2. Requirements
|
19
|
+
|
20
|
+
h2. Install
|
21
|
+
|
22
|
+
bc.
|
23
|
+
$ gem install <%= @name %>
|
24
|
+
|
25
|
+
<%- if @bin -%>
|
26
|
+
h2. Synopsis
|
27
|
+
|
28
|
+
bc.
|
29
|
+
$ <%= @name %>
|
30
|
+
|
31
|
+
<%- end -%>
|
32
|
+
h2. Copyright
|
33
|
+
|
34
|
+
<%- if @author -%>
|
35
|
+
Copyright (c) <%= @year %> <%= @author %>
|
36
|
+
<%- else -%>
|
37
|
+
Copyright (c) <%= @year %>
|
38
|
+
<%- end -%>
|
39
|
+
|
40
|
+
<%- if yard? -%>
|
41
|
+
See {file:LICENSE.txt} for details.
|
42
|
+
<%- else -%>
|
43
|
+
See LICENSE.txt for details.
|
44
|
+
<%- end -%>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
<%- if bundler? -%>
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'bundler'
|
6
|
+
rescue LoadError => e
|
7
|
+
STDERR.puts e.message
|
8
|
+
STDERR.puts "Run `gem install bundler` to install Bundler."
|
9
|
+
exit e.status_code
|
10
|
+
end
|
11
|
+
|
12
|
+
begin
|
13
|
+
Bundler.setup(:development, :doc)
|
14
|
+
rescue Bundler::BundlerError => e
|
15
|
+
STDERR.puts e.message
|
16
|
+
STDERR.puts "Run `bundle install` to install missing gems."
|
17
|
+
exit e.status_code
|
18
|
+
end
|
19
|
+
|
20
|
+
<%- end -%>
|
21
|
+
require 'rake'
|
22
|
+
|
23
|
+
<%= includes :tasks -%>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: <%= @name %>
|
2
|
+
summary: <%= yaml_escape @summary %>
|
3
|
+
description: <%= yaml_escape @description %>
|
4
|
+
<%- if @license -%>
|
5
|
+
license: <%= @license %>
|
6
|
+
<%- end -%>
|
7
|
+
<%- if @authors.length > 1 -%>
|
8
|
+
authors:
|
9
|
+
<%- @authors.each do |name| -%>
|
10
|
+
- <%= name %>
|
11
|
+
<%- end -%>
|
12
|
+
<%- else -%>
|
13
|
+
authors: <%= @authors.first %>
|
14
|
+
<%- end -%>
|
15
|
+
<%- if @email -%>
|
16
|
+
email: <%= @email %>
|
17
|
+
<%- end -%>
|
18
|
+
homepage: <%= @homepage %>
|
19
|
+
<%= includes :gem, '' -%>
|
20
|
+
|
21
|
+
development_dependencies:
|
22
|
+
ore: ~> <%= @ore_version %>
|
23
|
+
<%= includes :dependencies, '' -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
require '<%= @namespace_dir %>/version'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%- @modules.each_with_index do |namespace,n| -%>
|
2
|
+
<%= indent(n) %>module <%= namespace %>
|
3
|
+
<%- end -%>
|
4
|
+
<%= indent(@module_depth) %># <%= @name %> version
|
5
|
+
<%= indent(@module_depth) %>VERSION = <%= @version.dump %>
|
6
|
+
<%- (@module_depth - 1).downto(0) do |n| -%>
|
7
|
+
<%= indent(n) %>end
|
8
|
+
<%- end -%>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
source :rubygems
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'rake', '~> 0.8.7'
|
7
|
+
<%- if yard?
|
8
|
+
case @markup
|
9
|
+
when :markdown -%>
|
10
|
+
case RUBY_PLATFORM
|
11
|
+
when 'java'
|
12
|
+
gem 'maruku'
|
13
|
+
else
|
14
|
+
gem 'bluecloth', '>= 2.0.0'
|
15
|
+
end
|
16
|
+
<%- when :textile -%>
|
17
|
+
gem 'RedCloth'
|
18
|
+
<%- end
|
19
|
+
end -%>
|
20
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
bundler: ~> 1.0.0
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%- if bundler? -%>
|
2
|
+
require 'ore/specification'
|
3
|
+
require 'jeweler'
|
4
|
+
Jeweler::Tasks.new(Ore::Specification.new)
|
5
|
+
<%- else -%>
|
6
|
+
begin
|
7
|
+
gem 'ore', '~> <%= @ore_version %>'
|
8
|
+
gem 'jeweler', '~> 1.4'
|
9
|
+
|
10
|
+
require 'ore/specification'
|
11
|
+
require 'jeweler'
|
12
|
+
|
13
|
+
Jeweler::Tasks.new(Ore::Specification.new)
|
14
|
+
rescue LoadError
|
15
|
+
STDERR.puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
16
|
+
end
|
17
|
+
<%- end -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
ore-tasks: ~> 0.1.0
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%- if bundler? -%>
|
2
|
+
require 'ore/tasks'
|
3
|
+
Ore::Tasks.new
|
4
|
+
<%- else -%>
|
5
|
+
begin
|
6
|
+
require 'ore/tasks'
|
7
|
+
Ore::Tasks.new
|
8
|
+
rescue LoadError => e
|
9
|
+
STDERR.puts e.message
|
10
|
+
STDERR.puts "Run `gem install ore-tasks` to install 'ore/tasks'."
|
11
|
+
end
|
12
|
+
<%- end -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
--colour --format documentation
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%- if bundler? -%>
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
RSpec::Core::RakeTask.new
|
4
|
+
<%- else -%>
|
5
|
+
begin
|
6
|
+
require 'rspec/core/rake_task'
|
7
|
+
RSpec::Core::RakeTask.new
|
8
|
+
rescue LoadError => e
|
9
|
+
task :spec do
|
10
|
+
abort "Please run `gem install rspec` to install RSpec."
|
11
|
+
end
|
12
|
+
end
|
13
|
+
<%- end -%>
|
14
|
+
task :default => :spec
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
<%- if bundler? -%>
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'bundler'
|
6
|
+
rescue LoadError => e
|
7
|
+
STDERR.puts e.message
|
8
|
+
STDERR.puts "Run `gem install bundler` to install Bundler."
|
9
|
+
exit e.status_code
|
10
|
+
end
|
11
|
+
|
12
|
+
begin
|
13
|
+
Bundler.setup(:default, :development, :test)
|
14
|
+
rescue Bundler::BundlerError => e
|
15
|
+
STDERR.puts e.message
|
16
|
+
STDERR.puts "Run `bundle install` to install missing gems."
|
17
|
+
exit e.status_code
|
18
|
+
end
|
19
|
+
|
20
|
+
<%- end -%>
|
21
|
+
require 'test/unit'
|
22
|
+
|
23
|
+
class Test::Unit::TestCase
|
24
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
--markup <%= @markup %> --title "<%= @name %> Documentation" --protected
|
@@ -0,0 +1 @@
|
|
1
|
+
yard: ~> 0.6.0
|
@@ -0,0 +1 @@
|
|
1
|
+
has_yard: true
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%- if bundler? -%>
|
2
|
+
require 'yard'
|
3
|
+
YARD::Rake::YardocTask.new
|
4
|
+
<%- else -%>
|
5
|
+
begin
|
6
|
+
require 'yard'
|
7
|
+
YARD::Rake::YardocTask.new
|
8
|
+
rescue LoadError => e
|
9
|
+
task :yard do
|
10
|
+
abort "Please run `gem install yard` to install YARD."
|
11
|
+
end
|
12
|
+
end
|
13
|
+
<%- end -%>
|