roqua-rom-api 0.1.10 → 0.1.11

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: 5a95d8bfee28a8a954ee62dc31b632b5516ef7e4
4
- data.tar.gz: 0b53e11f04d56494713177e82b0c636744df3262
3
+ metadata.gz: 2c0f791ffb54619a1c58c609cdba40d5bd3d7398
4
+ data.tar.gz: e33f8f99892cbda235533616f39f2fb79ac08bbf
5
5
  SHA512:
6
- metadata.gz: 6b201635dbb748824913bb8be850b0288a4b1b6adaeac8af49e252fbdf25b495f54fe7112db0cabc2b0a67ce354edf82db8bd8fd09875c45f1c1371e9d8fa982
7
- data.tar.gz: e6b8e553487c7ba0e70b1204c4618107c7e12246c90195b527876c3785a605654208030fa3ff643ec98764ced00c7e17139875da0b36413bf7df2b3ba3a705be
6
+ metadata.gz: e7751a11b6a9b5baa9a9cbeee9c7d5cf43d75447f43900654f3e77e573c531d6097117230e769011634c9dbef4ba217ea02cb9d6448d96d045740dc6a7cd7f91
7
+ data.tar.gz: 5c7cc83c86d705afe41537b6b32d5a758df1150e3d85bbfb0d04e77f1b2f0cb47f84d5baf3ce1832626fffcbbeb64d004835cdb35b0064a08457ac3fe1339e3b
data/ChangeLog.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### HEAD
2
+
3
+
4
+
5
+ ### 0.1.11 / 2014-10-20
6
+
7
+ * Add textvars parameter to protocol subscriptions
8
+
1
9
  ### 0.1.10 / 2014-10-07
2
10
 
3
11
  * Add flags parameter to protocol subscriptions
data/README.md CHANGED
@@ -99,6 +99,7 @@ To subscribe to a protocol run the following command:
99
99
  * `protocol_key:` [Required] - Key uniquely identifying the protocol of interest as specified in RoQua.
100
100
  * `start_at:` [Defaults to the present] - Timestamp specifying when the first measurement should be prepared.
101
101
  * `flags` - Boolean flags that are passed in when a questionnaire is being filled out.
102
+ * `textvars` - String variables that are passed in when a questionnaire is being filled out.
102
103
 
103
104
  When the subscription succeeds, the subscription object is available through the `#result` accessor:
104
105
 
@@ -6,11 +6,11 @@ nl:
6
6
  attributes:
7
7
  roqua/rom_api/start_protocol_subscription:
8
8
  attributes:
9
- protocol_key:
10
- protocol_not_found_by_key: met sleutel '%{value}' niet gevonden
9
+ base:
10
+ flag_does_not_exist: Een van de opgegeven vlaggen bestaat niet.
11
+ flag_value_invalid: Een van de opgegeven vlaggen bevat een waarde anders dan true, false of nil.
12
+
11
13
  attributes:
12
14
  roqua/rom_api/start_fill_out_session:
13
15
  questionnaire_keys: Vragenlijsten
14
16
  return_to: Return url
15
- roqua/rom_api/start_protocol_subscription:
16
- protocol_key: Protocol
@@ -11,6 +11,7 @@ module Roqua
11
11
  attribute :protocol_key, String
12
12
  attribute :protocol_name, String
13
13
  attribute :flags, Hash
14
+ attribute :textvars, Hash
14
15
  end
15
16
  end
16
17
  end
@@ -6,9 +6,10 @@ module Roqua
6
6
  string :protocol_key
7
7
  time :start_at, default: nil
8
8
  hash :flags, default: {}, strip: false
9
+ hash :textvars, default: {}, strip: false
9
10
 
10
11
  def execute
11
- options = {protocol_key: protocol_key, flags: flags}
12
+ options = {protocol_key: protocol_key, flags: flags, textvars: textvars}
12
13
  options[:start_at] = start_at.to_i if start_at
13
14
  validate_response_for do
14
15
  RomApi.basic_auth_session.post("/dossiers/#{dossier_id}/protocol_subscriptions", options)
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module RomApi
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
5
5
  end
@@ -1,7 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe StartProtocolSubscription do
4
- let(:options) { {dossier_id: 'some_dossier_id', protocol_key: 'some_key', flags: {some: 'flag'}} }
4
+ let(:options) { {dossier_id: 'some_dossier_id', protocol_key: 'some_key',
5
+ flags: {some_flag: true}, textvars: {some_var: 'string'}} }
5
6
  let(:session) { Sessions::BasicAuthSession.new }
6
7
  let(:response) { httparty_response({}) }
7
8
  before do
@@ -12,7 +13,8 @@ describe StartProtocolSubscription do
12
13
  it 'does a post to the rom protocol_subscription api' do
13
14
  expect(session).to receive(:post).with("/dossiers/#{options[:dossier_id]}/protocol_subscriptions",
14
15
  protocol_key: options[:protocol_key],
15
- flags: {some: 'flag'})
16
+ flags: {some_flag: true},
17
+ textvars: {some_var: 'string'})
16
18
  StartProtocolSubscription.run!(options)
17
19
  end
18
20
 
@@ -21,7 +23,8 @@ describe StartProtocolSubscription do
21
23
  expect(session).to receive(:post).with("/dossiers/#{options[:dossier_id]}/protocol_subscriptions",
22
24
  protocol_key: options[:protocol_key],
23
25
  start_at: start_at.to_i,
24
- flags: {some: 'flag'})
26
+ flags: {some_flag: true},
27
+ textvars: {some_var: 'string'})
25
28
  StartProtocolSubscription.run!(options.merge start_at: start_at)
26
29
  end
27
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-rom-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Esposito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
11
+ date: 2014-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty