git-gc-cron 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +2 -0
- data/features/cli.feature +2 -2
- data/features/step_definitions/repos.rb +6 -6
- data/lib/git_gc_cron/cli.rb +5 -3
- data/lib/git_gc_cron/version.rb +1 -1
- metadata +65 -63
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Yzg0NGEwY2Q0ZGIwMGJiNDQ3ZTJiYzRkMWFhYjNkMjEyYWY4OWEyMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Mjg4M2E0M2JiN2UxZjNjOWViNjFlYjYzZjk0NjUxODE5ZDY5ZjZhYg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGQ0MDFlZGFkMmRiNzlmNGRlOWFjZGY0MmQ5YWY2NmRlN2JmNGM3ZGYxZWFi
|
10
|
+
NTc4ZTY3MTIzMTNhMWZlNzY4ODlmNzUxZjhjNDU4MWNiNzllMjNlNzYxODkx
|
11
|
+
OGMxYTllZjcyNWUxOWY0YjVkMzYwMGNiMDViZmY2YjJlZGEwMWU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NmRlODFkNzljZjk0MjljOGU2OWEyNjJhODI2MjhiNjg1ODE3Nzk2YzVkYmE2
|
14
|
+
ZjBhYmZjMjU1NjQyNDE3NzZhM2E5YTRmZjgyNjMzMGM5ODdkNTY5NmUxMjQw
|
15
|
+
NzA3MjYyNThjZmY2MTRjYzllMTE2YTE3MjkwN2U3NDlmYTFjMTA=
|
data/Gemfile
CHANGED
data/features/cli.feature
CHANGED
@@ -8,7 +8,7 @@ Feature: CLI
|
|
8
8
|
And a checked out repo "repos1/def/xyz"
|
9
9
|
And a bare repo "repos2/ghi.git"
|
10
10
|
And a bare repo "repos3/jkl.git"
|
11
|
-
When I run
|
11
|
+
When I run `git-gc-cron repos1 repos2`
|
12
12
|
Then the repo "repos1/abc" should be packed
|
13
13
|
And the repo "repos1/def/xyz" should be packed
|
14
14
|
And the repo "repos2/ghi.git" should be packed
|
@@ -17,6 +17,6 @@ Feature: CLI
|
|
17
17
|
Scenario: Verbose output
|
18
18
|
Given a checked out repo "repos1/abc"
|
19
19
|
And a checked out repo "repos1/def/xyz"
|
20
|
-
When I run
|
20
|
+
When I run `git-gc-cron -v repos1`
|
21
21
|
Then the output should contain "repos1/abc"
|
22
22
|
And the output should contain "repos1/def/xyz"
|
@@ -1,21 +1,21 @@
|
|
1
|
-
Given
|
1
|
+
Given(/^a checked out repo "([^"]*)"$/) do |path|
|
2
2
|
dirs << path
|
3
3
|
run "git init -q"
|
4
4
|
dirs.pop
|
5
5
|
end
|
6
6
|
|
7
|
-
Given
|
7
|
+
Given(/^a bare repo "([^"]*)"$/) do |path|
|
8
8
|
dirs << path
|
9
9
|
run "git init --bare -q"
|
10
10
|
dirs.pop
|
11
11
|
end
|
12
12
|
|
13
|
-
Then
|
13
|
+
Then(/^the repo "([^"]*)" should be packed$/) do |path|
|
14
14
|
path << "/.git" unless path =~ /\.git$/
|
15
|
-
|
15
|
+
step %|a file named "#{path}/objects/info/packs" should exist|
|
16
16
|
end
|
17
17
|
|
18
|
-
Then
|
18
|
+
Then(/^the repo "([^"]*)" should not be packed$/) do |path|
|
19
19
|
path << "/.git" unless path =~ /\.git$/
|
20
|
-
|
20
|
+
step %|a file named "#{path}/objects/info/packs" should not exist|
|
21
21
|
end
|
data/lib/git_gc_cron/cli.rb
CHANGED
@@ -6,9 +6,11 @@ module GitGcCron
|
|
6
6
|
ARGV.each do |base|
|
7
7
|
repos = Dir["#{base}/**/{.git,*.git}"]
|
8
8
|
repos.each_with_index do |repo_path, i|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
if File.directory?(repo_path) then
|
10
|
+
Dir.chdir(repo_path) do
|
11
|
+
puts repo_path if verbose
|
12
|
+
system ["git", "(##{i + 1}/#{repos.size + 1} #{repo_path}) git"], "gc", "-q"
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
data/lib/git_gc_cron/version.rb
CHANGED
metadata
CHANGED
@@ -1,62 +1,68 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-gc-cron
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Thomas Ritz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
17
14
|
name: rspec
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
25
20
|
type: :development
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: cucumber
|
29
21
|
prerelease: false
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cucumber
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
36
34
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: aruba
|
40
35
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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: aruba
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
47
48
|
type: :development
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: git-gc-cron recursively searches for git repos in the directories specified
|
56
|
+
on the command line and runs "git gc" on them.
|
57
|
+
email:
|
51
58
|
- thomas@galaxy-ritz.de
|
52
|
-
executables:
|
59
|
+
executables:
|
53
60
|
- git-gc-cron
|
54
61
|
extensions: []
|
55
|
-
|
56
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
57
63
|
- LICENSE
|
58
64
|
- README
|
59
|
-
files:
|
65
|
+
files:
|
60
66
|
- .gitignore
|
61
67
|
- Gemfile
|
62
68
|
- LICENSE
|
@@ -70,35 +76,31 @@ files:
|
|
70
76
|
- lib/git_gc_cron.rb
|
71
77
|
- lib/git_gc_cron/cli.rb
|
72
78
|
- lib/git_gc_cron/version.rb
|
73
|
-
|
74
|
-
homepage: ""
|
79
|
+
homepage: ''
|
75
80
|
licenses: []
|
76
|
-
|
81
|
+
metadata: {}
|
77
82
|
post_install_message:
|
78
|
-
rdoc_options:
|
83
|
+
rdoc_options:
|
79
84
|
- --charset=UTF-8
|
80
|
-
require_paths:
|
85
|
+
require_paths:
|
81
86
|
- lib
|
82
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: "0"
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
94
97
|
requirements: []
|
95
|
-
|
96
98
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.
|
99
|
+
rubygems_version: 2.1.0
|
98
100
|
signing_key:
|
99
|
-
specification_version:
|
101
|
+
specification_version: 4
|
100
102
|
summary: Let cron run "git gc" on all your git repos
|
101
|
-
test_files:
|
103
|
+
test_files:
|
102
104
|
- features/cli.feature
|
103
105
|
- features/step_definitions/repos.rb
|
104
106
|
- features/support/setup.rb
|