gh-trending 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 +4 -4
- data/.gitignore +1 -0
- data/README.md +2 -10
- data/lib/gh_trending/developer.rb +6 -6
- data/lib/gh_trending/developers.rb +1 -5
- data/lib/gh_trending/repositories.rb +1 -5
- data/lib/gh_trending/repository.rb +10 -10
- data/lib/gh_trending/version.rb +1 -1
- metadata +1 -2
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db3207b8da3785a10c4f6e8af29e0b92aab5e10
|
4
|
+
data.tar.gz: 1a30ff5b7958abc430316fb036df5da401982002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46ab1c4fbc8aed72605a82a91a804ce50cf51c8ebda3983f9c9d34b34fa95ec8c7b04d60b8fc963629ba2d7f0d7eaac70356acf4d3e33acbbc9a79e666b24b45
|
7
|
+
data.tar.gz: 4003f6bb6bf5f25fa2e526153979ca61a9d5643b34133fc49e8ce907d535fa896ff2abf80eaa34f7b5102a27cfe916b827fe3030cf6367a61cfe86414bffb48c
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -91,17 +91,9 @@ crawler.get language: 'javascript'
|
|
91
91
|
* `url` => The github's URL of the repository
|
92
92
|
* `period_stars` => The number of stars of the repository in the requested `time_period`.
|
93
93
|
|
94
|
-
##
|
94
|
+
## Dependencies
|
95
95
|
|
96
|
-
|
97
|
-
|
98
|
-
## Contributing
|
99
|
-
|
100
|
-
You can run `bin/dev` to play around with the tool. You should run this command every time you make a change in the gem to test your modifications.
|
101
|
-
|
102
|
-
* If for some reason you can't run the `bin/dev` script, make sure the script has executions rights (`chmod +x bin/dev`).
|
103
|
-
|
104
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/luispcosta/gh-trending. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
96
|
+
* [Mechanize](https://github.com/sparklemotion/mechanizes)
|
105
97
|
|
106
98
|
## Tests
|
107
99
|
|
@@ -6,13 +6,13 @@ module Gh
|
|
6
6
|
attr_reader :full_name, :user_profile_url, :hot_repository_url
|
7
7
|
|
8
8
|
def initialize(
|
9
|
-
full_name:
|
10
|
-
user_profile_url:
|
11
|
-
hot_repository_url:
|
9
|
+
full_name: '',
|
10
|
+
user_profile_url: '',
|
11
|
+
hot_repository_url: ''
|
12
12
|
)
|
13
|
-
@full_name = full_name
|
14
|
-
@user_profile_url = user_profile_url
|
15
|
-
@hot_repository_url = hot_repository_url
|
13
|
+
@full_name = full_name
|
14
|
+
@user_profile_url = user_profile_url
|
15
|
+
@hot_repository_url = hot_repository_url
|
16
16
|
end
|
17
17
|
|
18
18
|
def to_h
|
@@ -18,7 +18,7 @@ module Gh
|
|
18
18
|
def get(*args)
|
19
19
|
parse_args = Gh::Trending::Parsers::ParserArguments.new(*args)
|
20
20
|
developers_list.clear
|
21
|
-
developers_list << parser.parse(parse_args).to_a.compact
|
21
|
+
developers_list << @parser.parse(parse_args).to_a.compact
|
22
22
|
developers_list.flatten!
|
23
23
|
end
|
24
24
|
|
@@ -29,10 +29,6 @@ module Gh
|
|
29
29
|
def to_h
|
30
30
|
developers_list.map(&:to_h)
|
31
31
|
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
attr_reader :parser
|
36
32
|
end
|
37
33
|
end
|
38
34
|
end
|
@@ -19,7 +19,7 @@ module Gh
|
|
19
19
|
def get(*args)
|
20
20
|
parse_args = Gh::Trending::Parsers::ParserArguments.new(*args)
|
21
21
|
repos_list.clear
|
22
|
-
repos_list << parser.parse(parse_args).to_a.compact
|
22
|
+
repos_list << @parser.parse(parse_args).to_a.compact
|
23
23
|
repos_list.flatten!
|
24
24
|
end
|
25
25
|
|
@@ -30,10 +30,6 @@ module Gh
|
|
30
30
|
def to_h
|
31
31
|
repos_list.map(&:to_h)
|
32
32
|
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
attr_reader :parser
|
37
33
|
end
|
38
34
|
end
|
39
35
|
end
|
@@ -7,17 +7,17 @@ module Gh
|
|
7
7
|
# Period stars correspond to the stars that the repository has in the
|
8
8
|
# current period being considered, for example: 283 stars THIS WEEK.
|
9
9
|
def initialize(
|
10
|
-
name:
|
11
|
-
description:
|
12
|
-
language:
|
13
|
-
period_stars:
|
14
|
-
url:
|
10
|
+
name: '',
|
11
|
+
description: '',
|
12
|
+
language: '',
|
13
|
+
period_stars: 0,
|
14
|
+
url: ''
|
15
15
|
)
|
16
|
-
@name = name
|
17
|
-
@description = description
|
18
|
-
@language = language
|
19
|
-
@period_stars = period_stars
|
20
|
-
@url = url
|
16
|
+
@name = name
|
17
|
+
@description = description
|
18
|
+
@language = language
|
19
|
+
@period_stars = period_stars
|
20
|
+
@url = url
|
21
21
|
end
|
22
22
|
|
23
23
|
def to_h
|
data/lib/gh_trending/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh-trending
|
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
|
- luispcosta
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- CODE_OF_CONDUCT.md
|
122
122
|
- Gemfile
|
123
123
|
- LICENSE
|
124
|
-
- LICENSE.txt
|
125
124
|
- README.md
|
126
125
|
- Rakefile
|
127
126
|
- bin/console
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2017 luispcosta
|
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.
|