simple_respond 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/simple_respond +12 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 254c351b2cb5b677e4e6d236f1b810990983e368
4
- data.tar.gz: d3135db8fd03b0282aa8904ba4faa5ad0d95ef0d
3
+ metadata.gz: f06c2aaf36c28ea0f8aaa90c077051ad1c39f4d1
4
+ data.tar.gz: 1f5200166949f3c73e128e719d6f87f4f44c91bd
5
5
  SHA512:
6
- metadata.gz: 2a4ed3561c60d8b5dfdee47ddb0bae89f619c408f47f4bf2484a2d7612ea740210a99ba9ee35a16737e7fa679564d9b7e90ecd66773b0ec8ac764f27d2960905
7
- data.tar.gz: 32cfdfed2ddbc1ca7000e0254e8f3d9c5171ef9c504a556a2f3eaf89715ceab66620851827af78ad9685871dd1129891919ce66ebb4371fee8ad1e751cfdf52c
6
+ metadata.gz: 1a468b91f8582da0ae5cd02f8298f8d0ac2610fcc80116c513e22016813941ba91178c2874d7aac3bd2960eb93ad4f02e3c1eb8a85ef45ff7d4d12084e7c21c1
7
+ data.tar.gz: 4916363a19eaeaaba9307b7d188b776c8c77d644a3bde8db45f5e7b75ce692c78b2704aeef07e13b963ec6ea946cee4a84cb69f829f90525cff17b3331cc3e14
data/bin/simple_respond CHANGED
@@ -7,12 +7,17 @@ if ARGV.length != 2 then
7
7
  Kernel.exit(1)
8
8
  end
9
9
 
10
- set :port, ARGV[0]
10
+ class SimpleRespond < Sinatra::Base
11
11
 
12
- get '*' do
13
- content_type :json
14
- response = ARGV[1]
15
- response ||= 'response.json'
16
- puts "Responding with #{response}"
17
- File.read(response)
12
+ set :port, ARGV[0]
13
+
14
+ get '*' do
15
+ content_type :json
16
+ response = ARGV[1]
17
+ response ||= 'response.json'
18
+ puts "Responding with #{response}"
19
+ File.read(response)
20
+ end
21
+
22
+ run!
18
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_respond
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Laboon