where_is_ISS 0.2.0 → 0.2.1

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: 1e499d7d373cf238724f19647273a93647b9eae7303e445b99105170efae8759
4
- data.tar.gz: 179273073c898542fc0a698c8d945a63c330cc12f6f09c7aa9bdd2c5507aa030
3
+ metadata.gz: e8f94a7b333ead512c5f34d48fdace419ba7a11956da0ded2a9212fcdf58f655
4
+ data.tar.gz: 03042afcaedbd7577987a77bd1b3195c854ff8f0a6bcefa858a693cfe9f9a11a
5
5
  SHA512:
6
- metadata.gz: 108a7ed9e56d5a9bf732255358bc0de7832e00ddb22a87695bd1ad2db9f5873fa5db9d7aa3bf4ee5ebe8f76f28b884167570c947b27c97db472423b8e2e1a001
7
- data.tar.gz: 19a9cdf3946044e130b4c6d83fec12e0824787c5a1e7231209f491b46bfc7eb4091b5f7dd3e24a3ea7fc227a4ec4b63dee6e9e20d6c38b75dbe2409bafa6bd42
6
+ metadata.gz: 5a86117c1684cfe37b2d158088f70132944362b851500d638a33e6f7851bc1c89b9b698bf5c1a967780497fa090b34a8ba438e77ae0639d134aabc030a900128
7
+ data.tar.gz: cfc84095f3ca58f5ed7195818355fb8307345317fa8dd7334fbbb157faa48c74e7bb61d95ca6f8e7af93e56f7aeb0102eccb2f9e5f449e0ebbd5f5fdd0abe4c8
data/.coveralls.yml ADDED
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+ repo_token: COVERALL
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # Ignore application configuration
14
+ /config/application.yml
data/Gemfile.lock CHANGED
@@ -1,12 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- where_is_ISS (0.1.0)
4
+ where_is_ISS (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ codecov (0.1.10)
10
+ json
11
+ simplecov
12
+ url
13
+ coveralls (0.8.22)
14
+ json (>= 1.8, < 3)
15
+ simplecov (~> 0.16.1)
16
+ term-ansicolor (~> 1.3)
17
+ thor (~> 0.19.4)
18
+ tins (~> 1.6)
9
19
  diff-lcs (1.3)
20
+ docile (1.3.1)
21
+ figaro (1.1.1)
22
+ thor (~> 0.14)
10
23
  json (2.1.0)
11
24
  rake (10.5.0)
12
25
  rspec (3.7.0)
@@ -22,12 +35,25 @@ GEM
22
35
  diff-lcs (>= 1.2.0, < 2.0)
23
36
  rspec-support (~> 3.7.0)
24
37
  rspec-support (3.7.1)
38
+ simplecov (0.16.1)
39
+ docile (~> 1.1)
40
+ json (>= 1.8, < 3)
41
+ simplecov-html (~> 0.10.0)
42
+ simplecov-html (0.10.2)
43
+ term-ansicolor (1.6.0)
44
+ tins (~> 1.0)
45
+ thor (0.19.4)
46
+ tins (1.16.3)
47
+ url (0.3.2)
25
48
 
26
49
  PLATFORMS
27
50
  ruby
28
51
 
29
52
  DEPENDENCIES
30
53
  bundler (~> 1.16)
54
+ codecov
55
+ coveralls
56
+ figaro
31
57
  json
32
58
  rake (~> 10.0)
33
59
  rspec (~> 3.0)
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Ruby gem to track ISS(International Space Station)
4
4
 
5
+ [![Build Status](https://travis-ci.org/manojnaidu619/where_is_ISS.svg?branch=master)](https://travis-ci.org/manojnaidu619/where_is_ISS)
6
+ [![Coverage Status](https://coveralls.io/repos/github/manojnaidu619/where_is_ISS/badge.svg?branch=master)](https://coveralls.io/github/manojnaidu619/where_is_ISS?branch=master)
7
+ [![Gem Version](https://badge.fury.io/rb/where_is_ISS.svg)](https://badge.fury.io/rb/where_is_ISS)
8
+ [![codecov](https://codecov.io/gh/manojnaidu619/where_is_ISS/branch/master/graph/badge.svg)](https://codecov.io/gh/manojnaidu619/where_is_ISS)
9
+
5
10
  ## Installation
6
11
 
7
12
  Add this line to your application's Gemfile:
@@ -26,7 +31,7 @@ Or install it yourself as:
26
31
  require 'where_is_ISS'
27
32
  Iss.track
28
33
  ```
29
- > International Space Station is over Europe/Brussels
34
+ > Europe/Brussels
30
35
 
31
36
  #### To get the coordinates
32
37
 
@@ -34,10 +39,9 @@ Or install it yourself as:
34
39
  require 'where_is_ISS'
35
40
  Iss.coordinates?
36
41
  ```
37
- > ISS current Latitude : 39.217404733948
42
+ > [39.905690278098, 130.19768130925]
38
43
  >
39
- > ISS current Longitude : 70.387933714929
40
-
44
+ > [latitude, longitude]
41
45
 
42
46
  #### To get complete data
43
47
 
@@ -45,28 +49,9 @@ Or install it yourself as:
45
49
  require 'where_is_ISS'
46
50
  Iss.info?
47
51
  ```
48
- > name : iss
49
- >
50
- > id : 25544
51
- >
52
- > latitude : 39.217404733948
53
- >
54
- > longitude : 70.387933714929
55
- >
56
- > altitude : 409.37505604794
52
+ > ["iss", 25544, 33.713440406913, 139.04106708983, 408.17433114318, 27613.034267873, "eclipsed", 1538486806, -3.6899752437549, 335.64562066714, "kilometers"]
57
53
  >
58
- > velocity : 27612.529171021
59
- >
60
- > visibility : eclipsed
61
- >
62
- > timestamp : 1538331076
63
- >
64
- > Solar Latitude : -2.9915448989155
65
- >
66
- > Solar Longitude : 264.66551212567
67
- >
68
- > units : kilometers
69
-
54
+ > [name, id, latitude, longitude, altitude, velocity, visibility, timestamp, solar latitude, solar longitude, units]
70
55
 
71
56
  ## Contributing
72
57
 
@@ -1,3 +1,3 @@
1
1
  module WhereIsISS
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/where_is_ISS.rb CHANGED
@@ -12,31 +12,32 @@ class Iss
12
12
  response = Net::HTTP.get_response(URI.parse("https://api.wheretheiss.at/v1/coordinates/#{@lat},#{@long}")) # Checking for 200 OK response from Server
13
13
  if (response.code).to_i == 200
14
14
  iss = JSON[open("https://api.wheretheiss.at/v1/coordinates/#{@lat},#{@long}").read] # Print out data if status = 200 OK
15
- puts("International Space Station is over #{iss['timezone_id']}")
15
+ p iss['timezone_id'] # put out the location
16
16
  else
17
17
  puts("Currently ISS is over Water bodies(Coordinates works only on land)")
18
18
  end
19
19
 
20
20
  def self.coordinates?
21
- puts "ISS current Latitude : #{@lat}"
22
- puts "ISS current Longtitude : #{@long}"
21
+ p @coord = [@lat, @long] # return array of lat, long
23
22
  end
24
23
 
25
24
  def self.info? # all the information is being retrieved from @data variable in track function
26
- puts "name : #{@data['name']}"
27
- puts "id : #{@data['id']}"
28
- puts "latitude : #{@data['latitude']}"
29
- puts "longtitude : #{@data['longitude']}"
30
- puts "altitude : #{@data['altitude']}"
31
- puts "velocity : #{@data['velocity']}"
32
- puts "visibility : #{@data['visibility']}"
33
- puts "timestamp : #{@data['timestamp']}"
34
- puts "Solar Latitude : #{@data['solar_lat']}"
35
- puts "Solar Longtitude : #{@data['solar_lon']}"
36
- puts "units : #{@data['units']}"
25
+ p @info = [@data['name'],@data['id'],@data['latitude'],@data['longitude'],@data['altitude'],@data['velocity'],
26
+ @data['visibility'],@data['timestamp'],@data['solar_lat'],@data['solar_lon'],@data['units']]
27
+ # return array of information
37
28
  end
38
29
  end
39
30
 
31
+ def self.members?
32
+ @data_1 = JSON[open('http://api.open-notify.org/astros.json').read]
33
+ @members = []
34
+ puts "#{@data_1['number']} people on ISS"
35
+ @data_1['people'].each do |d|
36
+ @members << d['name']
37
+ end
38
+ p @members # return array of members
39
+ end
40
+
40
41
  end
41
42
 
42
43
  =begin
data/where_is_ISS.gemspec CHANGED
@@ -37,4 +37,8 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "rake", "~> 10.0"
38
38
  spec.add_development_dependency "rspec", "~> 3.0"
39
39
  spec.add_development_dependency "json"
40
+ spec.add_development_dependency 'coveralls'
41
+ spec.add_development_dependency "figaro"
42
+ spec.add_development_dependency "codecov"
43
+
40
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_is_ISS
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manoj Naidu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,48 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: figaro
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: codecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
69
111
  description: Gives the current location of ISS(International Space Station)
70
112
  email:
71
113
  - manojnaidu619@gmail.com
@@ -73,6 +115,7 @@ executables: []
73
115
  extensions: []
74
116
  extra_rdoc_files: []
75
117
  files:
118
+ - ".coveralls.yml"
76
119
  - ".gitignore"
77
120
  - ".rspec"
78
121
  - ".travis.yml"