f1gem 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +32 -0
- data/LICENSE.txt +21 -0
- data/README.md +33 -0
- data/Rakefile +2 -0
- data/bin/f1gem +4 -0
- data/f1gem-1.0.0.gem +0 -0
- data/f1gem-1.0.1.gem +0 -0
- data/f1gem.gemspec +24 -0
- data/lib/f1gem.rb +14 -0
- data/lib/f1gem/version.rb +3 -0
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73fb91ebd550a28172e425f68a1a3e159d81f7def384ab33dd310ac037598171
|
4
|
+
data.tar.gz: 3af90ef261adb97b6fe37551cb1d05e6c386e99f2677936fbc90c727d0ed28be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74d8c09c303f34353224f0a628690f0ea90fc6b87abb700bdb5b7acc329b9a08adf10ce8cbecabd685f9b64b157bc94323b779386218609d38fe423c4c18a991
|
7
|
+
data.tar.gz: 8177a514786497e4e1862cc5e3ea1518639da00e1c885aefce77c1f978e6fadaa687860fcdf7f478e3a2515f7309d207c0822ade34d245f36b93be294d1f4bae
|
data/.gitignore
ADDED
data/Gemfile
ADDED
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
data/bin/f1gem
ADDED
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
|
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.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linhnvl
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
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
|