git_miner 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +6 -6
- data/README.md +8 -1
- data/Rakefile +2 -2
- data/bin/git-mine +0 -1
- data/git_miner.gemspec +2 -2
- data/lib/git_miner/core.rb +4 -1
- data/lib/git_miner/dispatch/abstract_dispatch.rb +2 -0
- data/lib/git_miner/dispatch/parallel_dispatch.rb +2 -0
- data/lib/git_miner/dispatch/simple_dispatch.rb +2 -0
- data/lib/git_miner/engine/abstract_engine.rb +1 -0
- data/lib/git_miner/engine/c_extension_engine.rb +5 -1
- data/lib/git_miner/engine/ruby_engine.rb +3 -1
- data/lib/git_miner/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0189bf9c342c04a3575700876f73dc9132eeab57ecd5127619ed591d4a9486a
|
4
|
+
data.tar.gz: 01db41129cc22cd8c4fd2ba3251603925613fe23ab028fa4b57cb88d05151b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d345cc49d44ef896a5875b7b4ab12679e72ed581301d9d5ef1500b84eb2a707af14e3d632da8d5e8a3b5654d54c2adc81e66a01b1454ffde2b16f2b8b3664d
|
7
|
+
data.tar.gz: f1ace38aefce766c9265269888b1c6f625461095ef5327a35723af392879d8c21e1c56a4c6d908b7f8eeda077bf5750e714b11477355b879449cce3d706aea13
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_miner (0.1
|
4
|
+
git_miner (0.2.1)
|
5
5
|
concurrent-ruby (~> 1.1)
|
6
6
|
parallel (~> 1.17)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
concurrent-ruby (1.1.
|
11
|
+
concurrent-ruby (1.1.9)
|
12
12
|
diff-lcs (1.3)
|
13
|
-
parallel (1.
|
14
|
-
rake (
|
13
|
+
parallel (1.21.0)
|
14
|
+
rake (13.0.1)
|
15
15
|
rake-compiler (1.0.7)
|
16
16
|
rake
|
17
17
|
rspec (3.8.0)
|
@@ -34,9 +34,9 @@ PLATFORMS
|
|
34
34
|
DEPENDENCIES
|
35
35
|
bundler (~> 2.0)
|
36
36
|
git_miner!
|
37
|
-
rake (~>
|
37
|
+
rake (~> 13.0)
|
38
38
|
rake-compiler (~> 1.0)
|
39
39
|
rspec (~> 3.0)
|
40
40
|
|
41
41
|
BUNDLED WITH
|
42
|
-
2.
|
42
|
+
2.2.32
|
data/README.md
CHANGED
@@ -2,17 +2,24 @@
|
|
2
2
|
|
3
3
|
Pet project I built to experiment with different concepts.
|
4
4
|
|
5
|
-
GitMiner allow
|
5
|
+
GitMiner allow "mining" of vanity Git SHA1 prefixes.
|
6
6
|
|
7
7
|
This gem is a work in progress (core functionality is working).
|
8
8
|
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
12
|
+
Rubygem:
|
12
13
|
```ruby
|
13
14
|
gem 'git_miner'
|
14
15
|
```
|
15
16
|
|
17
|
+
Development:
|
18
|
+
```
|
19
|
+
gem build git_miner.gemspec
|
20
|
+
gem install --local git_miner-*.gem
|
21
|
+
```
|
22
|
+
|
16
23
|
The installation will add the `git-mine` binary which act as a Git custom command: `git mine`.
|
17
24
|
|
18
25
|
|
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
7
7
|
task :default => :spec
|
8
8
|
|
9
9
|
Rake::ExtensionTask.new "git_miner_ext" do |ext|
|
10
|
-
ext.lib_dir = "lib
|
10
|
+
ext.lib_dir = "lib"
|
11
11
|
end
|
12
12
|
|
13
|
-
Rake::Task[:
|
13
|
+
Rake::Task[:spec].prerequisites << :compile
|
data/bin/git-mine
CHANGED
data/git_miner.gemspec
CHANGED
@@ -33,13 +33,13 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.executables = ["git-mine"]
|
34
34
|
spec.require_paths = ["lib"]
|
35
35
|
|
36
|
-
spec.extensions =
|
36
|
+
spec.extensions = Dir["ext/**/extconf.rb"]
|
37
37
|
|
38
38
|
spec.add_runtime_dependency "parallel", "~> 1.17"
|
39
39
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.1"
|
40
40
|
|
41
41
|
spec.add_development_dependency "bundler", "~> 2.0"
|
42
|
-
spec.add_development_dependency "rake", "~>
|
42
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
43
43
|
spec.add_development_dependency "rspec", "~> 3.0"
|
44
44
|
spec.add_development_dependency "rake-compiler", "~> 1.0"
|
45
45
|
end
|
data/lib/git_miner/core.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
module GitMiner
|
2
2
|
class Core
|
3
3
|
def initialize(engine:, dispatch:, prefix:)
|
4
|
-
GitMiner.logger.
|
4
|
+
GitMiner.logger.info("Initializing git miner.")
|
5
|
+
GitMiner.logger.info("Prefix: #{prefix}")
|
6
|
+
GitMiner.logger.debug("Engine: #{engine::IDENTIFIER}")
|
7
|
+
GitMiner.logger.debug("Dispatch: #{dispatch::IDENTIFIER}")
|
5
8
|
|
6
9
|
@prefix = prefix
|
7
10
|
|
@@ -1,10 +1,14 @@
|
|
1
|
-
require '
|
1
|
+
require 'openssl'
|
2
|
+
|
3
|
+
require File.join(__dir__, '..', '..', 'git_miner_ext')
|
2
4
|
|
3
5
|
module GitMiner
|
4
6
|
module Engine
|
5
7
|
class CExtensionEngine < AbstractEngine
|
6
8
|
include GitMinerExt
|
7
9
|
|
10
|
+
IDENTIFIER = "CExtension"
|
11
|
+
|
8
12
|
def sha1(str)
|
9
13
|
c_sha1_hexdigest(str)
|
10
14
|
end
|
@@ -3,6 +3,8 @@ require 'digest'
|
|
3
3
|
module GitMiner
|
4
4
|
module Engine
|
5
5
|
class RubyEngine < AbstractEngine
|
6
|
+
IDENTIFIER = "Ruby"
|
7
|
+
|
6
8
|
def sha1(str)
|
7
9
|
Digest::SHA1.hexdigest(str)
|
8
10
|
end
|
@@ -26,7 +28,7 @@ module GitMiner
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
|
31
|
+
nil
|
30
32
|
end
|
31
33
|
|
32
34
|
private
|
data/lib/git_miner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_miner
|
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
|
- Thierry Joyal
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,7 +134,7 @@ licenses: []
|
|
134
134
|
metadata:
|
135
135
|
homepage_uri: https://github.com/tjoyal/git_miner
|
136
136
|
source_code_uri: https://github.com/tjoyal/git_miner
|
137
|
-
post_install_message:
|
137
|
+
post_install_message:
|
138
138
|
rdoc_options: []
|
139
139
|
require_paths:
|
140
140
|
- lib
|
@@ -149,8 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
153
|
-
signing_key:
|
152
|
+
rubygems_version: 3.2.32
|
153
|
+
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: git-mine shell executable
|
156
156
|
test_files: []
|