corundum 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
 - data/lib/corundum.rb +1 -1
 - data/lib/corundum/browser-task.rb +1 -1
 - data/lib/corundum/github-pages.rb +20 -35
 - data/lib/corundum/rspec-task.rb +2 -5
 - data/lib/corundum/version_control.rb +1 -1
 - data/lib/corundum/version_control/git.rb +1 -1
 - data/spec/smoking_spec.rb +0 -2
 - metadata +19 -6
 - data/lib/corundum/rubyforge.rb +0 -55
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                ZjMxMDhiMDI0ZTVkNDdlMTA3ODA1NTY5MDNlYWMwODk2MDFmYWNmNg==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                NDNiMzU0NzFlOTljY2QzYjI4Y2Q5ZmRkODM0MGEwYzEyZmQ5ZWJmNQ==
         
     | 
| 
       7 
7 
     | 
    
         
             
            !binary "U0hBNTEy":
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                N2NiOWVmZDUyMTA5ODgxNDg2ZTJhMWQwYmMyODU0YjU4NmUzMTJmMTZkYzYw
         
     | 
| 
      
 10 
     | 
    
         
            +
                ZTAyY2E4MWMzZDJlNzk2ZjZlZWM2NzE3MmIzM2QyN2ExZTMyOTM4OGJjZjEz
         
     | 
| 
      
 11 
     | 
    
         
            +
                NWZhYzg1Y2JlZjIxOTcyZGJjZmYzYjBlMDk5NDU3ZGI1NDNlMWQ=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                ZWRiMmFlZGUwNTM5ZWFiMzQ5ZThkZDJiNzM5MGIxODRhMjhmYzM3YzI4MzFh
         
     | 
| 
      
 14 
     | 
    
         
            +
                OTlhNjY1ODJkMDFlYjA1ZWU5NzcwMmVjZjA1ODc5MTViNDk3YTY0MzAzMTQx
         
     | 
| 
      
 15 
     | 
    
         
            +
                YzU0YTFkZGNmMzEzZTBmM2Y5OWEyMmE5YmE0ZWZjODc4ZTY3MjA=
         
     | 
    
        data/lib/corundum.rb
    CHANGED
    
    
| 
         @@ -7,7 +7,7 @@ module Corundum 
     | 
|
| 
       7 
7 
     | 
    
         
             
                setting(:arguments, [])
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
                def command
         
     | 
| 
       10 
     | 
    
         
            -
                   
     | 
| 
      
 10 
     | 
    
         
            +
                  cmd("git", "--no-pager") do |cmd|
         
     | 
| 
       11 
11 
     | 
    
         
             
                    cmd.options << subcommand
         
     | 
| 
       12 
12 
     | 
    
         
             
                    arguments.each do |arg|
         
     | 
| 
       13 
13 
     | 
    
         
             
                      cmd.options += [*arg]
         
     | 
| 
         @@ -31,14 +31,14 @@ module Corundum 
     | 
|
| 
       31 
31 
     | 
    
         
             
                  end
         
     | 
| 
       32 
32 
     | 
    
         
             
                end
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                def action
         
     | 
| 
      
 34 
     | 
    
         
            +
                def action(*args)
         
     | 
| 
       35 
35 
     | 
    
         
             
                  Dir.chdir target_dir do
         
     | 
| 
       36 
36 
     | 
    
         
             
                    super
         
     | 
| 
       37 
37 
     | 
    
         
             
                  end
         
     | 
| 
       38 
38 
     | 
    
         
             
                end
         
     | 
| 
       39 
39 
     | 
    
         
             
              end
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
              class GithubPages < Mattock:: 
     | 
| 
      
 41 
     | 
    
         
            +
              class GithubPages < Mattock::CommandTaskLib
         
     | 
| 
       42 
42 
     | 
    
         
             
                default_namespace :publish_docs
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
                setting(:target_dir, "gh-pages")
         
     | 
| 
         @@ -63,7 +63,7 @@ module Corundum 
     | 
|
| 
       63 
63 
     | 
    
         
             
                end
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                def git_command(*args)
         
     | 
| 
       66 
     | 
    
         
            -
                   
     | 
| 
      
 66 
     | 
    
         
            +
                  cmd("git", "--no-pager") do |cmd|
         
     | 
| 
       67 
67 
     | 
    
         
             
                    args.each do |arg|
         
     | 
| 
       68 
68 
     | 
    
         
             
                      cmd.options += [*arg]
         
     | 
| 
       69 
69 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -86,40 +86,25 @@ module Corundum 
     | 
|
| 
       86 
86 
     | 
    
         
             
                    end
         
     | 
| 
       87 
87 
     | 
    
         | 
| 
       88 
88 
     | 
    
         
             
                    InDirCommandTask.define_task(self, :remote_branch => repo_dir) do |t|
         
     | 
| 
       89 
     | 
    
         
            -
                      t.verify_command =  
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                         
     | 
| 
       95 
     | 
    
         
            -
                        cmd.add Mattock::CommandLine.new("rm -rf *")
         
     | 
| 
       96 
     | 
    
         
            -
                        cmd.add git_command(%w{commit -a -m} + ["'Creating pages'"])
         
     | 
| 
       97 
     | 
    
         
            -
                        cmd.add git_command("push", "origin", branch)
         
     | 
| 
       98 
     | 
    
         
            -
                        cmd.add git_command("branch", "--set-upstream", branch, "origin/" + branch)
         
     | 
| 
       99 
     | 
    
         
            -
                      end
         
     | 
| 
      
 89 
     | 
    
         
            +
                      t.verify_command = git_command | cmd("grep", "-q", branch)
         
     | 
| 
      
 90 
     | 
    
         
            +
                      t.command = git_command("checkout", "-b", branch) &
         
     | 
| 
      
 91 
     | 
    
         
            +
                        cmd("rm -rf *") &
         
     | 
| 
      
 92 
     | 
    
         
            +
                        git_command(%w{commit -a -m} + ["'Creating pages'"]) &
         
     | 
| 
      
 93 
     | 
    
         
            +
                        git_command("push", "origin", branch) &
         
     | 
| 
      
 94 
     | 
    
         
            +
                        git_command("branch", "--set-upstream", branch, "origin/" + branch)
         
     | 
| 
       100 
95 
     | 
    
         
             
                    end
         
     | 
| 
       101 
96 
     | 
    
         | 
| 
       102 
97 
     | 
    
         
             
                    InDirCommandTask.define_task(self, :local_branch => :remote_branch) do |t|
         
     | 
| 
       103 
     | 
    
         
            -
                      t.verify_command =  
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
                         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                        chain.add git_command("checkout", "-b", branch)
         
     | 
| 
       109 
     | 
    
         
            -
                        chain.add git_command("branch", "--set-upstream", branch, "origin/" + branch)
         
     | 
| 
       110 
     | 
    
         
            -
                        chain.add Mattock::CommandLine.new("rm", "-f", '.git/index')
         
     | 
| 
       111 
     | 
    
         
            -
                        chain.add git_command("clean", "-fdx")
         
     | 
| 
       112 
     | 
    
         
            -
                      end
         
     | 
| 
      
 98 
     | 
    
         
            +
                      t.verify_command = git_command(%w{branch}) | cmd("grep", "-q", "'#{branch}'")
         
     | 
| 
      
 99 
     | 
    
         
            +
                      t.command = git_command("checkout", "-b", branch) &
         
     | 
| 
      
 100 
     | 
    
         
            +
                        git_command("branch", "--set-upstream", branch, "origin/" + branch) &
         
     | 
| 
      
 101 
     | 
    
         
            +
                        cmd("rm", "-f", '.git/index') &
         
     | 
| 
      
 102 
     | 
    
         
            +
                        git_command("clean", "-fdx")
         
     | 
| 
       113 
103 
     | 
    
         
             
                    end
         
     | 
| 
       114 
104 
     | 
    
         | 
| 
       115 
105 
     | 
    
         
             
                    InDirCommandTask.define_task(self, :on_branch => [:remote_branch, :local_branch]) do |t|
         
     | 
| 
       116 
     | 
    
         
            -
                      t.verify_command =  
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
                        chain.add Mattock::CommandLine.new("grep", "-q", "'^[*] #{branch}'")
         
     | 
| 
       119 
     | 
    
         
            -
                      end
         
     | 
| 
       120 
     | 
    
         
            -
                      t.command = Mattock::PrereqChain.new do |chain|
         
     | 
| 
       121 
     | 
    
         
            -
                        chain.add git_command("checkout", branch)
         
     | 
| 
       122 
     | 
    
         
            -
                      end
         
     | 
| 
      
 106 
     | 
    
         
            +
                      t.verify_command = git_command(%w{branch}) | cmd("grep", "-q", "'^[*] #{branch}'")
         
     | 
| 
      
 107 
     | 
    
         
            +
                      t.command = git_command("checkout", branch)
         
     | 
| 
       123 
108 
     | 
    
         
             
                    end
         
     | 
| 
       124 
109 
     | 
    
         | 
| 
       125 
110 
     | 
    
         
             
                    task :pull => [repo_dir, :on_branch] do
         
     | 
| 
         @@ -129,7 +114,7 @@ module Corundum 
     | 
|
| 
       129 
114 
     | 
    
         
             
                    end
         
     | 
| 
       130 
115 
     | 
    
         | 
| 
       131 
116 
     | 
    
         
             
                    task :cleanup_repo => repo_dir do
         
     | 
| 
       132 
     | 
    
         
            -
                       
     | 
| 
      
 117 
     | 
    
         
            +
                      cmd("rm", "-f", File::join(repo_dir, "hooks", "*")).must_succeed!
         
     | 
| 
       133 
118 
     | 
    
         
             
                      File::open(File::join(repo_dir, ".gitignore"), "w") do |file|
         
     | 
| 
       134 
119 
     | 
    
         
             
                        file.write ".sw?"
         
     | 
| 
       135 
120 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -140,13 +125,13 @@ module Corundum 
     | 
|
| 
       140 
125 
     | 
    
         
             
                    task :pre_publish => [repo_dir, target_dir]
         
     | 
| 
       141 
126 
     | 
    
         | 
| 
       142 
127 
     | 
    
         
             
                    task :clobber_target => [:on_branch, :pull] do
         
     | 
| 
       143 
     | 
    
         
            -
                       
     | 
| 
      
 128 
     | 
    
         
            +
                      cmd(*%w{rm -rf}) do |cmd|
         
     | 
| 
       144 
129 
     | 
    
         
             
                        cmd.options << target_dir + "/*"
         
     | 
| 
       145 
130 
     | 
    
         
             
                      end.must_succeed!
         
     | 
| 
       146 
131 
     | 
    
         
             
                    end
         
     | 
| 
       147 
132 
     | 
    
         | 
| 
       148 
133 
     | 
    
         
             
                    task :assemble_docs => [docs_index, :pre_publish, :clobber_target] do
         
     | 
| 
       149 
     | 
    
         
            -
                       
     | 
| 
      
 134 
     | 
    
         
            +
                      cmd(*%w{cp -a}) do |cmd|
         
     | 
| 
       150 
135 
     | 
    
         
             
                        cmd.options << source_dir + "/*"
         
     | 
| 
       151 
136 
     | 
    
         
             
                        cmd.options << target_dir
         
     | 
| 
       152 
137 
     | 
    
         
             
                      end.must_succeed!
         
     | 
    
        data/lib/corundum/rspec-task.rb
    CHANGED
    
    | 
         @@ -26,15 +26,12 @@ module Corundum 
     | 
|
| 
       26 
26 
     | 
    
         
             
                  ruby_command.options << ruby_opts if ruby_opts
         
     | 
| 
       27 
27 
     | 
    
         
             
                  ruby_command.options << "-w" if warning
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                  self.runner_command =  
     | 
| 
      
 29 
     | 
    
         
            +
                  self.runner_command = cmd(rspec_path) do |cmd|
         
     | 
| 
       30 
30 
     | 
    
         
             
                    cmd.options << rspec_opts
         
     | 
| 
       31 
31 
     | 
    
         
             
                    cmd.options << files_to_run
         
     | 
| 
       32 
32 
     | 
    
         
             
                  end
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                  self.command =  
     | 
| 
       35 
     | 
    
         
            -
                    cmd.add ruby_command
         
     | 
| 
       36 
     | 
    
         
            -
                    cmd.add runner_command
         
     | 
| 
       37 
     | 
    
         
            -
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
                  self.command = ruby_command - runner_command
         
     | 
| 
       38 
35 
     | 
    
         | 
| 
       39 
36 
     | 
    
         
             
                  super
         
     | 
| 
       40 
37 
     | 
    
         | 
    
        data/spec/smoking_spec.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: corundum
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.9
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Judson Lester
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-07-22 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: corundum
         
     | 
| 
         @@ -136,20 +136,34 @@ dependencies: 
     | 
|
| 
       136 
136 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
       137 
137 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       138 
138 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 139 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 140 
     | 
    
         
            +
              name: caliph
         
     | 
| 
      
 141 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 142 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 143 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 144 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 145 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
      
 146 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 147 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 148 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 149 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 150 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 151 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 152 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
       139 
153 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       140 
154 
     | 
    
         
             
              name: mattock
         
     | 
| 
       141 
155 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       142 
156 
     | 
    
         
             
                requirements:
         
     | 
| 
       143 
157 
     | 
    
         
             
                - - ~>
         
     | 
| 
       144 
158 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       145 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 159 
     | 
    
         
            +
                    version: '0.8'
         
     | 
| 
       146 
160 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       147 
161 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       148 
162 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       149 
163 
     | 
    
         
             
                requirements:
         
     | 
| 
       150 
164 
     | 
    
         
             
                - - ~>
         
     | 
| 
       151 
165 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       152 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 166 
     | 
    
         
            +
                    version: '0.8'
         
     | 
| 
       153 
167 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       154 
168 
     | 
    
         
             
              name: compass
         
     | 
| 
       155 
169 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -253,7 +267,6 @@ files: 
     | 
|
| 
       253 
267 
     | 
    
         
             
            - lib/corundum/gem_building.rb
         
     | 
| 
       254 
268 
     | 
    
         
             
            - lib/corundum/tasklibs.rb
         
     | 
| 
       255 
269 
     | 
    
         
             
            - lib/corundum/simplecov.rb
         
     | 
| 
       256 
     | 
    
         
            -
            - lib/corundum/rubyforge.rb
         
     | 
| 
       257 
270 
     | 
    
         
             
            - lib/corundum/questionable-content.rb
         
     | 
| 
       258 
271 
     | 
    
         
             
            - lib/corundum/version_control.rb
         
     | 
| 
       259 
272 
     | 
    
         
             
            - lib/corundum/version_control/monotone.rb
         
     | 
| 
         @@ -336,7 +349,7 @@ metadata: {} 
     | 
|
| 
       336 
349 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       337 
350 
     | 
    
         
             
            rdoc_options:
         
     | 
| 
       338 
351 
     | 
    
         
             
            - --title
         
     | 
| 
       339 
     | 
    
         
            -
            - corundum-0.3. 
     | 
| 
      
 352 
     | 
    
         
            +
            - corundum-0.3.9 RDoc
         
     | 
| 
       340 
353 
     | 
    
         
             
            require_paths:
         
     | 
| 
       341 
354 
     | 
    
         
             
            - lib/
         
     | 
| 
       342 
355 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
    
        data/lib/corundum/rubyforge.rb
    DELETED
    
    | 
         @@ -1,55 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'mattock/tasklib'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            #Big XXX: this totally isn't done.  It's some notes against ever wanting to
         
     | 
| 
       4 
     | 
    
         
            -
            #publish announcements to rubyforge ever again
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            module Corundum
         
     | 
| 
       7 
     | 
    
         
            -
              class Publishing < Mattock::TaskLib
         
     | 
| 
       8 
     | 
    
         
            -
                default_namespace :rubyforge
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                setting(:rubyforge,  nested(:package_id => nil, :group_id => nil, :release_name => nil))
         
     | 
| 
       11 
     | 
    
         
            -
                setting(:package_dir,  nil)
         
     | 
| 
       12 
     | 
    
         
            -
                setting(:gemspec,  nil)
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                def define
         
     | 
| 
       15 
     | 
    
         
            -
                  desc "Publish the gem and its documentation to Rubyforge and Gemcutter"
         
     | 
| 
       16 
     | 
    
         
            -
                  task root_task => in_namespace(:docs, :rubyforge)
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                  in_namespace do
         
     | 
| 
       19 
     | 
    
         
            -
                    desc 'Publish RDoc to RubyForge'
         
     | 
| 
       20 
     | 
    
         
            -
                    task :docs do
         
     | 
| 
       21 
     | 
    
         
            -
                      config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
         
     | 
| 
       22 
     | 
    
         
            -
                      host = "#{config["username"]}@rubyforge.org"
         
     | 
| 
       23 
     | 
    
         
            -
                      remote_dir = "/var/www/gforge-projects/#{@rubyforge[:group_id]}"
         
     | 
| 
       24 
     | 
    
         
            -
                      local_dir = 'rubydoc'
         
     | 
| 
       25 
     | 
    
         
            -
                      sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
         
     | 
| 
       26 
     | 
    
         
            -
                    end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                    task :scrape_rubyforge do
         
     | 
| 
       29 
     | 
    
         
            -
                      require 'rubyforge'
         
     | 
| 
       30 
     | 
    
         
            -
                      forge = RubyForge.new
         
     | 
| 
       31 
     | 
    
         
            -
                      forge.configure
         
     | 
| 
       32 
     | 
    
         
            -
                      forge.scrape_project(@rubyforge[:package_id])
         
     | 
| 
       33 
     | 
    
         
            -
                    end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                    desc "Publishes to RubyForge"
         
     | 
| 
       36 
     | 
    
         
            -
                    task :rubyforge => [:docs, :scrape_rubyforge] do |t|
         
     | 
| 
       37 
     | 
    
         
            -
                      require 'rubyforge'
         
     | 
| 
       38 
     | 
    
         
            -
                      forge = RubyForge.new
         
     | 
| 
       39 
     | 
    
         
            -
                      forge.configure
         
     | 
| 
       40 
     | 
    
         
            -
                      files = [".gem", ".tar.gz", ".tar.bz2"].map do |extension|
         
     | 
| 
       41 
     | 
    
         
            -
                        File::join(@package_dir, @gemspec.full_name) + extension
         
     | 
| 
       42 
     | 
    
         
            -
                      end
         
     | 
| 
       43 
     | 
    
         
            -
                      release = forge.lookup("release", @rubyforge[:package_id])[@rubyforge[:release_name]] rescue nil
         
     | 
| 
       44 
     | 
    
         
            -
                      if release.nil?
         
     | 
| 
       45 
     | 
    
         
            -
                        forge.add_release(@rubyforge[:group_id], @rubyforge[:package_id], @rubyforge[:release_name], *files)
         
     | 
| 
       46 
     | 
    
         
            -
                      else
         
     | 
| 
       47 
     | 
    
         
            -
                        files.each do |file|
         
     | 
| 
       48 
     | 
    
         
            -
                          forge.add_file(@rubyforge[:group_id], @rubyforge[:package_id], @rubyforge[:release_name], file)
         
     | 
| 
       49 
     | 
    
         
            -
                        end
         
     | 
| 
       50 
     | 
    
         
            -
                      end
         
     | 
| 
       51 
     | 
    
         
            -
                    end
         
     | 
| 
       52 
     | 
    
         
            -
                  end
         
     | 
| 
       53 
     | 
    
         
            -
                end
         
     | 
| 
       54 
     | 
    
         
            -
              end
         
     | 
| 
       55 
     | 
    
         
            -
            end
         
     |