git-trend 1.2.7 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql.yml +76 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +14 -6
- data/README.md +3 -4
- data/git-trend.gemspec +5 -4
- data/lib/git_trend/formatters/text_formatter.rb +2 -2
- data/lib/git_trend/scraper.rb +2 -2
- data/lib/git_trend/version.rb +1 -1
- data/spec/fixtures/trending/alloy +6315 -5664
- data/spec/fixtures/trending/index +7697 -6598
- data/spec/fixtures/trending/ruby +7670 -6569
- data/spec/fixtures/trending/ruby?since=weekly +7668 -6576
- data/spec/fixtures/trending?since= +8347 -0
- data/spec/fixtures/trending?since=daily +8347 -0
- data/spec/fixtures/trending?since=monthly +7705 -6503
- data/spec/fixtures/trending?since=monthly.html +8342 -0
- data/spec/fixtures/trending?since=weekly +7709 -6502
- data/spec/git_trend/cli_spec.rb +270 -179
- metadata +17 -14
- data/spec/fixtures/trending?since= +0 -1
- data/spec/fixtures/trending?since=daily +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c515ab8268a8e8e5f67f8a17931e813d5989dabd94f33395583286662bc0b791
|
4
|
+
data.tar.gz: d6937ec921f004f2d951a9d5da9d410c72982440cb824ad92abe095361c10165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6950a80e2186bf6742702f7f00261ef1c643ce893db17f2000def3f647407804b4de6f0ea5cf398027f8aa5e842672e4d1b6c22810cf791bf9ea04ffa15acc0a
|
7
|
+
data.tar.gz: 719d208ea9cf6e008667007dce28838197d06ff8cdb5360c146195760e2158b4376a77a95ea9dc68cb10e0bec07afb765084e68ee3bfa50b43dd6c5f71664fb8
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ "master" ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ "master" ]
|
20
|
+
schedule:
|
21
|
+
- cron: '18 4 * * 3'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Use only 'java' to analyze code written in Java, Kotlin or both
|
38
|
+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
39
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
40
|
+
|
41
|
+
steps:
|
42
|
+
- name: Checkout repository
|
43
|
+
uses: actions/checkout@v3
|
44
|
+
|
45
|
+
# Initializes the CodeQL tools for scanning.
|
46
|
+
- name: Initialize CodeQL
|
47
|
+
uses: github/codeql-action/init@v2
|
48
|
+
with:
|
49
|
+
languages: ${{ matrix.language }}
|
50
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
51
|
+
# By default, queries listed here will override any specified in a config file.
|
52
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
53
|
+
|
54
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
55
|
+
# queries: security-extended,security-and-quality
|
56
|
+
|
57
|
+
|
58
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
59
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
60
|
+
- name: Autobuild
|
61
|
+
uses: github/codeql-action/autobuild@v2
|
62
|
+
|
63
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
64
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
65
|
+
|
66
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
67
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
68
|
+
|
69
|
+
# - run: |
|
70
|
+
# echo "Run, Build Application using script"
|
71
|
+
# ./location_of_script_within_repo/buildscript.sh
|
72
|
+
|
73
|
+
- name: Perform CodeQL Analysis
|
74
|
+
uses: github/codeql-action/analyze@v2
|
75
|
+
with:
|
76
|
+
category: "/language:${{matrix.language}}"
|
data/.travis.yml
CHANGED
@@ -3,9 +3,9 @@ env:
|
|
3
3
|
- CC_TEST_REPORTER_ID=2eb7b0f374e08e909106152c788cb32d24d6440cd41c14fe971a40a8ec971ca2
|
4
4
|
language: ruby
|
5
5
|
rvm:
|
6
|
-
- 2.
|
7
|
-
- 2.5
|
8
|
-
-
|
6
|
+
- 2.6.9
|
7
|
+
- 2.7.5
|
8
|
+
- 3.0.3
|
9
9
|
before_script:
|
10
10
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
11
11
|
- chmod +x ./cc-test-reporter
|
data/CHANGELOG.md
CHANGED
@@ -1,24 +1,32 @@
|
|
1
|
-
## v1.2.
|
1
|
+
## v1.2.9 (Mon Mar 13 2023)
|
2
|
+
|
3
|
+
- Upgrade gem [3f79648]
|
4
|
+
|
5
|
+
## v1.2.8 (Mon Jan 31 2022)
|
6
|
+
|
7
|
+
- Fix changing HTML structure [524bed8]
|
8
|
+
|
9
|
+
## v1.2.7 (Sun Aug 8 2021)
|
2
10
|
|
3
11
|
- Correspond to the new structure of HTML [a708fd4]
|
4
12
|
|
5
|
-
## v1.2.6 (Sun Aug 8)
|
13
|
+
## v1.2.6 (Sun Aug 8 2021)
|
6
14
|
|
7
15
|
- Update gems
|
8
16
|
|
9
|
-
## v1.2.5 (Sat Aug 8)
|
17
|
+
## v1.2.5 (Sat Aug 8 2020)
|
10
18
|
|
11
19
|
- Eliminate a warning of Thor [781baf4]
|
12
20
|
|
13
|
-
## v1.2.4 (Mon Mar 2)
|
21
|
+
## v1.2.4 (Mon Mar 2 2020)
|
14
22
|
|
15
23
|
- Fix languages without linefeeds [ecc63af]
|
16
24
|
|
17
|
-
## v1.2.3 (Mon Mar 2)
|
25
|
+
## v1.2.3 (Mon Mar 2 2020)
|
18
26
|
|
19
27
|
- Fix wrong interger format of star [dbdc344]
|
20
28
|
|
21
|
-
## v1.2.2 (Sun Dec 15)
|
29
|
+
## v1.2.2 (Sun Dec 15 2019)
|
22
30
|
|
23
31
|
- Update gem [4f11bc0]
|
24
32
|
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
[![Build Status](
|
2
|
-
|
1
|
+
[![Build Status](https://travis-ci.com/rochefort/git-trend.svg?branch=master)](https://travis-ci.com/rochefort/git-trend)
|
2
|
+
[![Coverage Status](https://coveralls.io/repos/github/rochefort/git-trend/badge.svg?branch=master)](https://coveralls.io/github/rochefort/git-trend?branch=master)
|
3
3
|
[![Code Climate](https://img.shields.io/codeclimate/maintainability/rochefort/git-trend.svg)](https://codeclimate.com/github/rochefort/git-trend/maintainability)
|
4
|
-
[![Code Climate](https://img.shields.io/codeclimate/coverage/rochefort/git-trend.svg)](https://codeclimate.com/github/rochefort/git-trend/test_coverage)
|
5
4
|
[![Gem Version](http://img.shields.io/gem/v/git-trend.svg?style=flat)](http://badge.fury.io/rb/git-trend)
|
6
5
|
|
7
6
|
|
@@ -21,7 +20,7 @@ And this also work as a command line utility.
|
|
21
20
|
|
22
21
|
## Requirements
|
23
22
|
|
24
|
-
Ruby versions is 2.
|
23
|
+
Ruby versions is 2.4 or later.
|
25
24
|
|
26
25
|
## Installation
|
27
26
|
Add this line to your application's Gemfile:
|
data/git-trend.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.description = spec.summary
|
18
18
|
spec.homepage = "https://github.com/rochefort/git-trend"
|
19
19
|
spec.license = "MIT"
|
20
|
+
spec.required_ruby_version = ">= 2.5.0"
|
20
21
|
|
21
22
|
spec.files = `git ls-files -z`.split("\x0")
|
22
23
|
spec.bindir = "exe"
|
@@ -28,8 +29,8 @@ Gem::Specification.new do |spec|
|
|
28
29
|
|
29
30
|
spec.add_dependency "addressable", "~> 2.8"
|
30
31
|
spec.add_dependency "mb_string"
|
31
|
-
spec.add_dependency "mechanize", ">= 2.
|
32
|
-
spec.add_dependency "thor", ">= 0.20.0", "< 1.
|
32
|
+
spec.add_dependency "mechanize", ">= 2.8.5", "< 2.9.0"
|
33
|
+
spec.add_dependency "thor", ">= 0.20.0", "< 1.3.0"
|
33
34
|
spec.add_dependency "unicode-display_width"
|
34
35
|
|
35
36
|
spec.add_development_dependency "bundler"
|
@@ -40,9 +41,9 @@ Gem::Specification.new do |spec|
|
|
40
41
|
spec.add_development_dependency "rubocop-rails"
|
41
42
|
|
42
43
|
spec.add_development_dependency "pry-byebug"
|
43
|
-
spec.add_development_dependency "rspec", "~> 3.
|
44
|
+
spec.add_development_dependency "rspec", "~> 3.12.0"
|
44
45
|
spec.add_development_dependency "simplecov", "~>0.16.1"
|
45
|
-
spec.add_development_dependency "webmock", "~> 3.
|
46
|
+
spec.add_development_dependency "webmock", "~> 3.18.1"
|
46
47
|
|
47
48
|
spec.add_development_dependency "coveralls", "~> 0.8.23"
|
48
49
|
end
|
@@ -67,7 +67,7 @@ module GitTrend::Formatters
|
|
67
67
|
fmt = "%#{f[0]}s %-#{f[1]}s %-#{f[2]}s %#{f[3]}s"
|
68
68
|
fmt << " %-#{f[4]}s" if @enable_description
|
69
69
|
|
70
|
-
puts fmt % header
|
70
|
+
puts (fmt % header).rstrip
|
71
71
|
puts fmt % @columns_sizes.map { |column| "-" * column }
|
72
72
|
end
|
73
73
|
|
@@ -84,7 +84,7 @@ module GitTrend::Formatters
|
|
84
84
|
description_fmt = " %-#{f.last - mb_char_size}s"
|
85
85
|
end
|
86
86
|
result = "#{fmt}#{description_fmt}" % data
|
87
|
-
puts result
|
87
|
+
puts result.rstrip
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
data/lib/git_trend/scraper.rb
CHANGED
@@ -51,10 +51,10 @@ module GitTrend
|
|
51
51
|
|
52
52
|
def generate_project(page)
|
53
53
|
page.search(".Box-row").map do |content|
|
54
|
-
icon_area = content.search(".f6.color-
|
54
|
+
icon_area = content.search(".f6.color-fg-muted.mt-2")
|
55
55
|
Project.new(
|
56
56
|
name: content.search("h1 a").attr("href").to_s.sub(/\A\//, ""),
|
57
|
-
description: content.search(".col-9.color-
|
57
|
+
description: content.search(".col-9.color-fg-muted.my-1.pr-4").text.strip,
|
58
58
|
lang: content.search('span[itemprop="programmingLanguage"]').text.strip,
|
59
59
|
all_star_count: comma_to_i(icon_area.search("a:has(svg.octicon-star)").text.strip),
|
60
60
|
fork_count: comma_to_i(icon_area.search("a:has(svg.octicon-repo-forked)").text.strip),
|
data/lib/git_trend/version.rb
CHANGED