roqua-core-api 0.2.4 → 0.3.0

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: 9a4c4f6f88862ed1b7cd926af421153f10bf8199
4
- data.tar.gz: d0f78eb13ea7b153bf388b1512225a62c571530b
3
+ metadata.gz: a3270b586349f9e29771af5d0f53e55ef4167f71
4
+ data.tar.gz: aa83a7b5908cb17c6043edbb3441d02ab595f427
5
5
  SHA512:
6
- metadata.gz: 754c820ef19069a062e6470e78175e93b157d6766f380b33c87c80f99cbab02b48cb1c384c8a0b2dd66b55af24e2f899229b4dccf5ce406ea4b2653452042f6d
7
- data.tar.gz: 916e9fe188cbd2abd3d966592c85c6ceb6984a6e04241028ea1da455701dec9529cf520572abc8d2e08d93485d5515153fb9898b9e97e1285e237814e460d15a
6
+ metadata.gz: 3286272447063c7e3f31e488655a096814611c35b3ed9d90f748d51c249261de00292b6d7d64ee7f893ea0b7a5d7e8ab44ada55af9e5650c89a7f22c32e79533
7
+ data.tar.gz: f3c983eece1a79fd6de9cc353fc8d85313098474309bd2c3c240006d9f0fd96fa0022605368f66011efa32389540ae3516751598f8b245cbfa0ee3ca4a841a2a
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.3.0
2
+
3
+ * BACKWARD INCOMPATIBLE: SendTextMessage now expects a session instead of username/password
4
+
1
5
  ### 0.2.4
2
6
 
3
7
  * Add SendTextMessage
@@ -2,21 +2,19 @@ module Roqua
2
2
  module CoreApi
3
3
  # @api private
4
4
  class SendTextMessageTo < ActiveInteraction::Base
5
+ object :session, class: Sessions::AuthSession
5
6
  string :person_id
6
7
  hash :attributes do
7
8
  string :body
8
9
  string :reference, default: nil
9
10
  end
10
- string :username, default: ENV['CORE_BASICAUTH_ID']
11
- string :password, default: ENV['CORE_BASICAUTH_SECRET']
12
11
 
13
12
  # Possible variables in the body are:
14
13
  # %firstname%,
15
14
  # %lastname%,
16
15
  # %initials%
17
16
  def execute
18
- CoreApi.basic_auth_session(username: username, password: password)
19
- .post "/text_messages", text_message: attributes, person_id: person_id
17
+ session.post "/text_messages", text_message: attributes, person_id: person_id
20
18
  end
21
19
  end
22
20
  end
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module CoreApi
3
- VERSION = '0.2.4'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -9,6 +9,6 @@ describe SendTextMessageTo do
9
9
  reference: 'some_reference'}
10
10
  expect(session).to receive(:post).with '/text_messages', person_id: 'some_person_id',
11
11
  text_message: text_message_attributes
12
- SendTextMessageTo.run!(person_id: 'some_person_id', attributes: text_message_attributes)
12
+ SendTextMessageTo.run!(session: session, person_id: 'some_person_id', attributes: text_message_attributes)
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-core-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-22 00:00:00.000000000 Z
11
+ date: 2016-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  version: '0'
264
264
  requirements: []
265
265
  rubyforge_project:
266
- rubygems_version: 2.5.1
266
+ rubygems_version: 2.6.6
267
267
  signing_key:
268
268
  specification_version: 4
269
269
  summary: API wrapper gem around Core's API