devserver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +13 -0
- data/Readme.md +34 -0
- data/bin/devserver +1 -2
- data/lib/devserver/cli.rb +14 -0
- data/lib/devserver/command_manager.rb +13 -0
- data/lib/devserver/version.rb +14 -1
- data/lib/devserver.rb +13 -0
- metadata +5 -3
data/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# devserver - Copyright 2010 Jason Adam Young
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
data/Readme.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# devserver
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
Devserver is a gem that provides wrapper script to launch a local webserver of your choosing (passenger, mongrel, and thin are supported, thin is the default), this grew out of [this post](http://rambleon.org/2010/11/07/refactoring-my-rails-devserver-script/).
|
6
|
+
|
7
|
+
I needed something that gave me a little more flexibility than `script/server` (or `rails server` in Rails3 ) - and because I have Rails2 and Rails3 projects, having something consistent between the two is useful for me (I can't tell you how frustrating it was to keep typing script/server in my Rails3 project before I got smart enough to dump the script).
|
8
|
+
|
9
|
+
I made it a gem because I got tired of checking it in for multiple places, and I wanted to retain the licensing of it and it's just easier to make it a gem.
|
10
|
+
|
11
|
+
Plus, I wanted to learn more about gems, and rubygems.org, and bundler, and using thor as a command line interface. All the tools have been great to work with, especially thor (needless to say, this gem requires thor).
|
12
|
+
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
$ gem install devserver
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
Just run 'devserver' - thanks to the use of thor - there is usage information galore. It needs to be cleaned more than a little. But I wanted to get something out the door and working back to the point I was with my standalone script.
|
21
|
+
|
22
|
+
One thing that the tool will try to do is run "stop" with the server chosen if it's still running and listening on the specified port. I was running into this all the time just closing a terminal window instead of hitting control+c.
|
23
|
+
|
24
|
+
## Platforms
|
25
|
+
|
26
|
+
I do development on OS X. So I've only tested OS X. I imagine it works elsewhere. I likely will try it on Ubuntu at some point. I might do Windows 7 just for the fun of it. But like Johnny Dangerously, I'm likely to only do that once.
|
27
|
+
|
28
|
+
## TODO
|
29
|
+
|
30
|
+
Lots. Tests, documentation cleanups, I want to tail the development.log for thin/mongrel (and maybe unicorn) just like passenger standalone does.
|
31
|
+
|
32
|
+
## License
|
33
|
+
|
34
|
+
Released under the Apache License (v2). See LICENSE for more details.
|
data/bin/devserver
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# devserver -
|
3
|
-
# Copyright 2010 Jason Adam Young
|
2
|
+
# devserver - Copyright 2010 Jason Adam Young
|
4
3
|
#
|
5
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
5
|
# you may not use this file except in compliance with the License.
|
data/lib/devserver/cli.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# devserver - Copyright 2010 Jason Adam Young
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'thor'
|
2
16
|
require 'yaml'
|
3
17
|
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# devserver - Copyright 2010 Jason Adam Young
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
1
14
|
require 'socket'
|
2
15
|
require 'timeout'
|
3
16
|
|
data/lib/devserver/version.rb
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# devserver - Copyright 2010 Jason Adam Young
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
1
14
|
module Devserver
|
2
|
-
VERSION = "0.0.
|
15
|
+
VERSION = "0.0.4"
|
3
16
|
end
|
data/lib/devserver.rb
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# devserver - Copyright 2010 Jason Adam Young
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
1
14
|
require 'devserver/version'
|
2
15
|
|
3
16
|
module Devserver
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason Adam Young
|
@@ -46,7 +46,9 @@ extra_rdoc_files: []
|
|
46
46
|
files:
|
47
47
|
- .gitignore
|
48
48
|
- Gemfile
|
49
|
+
- LICENSE
|
49
50
|
- Rakefile
|
51
|
+
- Readme.md
|
50
52
|
- bin/devserver
|
51
53
|
- devserver.gemspec
|
52
54
|
- lib/devserver.rb
|