my_gems_summary 1.5 → 1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -0
  3. data/Gemfile.lock +19 -0
  4. data/bin/setup +8 -0
  5. data/lib/my_gems.rb +22 -0
  6. metadata +5 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c06417983f9ec2b4355dd7a3f6d0a06339b5d349630d37f1f3905d3210c0307
4
- data.tar.gz: f563835d063d539d63105d8ca46258f3262190123022b25658f6e20b0230e262
3
+ metadata.gz: be5f3c6b9f4e1fa41daff660ab3745c0562c75eb8002d2f4b8c6ef1e8fa7052e
4
+ data.tar.gz: d23db1d6b4f3c0129bc5e33d9787dcf43167696e64f13bff31497ca0d6bc214e
5
5
  SHA512:
6
- metadata.gz: ac62d179c806b002326fc3fcd3ae4ba2e8bf273c024486297b650cc9dc41984b2fb2aa592d806290931ff3d7a125bce55e1ed63a9d75f1cf7366d94dddfbf670
7
- data.tar.gz: 82a16233cff59eb0bc9fd03dcdd270973f3cf8f33779f76807162c27deb882f19b77ccd936921806dc83ec0b01b8bec1830a8d69acdc340f52035faa6af3c4c4
6
+ metadata.gz: 95f72df671836e3292bf1cdda5c55e1159bdc98da72ed7af685e812df9a4400a52e818ed21a33c387b194aef5f3cca02ef34afaec2b92d46bed024d8f77fd356
7
+ data.tar.gz: a3d4ced8d02f3343e5d42e7ce2659ff14833bd9574e088dedbbed3d0c8b400352ec700293086b72a899997d0b6e35a3c0df024f0233e2415f27bfb2cf96a6b79
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in underscore.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ my_gems_summary (1.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ gems (1.2.0)
10
+
11
+ PLATFORMS
12
+ x86_64-linux
13
+
14
+ DEPENDENCIES
15
+ gems (~> 1.2)
16
+ my_gems_summary!
17
+
18
+ BUNDLED WITH
19
+ 2.2.33
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/my_gems.rb ADDED
@@ -0,0 +1,22 @@
1
+ require 'gems'
2
+
3
+ GemDTO = Struct.new(:name, :downloads)
4
+
5
+ module MyGems
6
+ def self.show
7
+ puts "⭐ Let's see if you're a star!⭐ "
8
+ puts "📚 Here's your summary:"
9
+ puts "\n"
10
+
11
+ my_gems = Gems.gems.map { |gem| GemDTO.new(gem['name'], gem['downloads']) }
12
+ gem_with_longest_name = my_gems.max_by { |gem| gem.name.length }
13
+
14
+ my_gems.each do |gem|
15
+ name_output = gem.name.ljust(gem_with_longest_name.first.length)
16
+ puts "🛑 #{name_output} 🔝 #{gem.downloads} downloads"
17
+ end
18
+
19
+ puts "\n"
20
+ puts "Bye! See you soon 👋👋👋"
21
+ end
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_gems_summary
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: '1.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinicius Kammradt
@@ -32,7 +32,11 @@ executables:
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - Gemfile
36
+ - Gemfile.lock
35
37
  - bin/mygems
38
+ - bin/setup
39
+ - lib/my_gems.rb
36
40
  homepage: https://github.com/kammradt/my-gems-summary-cli
37
41
  licenses:
38
42
  - MIT