simple_respond 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +2 -3
- data/lib/simple_respond.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3713a43a4f1bcb2eb8cabb1b726213f9ffe4b1d5
|
4
|
+
data.tar.gz: 2dcf726d366920887c425b67e8d81f7d23b8fb28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f8b42242c95a2b85ed6d0e627154ba21103487e0811d33a30dfdc6e20673b14de85e45a42ef287e8cfbeb359feedc7052823be99fdd5a4be045bb5e9b777d41
|
7
|
+
data.tar.gz: 6165665defd8950194a7cb1287fc8288eba7c36c50459452800abb567d1d9181df8f86d731d271da4c549589155273a9b81e93569ebddd731a6fea479a37ed1b
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_respond
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Laboon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -32,7 +32,6 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- bin/simple_respond
|
35
|
-
- lib/simple_respond.rb
|
36
35
|
homepage: http://github.com/laboon/simple_respond
|
37
36
|
licenses:
|
38
37
|
- MIT
|
data/lib/simple_respond.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'sinatra'
|
2
|
-
|
3
|
-
class SimpleRespond < Sinatra::Base
|
4
|
-
|
5
|
-
port = ARGV[0]
|
6
|
-
port ||= 80
|
7
|
-
|
8
|
-
response_file = ARGV[1]
|
9
|
-
response_file ||= 'response.json'
|
10
|
-
|
11
|
-
set :port, port
|
12
|
-
|
13
|
-
get '*' do
|
14
|
-
content_type :json
|
15
|
-
puts "Responding with #{response_file}"
|
16
|
-
File.read(response_file)
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
puts "Hello, you're running your web app from a gem!"
|
22
|
-
SimpleRespond.run!
|