auser-poolparty 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/cloud +1 -0
- data/config/jeweler.rb +4 -4
- data/lib/poolparty/plugins/chef.rb +1 -1
- data/lib/poolparty/poolparty/poolparty_base_class.rb +1 -1
- data/lib/poolparty/resources/package.rb +8 -0
- data/vendor/gems/butterfly/History.txt +4 -0
- data/vendor/gems/butterfly/PostInstall.txt +2 -0
- data/vendor/gems/butterfly/README.rdoc +48 -0
- data/vendor/gems/butterfly/Rakefile +62 -0
- data/vendor/gems/butterfly/VERSION.yml +4 -0
- data/vendor/gems/butterfly/bin/flutter +4 -0
- data/vendor/gems/butterfly/butterfly.gemspec +37 -0
- data/vendor/gems/butterfly/examples/config.ru +15 -0
- data/vendor/gems/butterfly/examples/my_app.rb +12 -0
- data/vendor/gems/butterfly/lib/butterfly.rb +14 -0
- data/vendor/gems/butterfly/lib/handler.rb +48 -0
- data/vendor/gems/butterfly/lib/request.rb +29 -0
- data/vendor/gems/butterfly/lib/response.rb +49 -0
- data/vendor/gems/butterfly/script/console +10 -0
- data/vendor/gems/butterfly/script/destroy +14 -0
- data/vendor/gems/butterfly/script/generate +14 -0
- data/vendor/gems/butterfly/test/test_adapter_base.rb +23 -0
- data/vendor/gems/butterfly/test/test_butterfly_request.rb +46 -0
- data/vendor/gems/butterfly/test/test_butterfly_response.rb +43 -0
- data/vendor/gems/butterfly/test/test_butterfly_server.rb +16 -0
- data/vendor/gems/butterfly/test/test_default.rb +12 -0
- data/vendor/gems/butterfly/test/test_helper.rb +6 -0
- data/vendor/gems/dslify/History.txt +4 -0
- data/vendor/gems/dslify/Manifest.txt +25 -0
- data/vendor/gems/dslify/PostInstall.txt +5 -0
- data/vendor/gems/dslify/README.txt +60 -0
- data/vendor/gems/dslify/Rakefile +56 -0
- data/vendor/gems/dslify/config/hoe.rb +73 -0
- data/vendor/gems/dslify/config/requirements.rb +15 -0
- data/vendor/gems/dslify/dslify.gemspec +40 -0
- data/vendor/gems/dslify/lib/dslify.rb +7 -0
- data/vendor/gems/dslify/lib/dslify/dslify.rb +76 -0
- data/vendor/gems/dslify/lib/dslify/version.rb +10 -0
- data/vendor/gems/dslify/script/console +10 -0
- data/vendor/gems/dslify/script/destroy +14 -0
- data/vendor/gems/dslify/script/generate +14 -0
- data/vendor/gems/dslify/script/txt2html +82 -0
- data/vendor/gems/dslify/setup.rb +1585 -0
- data/vendor/gems/dslify/tasks/deployment.rake +34 -0
- data/vendor/gems/dslify/tasks/environment.rake +7 -0
- data/vendor/gems/dslify/tasks/website.rake +17 -0
- data/vendor/gems/dslify/test/test_dslify.rb +138 -0
- data/vendor/gems/dslify/website/index.html +86 -0
- data/vendor/gems/dslify/website/index.txt +83 -0
- data/vendor/gems/dslify/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/vendor/gems/dslify/website/stylesheets/screen.css +138 -0
- data/vendor/gems/dslify/website/template.html.erb +48 -0
- data/vendor/gems/parenting/History.txt +4 -0
- data/vendor/gems/parenting/Manifest.txt +13 -0
- data/vendor/gems/parenting/PostInstall.txt +2 -0
- data/vendor/gems/parenting/README.rdoc +47 -0
- data/vendor/gems/parenting/Rakefile +28 -0
- data/vendor/gems/parenting/lib/parenting.rb +10 -0
- data/vendor/gems/parenting/lib/parenting/parenting.rb +61 -0
- data/vendor/gems/parenting/parenting.gemspec +39 -0
- data/vendor/gems/parenting/script/console +10 -0
- data/vendor/gems/parenting/script/destroy +14 -0
- data/vendor/gems/parenting/script/generate +14 -0
- data/vendor/gems/parenting/test/file_to_eval.rb +9 -0
- data/vendor/gems/parenting/test/test_helper.rb +5 -0
- data/vendor/gems/parenting/test/test_parenting.rb +117 -0
- data/vendor/gems/suitcase/LICENSE +20 -0
- data/vendor/gems/suitcase/README.rdoc +31 -0
- data/vendor/gems/suitcase/Rakefile +57 -0
- data/vendor/gems/suitcase/VERSION.yml +4 -0
- data/vendor/gems/suitcase/lib/suitcase.rb +5 -0
- data/vendor/gems/suitcase/lib/suitcase/unzipper.rb +15 -0
- data/vendor/gems/suitcase/lib/suitcase/zipper.rb +119 -0
- data/vendor/gems/suitcase/suitcase.gemspec +32 -0
- data/vendor/gems/suitcase/test/suitcase_test.rb +102 -0
- data/vendor/gems/suitcase/test/test_dir/box.rb +1 -0
- data/vendor/gems/suitcase/test/test_dir/test.txt +1 -0
- data/vendor/gems/suitcase/test/test_helper.rb +12 -0
- metadata +102 -22
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestAdapterBase < Test::Unit::TestCase
|
4
|
+
context "adaptor_base" do
|
5
|
+
before do
|
6
|
+
@ab = Butterfly::AdaptorBase.new
|
7
|
+
@env = {"REQUEST_URL" => "/"}
|
8
|
+
@response = Object.new
|
9
|
+
end
|
10
|
+
it "should raise an exception if there is no get defined" do
|
11
|
+
assert_raise Exception do; @ab.get(@env, @response) end
|
12
|
+
end
|
13
|
+
it "should raise an exception if there is no post defined" do
|
14
|
+
assert_raise Exception do; @ab.post(@env, @response) end
|
15
|
+
end
|
16
|
+
it "should raise an exception if there is no delete defined" do
|
17
|
+
assert_raise Exception do; @ab.delete(@env, @response) end
|
18
|
+
end
|
19
|
+
it "should raise an exception if there is no put defined" do
|
20
|
+
assert_raise Exception do; @ab.put(@env, @response) end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestButterflyRequest < Test::Unit::TestCase
|
4
|
+
context "params" do
|
5
|
+
before do
|
6
|
+
@env = {
|
7
|
+
"REQUEST_METHOD" => "GET",
|
8
|
+
"REQUEST_URI" => "/server"
|
9
|
+
}
|
10
|
+
end
|
11
|
+
it "should parse the query into 1 part [:server] when the path is /server" do
|
12
|
+
Butterfly::Request.new(@env).params.should == [:server]
|
13
|
+
end
|
14
|
+
it "should parse the query into 2 items when the path is /server/item" do
|
15
|
+
Butterfly::Request.new(@env.merge("REQUEST_URI" => "/server/item")).params.should == [:server, :item]
|
16
|
+
end
|
17
|
+
it "should parse the query into 3 items when the path is /server/item/two" do
|
18
|
+
Butterfly::Request.new(@env.merge("REQUEST_URI" => "/server/item/two")).params.should == [:server, :item, :two]
|
19
|
+
end
|
20
|
+
it "should not explode with a ?" do
|
21
|
+
Butterfly::Request.new(@env.merge("REQUEST_URI" => "/server/item/two?pop=dance")).params.should == [:server, :item, :two]
|
22
|
+
end
|
23
|
+
it "should pull out the post data when post_data is sent" do
|
24
|
+
Butterfly::Request.new(@env.merge("rack.input" => "fly away")).post_data.should == "fly away"
|
25
|
+
end
|
26
|
+
it "should pull out the post data param to map the response" do
|
27
|
+
@req = Butterfly::Request.new(@env.merge("REQUEST_URI" => "/server/item"))
|
28
|
+
@req.route_param.should == :server
|
29
|
+
@req.params.include?(:server).should == false
|
30
|
+
end
|
31
|
+
context "request type" do
|
32
|
+
it "should be :get when REQUEST_METHOD == GET" do
|
33
|
+
Butterfly::Request.new(@env.merge("REQUEST_METHOD" => "GET")).request_method.should == :get
|
34
|
+
end
|
35
|
+
it "should be :get when REQUEST_METHOD == POST" do
|
36
|
+
Butterfly::Request.new(@env.merge("REQUEST_METHOD" => "POST")).request_method.should == :post
|
37
|
+
end
|
38
|
+
it "should be :get when REQUEST_METHOD == PUT" do
|
39
|
+
Butterfly::Request.new(@env.merge("REQUEST_METHOD" => "PUT")).request_method.should == :put
|
40
|
+
end
|
41
|
+
it "should be :get when REQUEST_METHOD == DELETE" do
|
42
|
+
Butterfly::Request.new(@env.merge("REQUEST_METHOD" => "DELETE")).request_method.should == :delete
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestButterflyResponse < Test::Unit::TestCase
|
4
|
+
context "response" do
|
5
|
+
before do
|
6
|
+
@env = {
|
7
|
+
"REQUEST_URI" => "/.json",
|
8
|
+
"REQUEST_METHOD" => "get"
|
9
|
+
}
|
10
|
+
@request = Butterfly::Request.new @env
|
11
|
+
@response = Butterfly::Response.new @request
|
12
|
+
end
|
13
|
+
it "should have headers, status and a body" do
|
14
|
+
@response.headers.should == {}
|
15
|
+
@response.status.should == 200
|
16
|
+
@response.body.should == nil
|
17
|
+
end
|
18
|
+
it "should add the response header on a json request" do
|
19
|
+
@response.prepare_headers.should == {"ContentType" => "application/json"}
|
20
|
+
end
|
21
|
+
it "should return an Array on to the response to return to Rack" do
|
22
|
+
@response.return!("hi").class.should == Array
|
23
|
+
end
|
24
|
+
it "should return a rack request (json)" do
|
25
|
+
req = Butterfly::Request.new(@env.merge("REQUEST_URI" => "/index.json"))
|
26
|
+
resp = Butterfly::Response.new req
|
27
|
+
resp.return!("hi").should == [200, {"ContentType" => "application/json"}, "\"hi\""]
|
28
|
+
end
|
29
|
+
it "should return a rack request (text)" do
|
30
|
+
req = Butterfly::Request.new(@env.merge("REQUEST_URI" => "/"))
|
31
|
+
resp = Butterfly::Response.new req
|
32
|
+
resp.return!("hi").should == [200, {"ContentType" => "text/plain"}, "hi"]
|
33
|
+
end
|
34
|
+
it "should be able to add headers" do
|
35
|
+
@response.add_header("foo", "bar")
|
36
|
+
@response.headers.should === {"foo" => "bar"}
|
37
|
+
end
|
38
|
+
it "should return a 404 when there is a fail!" do
|
39
|
+
@response.fail!
|
40
|
+
@response.return!("hi").should == [404, {"ContentType" => "application/json"}, "\"hi\""]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestButterflyServer < Test::Unit::TestCase
|
4
|
+
context "server" do
|
5
|
+
before do
|
6
|
+
@server = Butterfly::Server.new({:host => "10.0.0.0", :port => 10000})
|
7
|
+
end
|
8
|
+
it "should set the host and port properly when passed in as a hash" do
|
9
|
+
@server.host.should == "10.0.0.0"
|
10
|
+
@server.port.should == 10000
|
11
|
+
end
|
12
|
+
it "should respond to call (for rack)" do
|
13
|
+
@server.respond_to?(:call).should == true
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
History.txt
|
2
|
+
Manifest.txt
|
3
|
+
PostInstall.txt
|
4
|
+
README.txt
|
5
|
+
Rakefile
|
6
|
+
config/hoe.rb
|
7
|
+
config/requirements.rb
|
8
|
+
dslify.gemspec
|
9
|
+
lib/dslify.rb
|
10
|
+
lib/dslify/dslify.rb
|
11
|
+
lib/dslify/version.rb
|
12
|
+
script/console
|
13
|
+
script/destroy
|
14
|
+
script/generate
|
15
|
+
script/txt2html
|
16
|
+
setup.rb
|
17
|
+
tasks/deployment.rake
|
18
|
+
tasks/environment.rake
|
19
|
+
tasks/website.rake
|
20
|
+
test/test_dslify.rb
|
21
|
+
website/index.html
|
22
|
+
website/index.txt
|
23
|
+
website/javascripts/rounded_corners_lite.inc.js
|
24
|
+
website/stylesheets/screen.css
|
25
|
+
website/template.html.erb
|
@@ -0,0 +1,60 @@
|
|
1
|
+
= dslify
|
2
|
+
|
3
|
+
== DESCRIPTION:
|
4
|
+
|
5
|
+
Easily add DSL accessors to any class without bothering to mess with the gory details of their implementation
|
6
|
+
|
7
|
+
== SYNOPSIS:
|
8
|
+
|
9
|
+
Simply add Dslify to your class, like so:
|
10
|
+
class MyClass
|
11
|
+
include Dslify
|
12
|
+
end
|
13
|
+
|
14
|
+
Then, you can call *any* method on your object and, if it is not a method on the instance, it will set the value on the class as an option. Note, you can always check these by checking out the options on the object.
|
15
|
+
|
16
|
+
instance = MyClass.new
|
17
|
+
instance.name #=> nil
|
18
|
+
instance.name "frank"
|
19
|
+
instance.name #=> "frank"
|
20
|
+
|
21
|
+
You can also define default values with the singleton method:
|
22
|
+
default_options({:name => "bob"})
|
23
|
+
|
24
|
+
instance = MyClass.new
|
25
|
+
instance.name #=> "bob"
|
26
|
+
instance.name "frank"
|
27
|
+
instance.name #=> "frank"
|
28
|
+
|
29
|
+
== REQUIREMENTS:
|
30
|
+
|
31
|
+
ruby
|
32
|
+
|
33
|
+
== INSTALL:
|
34
|
+
|
35
|
+
sudo gem install auser-dslify
|
36
|
+
|
37
|
+
== LICENSE:
|
38
|
+
|
39
|
+
(The MIT License)
|
40
|
+
|
41
|
+
Copyright (c) 2008 Ari Lerner
|
42
|
+
|
43
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
44
|
+
a copy of this software and associated documentation files (the
|
45
|
+
'Software'), to deal in the Software without restriction, including
|
46
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
47
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
48
|
+
permit persons to whom the Software is furnished to do so, subject to
|
49
|
+
the following conditions:
|
50
|
+
|
51
|
+
The above copyright notice and this permission notice shall be
|
52
|
+
included in all copies or substantial portions of the Software.
|
53
|
+
|
54
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
55
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
56
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
57
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
58
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
59
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
60
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'config/requirements'
|
2
|
+
require 'config/hoe' # setup Hoe + all gem configuration
|
3
|
+
|
4
|
+
Dir['tasks/**/*.rake'].each { |rake| load rake }
|
5
|
+
|
6
|
+
desc "Clean tmp directory"
|
7
|
+
task :clean_tmp do |t|
|
8
|
+
%x[rm #{File.dirname(__FILE__)}/Manifest.txt; touch #{File.dirname(__FILE__)}/Manifest.txt]
|
9
|
+
%w(logs tmp).each do |dir|
|
10
|
+
FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
desc "Remove the pkg directory"
|
14
|
+
task :clean_pkg do |t|
|
15
|
+
%w(pkg).each do |dir|
|
16
|
+
FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Generate a new manifest and a new gem"
|
21
|
+
task :build_local_gem => [:clean_tmp, :clean_pkg, :"manifest:refresh", :package]
|
22
|
+
|
23
|
+
desc "Release to github"
|
24
|
+
task :github_release => [:clean_tmp, :clean_pkg, :"manifest:refresh", :package] do
|
25
|
+
res = %x[rake debug_gem]
|
26
|
+
res = res.split("\n")[1..-1].join("\n")
|
27
|
+
::File.open("#{GEM_NAME.downcase}.gemspec", "w+") do |f|
|
28
|
+
f << res
|
29
|
+
end
|
30
|
+
`mv #{::File.expand_path(::File.dirname(__FILE__))}/pkg/*.gem #{::File.expand_path(::File.dirname(__FILE__))}/pkg/poolparty.gem`
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Generate gemspec"
|
34
|
+
task :gemspec => [:clean_tmp, :"manifest:refresh", :build_local_gem] do |t|
|
35
|
+
res = %x[rake debug_gem]
|
36
|
+
res = res.split("\n")[1..-1].join("\n")
|
37
|
+
::File.open("#{GEM_NAME.downcase}.gemspec", "w+") do |f|
|
38
|
+
f << res
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
desc "Generate gemspec for github"
|
43
|
+
task :gh => [:github_release] do
|
44
|
+
filepath = ::File.join(::File.dirname(__FILE__), "poolparty.gemspec")
|
45
|
+
data = open(filepath).read
|
46
|
+
spec = eval("$SAFE = 3\n#{data}")
|
47
|
+
yml = YAML.dump spec
|
48
|
+
File.open(filepath, "w+") do |f|
|
49
|
+
f << yml
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "Generate github gemspec and latest gem"
|
54
|
+
task :ghgem => [:gh] do
|
55
|
+
%x[sudo gem install pkg/poolparty.gem]
|
56
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'dslify/version'
|
2
|
+
|
3
|
+
AUTHOR = 'Ari Lerner' # can also be an array of Authors
|
4
|
+
EMAIL = "arilerner@mac.com"
|
5
|
+
DESCRIPTION = "Easily add DSL-like calls to any class"
|
6
|
+
GEM_NAME = 'dslify' # what ppl will type to install your gem
|
7
|
+
RUBYFORGE_PROJECT = 'dslify' # The unix name for your project
|
8
|
+
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
9
|
+
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
10
|
+
EXTRA_DEPENDENCIES = [
|
11
|
+
# ['activesupport', '>= 1.3.1']
|
12
|
+
] # An array of rubygem dependencies [name, version]
|
13
|
+
|
14
|
+
@config_file = "~/.rubyforge/user-config.yml"
|
15
|
+
@config = nil
|
16
|
+
RUBYFORGE_USERNAME = "auser"
|
17
|
+
def rubyforge_username
|
18
|
+
unless @config
|
19
|
+
begin
|
20
|
+
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
21
|
+
rescue
|
22
|
+
puts <<-EOS
|
23
|
+
ERROR: No rubyforge config file found: #{@config_file}
|
24
|
+
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
25
|
+
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
26
|
+
EOS
|
27
|
+
exit
|
28
|
+
end
|
29
|
+
end
|
30
|
+
RUBYFORGE_USERNAME.replace @config["username"]
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
REV = nil
|
35
|
+
# UNCOMMENT IF REQUIRED:
|
36
|
+
# REV = YAML.load(`svn info`)['Revision']
|
37
|
+
VERS = Dslify::VERSION::STRING + (REV ? ".#{REV}" : "")
|
38
|
+
RDOC_OPTS = ['--quiet', '--title', 'dslify documentation',
|
39
|
+
"--opname", "index.html",
|
40
|
+
"--line-numbers",
|
41
|
+
"--main", "README",
|
42
|
+
"--inline-source"]
|
43
|
+
|
44
|
+
class Hoe
|
45
|
+
def extra_deps
|
46
|
+
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
47
|
+
@extra_deps
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Generate all the Rake tasks
|
52
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
53
|
+
$hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
54
|
+
p.developer(AUTHOR, EMAIL)
|
55
|
+
p.description = DESCRIPTION
|
56
|
+
p.summary = DESCRIPTION
|
57
|
+
p.url = HOMEPATH
|
58
|
+
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
59
|
+
p.test_globs = ["test/**/test_*.rb"]
|
60
|
+
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
|
61
|
+
|
62
|
+
# == Optional
|
63
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
64
|
+
#p.extra_deps = EXTRA_DEPENDENCIES
|
65
|
+
|
66
|
+
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
67
|
+
end
|
68
|
+
|
69
|
+
CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
70
|
+
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
71
|
+
$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
72
|
+
$hoe.rsync_args = '-av --delete --ignore-errors'
|
73
|
+
$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + "/../PostInstall.txt").read rescue ""
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
include FileUtils
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
%w[rake hoe newgem rubigen].each do |req_gem|
|
6
|
+
begin
|
7
|
+
require req_gem
|
8
|
+
rescue LoadError
|
9
|
+
puts "This Rakefile requires the '#{req_gem}' RubyGem."
|
10
|
+
puts "Installation: gem install #{req_gem} -y"
|
11
|
+
exit
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{dslify}
|
5
|
+
s.version = "0.0.7"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Ari Lerner"]
|
9
|
+
s.date = %q{2009-04-29}
|
10
|
+
s.description = %q{Easily add DSL-like calls to any class}
|
11
|
+
s.email = ["arilerner@mac.com"]
|
12
|
+
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
|
13
|
+
s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "config/hoe.rb", "config/requirements.rb", "dslify.gemspec", "lib/dslify.rb", "lib/dslify/dslify.rb", "lib/dslify/version.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/test_dslify.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb"]
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.homepage = %q{http://dslify.rubyforge.org}
|
16
|
+
s.post_install_message = %q{Thanks for installing dslify!
|
17
|
+
|
18
|
+
For more information on dslify, see http://dslify.rubyforge.org
|
19
|
+
|
20
|
+
Ari Lerner}
|
21
|
+
s.rdoc_options = ["--main", "README.txt"]
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
s.rubyforge_project = %q{dslify}
|
24
|
+
s.rubygems_version = %q{1.3.2}
|
25
|
+
s.summary = %q{Easily add DSL-like calls to any class}
|
26
|
+
s.test_files = ["test/test_dslify.rb"]
|
27
|
+
|
28
|
+
if s.respond_to? :specification_version then
|
29
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
30
|
+
s.specification_version = 3
|
31
|
+
|
32
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
33
|
+
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
34
|
+
else
|
35
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
36
|
+
end
|
37
|
+
else
|
38
|
+
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
39
|
+
end
|
40
|
+
end
|