newsman 0.2.1 → 0.2.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/README.md +2 -2
- data/lib/newsman/github.rb +2 -2
- data/lib/newsman/html_output.rb +1 -1
- data/lib/newsman.rb +2 -6
- data/test/test_htmlout.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b217b1d0fee448151ff8a04b2099a6e311275e781112144a87f62a4e2a49e03
|
4
|
+
data.tar.gz: 78de209a3631b3e1589caab3b1bb336925009bcd52861e570e53b589d3ed8a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 317b520b605b309c9ce5aeed0ac3ba385afb6865a8469a3547189232f248011920a67c3a3cc9bb40470e1f0f0ec0b7014f667f106275e56e9df48469d810f757
|
7
|
+
data.tar.gz: 65eacb6e1debdcb1581af1d40c0b043d641825fc70780b01471f496c0bf5a336fbc8d13a43eab89ea0dacd39890b7ec38f684c842472d9be970508de20a46f70
|
data/README.md
CHANGED
@@ -44,13 +44,13 @@ Usage: newsman [options]
|
|
44
44
|
### Example
|
45
45
|
To run `newsman` use the following command:
|
46
46
|
```shell
|
47
|
-
newsman --name "Vladimir
|
47
|
+
newsman --name "Vladimir Lombrozo" --username "volodya-lombrozo" --repository objectionary/jeo-maven-plugin,objectionary/opeo-maven-plugin
|
48
48
|
```
|
49
49
|
|
50
50
|
Don't forget to set your own values for `name`, `username` and `repository` parameters.
|
51
51
|
Also you can download this repository and run the newsman script directly using the following command:
|
52
52
|
```shell
|
53
|
-
./bin/newsman --name "Vladimir
|
53
|
+
./bin/newsman --name "Vladimir Lombrozo" --username "volodya-lombrozo" --repository objectionary/jeo-maven-plugin,objectionary/opeo-maven-plugin
|
54
54
|
```
|
55
55
|
|
56
56
|
## How to build a gem from sources
|
data/lib/newsman/github.rb
CHANGED
@@ -39,9 +39,9 @@ class Github
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def issues(username, repositories)
|
42
|
-
|
42
|
+
one_year_ago = Date.today.prev_year.strftime('%Y-%m-%d')
|
43
43
|
query = "is:issue is:open author:#{username}"\
|
44
|
-
" author:0pdd created:>=#{
|
44
|
+
" author:0pdd created:>=#{one_year_ago} #{repositories}"
|
45
45
|
puts "Searching issues using the following query: '#{query}'"
|
46
46
|
@client.search_issues(query).items.map do |issue|
|
47
47
|
parse_issue(issue)
|
data/lib/newsman/html_output.rb
CHANGED
data/lib/newsman.rb
CHANGED
@@ -63,12 +63,8 @@ def generate
|
|
63
63
|
"You can choose another options like '-o html', '-o txt' or even '-o html'") do |o|
|
64
64
|
options[:output] = o
|
65
65
|
end
|
66
|
-
opts.on('-t', '--title TITLE', 'Project Title. Empty by default')
|
67
|
-
|
68
|
-
end
|
69
|
-
opts.on('-m', '--model MODEL', 'AI model to use. gpt-3.5-turbo by default') do |m|
|
70
|
-
options[:model] = m
|
71
|
-
end
|
66
|
+
opts.on('-t', '--title TITLE', 'Project Title. Empty by default') { |t| options[:title] = t }
|
67
|
+
opts.on('-m', '--model MODEL', 'AI model to use. gpt-3.5-turbo by default') { |m| options[:model] = m }
|
72
68
|
end.parse!
|
73
69
|
# Custom method to raise exception with a human-readable message
|
74
70
|
def options.require_option(key, message)
|
data/test/test_htmlout.rb
CHANGED
@@ -48,9 +48,10 @@ List is here:<br/>
|
|
48
48
|
Dir.mktmpdir do |temp_dir|
|
49
49
|
output = Htmlout.new(temp_dir)
|
50
50
|
today = Date.today.strftime('%d.%m.%Y')
|
51
|
-
expected = "#{today}.volodya-lombrozo.html"
|
51
|
+
expected = "#{today}.volodya-lombrozo.gpt-3-5-turbo.html"
|
52
52
|
output.print("Issue description\n\nHere is a new paragraph\nList is here:\n - one\n - two\n - three",
|
53
|
-
'volodya-lombrozo'
|
53
|
+
'volodya-lombrozo',
|
54
|
+
'gpt-3.5-turbo')
|
54
55
|
assert(File.exist?(File.join(temp_dir, expected)))
|
55
56
|
assert_equal(EXPECTED, File.read(File.join(temp_dir, expected)))
|
56
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newsman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Volodya Lombrozo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.5.
|
217
|
+
rubygems_version: 3.5.18
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: GitHub user weekly news
|