jdoc 0.0.4 → 0.0.5

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: 1e6ab788d64fd09d89645af3739586aa7d7c1e4a
4
- data.tar.gz: 314edf5ea027976c109b6308defbc5c60e775956
3
+ metadata.gz: 123bb745b74176f50d28727ac49d577c9a905360
4
+ data.tar.gz: 920d22e689edefcec4150268505e8ea8c6396771
5
5
  SHA512:
6
- metadata.gz: db73d88de36bc5639c4ff1494c19683decd3e7f60a4eec6ad50d84c15cad77b4fd516f86cb103cde5b7996fd3c40c3aefc0272e2097050d8a8779cccca28b7ef
7
- data.tar.gz: 2bc1fe9dba2f79f086c5e90aef13c9f9489c846b69deed9f02a42c60db21a98d43a228d0a3a945e4a9db06c5701659058b49a28a4df8594a71bfa4d813abe317
6
+ metadata.gz: 887e7113ba533a804ce16c512af98f176b2fb459e2968a45fddc4f99eaf666fd3f14d75e1fe42bfb0b925ec6024e5e4ed2fea293d0a26b23247e07efd645bd31
7
+ data.tar.gz: 4a2b82a99ccc84a9039875cbea22010a20f157e6aff7d65df70a847fa03a034b0c2327b4e2f1c3aa4296c5ef657bfd67a55a702b54f5f915f0057f694f465039
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.5
2
+ * Remove dependency on multi_json
3
+
1
4
  ## 0.0.4
2
5
  * Support whitespace and multiple templates in href
3
6
 
data/bin/jdoc CHANGED
@@ -13,7 +13,7 @@ when ".yml", ".yaml"
13
13
  schema = YAML.load_file(path)
14
14
  else
15
15
  str = File.read(path)
16
- schema = MultiJson.decode(str)
16
+ schema = JSON.parse(str)
17
17
  end
18
18
 
19
19
  puts Jdoc::Generator.call(schema)
data/jdoc.gemspec CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.add_dependency "erubis"
20
20
  spec.add_dependency "json_schema"
21
- spec.add_dependency "multi_json"
22
21
  spec.add_development_dependency "activesupport"
23
22
  spec.add_development_dependency "bundler", "~> 1.6"
24
23
  spec.add_development_dependency "pry"
data/lib/jdoc.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "cgi"
2
2
  require "erubis"
3
3
  require "json_schema"
4
- require "multi_json"
5
4
 
6
5
  require "jdoc/generator"
7
6
  require "jdoc/link"
data/lib/jdoc/link.rb CHANGED
@@ -64,7 +64,7 @@ module Jdoc
64
64
 
65
65
  # @return [String, nil] Example request body in JSON format
66
66
  def request_body
67
- MultiJson.encode(RequestGenerator.call(schema), pretty: true) + "\n"
67
+ JSON.pretty_generate(RequestGenerator.call(schema)) + "\n"
68
68
  end
69
69
 
70
70
  # @return [true, false] True if this endpoint must have request body
@@ -74,7 +74,7 @@ module Jdoc
74
74
 
75
75
  # @return [String] JSON response body generated from example properties
76
76
  def response_body
77
- MultiJson.encode(response_hash, pretty: true)
77
+ JSON.pretty_generate(response_hash)
78
78
  end
79
79
 
80
80
  # @return [Fixnum] Preferred respone status code for this endpoint
data/lib/jdoc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jdoc
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdoc
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
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2014-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: multi_json
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: activesupport
57
43
  requirement: !ruby/object:Gem::Requirement