haveapi 0.8.0 → 0.9.0

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: 0a2561065ed9bd8e8a053e8efa3debcc9629ce6d
4
- data.tar.gz: eaf9113c05194d96329c23a40953bee900757110
3
+ metadata.gz: db77445e2eddd438c74241352278d80104186175
4
+ data.tar.gz: c19f5d3ec08d9a241232ea9778e8fb1a9103167c
5
5
  SHA512:
6
- metadata.gz: 3d04c0295dd93b9b7c4f7f094106c087a83a5e734c425e50c33f8d1bb03e4e9dce4eb8d9995760e6755b8177f62a63af3a96be362e7ab80f6db67c4606249815
7
- data.tar.gz: da12b6b30fb5978e2e0627c0ffbc2ce7d53395a665d7d23008f20459a5d1342db5643f0342857a21c56c4e9f2e561a89c990313d1261ad7ca9d0894aa3e02a7a
6
+ metadata.gz: db0696b8685662cf19777daeb08e157b24145b03b2bdbb3e1f63b17356a1f2b165b4b0c3fa3851255755069cb3f0f378e218a3bfa10ce1cb813bbd9d3ec085df
7
+ data.tar.gz: 4e3b3ce8950f3cc0209234dd100ac4cc45253aa8ad464d4577c2eaa96a8abd81250ea3321bf167378b3bb5431c5d07ee5813307d783e3fc1d14d9c6bd72797e9
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ * Sat Apr 22 2017 - version 0.9.0
2
+ - Optionally forbid loading parameter validators from model
3
+
1
4
  * Fri Feb 10 2017 - version 0.8.0
2
5
  - Protocol version 1.2
3
6
  - Server.base_url: support for proxied https
data/haveapi.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'haveapi/version'
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'haveapi'
7
7
  s.version = HaveAPI::VERSION
8
- s.date = '2017-02-10'
8
+ s.date = '2017-04-22'
9
9
  s.summary =
10
10
  s.description = 'Framework for creating self-describing APIs'
11
11
  s.authors = 'Jakub Skokan'
@@ -24,6 +24,6 @@ Gem::Specification.new do |s|
24
24
  s.add_runtime_dependency 'rake'
25
25
  s.add_runtime_dependency 'github-markdown', '~> 0.6.9'
26
26
  s.add_runtime_dependency 'nesty', '~> 1.0.2'
27
- s.add_runtime_dependency 'haveapi-client', '~> 0.8.0'
27
+ s.add_runtime_dependency 'haveapi-client', '~> 0.9.0'
28
28
  s.add_runtime_dependency 'mail'
29
29
  end
@@ -388,7 +388,7 @@ END
388
388
  next unless p.is_a?(::HaveAPI::Parameters::Typed)
389
389
 
390
390
  if p.db_name == param
391
- p.add_validator(key, opts)
391
+ p.add_validator(key, opts) if p.load_validators?
392
392
  break
393
393
  end
394
394
  end
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  module HaveAPI::Parameters
4
4
  class Typed
5
- ATTRIBUTES = %i(label desc type db_name default fill clean protected)
5
+ ATTRIBUTES = %i(label desc type db_name default fill clean protected load_validators)
6
6
 
7
7
  attr_reader :name, :label, :desc, :type, :default
8
8
 
@@ -40,6 +40,10 @@ module HaveAPI::Parameters
40
40
  @fill
41
41
  end
42
42
 
43
+ def load_validators?
44
+ @load_validators.nil? || @load_validators
45
+ end
46
+
43
47
  def describe(context)
44
48
  {
45
49
  required: required?,
@@ -1,4 +1,4 @@
1
1
  module HaveAPI
2
2
  PROTOCOL_VERSION = '1.2'
3
- VERSION = '0.8.0'
3
+ VERSION = '0.9.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haveapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2017-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.8.0
145
+ version: 0.9.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.8.0
152
+ version: 0.9.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: mail
155
155
  requirement: !ruby/object:Gem::Requirement