git-trend 1.2.8 → 1.3.0
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/CHANGELOG.md +15 -7
- data/git-trend.gemspec +3 -3
- data/lib/git_trend/scraper.rb +1 -1
- data/lib/git_trend/version.rb +1 -1
- data/spec/fixtures/trending/alloy +2139 -3806
- data/spec/fixtures/trending/index +2783 -4491
- data/spec/fixtures/trending/ruby +2784 -4450
- data/spec/fixtures/trending/ruby?since=weekly +2808 -4447
- data/spec/fixtures/trending?since= +2785 -4491
- data/spec/fixtures/trending?since=daily +2785 -4491
- data/spec/fixtures/trending?since=monthly +2821 -4464
- data/spec/fixtures/trending?since=weekly +2808 -4473
- data/spec/git_trend/cli_spec.rb +168 -789
- data/spec/spec_helper.rb +3 -6
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 323d3cdcc6a5b98203e5ece49d36d138889ec29c1ec19468e838bb3434fd2c88
|
4
|
+
data.tar.gz: b3baf1505331b32e0ce86cf088687b9655f0757ed85d339bb35814b2ee84a06e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5c0976042644c9dfd4586be12d139657c2cb2fb7732f1fef028b357d4f4e7b11f78892e3e400fd7476224e00abf8806f9087d1cda244c7f6dbbff7713aebc53
|
7
|
+
data.tar.gz: 2a0f4c8bdbff6e03a83e43233825f98c67ff0156f2185d2b6e4fbe4776b64b54c5dcc1a169f4c1f868b31a61cb9522b899b967bd3d3f11a753682c6e864ca356
|
@@ -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/CHANGELOG.md
CHANGED
@@ -1,28 +1,36 @@
|
|
1
|
-
## v1.
|
1
|
+
## v1.3.0 (Mon Mar 13 2023)
|
2
|
+
|
3
|
+
- Fix changing HTML structure [8de4920]
|
4
|
+
|
5
|
+
## v1.2.9 (Mon Mar 13 2023)
|
6
|
+
|
7
|
+
- Upgrade gem [3f79648]
|
8
|
+
|
9
|
+
## v1.2.8 (Mon Jan 31 2022)
|
2
10
|
|
3
11
|
- Fix changing HTML structure [524bed8]
|
4
12
|
|
5
|
-
## v1.2.7 (Sun Aug 8)
|
13
|
+
## v1.2.7 (Sun Aug 8 2021)
|
6
14
|
|
7
15
|
- Correspond to the new structure of HTML [a708fd4]
|
8
16
|
|
9
|
-
## v1.2.6 (Sun Aug 8)
|
17
|
+
## v1.2.6 (Sun Aug 8 2021)
|
10
18
|
|
11
19
|
- Update gems
|
12
20
|
|
13
|
-
## v1.2.5 (Sat Aug 8)
|
21
|
+
## v1.2.5 (Sat Aug 8 2020)
|
14
22
|
|
15
23
|
- Eliminate a warning of Thor [781baf4]
|
16
24
|
|
17
|
-
## v1.2.4 (Mon Mar 2)
|
25
|
+
## v1.2.4 (Mon Mar 2 2020)
|
18
26
|
|
19
27
|
- Fix languages without linefeeds [ecc63af]
|
20
28
|
|
21
|
-
## v1.2.3 (Mon Mar 2)
|
29
|
+
## v1.2.3 (Mon Mar 2 2020)
|
22
30
|
|
23
31
|
- Fix wrong interger format of star [dbdc344]
|
24
32
|
|
25
|
-
## v1.2.2 (Sun Dec 15)
|
33
|
+
## v1.2.2 (Sun Dec 15 2019)
|
26
34
|
|
27
35
|
- Update gem [4f11bc0]
|
28
36
|
|
data/git-trend.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_dependency "addressable", "~> 2.8"
|
31
31
|
spec.add_dependency "mb_string"
|
32
|
-
spec.add_dependency "mechanize", ">= 2.
|
32
|
+
spec.add_dependency "mechanize", ">= 2.8.5", "< 2.9.0"
|
33
33
|
spec.add_dependency "thor", ">= 0.20.0", "< 1.3.0"
|
34
34
|
spec.add_dependency "unicode-display_width"
|
35
35
|
|
@@ -41,9 +41,9 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_development_dependency "rubocop-rails"
|
42
42
|
|
43
43
|
spec.add_development_dependency "pry-byebug"
|
44
|
-
spec.add_development_dependency "rspec", "~> 3.
|
44
|
+
spec.add_development_dependency "rspec", "~> 3.12.0"
|
45
45
|
spec.add_development_dependency "simplecov", "~>0.16.1"
|
46
|
-
spec.add_development_dependency "webmock", "~> 3.
|
46
|
+
spec.add_development_dependency "webmock", "~> 3.18.1"
|
47
47
|
|
48
48
|
spec.add_development_dependency "coveralls", "~> 0.8.23"
|
49
49
|
end
|
data/lib/git_trend/scraper.rb
CHANGED
@@ -53,7 +53,7 @@ module GitTrend
|
|
53
53
|
page.search(".Box-row").map do |content|
|
54
54
|
icon_area = content.search(".f6.color-fg-muted.mt-2")
|
55
55
|
Project.new(
|
56
|
-
name: content.search("
|
56
|
+
name: content.search("h2 a").attr("href").to_s.sub(/\A\//, ""),
|
57
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),
|
data/lib/git_trend/version.rb
CHANGED