s3repo 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef33abc7a9c68094cea63f78eda508e1d28410f6
4
- data.tar.gz: 4bdecf7a7da13f587885170820ea4ec366023e3b
3
+ metadata.gz: bd7ef642134fab4be6e039ff269e369db9037345
4
+ data.tar.gz: 454d915c9b7b72e7fffc825fda3c81548a637f68
5
5
  SHA512:
6
- metadata.gz: 00a381930d91c53ab11280a6ee3e123013ac4c11ee748cfb4ea2cd7ebb7cb685797fc9e26a6c1a005bf0a88b72cf23dbbcdd2465b98452497ff9dcb44ee647db
7
- data.tar.gz: 3424d3b8beb09b9228ab369d3b0571dc07eb395ac732ff1ee53d60707b46a76f433b36db1e085f48fb582feb9aa00bbd9677a115eae3aa228a4d963fc062234e
6
+ metadata.gz: 160d26e0ecb9c836ca380043a5a2d9968ffe79824ce6dbe582b755266748f315c557ac3212941c92576acce15ba19a557322007320354ec3de09b23bf7c169f5
7
+ data.tar.gz: 4925690ee1b40f189ca78e2371b69e0534f86c9be9cb3ba5f2df52b1f2bd4aa1dd0de277ed7816cd826accf3e59d0b23fe870f84362f745190848ca203fa9389
data/bin/s3repo CHANGED
@@ -30,6 +30,15 @@ Mercenary.program(:s3repo) do |p|
30
30
  end
31
31
  end
32
32
 
33
+ p.command(:remove) do |c|
34
+ c.syntax 'remove [package...]'
35
+ c.description 'Remove packages from repo DB'
36
+
37
+ c.action do |args, _|
38
+ S3Repo.new.remove_packages args
39
+ end
40
+ end
41
+
33
42
  p.action do
34
43
  puts p
35
44
  exit 1
@@ -16,6 +16,19 @@ module S3Repo
16
16
  puts "Adding #{File.basename(path)} to repo.db"
17
17
  run("repo-add #{db_path} #{path}")
18
18
  end
19
+ update!
20
+ end
21
+
22
+ def remove_packages(packages)
23
+ @db_path = nil
24
+ packages.each do |package|
25
+ puts "Removing #{package} from repo.db"
26
+ run("repo-remove #{db_path} #{package}")
27
+ end
28
+ update!
29
+ end
30
+
31
+ def update!
19
32
  client.upload!('repo.db', db_path)
20
33
  sign_db if ENV['S3REPO_SIGN_DB']
21
34
  end
data/lib/s3repo/repo.rb CHANGED
@@ -27,6 +27,10 @@ module S3Repo
27
27
  metadata.add_packages(paths)
28
28
  end
29
29
 
30
+ def remove_packages(packages)
31
+ metadata.remove_package(packages)
32
+ end
33
+
30
34
  def packages
31
35
  package_cache.cache { parse_packages }
32
36
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define version
3
3
  module S3Repo
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
data/s3repo.gemspec CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'aws-sdk', '~> 2.0.0'
22
22
  s.add_dependency 'basiccache', '~> 1.0.0'
23
23
 
24
- s.add_development_dependency 'rubocop', '~> 0.28.0'
24
+ s.add_development_dependency 'rubocop', '~> 0.29.0'
25
25
  s.add_development_dependency 'rake', '~> 10.4.0'
26
26
  s.add_development_dependency 'coveralls', '~> 0.7.1'
27
- s.add_development_dependency 'rspec', '~> 3.1.0'
27
+ s.add_development_dependency 'rspec', '~> 3.2.0'
28
28
  s.add_development_dependency 'fuubar', '~> 2.0.0'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mercenary
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.28.0
61
+ version: 0.29.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: 0.28.0
68
+ version: 0.29.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 3.1.0
103
+ version: 3.2.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 3.1.0
110
+ version: 3.2.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: fuubar
113
113
  requirement: !ruby/object:Gem::Requirement