ore-core 0.1.0
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 +17 -0
- data/GemspecYML.md +284 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +25 -0
- data/gemspec.yml +18 -0
- data/lib/ore.rb +3 -0
- data/lib/ore/checks.rb +88 -0
- data/lib/ore/defaults.rb +140 -0
- data/lib/ore/dependency.rb +65 -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/naming.rb +113 -0
- data/lib/ore/paths.rb +146 -0
- data/lib/ore/project.rb +599 -0
- data/lib/ore/settings.rb +274 -0
- data/lib/ore/specification.rb +29 -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-core.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-is-plugin/Gemfile +3 -0
- data/spec/helpers/projects/dm-is-plugin/VERSION +1 -0
- data/spec/helpers/projects/dm-is-plugin/dm-is-plugin.gemspec +10 -0
- data/spec/helpers/projects/dm-is-plugin/gemspec.yml +9 -0
- data/spec/helpers/projects/dm-is-plugin/lib/dm-is-plugin.rb +4 -0
- data/spec/helpers/projects/dm-is-plugin/lib/dm-is-plugin/is/plugin.rb +6 -0
- data/spec/helpers/projects/explicit/gemspec.yml +19 -0
- data/spec/helpers/projects/explicit/lib/explicit/version.rb +15 -0
- data/spec/helpers/projects/ffi-binding/gemspec.yml +11 -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 +6 -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 +56 -0
- data/spec/projects/dm_plugin_project_spec.rb +29 -0
- data/spec/projects/explicit_project_spec.rb +37 -0
- data/spec/projects/ffi_binding_project_spec.rb +25 -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 +40 -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 +170 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/projects'
|
3
|
+
require 'projects/project_examples'
|
4
|
+
|
5
|
+
describe "Explicit project" do
|
6
|
+
include Helpers::Projects
|
7
|
+
|
8
|
+
before(:all) do
|
9
|
+
@project = project('explicit')
|
10
|
+
end
|
11
|
+
|
12
|
+
it_should_behave_like 'an Ore Project'
|
13
|
+
|
14
|
+
it "should have a namespace directory" do
|
15
|
+
@project.namespace_dir.should == 'explicit'
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should have a license" do
|
19
|
+
@project.license.should == 'MIT'
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should have a licenses" do
|
23
|
+
@project.licenses.should == ['MIT']
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should have a post-install message" do
|
27
|
+
@project.post_install_message.should_not be_empty
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should have a required Ruby version" do
|
31
|
+
@project.required_ruby_version.should == '>= 1.8.7'
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should have a required RubyGems version" do
|
35
|
+
@project.required_rubygems_version.should == '>= 1.3.7'
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/projects'
|
3
|
+
require 'projects/project_examples'
|
4
|
+
|
5
|
+
describe "FFI Bindings project" do
|
6
|
+
include Helpers::Projects
|
7
|
+
|
8
|
+
before(:all) do
|
9
|
+
@project = project('ffi-binding')
|
10
|
+
end
|
11
|
+
|
12
|
+
it_should_behave_like 'an Ore Project'
|
13
|
+
|
14
|
+
it "should correctly guess the namespace" do
|
15
|
+
@project.namespace.should == 'FFI::Binding'
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should have a namespace directory" do
|
19
|
+
@project.namespace_dir.should == 'ffi/binding'
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should have external requirements" do
|
23
|
+
@project.requirements.should == ['libstuff >= 1.0']
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/projects'
|
3
|
+
require 'projects/project_examples'
|
4
|
+
|
5
|
+
describe "Jeweler project" do
|
6
|
+
include Helpers::Projects
|
7
|
+
|
8
|
+
before(:all) do
|
9
|
+
@project = project('jewelery')
|
10
|
+
end
|
11
|
+
|
12
|
+
it_should_behave_like 'an Ore Project'
|
13
|
+
|
14
|
+
it "should have a namespace directory" do
|
15
|
+
@project.namespace_dir.should == 'jewelery'
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/projects'
|
3
|
+
require 'projects/project_examples'
|
4
|
+
|
5
|
+
describe "Minimal project" do
|
6
|
+
include Helpers::Projects
|
7
|
+
|
8
|
+
before(:all) do
|
9
|
+
@project = project('minimal')
|
10
|
+
end
|
11
|
+
|
12
|
+
it_should_behave_like 'an Ore Project'
|
13
|
+
|
14
|
+
it "should not have a namespace directory" do
|
15
|
+
@project.namespace_dir.should be_nil
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ore/project'
|
3
|
+
|
4
|
+
shared_examples_for 'an Ore Project' do
|
5
|
+
it "should have project files" do
|
6
|
+
@project.project_files.should_not be_empty
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should have a name" do
|
10
|
+
@project.name.should_not be_nil
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should have a namespace" do
|
14
|
+
@project.namespace.should_not be_nil
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should have a version" do
|
18
|
+
@project.version.major.should == 1
|
19
|
+
@project.version.minor.should == 2
|
20
|
+
@project.version.patch.should == 3
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should have a summary" do
|
24
|
+
@project.summary.should_not be_nil
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should have a description" do
|
28
|
+
@project.description.should_not be_nil
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should have authors" do
|
32
|
+
@project.authors.should_not be_empty
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should be able to create a Gem::Specification" do
|
36
|
+
Dir.chdir(@project.root) do
|
37
|
+
@project.to_gemspec.validate.should == true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'helpers/files'
|
3
|
+
|
4
|
+
require 'ore/versions/version_file'
|
5
|
+
|
6
|
+
describe Versions::VersionFile do
|
7
|
+
include Helpers::Files
|
8
|
+
|
9
|
+
subject { Versions::VersionFile }
|
10
|
+
|
11
|
+
it "should load and parse the version string from a VERSION file" do
|
12
|
+
v = subject.load(file('VERSION'))
|
13
|
+
|
14
|
+
v.major.should == 1
|
15
|
+
v.minor.should == 2
|
16
|
+
v.patch.should == 3
|
17
|
+
v.build.should be_nil
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should load and parse the version numbers from a VERSION.yml file" do
|
21
|
+
v = subject.load(file('VERSION.yml'))
|
22
|
+
|
23
|
+
v.major.should == 1
|
24
|
+
v.minor.should == 2
|
25
|
+
v.patch.should == 3
|
26
|
+
v.build.should be_nil
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ore/versions/version'
|
3
|
+
|
4
|
+
describe Ore::Versions::Version do
|
5
|
+
subject { Ore::Versions::Version }
|
6
|
+
|
7
|
+
describe "new" do
|
8
|
+
let(:stable) { subject.new(1,2,3) }
|
9
|
+
let(:beta) { subject.new(1,2,3,'beta4') }
|
10
|
+
|
11
|
+
it "should default the major, minor and patch numbers to 0" do
|
12
|
+
v = subject.new(nil,nil,nil)
|
13
|
+
|
14
|
+
v.major.should == 0
|
15
|
+
v.minor.should == 0
|
16
|
+
v.patch.should == 0
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should default the build string to nil" do
|
20
|
+
stable.build.should == nil
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should construct a version string from the numbers" do
|
24
|
+
stable.version.should == '1.2.3'
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should append the build string to the version" do
|
28
|
+
beta.version.should == '1.2.3.beta4'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "parse" do
|
33
|
+
let(:stable) { '1.2.3' }
|
34
|
+
let(:beta) { '1.2.3.beta4' }
|
35
|
+
|
36
|
+
it "should parse the major, minor and patch version numbers" do
|
37
|
+
v = subject.parse(stable)
|
38
|
+
|
39
|
+
v.major.should == 1
|
40
|
+
v.minor.should == 2
|
41
|
+
v.patch.should == 3
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should parse the build string if given" do
|
45
|
+
v = subject.parse(beta)
|
46
|
+
|
47
|
+
v.major.should == 1
|
48
|
+
v.minor.should == 2
|
49
|
+
v.patch.should == 3
|
50
|
+
v.build.should == 'beta4'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ore-core
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Postmodern
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-11-07 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: yard
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 6
|
31
|
+
- 1
|
32
|
+
version: 0.6.1
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 2
|
45
|
+
- 0
|
46
|
+
- 0
|
47
|
+
version: 2.0.0
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
description: Ore is a simple RubyGem building solution. Ore handles the creation of Gem::Specification objects as well as building '.gem' files. Ore allows the developer to keep all of the project information in a single YAML file.
|
51
|
+
email: postmodern.mod3@gmail.com
|
52
|
+
executables: []
|
53
|
+
|
54
|
+
extensions: []
|
55
|
+
|
56
|
+
extra_rdoc_files:
|
57
|
+
- README.md
|
58
|
+
- ChangeLog.md
|
59
|
+
- GemspecYML.md
|
60
|
+
- LICENSE.txt
|
61
|
+
files:
|
62
|
+
- .document
|
63
|
+
- .rspec
|
64
|
+
- .yardopts
|
65
|
+
- ChangeLog.md
|
66
|
+
- GemspecYML.md
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- gemspec.yml
|
71
|
+
- lib/ore.rb
|
72
|
+
- lib/ore/checks.rb
|
73
|
+
- lib/ore/defaults.rb
|
74
|
+
- lib/ore/dependency.rb
|
75
|
+
- lib/ore/document_file.rb
|
76
|
+
- lib/ore/exceptions.rb
|
77
|
+
- lib/ore/exceptions/exception.rb
|
78
|
+
- lib/ore/exceptions/invalid_metadata.rb
|
79
|
+
- lib/ore/exceptions/project_not_found.rb
|
80
|
+
- lib/ore/naming.rb
|
81
|
+
- lib/ore/paths.rb
|
82
|
+
- lib/ore/project.rb
|
83
|
+
- lib/ore/settings.rb
|
84
|
+
- lib/ore/specification.rb
|
85
|
+
- lib/ore/versions.rb
|
86
|
+
- lib/ore/versions/exceptions.rb
|
87
|
+
- lib/ore/versions/exceptions/invalid_version.rb
|
88
|
+
- lib/ore/versions/version.rb
|
89
|
+
- lib/ore/versions/version_constant.rb
|
90
|
+
- lib/ore/versions/version_file.rb
|
91
|
+
- lib/rubygems_plugin.rb
|
92
|
+
- ore-core.gemspec
|
93
|
+
- spec/dependency_spec.rb
|
94
|
+
- spec/document_file_spec.rb
|
95
|
+
- spec/helpers/files.rb
|
96
|
+
- spec/helpers/files/.document
|
97
|
+
- spec/helpers/files/VERSION
|
98
|
+
- spec/helpers/files/VERSION.yml
|
99
|
+
- spec/helpers/projects.rb
|
100
|
+
- spec/helpers/projects/dm-is-plugin/Gemfile
|
101
|
+
- spec/helpers/projects/dm-is-plugin/VERSION
|
102
|
+
- spec/helpers/projects/dm-is-plugin/dm-is-plugin.gemspec
|
103
|
+
- spec/helpers/projects/dm-is-plugin/gemspec.yml
|
104
|
+
- spec/helpers/projects/dm-is-plugin/lib/dm-is-plugin.rb
|
105
|
+
- spec/helpers/projects/dm-is-plugin/lib/dm-is-plugin/is/plugin.rb
|
106
|
+
- spec/helpers/projects/explicit/gemspec.yml
|
107
|
+
- spec/helpers/projects/explicit/lib/explicit/version.rb
|
108
|
+
- spec/helpers/projects/ffi-binding/gemspec.yml
|
109
|
+
- spec/helpers/projects/ffi-binding/lib/ffi/binding/version.rb
|
110
|
+
- spec/helpers/projects/jewelery/VERSION
|
111
|
+
- spec/helpers/projects/jewelery/bin/jewelery
|
112
|
+
- spec/helpers/projects/jewelery/gemspec.yml
|
113
|
+
- spec/helpers/projects/jewelery/jewelery.gemspec
|
114
|
+
- spec/helpers/projects/jewelery/lib/jewelery.rb
|
115
|
+
- spec/helpers/projects/jewelery/lib/jewelery/rubies.rb
|
116
|
+
- spec/helpers/projects/minimal/gemspec.yml
|
117
|
+
- spec/helpers/projects/minimal/lib/minimal.rb
|
118
|
+
- spec/naming_spec.rb
|
119
|
+
- spec/projects/dm_plugin_project_spec.rb
|
120
|
+
- spec/projects/explicit_project_spec.rb
|
121
|
+
- spec/projects/ffi_binding_project_spec.rb
|
122
|
+
- spec/projects/jeweler_project_spec.rb
|
123
|
+
- spec/projects/minimal_project_spec.rb
|
124
|
+
- spec/projects/project_examples.rb
|
125
|
+
- spec/spec_helper.rb
|
126
|
+
- spec/versions/version_file_spec.rb
|
127
|
+
- spec/versions/version_spec.rb
|
128
|
+
has_rdoc: yard
|
129
|
+
homepage: http://github.com/ruby-ore/ore-core
|
130
|
+
licenses:
|
131
|
+
- MIT
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
segments:
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
segments:
|
151
|
+
- 0
|
152
|
+
version: "0"
|
153
|
+
requirements: []
|
154
|
+
|
155
|
+
rubyforge_project: ore-core
|
156
|
+
rubygems_version: 1.3.7
|
157
|
+
signing_key:
|
158
|
+
specification_version: 3
|
159
|
+
summary: Mine raw RubyGems from YAML
|
160
|
+
test_files:
|
161
|
+
- spec/dependency_spec.rb
|
162
|
+
- spec/naming_spec.rb
|
163
|
+
- spec/document_file_spec.rb
|
164
|
+
- spec/versions/version_spec.rb
|
165
|
+
- spec/versions/version_file_spec.rb
|
166
|
+
- spec/projects/jeweler_project_spec.rb
|
167
|
+
- spec/projects/minimal_project_spec.rb
|
168
|
+
- spec/projects/explicit_project_spec.rb
|
169
|
+
- spec/projects/dm_plugin_project_spec.rb
|
170
|
+
- spec/projects/ffi_binding_project_spec.rb
|