sk_api_schema 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  See [commit messages](https://github.com/salesking/sk_api_schema/commits/) for details.
4
4
  Also signup to our [Developer Newsletter](http://www.salesking.eu/dev/newsletter/) to stay up-to-date !!!
5
5
 
6
+ ##2013-03
7
+
8
+ * add path method to schema: SK::Api::Schema.path
9
+
6
10
  ##2013-01
7
11
 
8
12
  Contacts/Client changes
@@ -35,9 +35,9 @@
35
35
  "type":"string"
36
36
  },
37
37
  "status":{
38
- "description": "Defaults to draft for new documents, unless otherwise stated. For new documents with status 'open' or 'closed' or doc where the status changes away from draft, following fields are set if empty: number(next in number schema), date(today), due date(due_days must be given). Only draft documents can be deleted.",
38
+ "description": "Defaults to draft for new documents, unless otherwise stated. For new documents with status 'open' or 'closed' or doc where the status changes away from draft, following fields are set if empty: number(next in number schema), date(today), due date(due_days must be given). Only draft documents can be deleted. Beware that the overdue-status is virtual as it depends on the real status=open and the document date.",
39
39
  "default":"draft",
40
- "enum":["draft","open","closed"],
40
+ "enum":["draft","open","closed","overdue"],
41
41
  "type":"string"
42
42
  },
43
43
  "external_ref":{
@@ -1,7 +1,7 @@
1
1
  module SK
2
2
  module Api
3
3
  class Schema
4
- VERSION='0.7.0'
4
+ VERSION='0.7.1'
5
5
  end
6
6
  end
7
7
  end
data/lib/sk_api_schema.rb CHANGED
@@ -9,6 +9,11 @@ module SK
9
9
 
10
10
  class << self
11
11
 
12
+ # Get the path to schema files. So it can be used f.ex. with
13
+ # gem json_schema_tools
14
+ def path
15
+ File.expand_path( '../json', File.dirname(__FILE__))
16
+ end
12
17
  # class var remembering already read-in schema's
13
18
  # {
14
19
  # 'v1.0'=>{
@@ -7,6 +7,10 @@ describe SK::Api::Schema do
7
7
  SK::Api::Schema.registry_reset
8
8
  end
9
9
 
10
+ it "should provide schema path" do
11
+ File.exists?(SK::Api::Schema.path).should be
12
+ end
13
+
10
14
  it "should read json schema file" do
11
15
  schema = SK::Api::Schema.read(:invoice, 'v1.0')
12
16
  schema[:title].should == 'invoice'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sk_api_schema
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Georg Leciejewski