1 require 'couch_object/version'
3 AUTHOR = 'Johan Sørensen' # can also be an array of Authors
4 EMAIL = "johan@johansorensen.com"
5 DESCRIPTION = "CouchObject is a library that maps ruby objects to CouchDb documents"
6 GEM_NAME = 'couchobject' # what ppl will type to install your gem
7 RUBYFORGE_PROJECT = 'couchobject' # The unix name for your project
8 HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
9 DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
11 @config_file = "~/.rubyforge/user-config.yml"
13 RUBYFORGE_USERNAME = "unknown"
14 def rubyforge_username
17 @config = YAML.load(File.read(File.expand_path(@config_file)))
20 ERROR: No rubyforge config file found: #{@config_file}"
21 Run 'rubyforge setup' to prepare your env for access to Rubyforge
22 - See http://newgem.rubyforge.org/rubyforge.html for more details
27 RUBYFORGE_USERNAME.replace @config["username"]
32 # UNCOMMENT IF REQUIRED:
33 # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
34 VERS = CouchObject::VERSION::STRING + (REV ? ".#{REV}" : "")
35 RDOC_OPTS = ['--quiet', '--title', 'couch_object documentation',
36 "--opname", "index.html",
43 @extra_deps.reject! { |x| Array(x).first == 'hoe' }
48 # Generate all the Rake tasks
49 # Run 'rake -T' to see list of generated tasks (from gem root directory)
50 hoe = Hoe.new(GEM_NAME, VERS) do |p|
52 p.description = DESCRIPTION
54 p.summary = DESCRIPTION
56 p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
57 p.test_globs = ["spec/**/spec_*.rb"]
58 p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
61 p.changes = p.paragraphs_of("History.txt", 0..1).join("\\n\\n")
62 # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
64 [ "json", ">= 1.1.1" ],
65 [ "ruby2ruby", ">= 1.1.7" ],
68 #p.spec_extras = {} # A hash of extra values to set in the gemspec.
72 CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
73 PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
74 hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')