grape-markdown 0.0.3 → 0.0.4

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: 23c66a58fc6dbd66c82241230455c5f2cb22dcae
4
- data.tar.gz: c516acd4dcba953c7b5d90bd1553aa5ea344ffba
3
+ metadata.gz: e25251ad9ffa8528ff2cce7f2c22de9442bb0d4a
4
+ data.tar.gz: a712b64644241064a0ba9f72b3920181d77222a0
5
5
  SHA512:
6
- metadata.gz: c38c1468ba6b71342d5330f534a858fdea4c43ce7f484134070747916ed142dd9dfb0166ffd40fa9d0f1395b3fe64d6cce175dc9fcdea5bb70a50db296013433
7
- data.tar.gz: 12530734727aa1e69062043254b019369bfbe9b773d62948da103934ac7f367b38a6500970d22347b6b5cbc841d223f4f03791c154b79630c9a89e4b355fe49b
6
+ metadata.gz: 21dc05842af3d45fd5544a9bbfa036894eaad89e066dae87ca383b3fff9da666cfdbdbed19dd959a0b7b7c16c80a202b54f82cb020d17d1221a281901f40470d
7
+ data.tar.gz: a345de86136d1bdf399faa931612c837dc335d87cde936b763ae9f1637da7486228fc0c77d6ff04a97a060f769ccb6ec3601ae68246e0011bd0764813f15ff7a
@@ -19,6 +19,10 @@ module GrapeMarkdown
19
19
  route_path.match('\/(\w*?)[\.\/\(]').captures.first
20
20
  end
21
21
 
22
+ def route_short_description
23
+ "#{route_method.titleize} a #{route_model}"
24
+ end
25
+
22
26
  def route_path_without_format
23
27
  route_path.gsub(/\((.*?)\)/, '')
24
28
  end
@@ -31,16 +35,6 @@ module GrapeMarkdown
31
35
  list? ? 'collection' : 'single'
32
36
  end
33
37
 
34
- def request_description
35
- "+ Request #{'(application/json)' if request_body?}"
36
- end
37
-
38
- def response_description
39
- code = route_method == 'POST' ? 201 : 200
40
-
41
- "+ Response #{code} (application/json)"
42
- end
43
-
44
38
  def list?
45
39
  %w(GET POST).include?(route_method) && !route_path.include?(':id')
46
40
  end
@@ -18,7 +18,7 @@ module GrapeMarkdown
18
18
 
19
19
  hash = Hash[array.compact]
20
20
 
21
- hash = hash.reverse_merge(id: Configuration.generate_id) if id
21
+ hash = hash.reverse_merge('id' => Configuration.generate_id) if id
22
22
  hash = { root => hash } if Configuration.include_root
23
23
 
24
24
  hash
@@ -1,3 +1,3 @@
1
1
  module GrapeMarkdown
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2014-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape