octostat 0.2.0 → 0.3.1

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: a2e64faab77a884d9f7849108699a7d063709311553d22f79ebb9f9c61093722
4
- data.tar.gz: 4e897ff4d764deeefb86b51566fb0de8d01312cd39eca04eb22e0be14813c943
3
+ metadata.gz: 9fb6c2b54bc742cfecb4c07dd77e511fcd288b49cb00155a9ccd8d0054bef48a
4
+ data.tar.gz: e85a9d972c1aaa65d912ab4bbf3ba8e88df494e75005bd3e4262e13a79c07600
5
5
  SHA512:
6
- metadata.gz: 533b07af9b0820358c52a116d03a4c40037a3f6e38b7bdaecc1ab087359411092b0adfc24a6f2e4a88a5b0f4bccf9d987454a21e98db04bc153f36394ef328d9
7
- data.tar.gz: e1ae8db0d9455fe57db6e722dacf0dfa3b7a2ad7573133a8718e219a9364c3e8d3abb766ed36a00c700dd7c04cadf4279bd8a40c0815bf846cdd4e00d5a5e17c
6
+ metadata.gz: b6dd97af0de58bf4239d47533665be8104f7b6d88e6f15fee41c7bbf64d073bea145badb5edb4af64d6bfafe10e3635c45e6357c32897169c6038ff41c603036
7
+ data.tar.gz: 1b5779debb9f9a3fc5999c3731a15dca9d4e5af93ea611d67a2fc84f4447d58620b3af46ca1dff727d9e443ba53eeb1643b7ecd136bf2562dd18d58b893d4ff0
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.3.1] 2025-03-14
4
+
5
+ - Fix changelog
6
+
7
+ ## [0.3.0] 2025-03-14
8
+
9
+ - First working release.
data/README.md CHANGED
@@ -1,38 +1,16 @@
1
1
  # Octostat
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/octostat`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Octostat extracts and converts the Git log of a repo into an SQLite database for easy querying.
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'octostat'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install octostat
7
+ `gem install octostat`
22
8
 
23
9
  ## Usage
24
10
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
11
+ `octostat <OPTIONAL_PATH_TO_REPO>`
34
12
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/octostat.
13
+ To specify the name of the output database: `octostat path/to/repo --db=new_name.sqlite`
36
14
 
37
15
  ## License
38
16
 
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList["test/**/*_test.rb"]
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: :test
data/exe/octostat ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "octostat"
4
+
5
+ Octostat::Command.new(*ARGV).call
@@ -1,5 +1,4 @@
1
- require 'optparse'
2
-
1
+ require "optparse"
3
2
 
4
3
  module Octostat
5
4
  class Command
@@ -1,4 +1,4 @@
1
- require 'forwardable'
1
+ require "forwardable"
2
2
  require "sqlite3"
3
3
 
4
4
  module Octostat
@@ -6,12 +6,12 @@ module Octostat
6
6
  extend Forwardable
7
7
 
8
8
  PRAGMAS = {
9
- "foreign_keys" => true,
10
- "journal_mode" => :wal,
11
- "synchronous" => :normal,
12
- "mmap_size" => 134217728, # 128 megabytes
13
- "journal_size_limit" => 67108864, # 64 megabytes
14
- "cache_size" => 2000
9
+ "foreign_keys" => true,
10
+ "journal_mode" => :wal,
11
+ "synchronous" => :normal,
12
+ "mmap_size" => 134217728, # 128 megabytes
13
+ "journal_size_limit" => 67108864, # 64 megabytes
14
+ "cache_size" => 2000
15
15
  }
16
16
 
17
17
  COMMIT_INSERT = "INSERT OR IGNORE INTO commits (hash, email, name, date, merge_commit, subject) VALUES (?, ?, ?, ?, ?, ?)"
@@ -56,7 +56,7 @@ module Octostat
56
56
 
57
57
  def apply_pragma
58
58
  PRAGMAS.each do |pragma, value|
59
- db.public_send("#{pragma}=", value)
59
+ db.public_send(:"#{pragma}=", value)
60
60
  end
61
61
  end
62
62
 
data/lib/octostat/git.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "open3"
2
2
 
3
-
4
3
  module Octostat
5
4
  class Git
6
5
  include Enumerable
@@ -1,3 +1,3 @@
1
1
  module Octostat
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octostat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joé Dupuis
@@ -24,58 +24,19 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: debug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
27
  description:
70
28
  email:
71
29
  - joe@dupuis.io
72
- executables: []
30
+ executables:
31
+ - octostat
73
32
  extensions: []
74
33
  extra_rdoc_files: []
75
34
  files:
35
+ - CHANGELOG.md
76
36
  - LICENSE.txt
77
37
  - README.md
78
38
  - Rakefile
39
+ - exe/octostat
79
40
  - lib/octostat.rb
80
41
  - lib/octostat/command.rb
81
42
  - lib/octostat/database.rb
@@ -87,7 +48,7 @@ licenses:
87
48
  metadata:
88
49
  homepage_uri: https://github.com/testdouble/octostat
89
50
  source_code_uri: https://github.com/testdouble/octostat
90
- changelog_uri: https://github.com/testdouble/octostat/main/CHANGELOG.md
51
+ changelog_uri: https://github.com/testdouble/octostat/blob/main/CHANGELOG.md
91
52
  post_install_message:
92
53
  rdoc_options: []
93
54
  require_paths: