powder 0.1.3 → 0.1.4

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.
Files changed (5) hide show
  1. data/CHANGELOG.md +13 -2
  2. data/Readme.md +6 -1
  3. data/bin/powder +22 -7
  4. data/lib/powder/version.rb +1 -1
  5. metadata +20 -4
@@ -1,6 +1,17 @@
1
- ### 0.1.2 / TBA
1
+ ### 0.1.4 / 2011-05-26
2
2
 
3
- * X minor changes
3
+ * 2 minor change
4
+
5
+ * Fixes log command: the pow log (~/Library/Logs/Pow/apps/app-name.log) is
6
+ only created as the name of the directory, regardless of the name of the
7
+ symlink added in .pow (issue 23)
8
+ ([commit](https://github.com/Rodreegez/powder/commit/12fe024cc6768439d1555d61d770f660bfaf2d15))
9
+ * Supports Radiant apps (issue 21)
10
+ ([commit](https://github.com/Rodreegez/powder/commit/5854f32ca0b1106fefad8eb6b7a0e7d2c91e67d3))
11
+
12
+ ### 0.1.3 / 2011-05-20 ###
13
+
14
+ * 2 minor changes
4
15
 
5
16
  * add up and down commands
6
17
  ([commit](https://github.com/Rodreegez/powder/commit/e8775c166da40fad16d55df0022a61fd5d5af69b))
data/Readme.md CHANGED
@@ -36,7 +36,7 @@ powder manages [pow](http://pow.cx/)
36
36
  $ powder log
37
37
  => Tails the pow log.
38
38
  # Not the application log, but the pow log, available at
39
- # ~/Library/Logs/Pow/apps/app-name
39
+ # ~/Library/Logs/Pow/apps/#{app-directory}.log
40
40
 
41
41
  $ powder open
42
42
  => Opens the pow link in a browser
@@ -63,6 +63,11 @@ powder manages [pow](http://pow.cx/)
63
63
 
64
64
  $ powder uninstall
65
65
  => Uninstalls pow server
66
+
67
+ $ powder update
68
+ => Updates pow server
69
+ # Really this is just an alias to powder install, but it feels more natural
70
+ # this way.
66
71
 
67
72
  ### Enable and Disable Pow ###
68
73
 
data/bin/powder CHANGED
@@ -89,8 +89,13 @@ module Powder
89
89
  end
90
90
 
91
91
  desc "log", "Tails the Pow log"
92
- def log(name=nil)
93
- system "tail -f ~/Library/Logs/Pow/apps/#{name || current_dir_pow_name}.log"
92
+ def log
93
+ path_to_log_file = "#{ENV['HOME']}/Library/Logs/Pow/apps/#{current_dir_name}.log"
94
+ if File.exist? path_to_log_file
95
+ system "tail -f #{path_to_log_file}"
96
+ else
97
+ say "There is no Pow log file, have you set this application up yet?"
98
+ end
94
99
  end
95
100
 
96
101
  desc "applog", "Tails in current app"
@@ -109,17 +114,21 @@ module Powder
109
114
  end
110
115
 
111
116
  private
117
+
118
+ def current_dir_name
119
+ File.basename(%x{pwd}.chomp)
120
+ end
112
121
 
113
122
  def current_dir_pow_name
114
- File.basename(%x{pwd}.chomp).tr('_', '-')
123
+ current_dir_name.tr('_', '-')
115
124
  end
116
125
 
117
126
  def is_powable?
118
127
  if File.exists?('config.ru') || File.exists?('public/index.html')
119
128
  true
120
- elsif is_rails2_app?
121
- say "This appears to be a Rails 2 applicaton. You need a config.ru file."
122
- if yes? "Do you want to autogenerate a basic config.ru for Rails 2?"
129
+ elsif legacy = (is_rails2_app? || is_radiant_app?)
130
+ say "This appears to be a #{legacy} applicaton. You need a config.ru file."
131
+ if yes? "Do you want to autogenerate a basic config.ru for #{legacy}?"
123
132
  uri = URI.parse("https://gist.github.com/909308.txt")
124
133
  http = Net::HTTP.new(uri.host, uri.port)
125
134
  http.use_ssl = true
@@ -139,7 +148,13 @@ module Powder
139
148
  end
140
149
 
141
150
  def is_rails2_app?
142
- File.exists?('config/environment.rb') && !`grep RAILS_GEM_VERSION config/environment.rb`.empty?
151
+ File.exists?('config/environment.rb') &&
152
+ !`grep RAILS_GEM_VERSION config/environment.rb`.empty? ? 'Rails 2' : nil
153
+ end
154
+
155
+ def is_radiant_app?
156
+ File.exists?('config/environment.rb') &&
157
+ !`grep Radiant::Initializer config/environment.rb`.empty? ? 'Radiant' : nil
143
158
  end
144
159
 
145
160
  def domain
@@ -1,3 +1,3 @@
1
1
  module Powder
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powder
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.3
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 4
10
+ version: 0.1.4
6
11
  platform: ruby
7
12
  authors:
8
13
  - Phil Nash
@@ -11,7 +16,7 @@ autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
18
 
14
- date: 2011-05-20 00:00:00 +01:00
19
+ date: 2011-05-26 00:00:00 +01:00
15
20
  default_executable:
16
21
  dependencies:
17
22
  - !ruby/object:Gem::Dependency
@@ -22,6 +27,11 @@ dependencies:
22
27
  requirements:
23
28
  - - ">="
24
29
  - !ruby/object:Gem::Version
30
+ hash: 57
31
+ segments:
32
+ - 0
33
+ - 11
34
+ - 5
25
35
  version: 0.11.5
26
36
  type: :runtime
27
37
  version_requirements: *id001
@@ -59,17 +69,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
69
  requirements:
60
70
  - - ">="
61
71
  - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
62
75
  version: "0"
63
76
  required_rubygems_version: !ruby/object:Gem::Requirement
64
77
  none: false
65
78
  requirements:
66
79
  - - ">="
67
80
  - !ruby/object:Gem::Version
81
+ hash: 3
82
+ segments:
83
+ - 0
68
84
  version: "0"
69
85
  requirements: []
70
86
 
71
87
  rubyforge_project: powder
72
- rubygems_version: 1.5.2
88
+ rubygems_version: 1.3.7
73
89
  signing_key:
74
90
  specification_version: 3
75
91
  summary: Makes Pow even easier