json_schema_rails 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9995f6fcf61ca7baf31825818a209be42acc8e9e
4
- data.tar.gz: 5a00820d204b5034efbd8fbbf55ae08f87cbd70f
3
+ metadata.gz: 8555812280bf51321d1ceeb834194e518a5110ad
4
+ data.tar.gz: 1b72b9abbb83f4100357bf431b4f5c4fea396f93
5
5
  SHA512:
6
- metadata.gz: 5c75a0b8c7285302b9b567b9a687ec73bcef6d9679a06ff2995d93a8fc3455ce1c6f2ea0b43d7d15a7069f78515c4bfdfefe7f9d50cbee59a5a0a0ff53457b06
7
- data.tar.gz: 77289c86271e435e5cec7fecdb31a9342e2da82f852362190a2134a8f9407359604f6810fc5f407ee178593301559a2615b3af4f3245a0365fc463528a4afa5a
6
+ metadata.gz: 3f99d59ebe2901cab914b503445826427fcbc456b7d23a25ea7ffb606b3cd3d0ac7028cc1f5ca17154f63b9bc189b4212120cec6d1da1523619d73c0b92daaa1
7
+ data.tar.gz: 856c2b2a33faa7a4e0057cb203c48889bba9b1131e2e5a091ebc2d9676d699194781ccb1556d32a5990a4bbb3a3f94f99ff1e41fd62ddc9fe5146f0068dce3c2
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
4
+
5
+ install:
6
+ - "travis_retry bundle install"
7
+
8
+ script: "bundle exec rspec"
9
+
10
+ env:
11
+ - RAILS_VERSION=3.2.18
12
+ - RAILS_VERSION=4.1.1
data/Gemfile CHANGED
@@ -1,14 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Declare your gem's dependencies in json_schema_rails.gemspec.
4
- # Bundler will treat runtime dependencies like base dependencies, and
5
- # development dependencies will be added by default to the :development group.
6
3
  gemspec
7
4
 
8
- # Declare any dependencies that are still in development here instead of in
9
- # your gemspec. These might include edge Rails or gems from your path or
10
- # Git. Remember to move these dependencies to your gemspec before releasing
11
- # your gem to rubygems.org.
12
-
13
- # To use debugger
14
- # gem 'debugger'
5
+ if ENV['RAILS_VERSION']
6
+ gem "rails", "= #{ENV['RAILS_VERSION']}"
7
+ end
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 YOURNAME
1
+ Copyright 2014 Kota Saito
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # json_schema_rails
2
2
 
3
+ [![Build Status](https://travis-ci.org/kotas/json_schema_rails.svg?branch=master)](https://travis-ci.org/kotas/json_schema_rails) [![Code Climate](https://codeclimate.com/github/kotas/json_schema_rails.png)](https://codeclimate.com/github/kotas/json_schema_rails)
4
+
3
5
  [JSON Schema v4](http://json-schema.org/) validator and generator for Rails 3+
4
6
 
5
7
  ## Installation
@@ -2,18 +2,21 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#"
3
3
  title: <%= schema_title %>
4
4
  type: object
5
+ required:
6
+ - <%= file_name %>
5
7
  properties:
6
8
  <%= file_name %>:
7
9
  type: object
10
+ additionalProperties: false
8
11
  <%- if parameters.empty? -%>
9
- required:
10
- # - param1
11
- # - param2
12
- properties:
13
- # param1:
14
- # type: string
15
- # param2:
16
- # type: string
12
+ # required:
13
+ # - param1
14
+ # - param2
15
+ # properties:
16
+ # param1:
17
+ # type: string
18
+ # param2:
19
+ # type: string
17
20
  <%- else -%>
18
21
  required:
19
22
  <%- parameters.each do |param| -%>
@@ -2,6 +2,17 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#"
3
3
  title: <%= schema_title %>
4
4
  type: object
5
+ required:
6
+ - <%= model_name %>
5
7
  properties:
6
8
  <%= model_name %>:
7
9
  type: object
10
+ additionalProperties: false
11
+ # required:
12
+ # - param1
13
+ # - param2
14
+ # properties:
15
+ # param1:
16
+ # type: string
17
+ # param2:
18
+ # type: string
@@ -1,3 +1,3 @@
1
1
  module JsonSchemaRails
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schema_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kota Saito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-20 00:00:00.000000000 Z
11
+ date: 2014-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -170,6 +170,7 @@ files:
170
170
  - ".editorconfig"
171
171
  - ".gitignore"
172
172
  - ".rspec"
173
+ - ".travis.yml"
173
174
  - Gemfile
174
175
  - Guardfile
175
176
  - MIT-LICENSE