ranNUM 1.3.0 → 1.3.1

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 +4 -4
  2. data/lib/ranNUM.rb +5 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '002968cdc70a0c5e6dd8425bf6652d9cfc081616'
4
- data.tar.gz: adca7e7f57d589cf6692df9cfd9b42f729c4492d
3
+ metadata.gz: 4b5062043ef1b905e3814a44393a97fb520a7373
4
+ data.tar.gz: 9c621bf3ca8049c05a3e1dfd68077457b3b08ced
5
5
  SHA512:
6
- metadata.gz: 288decae25ea69cf1d77ca4004832f0dab3b6c769c2fa7c4974609c35b0c676f2a340e334874b26c182b1acbcf3c82a33e76e63f9ef9bc8054758f470ca697ba
7
- data.tar.gz: c9f94b32fb6bfc9b0538a70b84e959c1aa88d601fab4a5ca6792da7c84df73301ded7524858b427bf653a95deb22eb8aaa8631cf294273891cf4e02844a963a7
6
+ metadata.gz: b0cd7dff2c24d3872daf08e7f5b52362e06f2156b7aeded655a727498b0605f89f2209eeacf366d225dae329050c4c4f00aaa14ee250cc91bf4faa94f0172885
7
+ data.tar.gz: c1a96a4b7a7a6611365e82db62d793544a0f7307a5497a6ba5fb954faf761660b5e98f2ea1d467ed3f1a39c9aa408c75fe1115f1584867a23fc53067043f314c
data/lib/ranNUM.rb CHANGED
@@ -67,8 +67,8 @@ class RAN
67
67
  end
68
68
  #get weather data
69
69
  def self.get_owm_data(city_id, api_key)
70
- #url = "http://api.openweathermap.org/data/2.5/weather?id=#{city_id}&units=imperial&APPID=#{api_key}" #in fahrenheit
71
- url = "http://api.openweathermap.org/data/2.5/weather?id=#{city_id}&units=metric&APPID=#{api_key}" #in celcius
70
+ url = "http://api.openweathermap.org/data/2.5/weather?id=#{city_id}&units=imperial&APPID=#{api_key}" #in fahrenheit
71
+ #url = "http://api.openweathermap.org/data/2.5/weather?id=#{city_id}&units=metric&APPID=#{api_key}" #in celcius
72
72
  #url = "http://api.openweathermap.org/data/2.5/weather?id=#{city_id}&APPID=#{api_key}" #in kelvin
73
73
  resp = Net::HTTP.get_response(URI.parse(url))
74
74
  JSON.parse(resp.body)
@@ -83,6 +83,7 @@ class RAN
83
83
  unless weathertemp.nil?
84
84
  weathertemp
85
85
  else
86
+ sleep(1)
86
87
  RAN.w_TEMP
87
88
  end
88
89
  end
@@ -109,7 +110,7 @@ class RAN
109
110
 
110
111
 
111
112
  def self.number
112
- (RAN.y_STOCK.to_f*RAN.w_TEMP.to_f+1)*(RAN.s_SYMBOL2.to_f+1)
113
+ (rand(11)*RAN.y_STOCK.to_f*RAN.w_TEMP.to_f+1)*(rand(6)*RAN.s_SYMBOL2.to_f+1*RAN.w_TEMP.to_f+1)
113
114
  end
114
115
 
115
116
  def self.num(rnNUM)
@@ -138,7 +139,7 @@ end
138
139
  #puts RAN.number
139
140
 
140
141
  #prints a random number equal to or below the number in parentheses
141
- #puts RAN.num(10)
142
+ #puts RAN.num(1000000)
142
143
 
143
144
  #prints a random number equal to or below the number in parentheses rounded
144
145
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ranNUM
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colby Taperts