eltiempo 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +3 -29
- data/eltiempo.gemspec +1 -2
- data/lib/eltiempo/cli.rb +8 -2
- data/lib/eltiempo/eltiempo_parser.rb +4 -0
- data/lib/eltiempo/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5eaeee06f1d4509c54a37800385a66345441ab96
|
|
4
|
+
data.tar.gz: 6231e7d395fd870876f3e11f9210af5746070c83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ce4c447406e6c33a285de084f6444f25b52f519d4f696312907590a6c2ac47340f4985fe5b350a0ca5d039b7cb2405d8c51b1c2fe1ac97d1bb75b387edbc6ad
|
|
7
|
+
data.tar.gz: 43c0368d8f3403f4dfd1459670f9684b644410951355f0300b9efbe139247d618a824132d3ec1a6e52a737bd183d0b7526ad5095812c359b1d16636f49fec9b7
|
data/README.md
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
# Eltiempo
|
|
2
|
-
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/eltiempo`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
6
1
|
|
|
7
2
|
## Installation
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
gem 'eltiempo'
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
And then execute:
|
|
16
|
-
|
|
17
|
-
$ bundle
|
|
18
|
-
|
|
19
|
-
Or install it yourself as:
|
|
4
|
+
Git clone this repo.
|
|
20
5
|
|
|
21
|
-
|
|
6
|
+
bundle install
|
|
22
7
|
|
|
23
8
|
## Usage
|
|
24
9
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Development
|
|
28
|
-
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
-
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
-
|
|
33
|
-
## Contributing
|
|
34
|
-
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/eltiempo.
|
|
36
|
-
|
|
10
|
+
bundle exec bin/eltiempo
|
|
37
11
|
|
|
38
12
|
## License
|
|
39
13
|
|
data/eltiempo.gemspec
CHANGED
|
@@ -22,8 +22,7 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
25
|
-
spec.
|
|
26
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
25
|
+
spec.executables = ["eltiempo"]
|
|
27
26
|
spec.require_paths = ["lib"]
|
|
28
27
|
|
|
29
28
|
spec.add_development_dependency "bundler", "~> 1.11"
|
data/lib/eltiempo/cli.rb
CHANGED
|
@@ -18,16 +18,21 @@ module Eltiempo
|
|
|
18
18
|
puts "Temperature in #{city} " + @eltiempoparser.today_temp(city).to_s
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
desc "av_max", "display
|
|
21
|
+
desc "av_max", "display week average maximun temperature in city"
|
|
22
22
|
def av_max city
|
|
23
23
|
puts "Average maximum temperature of the week in #{city} " + @eltiempoparser.average_temp(city, "max").to_s + "º"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
desc "av_min", "display
|
|
26
|
+
desc "av_min", "display week average minimun temperature in city"
|
|
27
27
|
def av_min city
|
|
28
28
|
puts "Average maximum temperature of the week in #{city} " + @eltiempoparser.average_temp(city, "min").to_s + "º"
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
desc "cities", "display names of all available cities"
|
|
32
|
+
def cities
|
|
33
|
+
puts @eltiempoparser.all_cities
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
private
|
|
32
37
|
|
|
33
38
|
def config
|
|
@@ -37,6 +42,7 @@ module Eltiempo
|
|
|
37
42
|
map "-today" => "today"
|
|
38
43
|
map "-av_max" => "av_max"
|
|
39
44
|
map "-av_min" => "av_min"
|
|
45
|
+
map "-cities" => "cities"
|
|
40
46
|
|
|
41
47
|
end
|
|
42
48
|
end
|
data/lib/eltiempo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eltiempo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -69,7 +69,8 @@ dependencies:
|
|
|
69
69
|
description:
|
|
70
70
|
email:
|
|
71
71
|
- carlos@iniesta.co
|
|
72
|
-
executables:
|
|
72
|
+
executables:
|
|
73
|
+
- eltiempo
|
|
73
74
|
extensions: []
|
|
74
75
|
extra_rdoc_files: []
|
|
75
76
|
files:
|