ckm_client 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Build Status](https://travis-ci.org/skoba/ckm_client.png?branch=master)](https://travis-ci.org/skoba/ckm_client)[![Code Climate](https://codeclimate.com/github/skoba/ckm_client.png)](https://codeclimate.com/github/skoba/ckm_client)
1
2
  ckm_client
2
3
  ==========
3
4
 
@@ -6,7 +7,7 @@ A client module for the openEHR clincal knowledge manager
6
7
  Usage
7
8
  ----------
8
9
  Usage:
9
- ckmc <command> [<args>]
10
+ ckmc command args
10
11
 
11
12
  Commands supported:
12
13
  get Retrieve archetype by archetype_id
@@ -14,11 +15,6 @@ Commands supported:
14
15
  help show this help
15
16
 
16
17
 
17
- Commands supported:
18
- fetch Retrieve archetype by archetype_id
19
- search query archetype by keyword
20
- help show this help
21
-
22
18
  License
23
19
  ----------
24
20
  This product is under Apache 2.0 License
data/ckm_client.gemspec CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |gem|
23
23
  gem.require_paths = ["lib"]
24
24
 
25
25
  gem.add_dependency('thor')
26
- # gem.add_dependency('soap4r-ruby1.9')
27
26
  gem.add_dependency('savon')
28
27
 
29
28
  gem.add_development_dependency('rake')
@@ -36,7 +35,6 @@ Gem::Specification.new do |gem|
36
35
  gem.add_development_dependency('guard-cucumber')
37
36
  gem.add_development_dependency('listen', '0.6')
38
37
  gem.add_development_dependency('rb-kqueue')
39
- # gem.add_development_dependency('ammeter', '0.2.8')
40
38
  gem.add_development_dependency('libnotify')
41
39
  end
42
40
 
@@ -2,5 +2,6 @@ module OpenEHR
2
2
  module CKMClient
3
3
  require 'openehr/ckm_client/cli'
4
4
  require 'openehr/ckm_client/soap_interface'
5
+ require_relative 'ckm_client/version.rb'
5
6
  end
6
7
  end
@@ -5,6 +5,7 @@ module OpenEHR
5
5
  module CKMClient
6
6
  class CLI < Thor
7
7
  include Thor::Actions
8
+ class_option :verbose, type: :boolean, alias: '-v'
8
9
 
9
10
  desc 'get', 'Retrieve archetype by archetype_id'
10
11
  def get(archetype_id)
@@ -35,7 +36,7 @@ USAGE
35
36
  private
36
37
 
37
38
  def soap_interface
38
- OpenEHR::CKMClient::SOAPInterface.new
39
+ OpenEHR::CKMClient::SOAPInterface.new(options)
39
40
  end
40
41
  end
41
42
  end
@@ -6,8 +6,9 @@ module OpenEHR
6
6
  class SOAPInterface
7
7
  attr_reader :repository
8
8
 
9
- def initialize(repository=CKM_REPOSITORY)
10
- @repository = repository
9
+ def initialize(params)
10
+ @repository = params[:repository] || CKM_REPOSITORY
11
+ @log_level = params[:verbose] ? :debug : :fatal
11
12
  end
12
13
 
13
14
  def fetch(id)
@@ -20,13 +21,13 @@ module OpenEHR
20
21
 
21
22
  private
22
23
  def soap_driver(repository)
23
- SOAPDriver.new(repository)
24
+ SOAPDriver.new(repository, @log_level)
24
25
  end
25
26
  end
26
27
 
27
28
  class SOAPDriver
28
- def initialize(repository)
29
- @driver = Savon.client(wsdl: repository)
29
+ def initialize(repository, log_level)
30
+ @driver = Savon.client(wsdl: repository, log_level: log_level)
30
31
  end
31
32
 
32
33
  def get_adl_by_id(id)
@@ -1,5 +1,5 @@
1
1
  module OpenEHR
2
2
  module CKMClient
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ckm_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Shinji KOBAYASHI
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-08-15 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: thor
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: savon
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rake
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rspec
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: cucumber
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: guard
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: guard-spork
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: spork
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: guard-rspec
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - '>='
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: guard-cucumber
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - '>='
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - '>='
151
172
  - !ruby/object:Gem::Version
@@ -153,6 +174,7 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: listen
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - '='
158
180
  - !ruby/object:Gem::Version
@@ -160,6 +182,7 @@ dependencies:
160
182
  type: :development
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
187
  - - '='
165
188
  - !ruby/object:Gem::Version
@@ -167,6 +190,7 @@ dependencies:
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: rb-kqueue
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
195
  - - '>='
172
196
  - !ruby/object:Gem::Version
@@ -174,6 +198,7 @@ dependencies:
174
198
  type: :development
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
203
  - - '>='
179
204
  - !ruby/object:Gem::Version
@@ -181,6 +206,7 @@ dependencies:
181
206
  - !ruby/object:Gem::Dependency
182
207
  name: libnotify
183
208
  requirement: !ruby/object:Gem::Requirement
209
+ none: false
184
210
  requirements:
185
211
  - - '>='
186
212
  - !ruby/object:Gem::Version
@@ -188,6 +214,7 @@ dependencies:
188
214
  type: :development
189
215
  prerelease: false
190
216
  version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
191
218
  requirements:
192
219
  - - '>='
193
220
  - !ruby/object:Gem::Version
@@ -209,7 +236,6 @@ files:
209
236
  - LICENSE.txt
210
237
  - README.md
211
238
  - Rakefile
212
- - VERSION
213
239
  - bin/ckmc
214
240
  - ckm_client.gemspec
215
241
  - features/soap_interface.feature
@@ -226,26 +252,27 @@ files:
226
252
  homepage: http://openehr.jp
227
253
  licenses:
228
254
  - Apache 2.0
229
- metadata: {}
230
255
  post_install_message:
231
256
  rdoc_options: []
232
257
  require_paths:
233
258
  - lib
234
259
  required_ruby_version: !ruby/object:Gem::Requirement
260
+ none: false
235
261
  requirements:
236
262
  - - '>='
237
263
  - !ruby/object:Gem::Version
238
264
  version: '0'
239
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
+ none: false
240
267
  requirements:
241
268
  - - '>='
242
269
  - !ruby/object:Gem::Version
243
270
  version: '0'
244
271
  requirements: []
245
272
  rubyforge_project:
246
- rubygems_version: 2.0.3
273
+ rubygems_version: 1.8.25
247
274
  signing_key:
248
- specification_version: 4
275
+ specification_version: 3
249
276
  summary: CKM client and command line tool
250
277
  test_files: []
251
278
  has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 3b1a591516e198d945d891123141faa5f033b62f
4
- data.tar.gz: 832cfeaaf42403f3f630376812fe3b71ebea6494
5
- SHA512:
6
- metadata.gz: 8f5951bd54c9d79e43efe97b9d8325d75fa4669663580132fc763edd5d2f298334d3c0686341f135176d71b6651616639201d0fb95195b41750da1d4f825a768
7
- data.tar.gz: 661dcc458fdfa75f5d394a2e790264deceddefb893b14298ace4040ea6332648cfeac9a312ffe759086b0cc2481f2c0204c97909d1629cd33eb5bcd96f0f2dfd
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.1