roqua-core-api 0.4.0 → 0.5.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
  SHA256:
3
- metadata.gz: 1d24e263c105794df4c647f23f282af5df4cd536397c2219c3a01836032a7206
4
- data.tar.gz: d3c11d3f561a874b7a209a4dadb69c34a515148c5db3941478ffa854acdbbd13
3
+ metadata.gz: 30f8c823e4ff8e1a50c7b299b99fd9b61a250642253e7e86b6b1b5243843917b
4
+ data.tar.gz: e579c453635e8a91d55b49c0ec9c7bad4f6e941718e243928a9a862036ee9cce
5
5
  SHA512:
6
- metadata.gz: 8e23edc5bcbfe448719868c2a47f92e45de88b14c0e1caa2043aec22cb9191a40c5995e5b80b1b1fc58318eab3d5c97e9b6726d8dd4461e53ee75ade548cb5c7
7
- data.tar.gz: d0c3056bf8de5c17febb92df1e8ffc8539dfb57cc4a5ae80bc0c7fdcaf3535fc302420450e1c8af64df42d18eb168df1b4aea27a0a7abc93b77ff04e4dc0ad00
6
+ metadata.gz: ea8e37b35220405c19a1dbf95d9dc3a0a6373c35c765207387cb13b3feb7513b2a5b2c0996099d0db4d618aecd19800c905ae9479455bfcd0c26d6d0f655a032
7
+ data.tar.gz: 152e5994dd65d27b81f4ee04e8cee2cda0140693c0f64f71174121b1e19b800ab47fa2223bf1c682df011f35d83c9da39bf342b4f043ee9277a5459f22cb0321
data/ChangeLog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.5.0
2
+
3
+ require ruby 2.7
4
+ loosen httparty gem requirement
5
+
1
6
  ### 0.4.0
2
7
 
3
8
  * remove oauth_session
@@ -1,2 +1,2 @@
1
- require ::File.expand_path('../roqua/core_api', __FILE__)
2
- require ::File.expand_path('../i18n/core_api_i18n', __FILE__)
1
+ require ::File.expand_path('roqua/core_api', __dir__)
2
+ require ::File.expand_path('i18n/core_api_i18n', __dir__)
@@ -7,16 +7,16 @@ require 'roqua/core_api/sessions/hmac_auth_session'
7
7
 
8
8
  module Roqua
9
9
  module CoreApi
10
- def self.token_session(*arguments, &block)
11
- Sessions::TokenSession.new(*arguments, &block)
10
+ def self.token_session(...)
11
+ Sessions::TokenSession.new(...)
12
12
  end
13
13
 
14
- def self.basic_auth_session(*arguments, &block)
15
- Sessions::BasicAuthSession.new(*arguments, &block)
14
+ def self.basic_auth_session(...)
15
+ Sessions::BasicAuthSession.new(...)
16
16
  end
17
17
 
18
- def self.hmac_auth_request(*arguments)
19
- Sessions::HmacAuthRequest(*arguments)
18
+ def self.hmac_auth_request(...)
19
+ Sessions::HmacAuthRequest(...)
20
20
  end
21
21
  end
22
22
  end
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module CoreApi
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  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.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-03 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.0
33
+ version: '0.14'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.14.0
40
+ version: '0.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: virtus
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '10.0'
103
+ version: '13.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '10.0'
110
+ version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -156,18 +156,10 @@ executables: []
156
156
  extensions: []
157
157
  extra_rdoc_files: []
158
158
  files:
159
- - ".document"
160
- - ".gitignore"
161
- - ".rspec"
162
- - ".yardopts"
163
159
  - ChangeLog.md
164
- - Gemfile
165
- - Guardfile
166
160
  - LICENSE.txt
167
161
  - README.md
168
- - Rakefile
169
162
  - config/locales/validation_errors.yml
170
- - core_api.gemspec
171
163
  - lib/i18n/core_api_i18n.rb
172
164
  - lib/roqua-core-api.rb
173
165
  - lib/roqua/core_api.rb
@@ -205,11 +197,6 @@ files:
205
197
  - lib/roqua/core_api/update_dossier.rb
206
198
  - lib/roqua/core_api/update_person.rb
207
199
  - lib/roqua/core_api/version.rb
208
- - spec/core_api_spec.rb
209
- - spec/fabricators/auth_session_fabricator.rb
210
- - spec/fabricators/basic_auth_session_fabricator.rb
211
- - spec/fabricators/dossier_fabricator.rb
212
- - spec/fabricators/person_fabricator.rb
213
200
  - spec/lib/roqua/core_api/create_dossier_group_spec.rb
214
201
  - spec/lib/roqua/core_api/create_dossier_spec.rb
215
202
  - spec/lib/roqua/core_api/dossiers_spec.rb
@@ -223,13 +210,11 @@ files:
223
210
  - spec/lib/roqua/core_api/sessions/basic_auth_session_spec.rb
224
211
  - spec/lib/roqua/core_api/sessions/token_session_spec.rb
225
212
  - spec/lib/roqua/core_api/update_dossier_spec.rb
226
- - spec/spec_helper.rb
227
- - spec/support/httpparty_helpers.rb
228
213
  homepage: https://github.com/roqua/core/blob/master/core_api/README.markdown
229
214
  licenses:
230
215
  - MIT
231
216
  metadata: {}
232
- post_install_message:
217
+ post_install_message:
233
218
  rdoc_options: []
234
219
  require_paths:
235
220
  - lib
@@ -237,35 +222,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
222
  requirements:
238
223
  - - ">="
239
224
  - !ruby/object:Gem::Version
240
- version: '0'
225
+ version: '2.7'
241
226
  required_rubygems_version: !ruby/object:Gem::Requirement
242
227
  requirements:
243
228
  - - ">="
244
229
  - !ruby/object:Gem::Version
245
230
  version: '0'
246
231
  requirements: []
247
- rubygems_version: 3.0.3
248
- signing_key:
232
+ rubygems_version: 3.1.4
233
+ signing_key:
249
234
  specification_version: 4
250
235
  summary: API wrapper gem around Core's API
251
- test_files:
252
- - spec/core_api_spec.rb
253
- - spec/fabricators/auth_session_fabricator.rb
254
- - spec/fabricators/basic_auth_session_fabricator.rb
255
- - spec/fabricators/dossier_fabricator.rb
256
- - spec/fabricators/person_fabricator.rb
257
- - spec/lib/roqua/core_api/create_dossier_group_spec.rb
258
- - spec/lib/roqua/core_api/create_dossier_spec.rb
259
- - spec/lib/roqua/core_api/dossiers_spec.rb
260
- - spec/lib/roqua/core_api/models/active_virtus_spec.rb
261
- - spec/lib/roqua/core_api/models/dossier_spec.rb
262
- - spec/lib/roqua/core_api/models/person_spec.rb
263
- - spec/lib/roqua/core_api/send_email_to_spec.rb
264
- - spec/lib/roqua/core_api/send_invite_email_spec.rb
265
- - spec/lib/roqua/core_api/send_text_message_to_spec.rb
266
- - spec/lib/roqua/core_api/sessions/auth_session_spec.rb
267
- - spec/lib/roqua/core_api/sessions/basic_auth_session_spec.rb
268
- - spec/lib/roqua/core_api/sessions/token_session_spec.rb
269
- - spec/lib/roqua/core_api/update_dossier_spec.rb
270
- - spec/spec_helper.rb
271
- - spec/support/httpparty_helpers.rb
236
+ test_files: []
data/.document DELETED
@@ -1,3 +0,0 @@
1
- -
2
- ChangeLog.md
3
- LICENSE.txt
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- Gemfile.lock
2
- doc/
3
- pkg/
4
- vendor/cache/*.gem
5
- .yardoc
6
- .bundle/*
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --colour --format documentation
data/.yardopts DELETED
@@ -1,2 +0,0 @@
1
- --markup markdown --title "core_api Documentation" --protected
2
- - 'config/locales/validation_errors.yml'
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
- gem 'httparty', '= 0.14.0'
5
- gem 'omniauth-oauth2', '= 1.1.0'
6
- gem 'virtus', '= 1.0.0'
7
-
8
- group :development do
9
- gem 'kramdown'
10
- end
11
-
12
- group :test do
13
- gem 'guard', '~> 2.6'
14
- gem 'guard-rspec', '~> 4.2'
15
- gem 'fuubar', '~> 2.0'
16
- end
data/Guardfile DELETED
@@ -1,4 +0,0 @@
1
- guard :rspec, failed_mode: 'none', all_after_pass: false, all_on_start: false, cmd: 'bundle exec rspec --format Fuubar --colour' do
2
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
- end
data/Rakefile DELETED
@@ -1,41 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
-
5
- begin
6
- require 'bundler'
7
- rescue LoadError => e
8
- warn e.message
9
- warn "Run `gem install bundler` to install Bundler."
10
- exit(-1)
11
- end
12
-
13
- begin
14
- Bundler.setup(:development)
15
- rescue Bundler::BundlerError => e
16
- warn e.message
17
- warn "Run `bundle install` to install missing gems."
18
- exit e.status_code
19
- end
20
-
21
- require 'rake'
22
-
23
- require 'rspec/core/rake_task'
24
- RSpec::Core::RakeTask.new
25
-
26
- task test: :spec
27
- task default: :spec
28
-
29
- # run bundle in parent dir to update Gemfile.lock
30
- task :release do
31
- Bundler.with_clean_env do
32
- `bundle --gemfile=../Gemfile`
33
- end
34
- `git add ../Gemfile.lock && git commit -m 'update roqua-core-api in Gemfile.lock'`
35
- end
36
-
37
- require "bundler/gem_tasks"
38
-
39
- require 'yard'
40
- YARD::Rake::YardocTask.new
41
- task doc: :yard
data/core_api.gemspec DELETED
@@ -1,31 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- require File.expand_path('../lib/roqua/core_api/version', __FILE__)
4
-
5
- Gem::Specification.new do |gem|
6
- gem.name = "roqua-core-api"
7
- gem.version = Roqua::CoreApi::VERSION
8
- gem.summary = %q{API wrapper gem around Core's API}
9
- gem.description = %q{Provides authenticated access to Core}
10
- gem.license = "MIT"
11
- gem.authors = ["Marten Veldthuis"]
12
- gem.email = "marten@veldthuis.com"
13
- gem.homepage = "https://github.com/roqua/core/blob/master/core_api/README.markdown"
14
-
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ['lib']
19
-
20
- gem.add_dependency 'active_interaction', '~> 3.2'
21
- gem.add_dependency 'httparty', '~> 0.14.0'
22
- gem.add_dependency 'virtus', '~> 1.0'
23
-
24
- gem.add_development_dependency 'bundler'
25
- gem.add_development_dependency 'dotenv', '~> 0.10'
26
- gem.add_development_dependency 'fabrication', '~> 2.9'
27
- gem.add_development_dependency 'rake', '~> 10.0'
28
- gem.add_development_dependency 'rspec', '~> 3.0'
29
- gem.add_development_dependency 'webmock', '~> 1.17'
30
- gem.add_development_dependency 'yard', '~> 0.8'
31
- end
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Roqua::CoreApi do
4
- it "should have a VERSION constant" do
5
- expect(subject.const_get('VERSION')).to_not be_empty
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- Fabricator(:roqua_core_api_auth_session, from: Roqua::CoreApi::Sessions::AuthSession) do
2
- initialize_with { Roqua::CoreApi::Sessions::AuthSession.new core_site: 'http://core.roqua.eu' }
3
- end
4
-
5
- Fabricator(:roqua_core_api_token_session, from: Roqua::CoreApi::Sessions::TokenSession) do
6
- initialize_with do
7
- Roqua::CoreApi::Sessions::TokenSession.new access_token: 'some_access_token', core_site: 'http://core.roqua.eu'
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- Fabricator(:roqua_core_api_basic_auth_session, from: Roqua::CoreApi::Sessions::BasicAuthSession) do
2
- initialize_with do
3
- Roqua::CoreApi::Sessions::BasicAuthSession.new username: 'some_username',
4
- password: 'some_password',
5
- core_site: 'http://core.roqua.eu'
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- Fabricator(:roqua_core_api_dossier, from: Roqua::CoreApi::Models::Dossier) do
2
- initialize_with { Roqua::CoreApi::Models::Dossier.new }
3
- id 'dossier-id'
4
- external_identifier 'external-dossier-identifier'
5
- end
@@ -1,7 +0,0 @@
1
- Fabricator(:roqua_core_api_person, from: Roqua::CoreApi::Models::Dossier) do
2
- initialize_with { Roqua::CoreApi::Models::Person.new }
3
- firstname 'John'
4
- lastname 'Doe'
5
- role 'patient'
6
- email { sequence(:email) { |i| "test#{i}@roqua.nl" } }
7
- end
data/spec/spec_helper.rb DELETED
@@ -1,22 +0,0 @@
1
- require 'rspec'
2
- require 'fabrication'
3
-
4
- require 'dotenv'
5
- Dotenv.load(File.expand_path("../.env", File.dirname(__dir__)))
6
-
7
- require 'roqua-core-api'
8
- include Roqua::CoreApi
9
- include Roqua::CoreApi::Sessions
10
- include Roqua::CoreApi::Models
11
-
12
- # It seems sometimes the Rails constant is defined and Rails.root is injected (which is nil at that moment) resulting
13
- # in missing fabricators. Let's just set the path to the current directory to fix this. See:
14
- # https://github.com/paulelliott/fabrication/blob/42db96f11cbf80d22bd9c87dbf6740894c2b2bdc/lib/fabrication/config.rb#L42
15
- Fabrication::Config.path_prefix = ['.']
16
- Fabrication.manager.load_definitions
17
-
18
- Dir[File.join(File.expand_path(__dir__), 'support', '*.rb')].each { |f| require f }
19
-
20
- I18n.load_path << Dir[File.join(File.expand_path(__dir__), '..', 'config', 'locales', '*.yml')]
21
- I18n.enforce_available_locales = false
22
- I18n.default_locale = :nl
@@ -1,5 +0,0 @@
1
- def httparty_response(response_data, code = 200)
2
- allow(response_data).to receive(:code).and_return code
3
- allow(response_data).to receive(:parsed_response).and_return response_data
4
- response_data
5
- end