quirkey-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 CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.0.4 2009-08-09
2
+
3
+ * new -L (--skip-launch) option doesn't launch the web browser (thanks bmabey!)
4
+ * rubygems is required only on LoadError
5
+
1
6
  == 0.0.3 2009-07-06
2
7
 
3
8
  * Vegas::Runner is now Windows compatible (require win32-process gem)
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/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/lib/vegas.rb CHANGED
@@ -1,10 +1,14 @@
1
- require 'rubygems'
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.3.1"
11
+ VERSION = "0.0.4"
8
12
  WINDOWS = !!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i)
9
13
 
10
14
  autoload :Runner, 'vegas/runner'
data/test/test_helper.rb CHANGED
@@ -1,12 +1,19 @@
1
- require 'rubygems'
2
- require 'bacon'
3
- require 'sinatra'
4
- require 'rack/test'
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)
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require File.join(File.dirname(__FILE__), 'test_helper.rb')
2
2
 
3
3
  describe 'Vegas::Runner' do
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quirkey-vegas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.1
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-07-06 00:00:00 -07:00
12
+ date: 2009-08-09 00:00:00 -07: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.2.3
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: 1.8.0
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
@@ -83,11 +82,12 @@ files:
83
82
  - test/test_helper.rb
84
83
  - test/test_vegas_runner.rb
85
84
  has_rdoc: false
86
- homepage: http://code.quirkey.com/vegas
85
+ homepage:
86
+ licenses:
87
87
  post_install_message:
88
88
  rdoc_options:
89
89
  - --main
90
- - README.rdoc
90
+ - README.txt
91
91
  require_paths:
92
92
  - lib
93
93
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements: []
106
106
 
107
107
  rubyforge_project: quirkey
108
- rubygems_version: 1.2.0
108
+ rubygems_version: 1.3.5
109
109
  signing_key:
110
110
  specification_version: 3
111
111
  summary: Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.