1+ require 'stories/version'
2+
3+ AUTHOR = 'FIXME full name' # can also be an array of Authors
4+ EMAIL = "FIXME email"
5+ DESCRIPTION = "description of gem"
6+ GEM_NAME = 'stories' # what ppl will type to install your gem
7+ RUBYFORGE_PROJECT = 'stories' # The unix name for your project
8+ HOMEPATH = "http://#{ RUBYFORGE_PROJECT } .rubyforge.org"
9+ DOWNLOAD_PATH = "http://rubyforge.org/projects/#{ RUBYFORGE_PROJECT } "
10+
11+ @config_file = "~/.rubyforge/user-config.yml"
12+ @config = nil
13+ RUBYFORGE_USERNAME = "unknown"
14+ def rubyforge_username
15+ unless @config
16+ begin
17+ @config = YAML . load ( File . read ( File . expand_path ( @config_file ) ) )
18+ rescue
19+ puts <<-EOS
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
23+ EOS
24+ exit
25+ end
26+ end
27+ RUBYFORGE_USERNAME . replace @config [ "username" ]
28+ end
29+
30+
31+ REV = nil
32+ # UNCOMMENT IF REQUIRED:
33+ # REV = YAML.load(`svn info`)['Revision']
34+ VERS = Stories ::VERSION ::STRING + ( REV ? ".#{ REV } " : "" )
35+ RDOC_OPTS = [ '--quiet' , '--title' , 'stories documentation' ,
36+ "--opname" , "index.html" ,
37+ "--line-numbers" ,
38+ "--main" , "README" ,
39+ "--inline-source" ]
40+
41+ class Hoe
42+ def extra_deps
43+ @extra_deps . reject! { |x | Array ( x ) . first == 'hoe' }
44+ @extra_deps
45+ end
46+ end
47+
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 |
51+ p . developer ( AUTHOR , EMAIL )
52+ p . description = DESCRIPTION
53+ p . summary = DESCRIPTION
54+ p . url = HOMEPATH
55+ p . rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
56+ p . test_globs = [ "test/**/test_*.rb" ]
57+ p . clean_globs |= [ '**/.*.sw?' , '*.gem' , '.config' , '**/.DS_Store' ] #An array of file patterns to delete on clean.
58+
59+ # == Optional
60+ p . changes = p . paragraphs_of ( "History.txt" , 0 ..1 ) . join ( "\n \n " )
61+ #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
62+
63+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
64+
65+ end
66+
67+ CHANGES = $hoe. paragraphs_of ( 'History.txt' , 0 ..1 ) . join ( "\\ n\\ n" )
68+ PATH = ( RUBYFORGE_PROJECT == GEM_NAME ) ? RUBYFORGE_PROJECT : "#{ RUBYFORGE_PROJECT } /#{ GEM_NAME } "
69+ $hoe. remote_rdoc_dir = File . join ( PATH . gsub ( /^#{ RUBYFORGE_PROJECT } \/ ?/ , '' ) , 'rdoc' )
70+ $hoe. rsync_args = '-av --delete --ignore-errors'
0 commit comments