forecast 0.0.8 → 0.0.9

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: 7bedac729e0633e851903429abe9b90e389bf394
4
- data.tar.gz: 0ee0e0f0ca1791b76cb5e85623b524f3bb3b8d6d
3
+ metadata.gz: 9e0b0fe97e4b4a90b9fb49ba4dc2be9c5953ac44
4
+ data.tar.gz: 5cc97ea3e709bf0b1d25c5add66ebaa7481f504e
5
5
  SHA512:
6
- metadata.gz: 10567a96c75d32e09fcc00f6d4ffdefcc8e56ae932b8245f2918473f82c9ca32c39afcd2ea16cf8167e50c3d995a9571c59b2bbcea02db77c8cf3f919abd5c2c
7
- data.tar.gz: 7ec7db3da9a5faa99e42abe359fab5a8760b3296cbd721e58b128bd6d65d3d0001ee0bba6d386f78dc376df9d4acfeb28f5c0aa47230e5ca8bd106f11ea5bd7f
6
+ metadata.gz: 7aea0c3ef0cc5ab130cc87208569340bbb124d6c9d532aee688f93ec2ab89bf672fcbc4f16eb4ae9a76198b25452921172d029114e062b5f6126dacd8a11594b
7
+ data.tar.gz: 2da6a879e831d5ec92cba6a8d54b416878a22aa6988ed7f471eaee972222496f249c53b38d26dbb5a5bfe345ee20005f9656a71812a284746c5a6e4b36b6ee10
@@ -3,7 +3,13 @@ forecast
3
3
 
4
4
  > Changelog
5
5
 
6
- ## Master
6
+ ## v0.0.9
7
+
8
+ ## Bugfix
9
+
10
+ * Fixed default command overrides user argument
11
+
12
+ ## v0.0.8
7
13
 
8
14
  ## Enhancements
9
15
 
data/README.md CHANGED
@@ -199,15 +199,16 @@ forecast:
199
199
  Usage: forecast COMMAND [OPTIONS]
200
200
 
201
201
  Commands
202
- current: get current weather
202
+ current: get current weather [default]
203
203
  daily: get daily forecasts
204
204
  hourly: get hourly forecasts
205
205
 
206
206
  Options
207
- -l, --location LAT,LNG Location
207
+ -l, --location LAT,LNG Location [required]
208
208
  -p, --provider PROVIDER Supported API Providers: forecast_io, open_weather_map, wunderground, yahoo
209
209
  -a, --api_key API_KEY Apply an api key if neccessary
210
210
  -s, --scale SCALE Scale: one of celsius, fahrenheit or kelvin
211
+ -h, --help Displays Help
211
212
  ```
212
213
 
213
214
  ## Run Tests
@@ -37,12 +37,16 @@ optparse = optparser.parse!
37
37
  # Init command
38
38
  command = ARGV.shift
39
39
 
40
- # Use current as default command if a location has specified
41
- if !command && options.location.nil?
42
- puts optparser.to_s
43
- exit
44
- else
45
- command = 'current'
40
+
41
+ if !command
42
+ if options.location.nil?
43
+ # Error: No command specified
44
+ puts optparser.to_s
45
+ exit
46
+ else
47
+ # If a location has been specified, use current as the default command
48
+ command = 'current'
49
+ end
46
50
  end
47
51
 
48
52
  # Show errors on missing mandatory options
@@ -1,3 +1,3 @@
1
1
  class Forecast
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Nowrotek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-27 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis