hoof 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +2 -2
  2. data/VERSION +1 -1
  3. data/hoof.gemspec +1 -1
  4. data/lib/hoof/cli.rb +16 -2
  5. metadata +3 -3
data/README.rdoc CHANGED
@@ -28,9 +28,9 @@ Then change your /etc/nsswitch.conf like this:
28
28
 
29
29
  Next step - initialize hoof for application:
30
30
 
31
- <tt>mkdir ~/.hoof && ln -s /path/to/app ~/.hoof/app</tt>
31
+ <tt>cd /to/your/app && hoof init</tt>
32
32
 
33
- Then add unicorn to your app Gembile and bundle it.
33
+ This adds unicorn to your app Gemfile, so bundle it.
34
34
 
35
35
 
36
36
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/hoof.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hoof}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["pyromaniac"]
data/lib/hoof/cli.rb CHANGED
@@ -4,19 +4,33 @@ require "hoof"
4
4
 
5
5
  module Hoof
6
6
  class Cli < Thor
7
+ include Thor::Actions
7
8
 
8
9
  default_task :start
9
10
 
10
- desc "start", "Starts hoof daemon"
11
+ desc 'hoof start', 'Starts hoof daemon'
11
12
  def start
12
13
  daemon 'start'
13
14
  end
14
15
 
15
- desc "stop", "Stops hoof daemon"
16
+ desc 'hoof stop', 'Stops hoof daemon'
16
17
  def stop
17
18
  daemon 'stop'
18
19
  end
19
20
 
21
+ desc 'hoof init [NAME]', 'Initializes hoof for app in current directory'
22
+ long_desc <<-D
23
+ Initializes hoof for current directory application.
24
+ This task creates symlink in ~/.hoof and adds unicorn to
25
+ your application Gemfile.
26
+ So do not forget to bundle it again.
27
+ D
28
+ def init name = nil
29
+ name ||= File.basename Dir.getwd
30
+ create_link File.expand_path(File.join("~/.hoof", name)), '.'
31
+ append_to_file 'Gemfile', "\ngem 'unicorn'"
32
+ end
33
+
20
34
  #desc "list", "Lists started applications"
21
35
  #def list
22
36
  #end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoof
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - pyromaniac