powser 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,20 @@
1
- ## 0.0.1 (July 10, 2010)
1
+ ### 0.0.3 (Nov 27, 2011)
2
2
 
3
3
  Features:
4
4
 
5
- - initial import of this dummy gem
5
+ - restart any pow app by passing the `app` HTTP parameter.
6
+ - `http://powser.dev/restart?app=myapp`
7
+
8
+
9
+ ### 0.0.2 (Nov 26, 2011)
10
+
11
+ Fixes:
12
+
13
+ - bug when running `powser start` in a non-pow app directory.
14
+
15
+
16
+ ### 0.0.1 (Nov 26, 2011)
17
+
18
+ Features:
19
+
20
+ - initial import of the powser server.
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
- Copyright (c) 2011 Phil Monroe
2
-
1
+ Copyright (c) 2011 Phil Monroe and all contributors.
2
+
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
5
5
  "Software"), to deal in the Software without restriction, including
data/README.md CHANGED
@@ -7,6 +7,8 @@ A simple web server interface to powder CLI for pow! This gives you the ability
7
7
  * Browse to `http://powser.dev/restart`
8
8
  * Redirect to a custom url by passing in the `redirect` parameter to the action
9
9
  * `http://powser.dev/restart?redirect=www.appname.dev`
10
+ * Restart any of your pow apps by passing the `app` parameter the action
11
+ * `http://powser.dev/restart?app=appname`
10
12
 
11
13
  ### How do I setup Powser?
12
14
  From scratch:
data/bin/powser CHANGED
@@ -23,7 +23,7 @@ module Powser
23
23
  File.open("app", "w") do |f|
24
24
  f.puts(app)
25
25
  end
26
- say "Powser is now active for #{app}."
26
+ say "Powser defaults to #{app}."
27
27
  end
28
28
  end
29
29
 
@@ -32,7 +32,7 @@ module Powser
32
32
  app ||= get_pow_name
33
33
  Dir.chdir(SERVER_PATH) do
34
34
  `powder unlink`
35
- say "Powser is no longer active for #{app}."
35
+ say "Powser no longer defaults to #{app}."
36
36
  end
37
37
  end
38
38
 
@@ -10,6 +10,8 @@ module Powser
10
10
 
11
11
  # Routes ------------------------------------------------------------------
12
12
  get '/restart' do
13
+ @pow_app = params[:app] if params[:app]
14
+
13
15
  to_url = redirect_url(params[:redirect])
14
16
  pow_dir(@pow_app) do
15
17
  `powder restart`
@@ -18,6 +20,8 @@ module Powser
18
20
  redirect to_url
19
21
  end
20
22
 
23
+ private
24
+
21
25
  # Helpers -------------------------------------------------------------------
22
26
  def pow_dir(app_name, &block)
23
27
  path = POW_PATH + '/' + app_name
@@ -1,3 +1,3 @@
1
1
  module Powser
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Powser::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Phil Monroe"]
10
- s.email = ["phil@philmonroe.com.com"]
10
+ s.email = ["phil@philmonroe.com"]
11
11
  s.homepage = "http://github.com/phil-monroe/powser"
12
12
  s.summary = "Powder from your browser."
13
13
  s.description = "A simple web server interface to Powder."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70354531446060 !ruby/object:Gem::Requirement
16
+ requirement: &70287359640140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.11.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70354531446060
24
+ version_requirements: *70287359640140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sinatra
27
- requirement: &70354531445480 !ruby/object:Gem::Requirement
27
+ requirement: &70287359639500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.3.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70354531445480
35
+ version_requirements: *70287359639500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: powder
38
- requirement: &70354531444900 !ruby/object:Gem::Requirement
38
+ requirement: &70287359638880 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.1.7
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70354531444900
46
+ version_requirements: *70287359638880
47
47
  description: A simple web server interface to Powder.
48
48
  email:
49
- - phil@philmonroe.com.com
49
+ - phil@philmonroe.com
50
50
  executables:
51
51
  - powser
52
52
  extensions: []