powerup 0.0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in powerup.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Jan-Oliver Jahner
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR
data/README.md ADDED
@@ -0,0 +1,20 @@
1
+ powerup
2
+ ========
3
+ **powerup** adds rake tasks to add/remove and restart your app with pow
4
+
5
+ Installation
6
+ ---------------
7
+ Add `gem "powerup"` to your Gemfile
8
+
9
+
10
+ Usage
11
+ ---------------
12
+ run `rake pow:add` to add your application to pow
13
+
14
+ run `rake pow:remove` to remove your application from pow
15
+
16
+ run `rake pow:restart` to restart your application
17
+
18
+ Copyright
19
+ ---------
20
+ Copyright (c) 2011 Jan-Oliver Jahner See LICENSE for further details.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,10 @@
1
+ require 'powerup'
2
+ require 'rails'
3
+
4
+ module Powerup
5
+ class Railtie < Rails::Railtie
6
+ rake_tasks do
7
+ load 'powerup/railties/powerup.rake'
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,40 @@
1
+ APP_PATH = File.expand_path(".")
2
+ APP_NAME = File.basename(APP_PATH)
3
+ HOME = ENV['HOME']
4
+ POW_PATH = File.join(HOME, '.pow')
5
+
6
+ def exec_with_expain(cmd)
7
+ puts "executing '#{cmd}'"
8
+ exec cmd
9
+ end
10
+
11
+ namespace :pow do
12
+ task :check_for_pow do
13
+ unless File.exists?(POW_PATH)
14
+ puts "error: pow not found!"
15
+ puts "install with 'curl get.pow.cx | sh'"
16
+
17
+ exit(false)
18
+ end
19
+ end
20
+
21
+ desc "Adds app to pow"
22
+ task :add => :check_for_pow do
23
+ puts "Adding #{APP_NAME} to pow"
24
+ exec_with_expain ("ln -s #{APP_PATH} #{POW_PATH}")
25
+ end
26
+
27
+ desc "Remove app from pow"
28
+ task :remove => :check_for_pow do
29
+ puts "Removing #{APP_NAME} from pow"
30
+ exec_with_expain ("rm #{File.join(POW_PATH, APP_NAME)}")
31
+ end
32
+
33
+ desc "Restarts app"
34
+ task :restart => :check_for_pow do
35
+ puts "Restarting ..."
36
+ exec_with_expain ("touch #{File.join(APP_PATH, "tmp")}/restart.txt")
37
+ end
38
+ end
39
+
40
+
@@ -0,0 +1,3 @@
1
+ module Powerup
2
+ VERSION = "0.0.1"
3
+ end
data/lib/powerup.rb ADDED
@@ -0,0 +1 @@
1
+ require 'powerup/railtie' if defined?(Rails)
data/powerup.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "powerup/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "powerup"
7
+ s.version = Powerup::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Jan-Oliver Jahner"]
10
+ s.email = ["jojahner@gmail.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{use pow with your application}
13
+ s.description = %q{adds rake tasks to use your application with pow}
14
+
15
+ s.rubyforge_project = "powerup"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: powerup
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Jan-Oliver Jahner
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-04-09 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: adds rake tasks to use your application with pow
23
+ email:
24
+ - jojahner@gmail.com
25
+ executables: []
26
+
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - lib/powerup.rb
38
+ - lib/powerup/railtie.rb
39
+ - lib/powerup/railties/powerup.rake
40
+ - lib/powerup/version.rb
41
+ - powerup.gemspec
42
+ has_rdoc: true
43
+ homepage: ""
44
+ licenses: []
45
+
46
+ post_install_message:
47
+ rdoc_options: []
48
+
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ requirements: []
70
+
71
+ rubyforge_project: powerup
72
+ rubygems_version: 1.6.2
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: use pow with your application
76
+ test_files: []
77
+