vegas 0.0.3.1 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.rdoc +13 -0
- data/lib/vegas.rb +7 -3
- data/lib/vegas/runner.rb +7 -4
- data/test/test_helper.rb +13 -6
- data/test/test_vegas_runner.rb +1 -1
- metadata +8 -9
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -23,6 +23,19 @@ Lets say you have a gem with a sinatra application. With Vegas you can create a
|
|
23
23
|
|
24
24
|
See the website: http://code.quirkey.com/vegas for full usage/options.
|
25
25
|
|
26
|
+
=== WINDOWS:
|
27
|
+
|
28
|
+
Using vegas (and gems that depend on it) on Windows works but isn't 100% the same.
|
29
|
+
Daemon-ization and browser launching work, but you will see duplicate messages.
|
30
|
+
|
31
|
+
If you see a warning like:
|
32
|
+
|
33
|
+
`expand_path': couldn't find HOME environment -- expanding `~/.vegas' (ArgumentError)
|
34
|
+
|
35
|
+
You have to set your HOME path:
|
36
|
+
|
37
|
+
c:\> set HOME=%HOMEPATH%
|
38
|
+
|
26
39
|
== INSTALL:
|
27
40
|
|
28
41
|
sudo gem install vegas
|
data/lib/vegas.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
|
2
|
-
require 'sinatra'
|
1
|
+
begin
|
2
|
+
require 'sinatra'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'sinatra'
|
6
|
+
end
|
3
7
|
|
4
8
|
$LOAD_PATH.unshift File.dirname(__FILE__)
|
5
9
|
|
6
10
|
module Vegas
|
7
|
-
VERSION = "0.0.
|
11
|
+
VERSION = "0.0.4"
|
8
12
|
WINDOWS = !!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i)
|
9
13
|
|
10
14
|
autoload :Runner, 'vegas/runner'
|
data/lib/vegas/runner.rb
CHANGED
@@ -46,7 +46,7 @@ module Vegas
|
|
46
46
|
write_url
|
47
47
|
|
48
48
|
begin
|
49
|
-
launch!
|
49
|
+
launch! unless options[:skip_launch]
|
50
50
|
daemonize! unless options[:foreground]
|
51
51
|
run!
|
52
52
|
rescue RuntimeError => e
|
@@ -151,7 +151,6 @@ module Vegas
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def launch!(specific_url = nil)
|
154
|
-
# Launchy.open(specific_url || url)
|
155
154
|
cmd = WINDOWS ? "start" : "sleep 2 && open"
|
156
155
|
system "#{cmd} #{specific_url || url}"
|
157
156
|
end
|
@@ -209,7 +208,11 @@ module Vegas
|
|
209
208
|
opts.on("-F", "--foreground", "don't daemonize, run in the foreground") { |f|
|
210
209
|
@options[:foreground] = true
|
211
210
|
}
|
212
|
-
|
211
|
+
|
212
|
+
opts.on("-L", "--no-launch", "don't launch the browser") { |f|
|
213
|
+
@options[:skip_launch] = true
|
214
|
+
}
|
215
|
+
|
213
216
|
opts.on('-K', "--kill", "kill the running process and exit") {|k|
|
214
217
|
kill!
|
215
218
|
exit
|
@@ -258,4 +261,4 @@ module Vegas
|
|
258
261
|
File.delete(pid_file) if File.exist?(pid_file)
|
259
262
|
end
|
260
263
|
end
|
261
|
-
end
|
264
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,12 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
dependencies = %w{
|
2
|
+
bacon
|
3
|
+
sinatra
|
4
|
+
rack/test
|
5
|
+
nokogiri
|
6
|
+
}
|
7
|
+
|
8
|
+
begin
|
9
|
+
dependencies.each {|f| require f }
|
10
|
+
rescue LoadError
|
11
|
+
require 'rubygems'
|
12
|
+
dependencies.each {|f| require f }
|
13
|
+
end
|
5
14
|
|
6
15
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'vegas.rb')
|
7
16
|
|
8
|
-
require 'nokogiri'
|
9
|
-
|
10
17
|
module TestHelper
|
11
18
|
def rackup(app)
|
12
19
|
Rack::Test::Session.new(app)
|
data/test/test_vegas_runner.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vegas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Quint
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-09 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.5.1
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: nokogiri
|
@@ -60,9 +60,9 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
63
|
+
version: 2.3.3
|
64
64
|
version:
|
65
|
-
description: Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.
|
65
|
+
description: Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps. It includes a class Vegas::Runner that wraps Rack/Sinatra applications and provides a simple command line interface and launching mechanism.
|
66
66
|
email:
|
67
67
|
- aaron@quirkey.com
|
68
68
|
executables: []
|
@@ -71,7 +71,6 @@ extensions: []
|
|
71
71
|
|
72
72
|
extra_rdoc_files:
|
73
73
|
- History.txt
|
74
|
-
- README.rdoc
|
75
74
|
files:
|
76
75
|
- History.txt
|
77
76
|
- LICENSE
|
@@ -79,13 +78,13 @@ files:
|
|
79
78
|
- lib/vegas.rb
|
80
79
|
- lib/vegas/runner.rb
|
81
80
|
has_rdoc: true
|
82
|
-
homepage:
|
81
|
+
homepage:
|
83
82
|
licenses: []
|
84
83
|
|
85
84
|
post_install_message:
|
86
85
|
rdoc_options:
|
87
86
|
- --main
|
88
|
-
- README.
|
87
|
+
- README.txt
|
89
88
|
require_paths:
|
90
89
|
- lib
|
91
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -103,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
102
|
requirements: []
|
104
103
|
|
105
104
|
rubyforge_project: quirkey
|
106
|
-
rubygems_version: 1.3.
|
105
|
+
rubygems_version: 1.3.5
|
107
106
|
signing_key:
|
108
107
|
specification_version: 3
|
109
108
|
summary: Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.
|