powder 0.0.4 → 0.1.0
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/CHANGELOG +14 -0
- data/Readme.md +30 -21
- data/bin/{pow → powder} +16 -5
- data/lib/powder/version.rb +1 -1
- data/powder.gemspec +1 -1
- metadata +10 -5
data/CHANGELOG
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
=== 0.1.0 / 2011-04-11
|
2
|
+
|
3
|
+
* 1 Major change
|
4
|
+
|
5
|
+
* The command has changed from pow to powder to allow pow to use the command
|
6
|
+
(https://github.com/Rodreegez/powder/issues/5)
|
7
|
+
|
8
|
+
* 1 minor change
|
9
|
+
|
10
|
+
* open and link now honour domains specified in .powconfig
|
11
|
+
|
12
|
+
=== 0.0.4 / 2011-04-08
|
13
|
+
|
14
|
+
* Early release with link, list, restart, remove, open, install and uninstall commands
|
data/Readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
powder manages [pow](http://pow.cx/)
|
2
2
|
|
3
3
|
# Install #
|
4
4
|
|
@@ -6,43 +6,52 @@ Powder manages [Pow](http://pow.cx/)
|
|
6
6
|
|
7
7
|
# Usage #
|
8
8
|
|
9
|
-
$
|
10
|
-
=> link the current dir_name to ~/.pow/
|
9
|
+
$ powder
|
10
|
+
=> link the current dir_name to ~/.pow/dir-name
|
11
11
|
# if the dir_name has underscores in, powder changes them to hyphens
|
12
12
|
|
13
|
-
$
|
13
|
+
$ powder link bacon
|
14
14
|
=> link the current dir to ~/.pow/bacon
|
15
15
|
# If the current directory doesn't look like an app that can be powered
|
16
16
|
# by pow it will offer to download a basic config.ru for Rails 2
|
17
17
|
|
18
|
-
$
|
18
|
+
$ powder list
|
19
19
|
=> list all the current apps linked in ~/.pow
|
20
|
-
# aliased as
|
20
|
+
# aliased as powder -l
|
21
21
|
|
22
|
-
$
|
22
|
+
$ powder restart
|
23
23
|
=> restart the current app
|
24
|
-
# aliased as
|
24
|
+
# aliased as powder -r
|
25
25
|
|
26
|
-
$
|
26
|
+
$ powder remove
|
27
27
|
=> unlink current_dir
|
28
28
|
|
29
|
-
$
|
29
|
+
$ powder remove bacon
|
30
30
|
=> unlink bacon
|
31
|
-
|
32
|
-
$
|
31
|
+
|
32
|
+
$ powder open
|
33
33
|
=> opens the pow link in a browser
|
34
|
-
# aliased as
|
35
|
-
|
36
|
-
$
|
34
|
+
# aliased as powder -o
|
35
|
+
|
36
|
+
$ powder open bacon
|
37
37
|
=> opens http://bacon.dev in a browser
|
38
|
+
# if you have set up alternative top level domains in .powconfig,
|
39
|
+
# then the first listed domain will be opened.
|
38
40
|
|
39
|
-
$
|
40
|
-
=> installs pow server
|
41
|
-
|
42
|
-
|
41
|
+
$ powder install
|
42
|
+
=> installs pow server
|
43
|
+
# (I know, "curl get.pow.cx | sh" isn't hard, but this is _even_ easier)
|
44
|
+
|
45
|
+
$ powder uninstall
|
43
46
|
=> uninstalls pow server
|
44
|
-
|
45
|
-
|
47
|
+
|
48
|
+
# Contributors #
|
49
|
+
|
50
|
+
Built by [rodreegez](https://github.com/Rodreegez) and [philnash](https://github.com/philnash).
|
51
|
+
|
52
|
+
With contributions from [franciscoj](https://github.com/franciscoj), [cjkihlbom](https://github.com/cjkihlbom) and [pengwynn](https://github.com/pengwynn).
|
53
|
+
|
54
|
+
|
46
55
|
## Copyright ##
|
47
56
|
|
48
57
|
Copyright (c) 2011 Adam Rogers and Phil Nash. See LICENSE for details.
|
data/bin/{pow → powder}
RENAMED
@@ -5,7 +5,7 @@ require 'thor'
|
|
5
5
|
require 'fileutils'
|
6
6
|
require "net/https"
|
7
7
|
|
8
|
-
class
|
8
|
+
class Powder < Thor
|
9
9
|
include Thor::Actions
|
10
10
|
default_task :link
|
11
11
|
|
@@ -23,7 +23,7 @@ class Pow < Thor
|
|
23
23
|
name ||= current_dir_pow_name
|
24
24
|
symlink_path = "#{POWPATH}/#{name}"
|
25
25
|
FileUtils.ln_s(current_path, symlink_path) unless File.exists?(symlink_path)
|
26
|
-
say "Your application is now available at http://#{name}
|
26
|
+
say "Your application is now available at http://#{name}.#{domain}/"
|
27
27
|
end
|
28
28
|
|
29
29
|
desc "restart", "Restart current pow"
|
@@ -40,13 +40,13 @@ class Pow < Thor
|
|
40
40
|
|
41
41
|
desc "open", "Open a pow in the browser"
|
42
42
|
def open(name=nil)
|
43
|
-
%x{open http://#{name || current_dir_pow_name}
|
43
|
+
%x{open http://#{name || current_dir_pow_name}.#{domain}}
|
44
44
|
end
|
45
45
|
|
46
46
|
desc "remove", "Remove a pow"
|
47
47
|
def remove(name=nil)
|
48
48
|
return unless is_powable?
|
49
|
-
FileUtils.rm POWPATH + '/' + (name ||
|
49
|
+
FileUtils.rm POWPATH + '/' + (name || current_dir_pow_name)
|
50
50
|
end
|
51
51
|
|
52
52
|
desc "install", "Installs pow"
|
@@ -79,8 +79,19 @@ class Pow < Thor
|
|
79
79
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
80
80
|
request = Net::HTTP::Get.new(uri.request_uri)
|
81
81
|
create_file "config.ru", http.request(request).body
|
82
|
+
return true
|
83
|
+
else
|
84
|
+
say "Did not create config.ru"
|
85
|
+
return false
|
82
86
|
end
|
83
87
|
end
|
84
88
|
end
|
89
|
+
|
90
|
+
def domain
|
91
|
+
returned_domain = %x{source ~/.powconfig; echo $POW_DOMAINS}.gsub("\n", "").split(",").first
|
92
|
+
returned_domain = %x{source ~/.powconfig; echo $POW_DOMAIN}.gsub("\n", "") if returned_domain.nil? || returned_domain.empty?
|
93
|
+
returned_domain = 'dev' if returned_domain.nil? || returned_domain.empty?
|
94
|
+
returned_domain
|
95
|
+
end
|
85
96
|
end
|
86
|
-
|
97
|
+
Powder.start
|
data/lib/powder/version.rb
CHANGED
data/powder.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = ["
|
19
|
+
s.executables = ["powder"]
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
22
|
s.add_dependency 'thor', '>=0.9.2'
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: powder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
8
|
+
- 1
|
7
9
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.4
|
10
|
+
version: 0.1.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Phil Nash
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-11 00:00:00 +01:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -26,6 +27,7 @@ dependencies:
|
|
26
27
|
requirements:
|
27
28
|
- - ">="
|
28
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 63
|
29
31
|
segments:
|
30
32
|
- 0
|
31
33
|
- 9
|
@@ -37,18 +39,19 @@ description: Makes Pow even easier. I mean really, really, ridiculously easy.
|
|
37
39
|
email:
|
38
40
|
- "no"
|
39
41
|
executables:
|
40
|
-
-
|
42
|
+
- powder
|
41
43
|
extensions: []
|
42
44
|
|
43
45
|
extra_rdoc_files: []
|
44
46
|
|
45
47
|
files:
|
46
48
|
- .gitignore
|
49
|
+
- CHANGELOG
|
47
50
|
- Gemfile
|
48
51
|
- LICENSE
|
49
52
|
- Rakefile
|
50
53
|
- Readme.md
|
51
|
-
- bin/
|
54
|
+
- bin/powder
|
52
55
|
- lib/powder.rb
|
53
56
|
- lib/powder/version.rb
|
54
57
|
- powder.gemspec
|
@@ -66,6 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
69
|
requirements:
|
67
70
|
- - ">="
|
68
71
|
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
69
73
|
segments:
|
70
74
|
- 0
|
71
75
|
version: "0"
|
@@ -74,6 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
78
|
requirements:
|
75
79
|
- - ">="
|
76
80
|
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
77
82
|
segments:
|
78
83
|
- 0
|
79
84
|
version: "0"
|