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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c6a05f14ca92420bb79aeb13311a33dd2f3a4dae4af2c72256199c7e33546e6
4
- data.tar.gz: cc49e991af6f2f033f2c1e29edd0c137c6bbaf2522981693b432d52c8df3801c
3
+ metadata.gz: 4b217b1d0fee448151ff8a04b2099a6e311275e781112144a87f62a4e2a49e03
4
+ data.tar.gz: 78de209a3631b3e1589caab3b1bb336925009bcd52861e570e53b589d3ed8a65
5
5
  SHA512:
6
- metadata.gz: ce4f8c54e47fc83b43b1806fbcb08d3c7938ebd1110861d1729822910f77ac356d9d85a2b31413395174b02401ab4570cc9a8f8175159595434913c26ab07abe
7
- data.tar.gz: 3f4da0c1dd1cf65647d6300f2a9facb0f5f750aa70a337a90a3d0b0d94ad172c726f1922d20a01745e4ef4a6b099baa428a8830b71d2f29423024b00ceb09e71
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 Zakharov" --username "volodya-lombrozo" --repository objectionary/jeo-maven-plugin,objectionary/opeo-maven-plugin
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 Zakharov" --username "volodya-lombrozo" --repository objectionary/jeo-maven-plugin,objectionary/opeo-maven-plugin
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
@@ -39,9 +39,9 @@ class Github
39
39
  end
40
40
 
41
41
  def issues(username, repositories)
42
- one_month_ago = Date.today.prev_month.strftime('%Y-%m-%d')
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:>=#{one_month_ago} #{repositories}"
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)
@@ -60,7 +60,7 @@ class Htmlout
60
60
 
61
61
  def filename(reporter, model)
62
62
  date = Time.new.strftime('%d.%m.%Y')
63
- model = model.gsub('.', '-')
63
+ model = model.gsub('.', '-')
64
64
  "#{date}.#{reporter}.#{model}.html"
65
65
  end
66
66
 
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') do |t|
67
- options[:title] = t
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.1
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-06-07 00:00:00.000000000 Z
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.9
217
+ rubygems_version: 3.5.18
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: GitHub user weekly news