roqua-rom-api 0.1.3 → 0.1.4

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: 598043882196dc332c26289539efbe59b62a23d5
4
- data.tar.gz: 651fe8be6b0eec2c07a24ff44b4de466b4bab0c8
3
+ metadata.gz: d487e0e9755a189bd7deb54b98c048ae6a57bae6
4
+ data.tar.gz: 49e4bade533834bfb827a51a0a282e3569e99892
5
5
  SHA512:
6
- metadata.gz: c374e705c1cfd214eead8cdfbdf6345866461e4c56edf86824dbc31be579af8c6f603a7fe7547bacc25c031ec1c4b8f1579d534cbc51aaf720151b6435243292
7
- data.tar.gz: c4aba35175fc87b9beaea8ed1bf61f51620e7652f3449a928e269db3cf2291eb8cf43d457eb79e2de6b1f48e816822a5da9e2956dad7bd12f9646e402156cb9e
6
+ metadata.gz: cbe001619d66bcbca0ac093b80a1985879f73c0344127e3125e59d8523aa37fe65b11f903968873ce8b5696871e105e0c09f4fe7f29cc98be4a9591e71c2df47
7
+ data.tar.gz: 5a640575f62476a13e25a7d460772b1941538f24420df25f7ac316b215af3f6c7bae3fd63c44559d92526e2d89d761f3480775377bdb7ebe01d692ba99d58752
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.1.4 / 2014-05-26
2
+
3
+ * add answers and outcome to rom responses api
4
+
1
5
  ### 0.1.3 / 2014-05-20
2
6
 
3
7
  * remove next_run_time from protocol_subscriptions api
data/Rakefile CHANGED
@@ -36,4 +36,4 @@ require "bundler/gem_tasks"
36
36
 
37
37
  require 'yard'
38
38
  YARD::Rake::YardocTask.new
39
- task doc: :yard
39
+ task doc: :yard
@@ -14,6 +14,8 @@ module Roqua
14
14
  attribute :completer_type, String
15
15
  attribute :completed_at, DateTime
16
16
  attribute :status, String
17
+ attribute :values, Hash
18
+ attribute :outcome, Hash
17
19
 
18
20
  def name
19
21
  ActiveSupport::Deprecation.warn(
@@ -7,4 +7,4 @@ module Roqua
7
7
  Sessions::BasicAuthSession.new(*arguments, &block)
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -15,4 +15,4 @@ module Roqua
15
15
  end
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -12,4 +12,4 @@ module Roqua
12
12
  end
13
13
  end
14
14
  end
15
- end
15
+ end
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module RomApi
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
@@ -4,4 +4,4 @@ Fabricator(:basic_auth_session, from: Roqua::RomApi::Sessions::BasicAuthSession)
4
4
  password: 'some_password',
5
5
  rom_host: 'http://roqua.dev'
6
6
  end
7
- end
7
+ end
@@ -4,7 +4,6 @@ describe ProtocolSubscription do
4
4
  let(:response_body) do
5
5
  {'id' => 1,
6
6
  'daily_start_time' => 300,
7
- 'next_run_time' => nil,
8
7
  'start_at' => "2014-04-10T14:00:28+02:00",
9
8
  'stop_at' => nil,
10
9
  'state' => "a",
@@ -16,7 +15,6 @@ describe ProtocolSubscription do
16
15
  protocol_subscription = ProtocolSubscription.new response_body
17
16
  expect(protocol_subscription.id).to eq 1
18
17
  expect(protocol_subscription.daily_start_time).to eq 300
19
- expect(protocol_subscription.next_run_time).to eq nil
20
18
  expect(protocol_subscription.start_at).to eq DateTime.parse("2014-04-10T14:00:28+02:00")
21
19
  expect(protocol_subscription.stop_at).to eq nil
22
20
  expect(protocol_subscription.protocol_key).to eq 'pkey'
@@ -9,7 +9,9 @@ describe Response do
9
9
  'completer_type' => 'patient',
10
10
  'completed_at' => nil,
11
11
  'status' => 'open',
12
- 'completing_url' => 'http://roqua.dev/client/session/new?token=26aee9a4'}
12
+ 'completing_url' => 'http://roqua.dev/client/session/new?token=26aee9a4',
13
+ 'values' => {'some' => 'values'},
14
+ 'outcome' => {'some' => 'outcome'}}
13
15
  end
14
16
 
15
17
  it 'assigns fields to attr_accessors' do
@@ -22,5 +24,7 @@ describe Response do
22
24
  expect(response.completer_type).to eq 'patient'
23
25
  expect(response.status).to eq 'open'
24
26
  expect(response.completing_url).to eq 'http://roqua.dev/client/session/new?token=26aee9a4'
27
+ expect(response.values).to eq('some' => 'values')
28
+ expect(response.outcome).to eq('some' => 'outcome')
25
29
  end
26
30
  end
@@ -26,4 +26,4 @@ describe StartProtocolSubscription do
26
26
  it 'returns the response' do
27
27
  expect(StartProtocolSubscription.run!(options)).to eq(response)
28
28
  end
29
- end
29
+ end
data/spec/spec_helper.rb CHANGED
@@ -3,4 +3,4 @@ require 'fabrication'
3
3
  require 'roqua-rom-api'
4
4
  include Roqua::RomApi
5
5
  include Roqua::RomApi::Sessions
6
- include Roqua::RomApi::Models
6
+ include Roqua::RomApi::Models
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.3
4
+ version: 0.1.4
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-05-20 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty