Skip to content

Commit

Permalink
* separate script/refactor as a file
Browse files Browse the repository at this point in the history
* remove unsed files
  • Loading branch information
hiroshi committed Jan 27, 2009
1 parent 062cff4 commit 5e86feb
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 53 deletions.
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009 [name of plugin creator]
Copyright (c) 2009 yakitara.com (Hiroshi Saito)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
15 changes: 9 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Script-refactor
script/refactor
===============

Introduction goes here.
First of all, if you don't install this via:

script/plugin install git://github.com/hiroshi/script-refactor.git

Example
=======
You may have no script/refactor. If so, do install.rb by hand:

Example goes here.
ruby vendor/plugins/script-refactor/install.rb

Next, just type:

Copyright (c) 2009 [name of plugin creator], released under the MIT license
script/refactor

You will see the usage and other information of the script.
23 changes: 0 additions & 23 deletions Rakefile

This file was deleted.

20 changes: 13 additions & 7 deletions install.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# install script/refactor
open(File.dirname(__FILE__) + "/../../../script/refactor", "w") do |file|
file.print <<-SCRIPT
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../vendor/plugins/script_refactor/lib/script_refactor'
SCRIPT
file.chmod(0755) # make executable
end
require "fileutils"
file_name = "script/refactor"
puts " create #{file_name}"
dst = File.dirname(__FILE__) + "/../../../#{file_name}"
src = File.dirname(__FILE__) + "/#{file_name}"
# open(path, "w") do |file|
# file.print <<-SCRIPT
# #!/usr/bin/env ruby
# require File.dirname(__FILE__) + '/../vendor/plugins/script_refactor/lib/script_refactor'
# SCRIPT
# file.chmod(0755) # make it executable
# end
FileUtils.copy(src, dst)
2 changes: 2 additions & 0 deletions script/refactor
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../vendor/plugins/script-refactor/lib/script_refactor'
4 changes: 0 additions & 4 deletions tasks/script_refactor_tasks.rake

This file was deleted.

8 changes: 0 additions & 8 deletions test/script_refactor_test.rb

This file was deleted.

3 changes: 0 additions & 3 deletions test/test_helper.rb

This file was deleted.

6 changes: 5 additions & 1 deletion uninstall.rb
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Uninstall hook code here
# uninstall script/refactor
require "fileutils"
file_name = "script/refactor"
puts " rm #{file_name}"
FileUtils.rm File.dirname(__FILE__) + "/../../../#{file_name}"

0 comments on commit 5e86feb

Please sign in to comment.