cumulus_ruby 0.3.1 → 0.4.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
  SHA1:
3
- metadata.gz: 6e76acba60da1f86bc2213c5dc59af3167da29c4
4
- data.tar.gz: fcbb6cd5178ad9ad4db083c42eca8ef3a52e655d
3
+ metadata.gz: 13c5a898a0f7b4a09c2a77c71ef03adb4e3000a9
4
+ data.tar.gz: 982957361c3db3e038b4bd655c3391d4ee522a50
5
5
  SHA512:
6
- metadata.gz: b748ffe4d80664093ec24206313810705d385d73382b509370a5850df0d300848267805b2b18595ba60d06bf49932e71a8d34971a292f442734410ead0730c56
7
- data.tar.gz: 7e3939856ae16d1618774929e1c00689b189818ca395336e53e47e3ada2693c5c9f7e888d794a656ec660c6aaeb29040e02405b991e16947b3341ca21827baef
6
+ metadata.gz: 7650f8a144aae25c68df791b07c4df738aea79cc1519e501668ee20be274acbfd77a50d56070138f93c24675be8f91252075003e4822f42837b491cbd7a454bc
7
+ data.tar.gz: 8e05087426d965f150177f77a84351ef9f4c5dd49a4f0379b55aee0b86391402df823bc41fb0198ea46bf4bed5000e97d1b73c2b8a3d4ee731965a34b658c48e
data/README.md CHANGED
@@ -50,7 +50,7 @@ patient.update(first_name: 'Mike')
50
50
  Fetch a patient.
51
51
 
52
52
  ```ruby
53
- patient.fetch(other_patient.curp)
53
+ patient = Cumulus::Patient.fetch(client, patient.curp)
54
54
  ```
55
55
 
56
56
  Search patient info.
@@ -20,6 +20,10 @@ module Cumulus
20
20
 
21
21
  PARAMETERS.keys.each { |k| attr_accessor k }
22
22
 
23
+ def self.fetch(client, curp)
24
+ client.request(:get, "/pacientes/#{curp}")
25
+ end
26
+
23
27
  def initialize(client, parameters={})
24
28
  @client = client
25
29
  parameters_handler.set(parameters)
@@ -35,10 +39,6 @@ module Cumulus
35
39
  client.request(:put, "/pacientes/#{curp}", parameters_handler.for_request)
36
40
  end
37
41
 
38
- def fetch(curp)
39
- client.request(:get, "/pacientes/#{curp}")
40
- end
41
-
42
42
  def search(curp, query)
43
43
  client.request(:post, "/pacientes/#{curp}/busqueda", { query: query })
44
44
  end
@@ -1,3 +1,3 @@
1
1
  module Cumulus
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cumulus_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amed Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-14 00:00:00.000000000 Z
11
+ date: 2016-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler