my_immune_test 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/my_immune_test.rb +24 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 09673f938adf14eaec2d37551699566017a0d273
4
+ data.tar.gz: e45a30b1b28e31f8066da03b17a536387a20b16e
5
+ SHA512:
6
+ metadata.gz: dc44a8b44ed1f011f9f800e90d83e20737a8ca3f86fccde5e7c19252c6f811457946ae6c77631c6f3e2ad1e6dccbeab38470b262c75143b1f3fdd44b33217b54
7
+ data.tar.gz: c8c9de2e4b0d5e44eafec2d77e2d723ff6f72489805ae9616ecc171b988a70e1b1acf68cbb5a43b44c11f5415e47468313e1516deda1470a213488a84cbffbbe
@@ -0,0 +1,24 @@
1
+ require 'rubygems'
2
+ require 'httparty'
3
+
4
+ class ImmuneTest
5
+ include HTTParty
6
+ base_uri 'http://immuneapi-cabledemo.rhcloud.com/'
7
+
8
+ def self.calling_api(person_id, state)
9
+ return get("/immunization_status?person_id=#{person_id}&state=#{state}")
10
+ end
11
+
12
+ def self.print_person(*args)
13
+ puts 'starting to get json object'
14
+ result = calling_api(*args)
15
+ case result.code
16
+ when 200
17
+ return result
18
+ when 404
19
+ return "Page not found!"
20
+ when 500...600
21
+ return "ERROR #{response.code}"
22
+ end
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my_immune_test
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Thrikal Samy.S
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The library calling api and return person information, immunization data
14
+ email:
15
+ - thrillsam@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/my_immune_test.rb
21
+ homepage: http://rubylearning.org/
22
+ licenses: []
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.2.2
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Immune System
44
+ test_files: []
45
+ has_rdoc: