ginatra 2.0.2 → 2.1.0
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.
- data/.gitignore +3 -0
- data/README.md +51 -44
- data/VERSION +1 -1
- data/ginatra.gemspec +6 -18
- data/lib/ginatra/config.rb +41 -1
- data/lib/ginatra/helpers.rb +130 -9
- data/lib/ginatra/repo.rb +40 -4
- data/lib/ginatra/repo_list.rb +42 -1
- data/lib/ginatra.rb +93 -2
- metadata +3 -16
- data/vendor/vegas/History.txt +0 -18
- data/vendor/vegas/LICENSE +0 -22
- data/vendor/vegas/Manifest.txt +0 -5
- data/vendor/vegas/README.rdoc +0 -45
- data/vendor/vegas/Rakefile +0 -32
- data/vendor/vegas/lib/vegas/runner.rb +0 -270
- data/vendor/vegas/lib/vegas.rb +0 -16
- data/vendor/vegas/test/test_app/bin/test_app +0 -9
- data/vendor/vegas/test/test_app/test_app.rb +0 -10
- data/vendor/vegas/test/test_apps.rb +0 -22
- data/vendor/vegas/test/test_helper.rb +0 -59
- data/vendor/vegas/test/test_vegas_runner.rb +0 -8
- data/vendor/vegas/vegas.gemspec +0 -45
@@ -1,22 +0,0 @@
|
|
1
|
-
class TestApp1 < Sinatra::Default
|
2
|
-
|
3
|
-
get '/' do
|
4
|
-
'TestApp1 Index'
|
5
|
-
end
|
6
|
-
|
7
|
-
get '/route' do
|
8
|
-
'TestApp1 route'
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
|
13
|
-
class TestApp2 < Sinatra::Default
|
14
|
-
|
15
|
-
get '/' do
|
16
|
-
'TestApp2 Index'
|
17
|
-
end
|
18
|
-
|
19
|
-
get '/route' do
|
20
|
-
'TestApp2 route'
|
21
|
-
end
|
22
|
-
end
|
@@ -1,59 +0,0 @@
|
|
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
|
14
|
-
|
15
|
-
require File.join(File.dirname(__FILE__), '..', 'lib', 'vegas.rb')
|
16
|
-
|
17
|
-
module TestHelper
|
18
|
-
def rackup(app)
|
19
|
-
Rack::Test::Session.new(app)
|
20
|
-
end
|
21
|
-
|
22
|
-
def body
|
23
|
-
last_response.body.to_s
|
24
|
-
end
|
25
|
-
|
26
|
-
def instance_of(klass)
|
27
|
-
lambda {|obj| obj.is_a?(klass) }
|
28
|
-
end
|
29
|
-
|
30
|
-
def html_body
|
31
|
-
body =~ /^\<html/ ? body : "<html><body>#{body}</body></html>"
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
Bacon::Context.send(:include, TestHelper)
|
37
|
-
|
38
|
-
class Should
|
39
|
-
|
40
|
-
def have_element(search, content = nil)
|
41
|
-
satisfy "have element matching #{search}" do
|
42
|
-
doc = Nokogiri.parse(@object.to_s)
|
43
|
-
node_set = doc.search(search)
|
44
|
-
if node_set.empty?
|
45
|
-
false
|
46
|
-
else
|
47
|
-
collected_content = node_set.collect {|t| t.content }.join(' ')
|
48
|
-
case content
|
49
|
-
when Regexp
|
50
|
-
collected_content =~ content
|
51
|
-
when String
|
52
|
-
collected_content.include?(content)
|
53
|
-
when nil
|
54
|
-
true
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
data/vendor/vegas/vegas.gemspec
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{vegas}
|
5
|
-
s.version = "0.0.4.1"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Aaron Quint"]
|
9
|
-
s.date = %q{2009-08-09}
|
10
|
-
s.description = %q{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.}
|
11
|
-
s.email = ["aaron@quirkey.com"]
|
12
|
-
s.extra_rdoc_files = ["History.txt"]
|
13
|
-
s.files = ["History.txt", "LICENSE", "README.rdoc", "lib/vegas.rb", "lib/vegas/runner.rb", "test/test_app/test_app.rb", "test/test_apps.rb", "test/test_helper.rb", "test/test_vegas_runner.rb"]
|
14
|
-
s.rdoc_options = ["--main", "README.txt"]
|
15
|
-
s.require_paths = ["lib"]
|
16
|
-
s.rubyforge_project = %q{quirkey}
|
17
|
-
s.rubygems_version = %q{1.3.5}
|
18
|
-
s.summary = %q{Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.}
|
19
|
-
s.test_files = ["test/test_app/test_app.rb", "test/test_apps.rb", "test/test_helper.rb", "test/test_vegas_runner.rb"]
|
20
|
-
|
21
|
-
if s.respond_to? :specification_version then
|
22
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
-
s.specification_version = 3
|
24
|
-
|
25
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
-
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.1"])
|
27
|
-
s.add_development_dependency(%q<newgem>, [">= 1.5.1"])
|
28
|
-
s.add_development_dependency(%q<nokogiri>, [">= 1.0.6"])
|
29
|
-
s.add_development_dependency(%q<bacon>, [">= 1.1.0"])
|
30
|
-
s.add_development_dependency(%q<hoe>, [">= 2.3.3"])
|
31
|
-
else
|
32
|
-
s.add_dependency(%q<sinatra>, [">= 0.9.1"])
|
33
|
-
s.add_dependency(%q<newgem>, [">= 1.5.1"])
|
34
|
-
s.add_dependency(%q<nokogiri>, [">= 1.0.6"])
|
35
|
-
s.add_dependency(%q<bacon>, [">= 1.1.0"])
|
36
|
-
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
37
|
-
end
|
38
|
-
else
|
39
|
-
s.add_dependency(%q<sinatra>, [">= 0.9.1"])
|
40
|
-
s.add_dependency(%q<newgem>, [">= 1.5.1"])
|
41
|
-
s.add_dependency(%q<nokogiri>, [">= 1.0.6"])
|
42
|
-
s.add_dependency(%q<bacon>, [">= 1.1.0"])
|
43
|
-
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
44
|
-
end
|
45
|
-
end
|