f1gem 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0ad48b3b5d492a16d22ee71a907b0dd4b450adfd5af07d66e042a266c8d1e9a
4
- data.tar.gz: 006356d3e4712cb692a614ccb5b0d67773bcf9f923bd559373b7d77a4dd4425a
3
+ metadata.gz: 73fb91ebd550a28172e425f68a1a3e159d81f7def384ab33dd310ac037598171
4
+ data.tar.gz: 3af90ef261adb97b6fe37551cb1d05e6c386e99f2677936fbc90c727d0ed28be
5
5
  SHA512:
6
- metadata.gz: 8d2153dbffbaf975a3c13dd82f2e44a1ee217ee8889914469ef3fbf83a037d3886fa31ca191f9bea171599c1bccd4fa6427c15005516f33a6881e06a9269c176
7
- data.tar.gz: f5e7dc7393fbd21cc7d3d87fd57f9268b6b7add125d2775694dd21fa5336b52f0669857aa02b15ddcbf41ae174e8d563af1d5c528950f721b364928ddaafcdec
6
+ metadata.gz: 74d8c09c303f34353224f0a628690f0ea90fc6b87abb700bdb5b7acc329b9a08adf10ce8cbecabd685f9b64b157bc94323b779386218609d38fe423c4c18a991
7
+ data.tar.gz: 8177a514786497e4e1862cc5e3ea1518639da00e1c885aefce77c1f978e6fadaa687860fcdf7f478e3a2515f7309d207c0822ade34d245f36b93be294d1f4bae
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
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 f1gem.gemspec
6
+ gemspec
7
+ gem "httparty"
8
+ gem "terminal-table"
data/Gemfile.lock ADDED
@@ -0,0 +1,32 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ f1gem (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ httparty (0.18.1)
10
+ mime-types (~> 3.0)
11
+ multi_xml (>= 0.5.2)
12
+ mime-types (3.3.1)
13
+ mime-types-data (~> 3.2015)
14
+ mime-types-data (3.2021.0225)
15
+ multi_xml (0.6.0)
16
+ rake (10.5.0)
17
+ terminal-table (3.0.1)
18
+ unicode-display_width (>= 1.1.1, < 3)
19
+ unicode-display_width (2.0.0)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ bundler (~> 1.17)
26
+ f1gem!
27
+ httparty
28
+ rake (~> 10.0)
29
+ terminal-table
30
+
31
+ BUNDLED WITH
32
+ 1.17.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 linhnvl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # F1gem
2
+ ## Installation
3
+ Add this line to your application's Gemfile:
4
+
5
+ ```ruby
6
+ gem "f1gem"
7
+ ```
8
+
9
+ And then execute:
10
+
11
+ $ bundle
12
+
13
+ Or install it yourself as:
14
+
15
+ $ gem install f1gem
16
+
17
+ ## Usage
18
+
19
+
20
+
21
+ ## Development
22
+
23
+ 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.
24
+
25
+ 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).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/f1gem.
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/f1gem ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'f1gem'
4
+ F1gem.execute(ARGV[0])
data/f1gem-1.0.0.gem ADDED
Binary file
data/f1gem-1.0.1.gem ADDED
Binary file
data/f1gem.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "f1gem/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "f1gem"
7
+ spec.version = F1gem::VERSION
8
+ spec.authors = ["linhnvl"]
9
+ spec.email = ["nguyenvanlinh12d3@gmail.com"]
10
+
11
+ spec.summary = "A gem to show finding results repository github on your terminal"
12
+ spec.description = "A gem to show finding results repository github on your terminal"
13
+ spec.homepage = "https://github.com/linhnvl/f1gem"
14
+ spec.license = "MIT"
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
+
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.17"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
data/lib/f1gem.rb ADDED
@@ -0,0 +1,14 @@
1
+ require "httparty"
2
+ require "terminal-table"
3
+
4
+ class F1gem
5
+ def self.execute repo_name
6
+ results = HTTParty.get("https://api.github.com/search/repositories?q=#{repo_name}&per_page=10&page=1").parsed_response
7
+ rows = []
8
+ results["items"].each.with_index(1) do |item, index|
9
+ rows << [index, item["full_name"], item["stargazers_count"], item["html_url"]]
10
+ end
11
+ table = Terminal::Table.new :title => "F1gem", :headings => ["no", "full_name", "stars", "url"], :rows => rows
12
+ puts table
13
+ end
14
+ end
@@ -0,0 +1,3 @@
1
+ module F1gem
2
+ VERSION = "1.0.2"
3
+ end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: f1gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - linhnvl
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
@@ -41,10 +41,23 @@ dependencies:
41
41
  description: A gem to show finding results repository github on your terminal
42
42
  email:
43
43
  - nguyenvanlinh12d3@gmail.com
44
- executables: []
44
+ executables:
45
+ - f1gem
45
46
  extensions: []
46
47
  extra_rdoc_files: []
47
- files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - Gemfile.lock
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - bin/f1gem
56
+ - f1gem-1.0.0.gem
57
+ - f1gem-1.0.1.gem
58
+ - f1gem.gemspec
59
+ - lib/f1gem.rb
60
+ - lib/f1gem/version.rb
48
61
  homepage: https://github.com/linhnvl/f1gem
49
62
  licenses:
50
63
  - MIT