Skip to content

Commit c3b2414

Browse files
committed
Initial commit
0 parents  commit c3b2414

14 files changed

+365
-0
lines changed

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
10+
# Devenv
11+
.devenv*
12+
devenv.local.nix
13+
14+
# direnv
15+
.direnv
16+
17+
# pre-commit
18+
.pre-commit-config.yaml

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
sudo: false
3+
language: ruby
4+
cache: bundler
5+
rvm:
6+
- 2.6.10
7+
before_install: gem install bundler -v 1.17.2

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4+
5+
# Specify your gem's dependencies in octostat.gemspec
6+
gemspec

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Joé Dupuis
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.

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Octostat
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
6+
7+
## Installation
8+
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
22+
23+
## Usage
24+
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
34+
35+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/octostat.
36+
37+
## License
38+
39+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Rakefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require "bundler/gem_tasks"
2+
require "rake/testtask"
3+
4+
Rake::TestTask.new(:test) do |t|
5+
t.libs << "test"
6+
t.libs << "lib"
7+
t.test_files = FileList["test/**/*_test.rb"]
8+
end
9+
10+
task :default => :test

bin/console

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require "bundler/setup"
4+
require "octostat"
5+
6+
# You can add fixtures and/or initialization code here to make experimenting
7+
# with your gem easier. You can also use a different console, if you like.
8+
9+
# (If you use this, don't forget to add pry to your Gemfile!)
10+
# require "pry"
11+
# Pry.start
12+
13+
require "irb"
14+
IRB.start(__FILE__)

bin/setup

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
set -vx
5+
6+
bundle install
7+
8+
# Do any other automated setup that you need to do here

devenv.lock

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1715593316,
7+
"narHash": "sha256-S7XatU9uV3q9bVBcg/ER0VMQcnPZprrVlN209ne7LDw=",
8+
"owner": "cachix",
9+
"repo": "devenv",
10+
"rev": "725c90407ef53cc2a1b53701c6d2d0745cf2484f",
11+
"type": "github"
12+
},
13+
"original": {
14+
"dir": "src/modules",
15+
"owner": "cachix",
16+
"repo": "devenv",
17+
"type": "github"
18+
}
19+
},
20+
"flake-compat": {
21+
"flake": false,
22+
"locked": {
23+
"lastModified": 1733328505,
24+
"owner": "edolstra",
25+
"repo": "flake-compat",
26+
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
27+
"type": "github"
28+
},
29+
"original": {
30+
"owner": "edolstra",
31+
"repo": "flake-compat",
32+
"type": "github"
33+
}
34+
},
35+
"flake-compat_2": {
36+
"flake": false,
37+
"locked": {
38+
"lastModified": 1696426674,
39+
"owner": "edolstra",
40+
"repo": "flake-compat",
41+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
42+
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
43+
"type": "github"
44+
},
45+
"original": {
46+
"owner": "edolstra",
47+
"repo": "flake-compat",
48+
"type": "github"
49+
}
50+
},
51+
"flake-utils": {
52+
"inputs": {
53+
"systems": "systems"
54+
},
55+
"locked": {
56+
"lastModified": 1710146030,
57+
"owner": "numtide",
58+
"repo": "flake-utils",
59+
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
60+
"treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
61+
"type": "github"
62+
},
63+
"original": {
64+
"owner": "numtide",
65+
"repo": "flake-utils",
66+
"type": "github"
67+
}
68+
},
69+
"git-hooks": {
70+
"inputs": {
71+
"flake-compat": "flake-compat",
72+
"gitignore": "gitignore",
73+
"nixpkgs": [
74+
"nixpkgs"
75+
]
76+
},
77+
"locked": {
78+
"lastModified": 1737465171,
79+
"owner": "cachix",
80+
"repo": "git-hooks.nix",
81+
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
82+
"type": "github"
83+
},
84+
"original": {
85+
"owner": "cachix",
86+
"repo": "git-hooks.nix",
87+
"type": "github"
88+
}
89+
},
90+
"gitignore": {
91+
"inputs": {
92+
"nixpkgs": [
93+
"git-hooks",
94+
"nixpkgs"
95+
]
96+
},
97+
"locked": {
98+
"lastModified": 1709087332,
99+
"owner": "hercules-ci",
100+
"repo": "gitignore.nix",
101+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
102+
"type": "github"
103+
},
104+
"original": {
105+
"owner": "hercules-ci",
106+
"repo": "gitignore.nix",
107+
"type": "github"
108+
}
109+
},
110+
"nixpkgs": {
111+
"locked": {
112+
"lastModified": 1725001927,
113+
"owner": "NixOS",
114+
"repo": "nixpkgs",
115+
"rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
116+
"treeHash": "1e85443cc9f0ba302df2cf61cacb8014943e2d19",
117+
"type": "github"
118+
},
119+
"original": {
120+
"owner": "NixOS",
121+
"ref": "nixos-24.05",
122+
"repo": "nixpkgs",
123+
"type": "github"
124+
}
125+
},
126+
"nixpkgs-ruby": {
127+
"inputs": {
128+
"flake-compat": "flake-compat_2",
129+
"flake-utils": "flake-utils",
130+
"nixpkgs": "nixpkgs_2"
131+
},
132+
"locked": {
133+
"lastModified": 1724737223,
134+
"owner": "bobvanderlinden",
135+
"repo": "nixpkgs-ruby",
136+
"rev": "175b5867babcbc471b94be9fd5576f2973bbdb6d",
137+
"treeHash": "2fe3404ac0eeb7bcb7ac7b5f5f8b9b6a7e460147",
138+
"type": "github"
139+
},
140+
"original": {
141+
"owner": "bobvanderlinden",
142+
"repo": "nixpkgs-ruby",
143+
"type": "github"
144+
}
145+
},
146+
"nixpkgs_2": {
147+
"locked": {
148+
"lastModified": 1725001927,
149+
"owner": "NixOS",
150+
"repo": "nixpkgs",
151+
"rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
152+
"treeHash": "1e85443cc9f0ba302df2cf61cacb8014943e2d19",
153+
"type": "github"
154+
},
155+
"original": {
156+
"owner": "NixOS",
157+
"ref": "nixos-24.05",
158+
"repo": "nixpkgs",
159+
"type": "github"
160+
}
161+
},
162+
"root": {
163+
"inputs": {
164+
"devenv": "devenv",
165+
"git-hooks": "git-hooks",
166+
"nixpkgs": "nixpkgs",
167+
"nixpkgs-ruby": "nixpkgs-ruby",
168+
"pre-commit-hooks": [
169+
"git-hooks"
170+
]
171+
}
172+
},
173+
"systems": {
174+
"locked": {
175+
"lastModified": 1681028828,
176+
"owner": "nix-systems",
177+
"repo": "default",
178+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
179+
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
180+
"type": "github"
181+
},
182+
"original": {
183+
"owner": "nix-systems",
184+
"repo": "default",
185+
"type": "github"
186+
}
187+
}
188+
},
189+
"root": "root",
190+
"version": 7
191+
}

lib/octostat.rb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require "octostat/version"
2+
3+
module Octostat
4+
class Error < StandardError; end
5+
# Your code goes here...
6+
end

lib/octostat/version.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Octostat
2+
VERSION = "0.1.0"
3+
end

octostat.gemspec

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
lib = File.expand_path("../lib", __FILE__)
2+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3+
require "octostat/version"
4+
5+
Gem::Specification.new do |spec|
6+
spec.name = "Octostat"
7+
spec.version = Octostat::VERSION
8+
spec.authors = ["Joé Dupuis"]
9+
spec.email = ["[email protected]"]
10+
11+
spec.summary = "Octostat extract git information to Sqlite"
12+
spec.homepage = "https://github.com/testdouble/octostat"
13+
spec.license = "MIT"
14+
15+
spec.metadata["homepage_uri"] = spec.homepage
16+
spec.metadata["source_code_uri"] = spec.homepage
17+
spec.metadata["changelog_uri"] = "https://github.com/testdouble/octostat/main/CHANGELOG.md"
18+
19+
spec.files = Dir['lib/**/*.rb', 'Rakefile', 'README.md', 'CHANGELOG.md', 'LICENSE.txt']
20+
spec.bindir = "exe"
21+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22+
spec.require_paths = ["lib"]
23+
24+
spec.add_development_dependency "bundler", "~> 1.17"
25+
spec.add_development_dependency "rake", "~> 10.0"
26+
spec.add_development_dependency "minitest", "~> 5.0"
27+
end

test/octostat_test.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require "test_helper"
2+
3+
class OctostatTest < Minitest::Test
4+
def test_that_it_has_a_version_number
5+
refute_nil ::Octostat::VERSION
6+
end
7+
8+
def test_it_does_something_useful
9+
assert false
10+
end
11+
end

test/test_helper.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
2+
require "octostat"
3+
4+
require "minitest/autorun"

0 commit comments

Comments
 (0)