cassette-rack 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93203bf07ad2d2bf689158528378c15fcc5c4386
4
- data.tar.gz: 72ba360c0eab36c64fb845346fbdb24e950a6a55
3
+ metadata.gz: b21c217f69cf7280e75130c4ffeb42e1f550d5ea
4
+ data.tar.gz: ca0662737ec616e546a26f65c626b35eca0da7a2
5
5
  SHA512:
6
- metadata.gz: 5f339b4d8279553bc7067452b4218cdbbcaf288674dfd7eb5b842534f52e0f907a0e9e7aad3a6132b3d039ad352c96986015257cc30f26bd5e35db8dbaa8550d
7
- data.tar.gz: c083878e301b10f8a76487c1987f8325b921058f1f555f5cf6c4d4d43df625f0217bf48cd2fcf97f7657dd5ce4648463ee228e30059ef1b7eec70e0b49d82c80
6
+ metadata.gz: 2a5e41f438b0aae56f20db527d1f14fbc775f3259820d9690fa78e8be3a8c856f18f3c9c73e8b0165df3d0bac1e83b61dd40a5b2ebdac0a01ca24e9cecb61e5c
7
+ data.tar.gz: bcf7b4b5e5330762c677546ea1a0d8895bc0f62102af924c52ac876ba70434b10d2db4532ab3e5d36698bcc4c8bebb27001c8e77f474440588bcb376b251f431
data/README.md CHANGED
@@ -27,9 +27,16 @@ $ gem install cassette-rack
27
27
  Add this line to your `config.ru`:
28
28
 
29
29
  ```
30
+ require 'cassette-rack'
30
31
  run CassetteRack::Engine
31
32
  ```
32
33
 
34
+ And then execute:
35
+
36
+ ```
37
+ $ rackup
38
+ ```
39
+
33
40
  ## License
34
41
 
35
42
  * MIT
@@ -5,27 +5,27 @@ module CassetteRack
5
5
  module Request
6
6
  attr_reader :request_options
7
7
 
8
- def get(path, params=nil, headers=nil)
8
+ def get(path, params={}, headers={})
9
9
  request(:get, path, params, headers)
10
10
  end
11
11
 
12
- def post(path, body, headers=nil)
13
- request(:post, path, nil, headers, body)
12
+ def post(path, body, headers={})
13
+ request(:post, path, {}, headers, body)
14
14
  end
15
15
 
16
- def patch(path, body, headers=nil)
17
- request(:patch, path, nil, headers, body)
16
+ def patch(path, body, headers={})
17
+ request(:patch, path, {}, headers, body)
18
18
  end
19
19
 
20
- def put(path, body=nil, headers=nil)
21
- request(:put, path, nil, headers, body)
20
+ def put(path, body={}, headers={})
21
+ request(:put, path, {}, headers, body)
22
22
  end
23
23
 
24
- def delete(path, headers=nil)
25
- request(:delete, path, nil, headers)
24
+ def delete(path, headers={})
25
+ request(:delete, path, {}, headers)
26
26
  end
27
27
 
28
- def request(method, path, params=nil, headers=nil, body=nil, options=nil)
28
+ def request(method, path, params={}, headers={}, body={}, options={})
29
29
  if request_options
30
30
  options = request_options
31
31
  else
@@ -36,7 +36,7 @@ module CassetteRack
36
36
  res = conn.send(method) do |req|
37
37
  case method
38
38
  when :get, :delete
39
- req.url path
39
+ req.url path, params
40
40
  when :post, :patch, :put
41
41
  req.path = path
42
42
  req.body = parse_content(body, req)
@@ -50,6 +50,8 @@ module CassetteRack
50
50
  @content = body
51
51
  end
52
52
  end
53
+ rescue
54
+ @content = body
53
55
  end
54
56
  # end private
55
57
  end
@@ -1,3 +1,3 @@
1
1
  module CassetteRack
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
@@ -33,19 +33,29 @@
33
33
  }
34
34
 
35
35
  #content {
36
- margin-left: 140px;
36
+ margin-left: 160px;
37
37
  border-left: solid #ccc;
38
38
  }
39
39
 
40
40
  #sidebar {
41
41
  float: left;
42
- width: 140px;
42
+ width: 160px;
43
43
  margin-left: -100%;
44
44
  background: #fff;
45
45
  border-right: solid #ccc;
46
46
  }
47
47
 
48
- #tree li { list-style: none; }
48
+ #tree {
49
+ margin-left: 10px;
50
+ }
51
+
52
+ #tree ol {
53
+ padding-left: 12px;
54
+ }
55
+
56
+ #tree li {
57
+ list-style: none;
58
+ }
49
59
 
50
60
  #tree li label.branch {
51
61
  position: relative;
@@ -55,7 +65,7 @@
55
65
  content: '';
56
66
  position: absolute;
57
67
  top: 50%;
58
- left: -10px;
68
+ left: -12px;
59
69
  margin-top: -4px;
60
70
  border: 4px solid transparent;
61
71
  border-left: 7px solid #999;
@@ -66,7 +76,7 @@
66
76
  #tree li .branch + input[type=checkbox] + ol > li { display: none; }
67
77
  #tree li .branch + input[type=checkbox]:checked + ol > li { display: block; }
68
78
 
69
- #tree li .leaf { padding-left: 10px; }
79
+ #tree li .leaf { padding-left: 12px; }
70
80
  #tree li .leaf > a { color: #333; text-decoration: none; }
71
81
  #tree li .leaf > a:visited { color: #333; }
72
82
  #tree li .leaf > a:hover { color: #333; background-color:#fff; }
@@ -75,7 +85,7 @@
75
85
  #tree li .active > a:hover { color: #fff; background-color:#999; }
76
86
 
77
87
  div.scroll {
78
- width: 130px;
88
+ width: 150px;
79
89
  overflow: scroll;
80
90
  }
81
91
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassette-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ogom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-12 00:00:00.000000000 Z
11
+ date: 2015-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday