noodle 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +23 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +25 -0
- data/LICENSE +20 -0
- data/README.rdoc +29 -0
- data/Rakefile +37 -0
- data/VERSION +1 -0
- data/lib/noodle.rb +103 -0
- data/noodle.gemspec +60 -0
- data/spec/noodle_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +12 -0
- metadata +110 -0
data/.document
ADDED
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
gemcutter (0.5.0)
|
5
|
+
json_pure
|
6
|
+
git (1.2.5)
|
7
|
+
jeweler (1.4.0)
|
8
|
+
gemcutter (>= 0.1.0)
|
9
|
+
git (>= 1.2.5)
|
10
|
+
rubyforge (>= 2.0.0)
|
11
|
+
json_pure (1.4.3)
|
12
|
+
rake (0.8.7)
|
13
|
+
rspec (1.2.9)
|
14
|
+
rubyforge (2.0.4)
|
15
|
+
json_pure (>= 1.1.7)
|
16
|
+
yard (0.5.8)
|
17
|
+
|
18
|
+
PLATFORMS
|
19
|
+
x86-mswin32
|
20
|
+
|
21
|
+
DEPENDENCIES
|
22
|
+
jeweler
|
23
|
+
rake
|
24
|
+
rspec
|
25
|
+
yard
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Matt Burke
|
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.
|
data/README.rdoc
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
= noodle
|
2
|
+
|
3
|
+
Use bundler to pull in .NET dependencies.
|
4
|
+
|
5
|
+
== Example usage
|
6
|
+
|
7
|
+
Create a gemfile like this:
|
8
|
+
|
9
|
+
source :rubygems
|
10
|
+
gem 'structuremap'
|
11
|
+
|
12
|
+
Create a rakefile like this:
|
13
|
+
|
14
|
+
require 'noodle'
|
15
|
+
Noodle::Rake::NoodleTask.new
|
16
|
+
|
17
|
+
Then run
|
18
|
+
|
19
|
+
bundle install
|
20
|
+
rake noodle
|
21
|
+
|
22
|
+
Your project will now have a lib directory with structuremap's dll in it.
|
23
|
+
Add a reference to said DLL in your .NET project.
|
24
|
+
|
25
|
+
See {Noodle::Rake::NoodleTask} for information on how to configure it.
|
26
|
+
|
27
|
+
== Copyright
|
28
|
+
|
29
|
+
Copyright (c) 2010 Matt Burke. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.setup :default, :rake
|
4
|
+
require 'rake'
|
5
|
+
|
6
|
+
require 'jeweler'
|
7
|
+
Jeweler::Tasks.new do |gem|
|
8
|
+
gem.name = "noodle"
|
9
|
+
gem.summary = %Q{Use bundler to get your .NET assembly dependencies}
|
10
|
+
gem.description = %Q{Use bundler to get your .NET assembly dependencies.}
|
11
|
+
gem.email = "maburke@sep.com"
|
12
|
+
gem.homepage = "http://github.com/spraints/noodle"
|
13
|
+
gem.authors = ["Matt Burke"]
|
14
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
15
|
+
gem.add_development_dependency "yard", ">= 0"
|
16
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
|
+
end
|
18
|
+
Jeweler::GemcutterTasks.new
|
19
|
+
|
20
|
+
require 'spec/rake/spectask'
|
21
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
22
|
+
spec.libs << 'lib' << 'spec'
|
23
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
24
|
+
end
|
25
|
+
|
26
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
27
|
+
spec.libs << 'lib' << 'spec'
|
28
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
29
|
+
spec.rcov = true
|
30
|
+
end
|
31
|
+
|
32
|
+
task :spec => :check_dependencies
|
33
|
+
|
34
|
+
task :default => :spec
|
35
|
+
|
36
|
+
require 'yard'
|
37
|
+
YARD::Rake::YardocTask.new
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.0
|
data/lib/noodle.rb
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
|
2
|
+
module Noodle
|
3
|
+
module Rake
|
4
|
+
|
5
|
+
# Rake tasks for setting up .NET dependencies.
|
6
|
+
#
|
7
|
+
# Four tasks are defined:
|
8
|
+
# * noodle:copy - copy the lib directories from the gems to the local project.
|
9
|
+
# * noodle:clean - remove the local lib directory.
|
10
|
+
# * noodle:update - clean, then copy.
|
11
|
+
# * noodle - alias of noodle:copy.
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# Noodle::Rake::NoodleTask.new :customname do |n|
|
15
|
+
# n.groups << :dotnet # only use the bundler :dotnet group
|
16
|
+
# n.outdir = 'someplace-other-than-lib'
|
17
|
+
# n.merge! # merge all the libs together
|
18
|
+
# end
|
19
|
+
class NoodleTask < ::Rake::TaskLib
|
20
|
+
# The name of the rake task to generate.
|
21
|
+
#
|
22
|
+
# Defaults to :noodle.
|
23
|
+
# @return [String]
|
24
|
+
attr_accessor :name
|
25
|
+
|
26
|
+
# An array of bundler groups that reference the required dlls.
|
27
|
+
# Use an empty array for all groups.
|
28
|
+
#
|
29
|
+
# Defaults to all groups.
|
30
|
+
# @return [Array]
|
31
|
+
attr_accessor :groups
|
32
|
+
|
33
|
+
# The destination directory.
|
34
|
+
#
|
35
|
+
# Defaults to 'lib'.
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :outdir
|
38
|
+
|
39
|
+
# Whether to copy everything into one directory or not.
|
40
|
+
# If this is true, all gem lib directories will be combined in {#outdir}.
|
41
|
+
# If this is false, each gem lib will be stored in a separate subdirectory of {#outdir}.
|
42
|
+
# You can also set this by calling `merge!`
|
43
|
+
#
|
44
|
+
# Defaults to false.
|
45
|
+
# @return [Boolean]
|
46
|
+
attr_accessor :merge
|
47
|
+
|
48
|
+
# Sets {#merge} to true.
|
49
|
+
# @return [void]
|
50
|
+
def merge!
|
51
|
+
@merge = true
|
52
|
+
end
|
53
|
+
|
54
|
+
# Define noodle's rake tasks.
|
55
|
+
# @yield [noodle]
|
56
|
+
# @yieldparam [NoodleTask] noodle the noodle task generator.
|
57
|
+
def initialize name = :noodle
|
58
|
+
@name = name
|
59
|
+
@groups = []
|
60
|
+
@outdir = 'lib'
|
61
|
+
@merge = false
|
62
|
+
yield self if block_given?
|
63
|
+
define
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
def define
|
68
|
+
unless ::Rake.application.last_comment
|
69
|
+
desc "Copies .NET dependencies in '#{outdir}'"
|
70
|
+
end
|
71
|
+
task name => "#{name}:copy"
|
72
|
+
|
73
|
+
desc "Copies .NET dependencies to '#{outdir}'"
|
74
|
+
task "#{name}:copy" do
|
75
|
+
specs = groups.any? ? Bundler.definition.specs_for(groups) : Bundler.environment.requested_specs
|
76
|
+
specs.each do |spec|
|
77
|
+
next if spec.name == 'bundler'
|
78
|
+
spec.load_paths.each do |path|
|
79
|
+
dest_path = dest_for(spec)
|
80
|
+
FileUtils.mkdir_p dest_path
|
81
|
+
FileUtils.cp_r "#{path}/.", dest_path, :verbose => true
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "Cleans '#{outdir}'"
|
87
|
+
task "#{name}:clean" do
|
88
|
+
FileUtils.rm_rf outdir, :verbose => true
|
89
|
+
end
|
90
|
+
|
91
|
+
desc "Updates .NET dependencies in '#{outdir}'"
|
92
|
+
task "#{name}:update" => ["#{name}:clean", "#{name}:copy"]
|
93
|
+
end
|
94
|
+
|
95
|
+
def dest_for spec
|
96
|
+
dest = outdir.dup
|
97
|
+
dest << "/#{spec.name}-#{spec.version}" unless merge
|
98
|
+
File.expand_path(dest)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
end
|
data/noodle.gemspec
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{noodle}
|
8
|
+
s.version = "0.2.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Matt Burke"]
|
12
|
+
s.date = %q{2010-08-11}
|
13
|
+
s.description = %q{Use bundler to get your .NET assembly dependencies.}
|
14
|
+
s.email = %q{maburke@sep.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/noodle.rb",
|
29
|
+
"noodle.gemspec",
|
30
|
+
"spec/noodle_spec.rb",
|
31
|
+
"spec/spec.opts",
|
32
|
+
"spec/spec_helper.rb"
|
33
|
+
]
|
34
|
+
s.homepage = %q{http://github.com/spraints/noodle}
|
35
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = %q{1.3.7}
|
38
|
+
s.summary = %q{Use bundler to get your .NET assembly dependencies}
|
39
|
+
s.test_files = [
|
40
|
+
"spec/noodle_spec.rb",
|
41
|
+
"spec/spec_helper.rb"
|
42
|
+
]
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
46
|
+
s.specification_version = 3
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
50
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
53
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
54
|
+
end
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
57
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
data/spec/noodle_spec.rb
ADDED
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.setup :default, :spec
|
4
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
require 'noodle'
|
7
|
+
require 'spec'
|
8
|
+
require 'spec/autorun'
|
9
|
+
|
10
|
+
Spec::Runner.configure do |config|
|
11
|
+
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: noodle
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Matt Burke
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-08-11 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
type: :development
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
- 9
|
34
|
+
version: 1.2.9
|
35
|
+
prerelease: false
|
36
|
+
requirement: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: yard
|
39
|
+
type: :development
|
40
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
prerelease: false
|
50
|
+
requirement: *id002
|
51
|
+
description: Use bundler to get your .NET assembly dependencies.
|
52
|
+
email: maburke@sep.com
|
53
|
+
executables: []
|
54
|
+
|
55
|
+
extensions: []
|
56
|
+
|
57
|
+
extra_rdoc_files:
|
58
|
+
- LICENSE
|
59
|
+
- README.rdoc
|
60
|
+
files:
|
61
|
+
- .document
|
62
|
+
- .gitignore
|
63
|
+
- Gemfile
|
64
|
+
- Gemfile.lock
|
65
|
+
- LICENSE
|
66
|
+
- README.rdoc
|
67
|
+
- Rakefile
|
68
|
+
- VERSION
|
69
|
+
- lib/noodle.rb
|
70
|
+
- noodle.gemspec
|
71
|
+
- spec/noodle_spec.rb
|
72
|
+
- spec/spec.opts
|
73
|
+
- spec/spec_helper.rb
|
74
|
+
has_rdoc: true
|
75
|
+
homepage: http://github.com/spraints/noodle
|
76
|
+
licenses: []
|
77
|
+
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options:
|
80
|
+
- --charset=UTF-8
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
requirements: []
|
102
|
+
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 1.3.7
|
105
|
+
signing_key:
|
106
|
+
specification_version: 3
|
107
|
+
summary: Use bundler to get your .NET assembly dependencies
|
108
|
+
test_files:
|
109
|
+
- spec/noodle_spec.rb
|
110
|
+
- spec/spec_helper.rb
|