Permalink
Browse files

Creates other folder and such.

  • Loading branch information...
1 parent 8505eac commit cc9170472aba1c0aff76471471086a440b926913 Alexander Kern committed Oct 5, 2010
Showing with 12 additions and 17 deletions.
  1. +12 −4 lib/organize/runner.rb
  2. +0 −13 spec/organize/runner_spec.rb
@@ -3,10 +3,18 @@
module Organize
class Runner < Optitron::CLI
desc 'Install stuff'
- def install(file, source = '.')
- # TODO: Make this method create the prefix, shared prefix, the .organize
- # file, the other folder (with all its symlinks), the Inbox -> Desktop
- # folder, and project archive folder.
+ def install(prefix = '~/Projects', shared_prefix = '~/Dropbox', inbox = '~/Desktop')
+ FileUtils.mkdir_p(prefix)
+ FileUtils.mkdir_p(File.join(prefix, 'Archive'))
+ FileUtils.mkdir_p(shared_prefix)
+ FileUtils.mkdir_p(File.join(prefix, 'Other'))
+ FileUtils.ln_s(inbox, File.join(prefix, 'Inbox'))
+
+ ['Documents', 'Movies', 'Music', 'Pictures', 'Public', 'Sites'].each do |folder|
+ FileUtils.ln_s("~/#{folder}", File.join(prefix, 'Other', folder))
+ end
+
+ # TODO: Make this method create the .organize file.
end
end
end
@@ -1,13 +0,0 @@
-require 'spec_helper'
-
-describe Organize::Runner do
-
- include FakeFS::SpecHelpers
-
- before do
- Organize::Runner.build
- @parser = Organize::Runner.optitron_parser
- end
-
- it 'should work'
-end

0 comments on commit cc91704

Please sign in to comment.