rackrack 0.1.3 → 0.2.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/VERSION +1 -1
  4. data/lib/rackrack/stub.rb +1 -11
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b6f4649ba0c7912cd778925c083d5dd362d25a4
4
- data.tar.gz: fdc01b05781f03ffa73dc73c5d987878fe5e7b72
3
+ metadata.gz: 2aa5e2e649b2b76e655489552ca3315eef1bec1d
4
+ data.tar.gz: 7d69ef09feb8339b21afa901597e70ad8fce1af6
5
5
  SHA512:
6
- metadata.gz: e94e3fecc5a1e788ed55e743189826bcb34598aff0c821b6924b6f1251f087b739374304ccb6566d8265dfaa6740ae6d391a1fa5bc60c99f7b7cb2449b1490b4
7
- data.tar.gz: f820cc5038aa0bb74ab263bdaaa33fbf144009961fcfcd9189046a6116064c446f48ea82fc06377039eb61a9b09f626231cac1e19722ce99d781abd1bbd2a8fa
6
+ metadata.gz: 1b99370108f625bef2d654ebc4c7cbd799989ff92da7f1890a39c486685576665900f0649aa8b48a9d3b1c99ddd22546d8c90e144d7bb4dc2f1b6642c0d80a05
7
+ data.tar.gz: 1030cdb7cd1469bd8397efe7c403b5a404ebfdaa5fb2754e32afa7f68f5543959640dfa2d6e74ec2181a48eb9738c917ae06e3a88122935969f3efc62b674cab
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ * simply use sinatra as middleware
4
+
1
5
  ## 0.1.3
2
6
 
3
7
  * use 502 to describe no stub matched
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
@@ -12,10 +12,6 @@ module Rackrack
12
12
  if block_given?
13
13
  @stub = Class.new(Sinatra::Base) do
14
14
  instance_eval(&block)
15
- # I use BadGatewy to describe no stub matched...
16
- not_found do
17
- status 502
18
- end
19
15
  end
20
16
  else
21
17
  @stub ||= raise Rackrack::Stub::NoStubException
@@ -33,15 +29,9 @@ module Rackrack
33
29
 
34
30
  def call(env)
35
31
  response = begin
36
- self.class.stub.call(env)
32
+ self.class.stub.new(@app).call(env)
37
33
  rescue Rackrack::Stub::NoStubException
38
- [ 502, {}, [] ]
39
- end
40
-
41
- if response.first == 502
42
34
  @app.call(env)
43
- else
44
- response
45
35
  end
46
36
  end
47
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rackrack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra