Skip to content

Commit 127632a

Browse files
committed
change: name style.
1 parent 6c83cb1 commit 127632a

File tree

11 files changed

+46
-107
lines changed

11 files changed

+46
-107
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ help:
1717
.PHONY: dev
1818
dev:
1919
ifeq ($(UNAME),Darwin)
20-
luarocks install --lua-dir=$(LUA_JIT_DIR) ljsonschema-master-0.rockspec --only-deps
20+
luarocks install --lua-dir=$(LUA_JIT_DIR) rockspec/jsonschema-master-0.rockspec --only-deps
2121
else ifneq ($(LUAROCKS_VER),'luarocks 3.')
22-
luarocks install ljsonschema-master-0.rockspec --only-deps
22+
luarocks install jsonschema-master-0.rockspec --only-deps
2323
else
24-
luarocks install --lua-dir=/usr/local/openresty/luajit ljsonschema-master-0.rockspec --only-deps
24+
luarocks install --lua-dir=/usr/local/openresty/luajit jsonschema-master-0.rockspec --only-deps
2525
endif
2626

2727

2828
### test: Run the test case
2929
test:
30-
LUA_PATH="./?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft4.lua
31-
LUA_PATH="./?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft6.lua
32-
LUA_PATH="./?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft7.lua
30+
LUA_PATH="./lib/?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft4.lua
31+
LUA_PATH="./lib/?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft6.lua
32+
LUA_PATH="./lib/?.lua;$(LUA_PATH)" LUA_CPATH="$(LUA_CPATH)" resty t/draft7.lua
3333

3434

3535
### help: Show Makefile rules.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
lsjonschema: JSON schema validator
2-
==================================
1+
jsonschema: JSON schema validator
2+
===========================================
33

4-
This library provides a JSON schema draft 4, draft 6, draft 7 validator for Lua/LuaJIT base on OpenResty.
4+
This library provides a JSON schema draft 4, draft 6, draft 7 validator for Lua/LuaJIT.
55
Note that even though it uses the JSON Schema semantics, it is neither bound or limited
66
to JSON. It can be used to validate saner key/value data formats as well (Lua
77
tables, msgpack, bencode, ...).
@@ -18,7 +18,7 @@ This module is pure Lua/LuaJIT project, it support Lua 5.2, Lua 5.3, LuaJIT 2.1
1818

1919
The preferred way to install this library is to use Luarocks:
2020

21-
luarocks install lua-resty-jsonschema
21+
luarocks install jsonschema
2222

2323
Running the tests:
2424

@@ -39,7 +39,7 @@ Usage
3939
### Getting started
4040

4141
```lua
42-
local jsonschema = require 'resty.jsonschema'
42+
local jsonschema = require 'jsonschema'
4343

4444
-- Note: do cache the result of schema compilation as this is a quite
4545
-- expensive process

resty/jsonschema.lua renamed to lib/jsonschema.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local store = require 'resty.jsonschema.store'
1+
local store = require 'jsonschema.store'
22
local loadstring = loadstring
33
local tostring = tostring
44
local pairs = pairs
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package = "jsonschema"
2+
version = "master-0"
3+
source = {
4+
url = "git://github.com/iresty/jsonschema.git",
5+
branch = "master",
6+
}
7+
8+
description = {
9+
summary = "JSON Schema data validator",
10+
detailed = [[
11+
This module is data validator the implements JSON Schema draft 4.
12+
Given an JSON schema, it will generates a validator function that can be used
13+
to validate any kind of data (not limited to JSON).
14+
15+
Base on https://github.com/jdesgats/ljsonschema .
16+
]],
17+
homepage = "https://github.com/iresty/jsonschema",
18+
license = "MIT"
19+
}
20+
21+
dependencies = {
22+
"net-url",
23+
}
24+
25+
build = {
26+
type = "builtin",
27+
modules = {
28+
["jsonschema"] = "lib/jsonschema.lua",
29+
["jsonschema.store"] = "lib/jsonschema/store.lua",
30+
}
31+
}

rockspec/lua-resty-jsonschema-0.1-0.rockspec

Lines changed: 0 additions & 31 deletions
This file was deleted.

rockspec/lua-resty-jsonschema-0.2-0.rockspec

Lines changed: 0 additions & 31 deletions
This file was deleted.

rockspec/lua-resty-jsonschema-master-0.rockspec

Lines changed: 0 additions & 30 deletions
This file was deleted.

t/draft4.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
local json = require 'cjson'
44
local time = require 'posix.time'
5-
local jsonschema = require 'resty.jsonschema'
5+
local jsonschema = require 'jsonschema'
66

77
local clock_gettime = time.clock_gettime
88
local CLOCK_PROCESS_CPUTIME_ID = time.CLOCK_PROCESS_CPUTIME_ID

t/draft6.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
local json = require 'cjson'
44
local time = require 'posix.time'
5-
local jsonschema = require 'resty.jsonschema'
5+
local jsonschema = require 'jsonschema'
66

77
local clock_gettime = time.clock_gettime
88
local CLOCK_PROCESS_CPUTIME_ID = time.CLOCK_PROCESS_CPUTIME_ID

0 commit comments

Comments
 (0)