Skip to content
This repository was archived by the owner on Nov 13, 2020. It is now read-only.

Commit 3d9ae87

Browse files
committed
Merge pull request #2 from hannahhoward/master
Make API work when used as a gem
2 parents 2309f41 + 0cb48b8 commit 3d9ae87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

json-api.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
1818
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1919
spec.require_paths = ["lib"]
2020

21-
spec.add_development_dependency "json-schema"
21+
spec.add_dependency "json-schema"
2222

2323
spec.add_development_dependency "bundler", "~> 1.3"
2424
spec.add_development_dependency "rake"

lib/json/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def self.parse(source, opts={})
1616

1717
def self.validate(source, opts={})
1818
source = JSON.parse(source) if source.kind_of?(String)
19-
JSON::Validator.validate!('lib/json/api/schema.json', source)
19+
JSON::Validator.validate!(File.expand_path('api/schema.json', File.dirname(__FILE__)), source)
2020
end
2121
end
2222
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy