roqua-rom-api 0.4.2 → 1.0.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: 535a4b60c45368785c54db8ea787cb7c55ae76ea
4
- data.tar.gz: 3136d9448c04008760acdb583e32a14664515d67
3
+ metadata.gz: 0f975026a540f11a37ec566c7ec81859e870f1e3
4
+ data.tar.gz: 7403f5aa50c0cdc469aa274e6b420da0b2b90e48
5
5
  SHA512:
6
- metadata.gz: 1b14d68dc7d170cf45fecbac5b6c2cee25fd476195734cdf9b44a3da5ff1fb14c15353278ea15e043df81d9a4cb8060e89937623baaddcf58b2f3ecb63402e25
7
- data.tar.gz: 1f88c54aacb92fb083e1dccd5e82deba0d534d6b95ad48fa4e9766c83745a854a3db98b871b33dcba8200eec47b79d10da834d2809c2361c694cd128934187ac
6
+ metadata.gz: 8c232bab60b97895f1bfb56dfe99a73d096e0d0ea90d85b29944a7aee033ab0c94c51366471bc88b4a5e2f42b02f0c9c0d33601988dff0936d97d7c811e7ab62
7
+ data.tar.gz: 350238ac0d444187c249025a858d3e831371e0e9f7aedb47dc2e65d9c5e75c6d39c4c68293c08d6400a488a4e0ab1e3a92de2ffd2bde6fa846818914f2bfafb9
data/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### HEAD
2
2
 
3
+ ### 1.0.0 / 2015-12-08
4
+
5
+ * Updated ActiveInteraction to version 2.1. AI 2 has various breaking changes, see http://taylor.fausak.me/2015/05/07/announcing-active-interaction-2/
6
+
3
7
  ### 0.4.2 / 2015-8-20
4
8
 
5
9
  * Add ability to use different basic_auth_sessions than the global one
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
  gem 'httparty', '= 0.12.0'
5
- gem 'active_interaction', '= 1.1.0'
5
+ gem 'active_interaction', '~> 2.1.0'
6
6
 
7
7
  group :test do
8
8
  gem 'guard-rspec', '~> 4.3'
@@ -11,6 +11,8 @@ module Roqua
11
11
  time :open_from, default: nil, allow_nil: true
12
12
  time :open_till, default: nil, allow_nil: true
13
13
 
14
+ validates :dossier_id, presence: { allow_blank: false }
15
+
14
16
  def execute
15
17
  validate_response_for do
16
18
  fill_out_request = {
@@ -2,9 +2,9 @@ module Roqua
2
2
  module RomApi
3
3
  # @api private
4
4
  class Endpoint < ActiveInteraction::Base
5
- model :basic_auth_session,
6
- default: -> { RomApi.basic_auth_session },
7
- class: Roqua::RomApi::Sessions::BasicAuthSession
5
+ object :basic_auth_session,
6
+ default: -> { RomApi.basic_auth_session },
7
+ class: Roqua::RomApi::Sessions::BasicAuthSession
8
8
 
9
9
  private
10
10
 
@@ -20,8 +20,10 @@ module Roqua
20
20
  end
21
21
  end
22
22
  end
23
+ nil
23
24
  elsif response.code == 422
24
25
  errors.add :base, 'Validations failed!'
26
+ nil
25
27
  else
26
28
  response_to_result response
27
29
  end
@@ -10,6 +10,7 @@ module Roqua
10
10
  string :stylesheet, default: nil
11
11
 
12
12
  validates :questionnaire_keys, presence: {unless: -> { response_ids.present? }}
13
+ validates :dossier_id, presence: {allow_blank: false}
13
14
 
14
15
  def execute
15
16
  validate_response_for do
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module RomApi
3
- VERSION = '0.4.2'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_dependency 'httparty', '~> 0.12.0'
20
- gem.add_dependency 'active_interaction', '~> 1.1'
20
+ gem.add_dependency 'active_interaction', '~> 2.1'
21
21
  gem.add_dependency 'virtus', '~> 1.0'
22
22
 
23
23
  gem.add_development_dependency 'bundler', '~> 1.6'
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Endpoint do
4
4
  class TestEndpoint < Endpoint
5
- model :response, class: RSpec::Mocks::Double
5
+ object :response, class: RSpec::Mocks::Double
6
6
 
7
7
  def execute
8
8
  validate_response_for do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-rom-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Esposito
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-08-21 00:00:00.000000000 Z
15
+ date: 2015-12-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: httparty
@@ -34,14 +34,14 @@ dependencies:
34
34
  requirements:
35
35
  - - "~>"
36
36
  - !ruby/object:Gem::Version
37
- version: '1.1'
37
+ version: '2.1'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
- version: '1.1'
44
+ version: '2.1'
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: virtus
47
47
  requirement: !ruby/object:Gem::Requirement