sssmoke 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -12
- data/bin/sssmoke +13 -10
- data/lib/sssmoke.rb +1 -5
- data/lib/sssmoke/version.rb +1 -1
- data/sssmoke.gemspec +2 -3
- metadata +3 -3
data/README.md
CHANGED
@@ -1,30 +1,34 @@
|
|
1
1
|
# Sssmoke
|
2
2
|
|
3
|
-
Slap
|
3
|
+
Slap Ruby scripts on a web server in seconds.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
$ gem install sssmoke
|
8
8
|
|
9
|
-
|
9
|
+
## Usage
|
10
10
|
|
11
|
-
|
11
|
+
Put erb templates in a directory (with extension _erb_).
|
12
12
|
|
13
|
-
|
13
|
+
To put the whole directory on a web server, run:
|
14
14
|
|
15
|
-
|
15
|
+
sssmoke
|
16
16
|
|
17
|
-
|
17
|
+
Now open:
|
18
18
|
|
19
|
-
|
19
|
+
http://localhost:<your web server's default port>/<name of erb script>
|
20
20
|
|
21
|
-
Put erb templates in a folder, go to the folder and run:
|
22
21
|
|
23
|
-
|
22
|
+
## Pro Usage for Powah Usah
|
24
23
|
|
25
|
-
|
24
|
+
If you want to sssmoke a directory other than the current directory:
|
25
|
+
|
26
|
+
sssmoke <directory name>
|
27
|
+
|
28
|
+
To expose a single template at the server's root:
|
29
|
+
|
30
|
+
sssmoke <file name>
|
26
31
|
|
27
|
-
http://localhost:<your web server's default port>/<name of script>
|
28
32
|
|
29
33
|
## Contributing
|
30
34
|
|
data/bin/sssmoke
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'sinatra/base'
|
3
|
+
require 'erb'
|
4
|
+
require 'tilt'
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
erb :index
|
6
|
+
filename = ARGV[0] || "."
|
7
|
+
if File.directory? filename
|
8
|
+
Class.new(Sinatra::Base) do
|
9
|
+
set :views, filename
|
10
|
+
get('/') { erb :index }
|
11
|
+
get('/:page') {|page| erb page.to_sym }
|
12
|
+
run!
|
9
13
|
end
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
else
|
15
|
+
Class.new(Sinatra::Base) do
|
16
|
+
get('/') { Tilt::ERBTemplate.new(filename).render }
|
17
|
+
run!
|
13
18
|
end
|
14
|
-
|
15
|
-
run!
|
16
19
|
end
|
data/lib/sssmoke.rb
CHANGED
data/lib/sssmoke/version.rb
CHANGED
data/sssmoke.gemspec
CHANGED
@@ -8,10 +8,9 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = Sssmoke::VERSION
|
9
9
|
gem.authors = ["Paolo \"Nusco\" Perrotta"]
|
10
10
|
gem.email = ["paolo.nusco.perrotta@gmail.com"]
|
11
|
-
gem.description = %q{Slap
|
12
|
-
gem.summary = %q{Put erb templates in a folder and run them in a server with the '
|
11
|
+
gem.description = %q{Slap Rubys script on a web server in seconds.}
|
12
|
+
gem.summary = %q{Put erb templates in a folder and run them in a server with the 'sssmoke' command.}
|
13
13
|
gem.homepage = "https://github.com/nusco/sssmoke"
|
14
|
-
|
15
14
|
gem.files = `git ls-files`.split($/)
|
16
15
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
16
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sssmoke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
-
description: Slap
|
46
|
+
description: Slap Rubys script on a web server in seconds.
|
47
47
|
email:
|
48
48
|
- paolo.nusco.perrotta@gmail.com
|
49
49
|
executables:
|
@@ -85,6 +85,6 @@ rubyforge_project:
|
|
85
85
|
rubygems_version: 1.8.24
|
86
86
|
signing_key:
|
87
87
|
specification_version: 3
|
88
|
-
summary: Put erb templates in a folder and run them in a server with the '
|
88
|
+
summary: Put erb templates in a folder and run them in a server with the 'sssmoke'
|
89
89
|
command.
|
90
90
|
test_files: []
|