tipsy 0.0.1
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 +7 -0
- data/Gemfile +5 -0
- data/README.md +10 -0
- data/Rakefile +1 -0
- data/bin/tipsy +10 -0
- data/config.ru +26 -0
- data/lib/tipsy/application.rb +88 -0
- data/lib/tipsy/builder.rb +13 -0
- data/lib/tipsy/generator.rb +53 -0
- data/lib/tipsy/helpers/capture.rb +22 -0
- data/lib/tipsy/helpers/tag.rb +30 -0
- data/lib/tipsy/helpers.rb +9 -0
- data/lib/tipsy/logger.rb +11 -0
- data/lib/tipsy/project/assets/javascripts/site.js +0 -0
- data/lib/tipsy/project/assets/stylesheets/screen.css.scss +0 -0
- data/lib/tipsy/project/config.erb +16 -0
- data/lib/tipsy/project/helpers/site_helper.rb +4 -0
- data/lib/tipsy/project/views/_layout.html.erb +16 -0
- data/lib/tipsy/server.rb +91 -0
- data/lib/tipsy/version.rb +3 -0
- data/lib/tipsy/view.rb +64 -0
- data/lib/tipsy.rb +72 -0
- data/test/root/.gitignore +7 -0
- data/test/root/assets/javascripts/test.js +0 -0
- data/test/root/assets/stylesheets/screen.css.scss +3 -0
- data/test/root/config.rb +6 -0
- data/test/root/views/_layout.html.erb +20 -0
- data/test/root/views/index.html.erb +3 -0
- data/tipsy.gemspec +30 -0
- metadata +161 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
= Tipsy
|
2
|
+
|
3
|
+
Tipsy is a small Rack-based server inspired by gems like StaticMatic and Serve. Its purpose is to aid development of static sites by providing
|
4
|
+
Rails-esque style templating and helpers. Various template types are supported via the Tilt gem, and assets are served via Sprockets, essentially giving you
|
5
|
+
a miniture Rails "view-only" environment.
|
6
|
+
|
7
|
+
=== Notes
|
8
|
+
|
9
|
+
Tipsy was developed for personal/internal use but feature/pull requests are gladly accepted. It is not designed to function in any kind of production
|
10
|
+
environment. When ready to upload files to a production environment, build the project and upload the result.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/tipsy
ADDED
data/config.ru
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#\ -p 4000
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'bundler'
|
6
|
+
begin
|
7
|
+
Bundler.setup(:default, :development)
|
8
|
+
rescue Bundler::BundlerError => e
|
9
|
+
$stderr.puts e.message
|
10
|
+
$stderr.puts "Missing dependencies. Run `bundle install` to install missing gems."
|
11
|
+
exit e.status_code
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'tipsy'
|
15
|
+
require 'sprockets'
|
16
|
+
|
17
|
+
# Setup the root path and initialize.
|
18
|
+
Tipsy.root = ::File.dirname(__FILE__) + "/test/root"
|
19
|
+
use Rack::CommonLogger
|
20
|
+
use Rack::ShowStatus
|
21
|
+
use Rack::ShowExceptions
|
22
|
+
run Rack::Cascade.new([
|
23
|
+
Rack::URLMap.new({ "/assets" => Tipsy::AssetHandler.new }),
|
24
|
+
Tipsy::Server.new,
|
25
|
+
Rack::Directory.new(Tipsy.root + '/public')
|
26
|
+
])
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'rack'
|
2
|
+
require 'tipsy/server'
|
3
|
+
|
4
|
+
module Tipsy
|
5
|
+
class Application
|
6
|
+
|
7
|
+
class_attribute :config, :instance_writer => false
|
8
|
+
attr_reader :app
|
9
|
+
|
10
|
+
def self.create(name = nil)
|
11
|
+
raise "Missing project name for 'tipsy new'" unless name
|
12
|
+
Tipsy::Generator.create_project!(name)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.build
|
16
|
+
Tipsy::Builder.new(self.config.build_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.initialize!
|
20
|
+
self.config = Tipsy.options
|
21
|
+
begin
|
22
|
+
require File.join(Tipsy.root, 'config.rb')
|
23
|
+
rescue LoadError
|
24
|
+
puts "To configure additional settings, create a config.rb in your root path. (#{Tipsy.root})"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.run
|
29
|
+
initialize!
|
30
|
+
self.new
|
31
|
+
end
|
32
|
+
|
33
|
+
def initialize
|
34
|
+
|
35
|
+
@app = Rack::Builder.new {
|
36
|
+
use Rack::CommonLogger
|
37
|
+
use Rack::ShowStatus
|
38
|
+
use Rack::ShowExceptions
|
39
|
+
use Tipsy::StaticFile, :root => Tipsy.options.public_path, :urls => %w[/]
|
40
|
+
run Rack::Cascade.new([
|
41
|
+
Rack::URLMap.new({ "/#{File.basename(Tipsy.options.asset_path)}" => Tipsy::AssetHandler.new }),
|
42
|
+
Tipsy::Server.new
|
43
|
+
])
|
44
|
+
}
|
45
|
+
|
46
|
+
puts "Tipsy #{Tipsy::VERSION} running on #{config.address}:#{config.port}"
|
47
|
+
|
48
|
+
begin run_thin
|
49
|
+
rescue LoadError
|
50
|
+
begin run_mongrel
|
51
|
+
rescue LoadError
|
52
|
+
run_webrick
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def server_opts
|
60
|
+
{ :Port => config.port, :Host => config.address }
|
61
|
+
end
|
62
|
+
|
63
|
+
def run_thin
|
64
|
+
handler = Rack::Handler.get('thin')
|
65
|
+
handler.run app, server_opts do |server|
|
66
|
+
puts "Running Tipsy with Thin (#{Thin::VERSION::STRING})."
|
67
|
+
end
|
68
|
+
exit(0)
|
69
|
+
end
|
70
|
+
|
71
|
+
def run_mongrel
|
72
|
+
handler = Rack::Handler.get('mongrel')
|
73
|
+
handler.run app, server_opts do |server|
|
74
|
+
puts "Running Tipsy with Mongrel (#{Mongrel::Const::MONGREL_VERSION})."
|
75
|
+
end
|
76
|
+
exit(0)
|
77
|
+
end
|
78
|
+
|
79
|
+
def run_webrick
|
80
|
+
handler = Rack::Handler.get('webrick')
|
81
|
+
handler.run app, server_opts do |server|
|
82
|
+
puts "Running Tipsy with Webrick. To use Mongrel or Thin, add them to your Gemfile"
|
83
|
+
trap("INT"){ server.shutdown }
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'tilt'
|
2
|
+
|
3
|
+
module Tipsy
|
4
|
+
class Generator
|
5
|
+
|
6
|
+
attr_reader :project_class, :dest_path, :source_path
|
7
|
+
|
8
|
+
def self.create_project!(name)
|
9
|
+
self.new(File.join(Tipsy.root, name.underscore), name.camelize)
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(dir, klass)
|
13
|
+
Tipsy.root = dir
|
14
|
+
@project_class = klass
|
15
|
+
|
16
|
+
@dest_path = dir
|
17
|
+
@source_path = File.join(File.dirname(__FILE__), 'project')
|
18
|
+
generate!
|
19
|
+
end
|
20
|
+
|
21
|
+
def generate!
|
22
|
+
FileUtils.mkdir(dest_path) unless File.exists?(dest_path)
|
23
|
+
copy_source(source_path, dest_path)
|
24
|
+
config = Tilt.new(File.join(source_path, 'config.erb'), nil)
|
25
|
+
config = config.render(Object.new, {
|
26
|
+
:classname => @project_class,
|
27
|
+
:root => dest_path
|
28
|
+
})
|
29
|
+
File.open(File.join(dest_path, 'config.rb'), 'w'){ |io| io.write(config) }
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def copy_source(src, dest)
|
35
|
+
|
36
|
+
Dir.foreach(src) do |file|
|
37
|
+
next if file == '.' || file == '..' || file == 'config.erb'
|
38
|
+
|
39
|
+
source = File.join(src, file)
|
40
|
+
copyto = File.join(dest, file)
|
41
|
+
|
42
|
+
if File.directory?(source)
|
43
|
+
FileUtils.mkdir(copyto)
|
44
|
+
copy_source(source, copyto)
|
45
|
+
else
|
46
|
+
FileUtils.cp(source, copyto)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Tipsy
|
2
|
+
module Helpers
|
3
|
+
module Capture
|
4
|
+
|
5
|
+
def content_for(name, content = nil, &block)
|
6
|
+
content ||= capture(&block) if block_given?
|
7
|
+
instance_variable_set("@_#{name}", content) if content
|
8
|
+
instance_variable_get("@_#{name}") unless content
|
9
|
+
end
|
10
|
+
|
11
|
+
def capture(&block)
|
12
|
+
buffer = ""
|
13
|
+
orig_buffer, @_output_buffer = @_output_buffer, buffer
|
14
|
+
yield
|
15
|
+
buffer
|
16
|
+
ensure
|
17
|
+
@_output_buffer = orig_buffer
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Tipsy
|
2
|
+
module Helpers
|
3
|
+
|
4
|
+
module Tag
|
5
|
+
include Capture
|
6
|
+
|
7
|
+
def tag(name, html_attrs = {}, open = false)
|
8
|
+
"<#{name}#{make_attributes(html_attrs)}#{open ? ">" : " />"}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def content_tag(name, content = nil, html_attrs = {}, &block)
|
12
|
+
buffer = "<#{name}#{make_attributes(html_attrs)}>"
|
13
|
+
content = capture(&block) if block_given?
|
14
|
+
"<#{name}#{make_attributes(html_attrs)}>#{content}</#{name}>"
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def make_attributes(hash)
|
20
|
+
attrs = []
|
21
|
+
hash.each_pair do |key, value|
|
22
|
+
attrs << "#{key}=#{value.inspect}"
|
23
|
+
end
|
24
|
+
(attrs.empty? ? "" : " #{attrs.join(" ")}")
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
data/lib/tipsy/logger.rb
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class <%= classname %> < Tipsy::Application
|
2
|
+
|
3
|
+
# Configure assets to be precompiled
|
4
|
+
config.assets << "site.js"
|
5
|
+
config.assets << "screen.css"
|
6
|
+
|
7
|
+
# The path where build files will go when compiled
|
8
|
+
# config.build_path = <%= File.join(root, 'build') %>
|
9
|
+
|
10
|
+
# The path where public files exist (default root/public)
|
11
|
+
# config.public_path = <%= File.join(root, 'public') %>
|
12
|
+
|
13
|
+
# The path where assets will be stored on build (default public_path/assets)
|
14
|
+
# config.asset_path = <%= File.join(root, 'assets') %>
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<title></title>
|
6
|
+
<meta name="keywords" content=""/>
|
7
|
+
<meta name="description" content=""/>
|
8
|
+
<!--[if lte IE 8]>
|
9
|
+
<![endif]-->
|
10
|
+
<!--[if IE 8]>
|
11
|
+
<![endif]-->
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<%= yield %>
|
15
|
+
</body>
|
16
|
+
</html>
|
data/lib/tipsy/server.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'rack'
|
2
|
+
require 'sprockets'
|
3
|
+
require 'hike'
|
4
|
+
require 'sass'
|
5
|
+
|
6
|
+
module Tipsy
|
7
|
+
|
8
|
+
class Server
|
9
|
+
|
10
|
+
attr_reader :request
|
11
|
+
attr_reader :response
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
@last_update = Time.now
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(env)
|
18
|
+
@request = Request.new(env)
|
19
|
+
@response = Response.new
|
20
|
+
path = request.path_info.to_s.sub(/^\//, '')
|
21
|
+
view = Tipsy::View.new(path, request)
|
22
|
+
content = view.render
|
23
|
+
content.nil? ? not_found : finish(content)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def finish(content)
|
29
|
+
[ 200, { 'Content-Type' => 'text/html' }, [content] ]
|
30
|
+
end
|
31
|
+
|
32
|
+
def not_found
|
33
|
+
[ 400, { 'Content-Type' => 'text/html' }, [] ]
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
class AssetHandler < Sprockets::Environment
|
39
|
+
def initialize
|
40
|
+
super(Tipsy.root) do |env|
|
41
|
+
env.static_root = Tipsy.options.asset_path
|
42
|
+
end
|
43
|
+
self.append_path "assets/javascripts"
|
44
|
+
self.append_path "assets/stylesheets"
|
45
|
+
self.append_path "assets/images"
|
46
|
+
self
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# From the rack/contrib TryStatic class
|
51
|
+
class StaticFile
|
52
|
+
attr_reader :app, :try_files, :static
|
53
|
+
|
54
|
+
def initialize(app, options)
|
55
|
+
@app = app
|
56
|
+
@try_files = ['', *options.delete(:try)]
|
57
|
+
@static = ::Rack::Static.new(lambda { [404, {}, []] }, options)
|
58
|
+
end
|
59
|
+
|
60
|
+
def call(env)
|
61
|
+
orig_path = env['PATH_INFO']
|
62
|
+
found = nil
|
63
|
+
try_files.each do |path|
|
64
|
+
resp = static.call(env.merge!({'PATH_INFO' => orig_path + path}))
|
65
|
+
break if 404 != resp[0] && found = resp
|
66
|
+
end
|
67
|
+
found or app.call(env.merge!('PATH_INFO' => orig_path))
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
class Request < Rack::Request
|
73
|
+
# Hash access to params
|
74
|
+
def params
|
75
|
+
@params ||= begin
|
76
|
+
hash = HashWithIndifferentAccess.new.update(Rack::Utils.parse_nested_query(query_string))
|
77
|
+
post_params = form_data? ? Rack::Utils.parse_nested_query(body.read) : {}
|
78
|
+
hash.update(post_params) unless post_params.empty?
|
79
|
+
hash
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class Response < Rack::Response
|
85
|
+
def body=(value)
|
86
|
+
value.respond_to?(:each) ? super(value) : super([value])
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
data/lib/tipsy/view.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'tilt'
|
2
|
+
require 'tipsy/helpers'
|
3
|
+
require 'hike'
|
4
|
+
|
5
|
+
module Tipsy
|
6
|
+
class View
|
7
|
+
|
8
|
+
attr_reader :content_type
|
9
|
+
attr_reader :file
|
10
|
+
attr_reader :request
|
11
|
+
attr_reader :trail
|
12
|
+
attr_reader :view_path
|
13
|
+
|
14
|
+
def initialize(path, request)
|
15
|
+
@request = request
|
16
|
+
@content_type = 'text/html'
|
17
|
+
@trail = Hike::Trail.new(File.join(Tipsy.root, 'views'))
|
18
|
+
@view_path = path
|
19
|
+
@template = nil
|
20
|
+
trail.append_path('.')
|
21
|
+
trail.append_extensions '.erb','.html', '.json', '.xml'
|
22
|
+
end
|
23
|
+
|
24
|
+
def render
|
25
|
+
unless template.nil?
|
26
|
+
tilt = Tilt.new(template, nil, :outvar => '@_output_buffer')
|
27
|
+
context = Context.new(request)
|
28
|
+
contents = unless layout.nil?
|
29
|
+
wrapped = Tilt.new(layout, nil, :outvar => '@_output_buffer')
|
30
|
+
contents = wrapped.render(context) do |*args|
|
31
|
+
tilt.render(context, *args)
|
32
|
+
end
|
33
|
+
else
|
34
|
+
tilt.render(context)
|
35
|
+
end
|
36
|
+
return contents
|
37
|
+
end
|
38
|
+
nil
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def template
|
44
|
+
@template ||= (trail.find(view_path) || trail.find(File.join(view_path, "index")))
|
45
|
+
end
|
46
|
+
|
47
|
+
def layout
|
48
|
+
@layout ||= (trail.find(File.join(view_path, '_layout')) || trail.find('_layout'))
|
49
|
+
end
|
50
|
+
|
51
|
+
class Context
|
52
|
+
include Tipsy::Helpers
|
53
|
+
|
54
|
+
attr_accessor :request, :content, :root
|
55
|
+
|
56
|
+
def initialize(req)
|
57
|
+
@request = req, @root = Tipsy.root
|
58
|
+
super
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
data/lib/tipsy.rb
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
require "tipsy/version"
|
2
|
+
require "active_support/all"
|
3
|
+
require 'optparse'
|
4
|
+
require 'ostruct'
|
5
|
+
|
6
|
+
module Tipsy
|
7
|
+
|
8
|
+
autoload :Application, 'tipsy/application'
|
9
|
+
autoload :Server, 'tipsy/server'
|
10
|
+
autoload :Responder, 'tipsy/handler'
|
11
|
+
autoload :View, 'tipsy/view'
|
12
|
+
autoload :Helpers, 'tipsy/helpers'
|
13
|
+
|
14
|
+
autoload :Builder, 'tipsy/builder'
|
15
|
+
autoload :Generator, 'tipsy/generator'
|
16
|
+
|
17
|
+
mattr_accessor :root
|
18
|
+
mattr_accessor :logger
|
19
|
+
mattr_accessor :env
|
20
|
+
mattr_accessor :sprockets
|
21
|
+
mattr_accessor :compass
|
22
|
+
|
23
|
+
def self.run_command(args, stdin)
|
24
|
+
args = [args].flatten
|
25
|
+
to_run = args.first
|
26
|
+
to_run = case to_run
|
27
|
+
when nil then 'run'
|
28
|
+
when 'new' then 'create'
|
29
|
+
when 'serve' || 's' then 'run'
|
30
|
+
else to_run
|
31
|
+
end
|
32
|
+
|
33
|
+
args.shift
|
34
|
+
|
35
|
+
options.port = 4000
|
36
|
+
options.host = '0.0.0.0'
|
37
|
+
options.assets = []
|
38
|
+
options.build_path = File.join(Tipsy.root, 'build')
|
39
|
+
options.public_path = File.join(Tipsy.root, 'public')
|
40
|
+
options.asset_path = File.join(options.public_path, 'assets')
|
41
|
+
|
42
|
+
parse_options!
|
43
|
+
Tipsy::Application.send(:"#{to_run}", *args)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.options
|
47
|
+
@@options ||= OpenStruct.new
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def self.parse_options!
|
53
|
+
|
54
|
+
op = OptionParser.new do |opts|
|
55
|
+
opts.banner = "Usage: tipsy [cmd] [options]"
|
56
|
+
opts.separator ""
|
57
|
+
opts.separator "Options:"
|
58
|
+
opts.on("-p", "--port", "Run the server on a specified port ( default: 4000 )") do |port|
|
59
|
+
options.port = port
|
60
|
+
end
|
61
|
+
opts.on("-a", "--address", "Run the server on a specified address ( default: 0.0.0.0 )") do |host|
|
62
|
+
options.host = host
|
63
|
+
end
|
64
|
+
opts.on_tail("--version", "Show version") do
|
65
|
+
puts Tipsy::VERSION
|
66
|
+
exit 0
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
File without changes
|
data/test/root/config.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<?xml version="1.0" encoding="utf-8"?>
|
3
|
+
<!DOCTYPE html>
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8"/>
|
7
|
+
<title></title>
|
8
|
+
<meta name="keywords" content=""/>
|
9
|
+
<meta name="description" content=""/>
|
10
|
+
<!--[if lte IE 8]>
|
11
|
+
<![endif]-->
|
12
|
+
<!--[if IE 8]>
|
13
|
+
<![endif]-->
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<p> I wrap the <%= yield %> in a layout</p>
|
17
|
+
<p>I'm a var set in the view: <%= @poop %></p>
|
18
|
+
<p>Some bold text set in the view: <%= content_for(:text) %></p>
|
19
|
+
</body>
|
20
|
+
</html>
|
data/tipsy.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "tipsy/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
|
7
|
+
s.name = "tipsy"
|
8
|
+
s.version = Tipsy::VERSION
|
9
|
+
s.authors = ["Brent Kirby"]
|
10
|
+
s.email = ["brent@kurbmedia.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{A mini Rack application server for developing static sites.}
|
13
|
+
s.description = %q{Tipsy is a mini Rack application for working with static websites using Tilt, Compass, and Sprockets.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "tipsy"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
|
22
|
+
s.add_dependency("rack", "~> 1.2")
|
23
|
+
s.add_dependency("rack-test", "~> 0.5")
|
24
|
+
s.add_dependency("tilt", "~> 1.3")
|
25
|
+
s.add_dependency("i18n", "~> 0.5")
|
26
|
+
s.add_dependency("sass", "~> 3.1")
|
27
|
+
s.add_dependency("active_support", ">= 3.0")
|
28
|
+
s.add_dependency('sprockets', '~> 2.0.0.beta.12')
|
29
|
+
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tipsy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Brent Kirby
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-06 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rack
|
17
|
+
requirement: &70334947082500 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.2'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70334947082500
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rack-test
|
28
|
+
requirement: &70334947081980 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.5'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70334947081980
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: tilt
|
39
|
+
requirement: &70334947081520 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.3'
|
45
|
+
type: :runtime
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70334947081520
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: i18n
|
50
|
+
requirement: &70334947081020 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0.5'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *70334947081020
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: sass
|
61
|
+
requirement: &70334947080560 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ~>
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3.1'
|
67
|
+
type: :runtime
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *70334947080560
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: active_support
|
72
|
+
requirement: &70334947080100 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '3.0'
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: *70334947080100
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: sprockets
|
83
|
+
requirement: &70334947079640 !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ~>
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.0.0.beta.12
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: *70334947079640
|
92
|
+
description: Tipsy is a mini Rack application for working with static websites using
|
93
|
+
Tilt, Compass, and Sprockets.
|
94
|
+
email:
|
95
|
+
- brent@kurbmedia.com
|
96
|
+
executables:
|
97
|
+
- tipsy
|
98
|
+
extensions: []
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
101
|
+
- .gitignore
|
102
|
+
- Gemfile
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- bin/tipsy
|
106
|
+
- config.ru
|
107
|
+
- lib/tipsy.rb
|
108
|
+
- lib/tipsy/application.rb
|
109
|
+
- lib/tipsy/builder.rb
|
110
|
+
- lib/tipsy/generator.rb
|
111
|
+
- lib/tipsy/helpers.rb
|
112
|
+
- lib/tipsy/helpers/capture.rb
|
113
|
+
- lib/tipsy/helpers/tag.rb
|
114
|
+
- lib/tipsy/logger.rb
|
115
|
+
- lib/tipsy/project/assets/javascripts/site.js
|
116
|
+
- lib/tipsy/project/assets/stylesheets/screen.css.scss
|
117
|
+
- lib/tipsy/project/config.erb
|
118
|
+
- lib/tipsy/project/helpers/site_helper.rb
|
119
|
+
- lib/tipsy/project/views/_layout.html.erb
|
120
|
+
- lib/tipsy/server.rb
|
121
|
+
- lib/tipsy/version.rb
|
122
|
+
- lib/tipsy/view.rb
|
123
|
+
- test/root/.gitignore
|
124
|
+
- test/root/assets/javascripts/test.js
|
125
|
+
- test/root/assets/stylesheets/screen.css.scss
|
126
|
+
- test/root/config.rb
|
127
|
+
- test/root/views/_layout.html.erb
|
128
|
+
- test/root/views/index.html.erb
|
129
|
+
- tipsy.gemspec
|
130
|
+
has_rdoc: true
|
131
|
+
homepage: ''
|
132
|
+
licenses: []
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
146
|
+
- - ! '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project: tipsy
|
151
|
+
rubygems_version: 1.6.2
|
152
|
+
signing_key:
|
153
|
+
specification_version: 3
|
154
|
+
summary: A mini Rack application server for developing static sites.
|
155
|
+
test_files:
|
156
|
+
- test/root/.gitignore
|
157
|
+
- test/root/assets/javascripts/test.js
|
158
|
+
- test/root/assets/stylesheets/screen.css.scss
|
159
|
+
- test/root/config.rb
|
160
|
+
- test/root/views/_layout.html.erb
|
161
|
+
- test/root/views/index.html.erb
|