suppository 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Guardfile +2 -2
- data/README.md +1 -1
- data/Rakefile +7 -7
- data/bin/suppository +4 -8
- data/lib/suppository/add_command.rb +14 -5
- data/lib/suppository/release.rb +2 -2
- data/lib/suppository/repository.rb +2 -2
- data/lib/suppository/version.rb +1 -1
- data/spec/spec_helper.rb +11 -16
- data/spec/suppository/add_command_spec.rb +37 -41
- data/spec/suppository/cli_spec.rb +19 -22
- data/spec/suppository/command_runner_spec.rb +5 -10
- data/spec/suppository/create_command_spec.rb +22 -27
- data/spec/suppository/dpkg_deb_line_spec.rb +10 -13
- data/spec/suppository/dpkg_deb_spec.rb +25 -29
- data/spec/suppository/gzip_spec.rb.rb +4 -6
- data/spec/suppository/help_command_spec.rb +2 -5
- data/spec/suppository/help_spec.rb +1 -4
- data/spec/suppository/logger_spec.rb +17 -27
- data/spec/suppository/master_deb_spec.rb +30 -39
- data/spec/suppository/package_spec.rb +32 -37
- data/spec/suppository/release_spec.rb +1 -0
- data/spec/suppository/repository_spec.rb +20 -25
- data/spec/suppository/tty_spec.rb +24 -39
- data/spec/suppository/version_command_spec.rb +2 -5
- data/spec/suppository/version_spec.rb +1 -5
- data/spec/suppository_spec.rb +23 -31
- data/suppository.gemspec +17 -18
- metadata +2 -2
data/spec/suppository_spec.rb
CHANGED
@@ -3,77 +3,69 @@ require 'suppository/version'
|
|
3
3
|
require 'English'
|
4
4
|
|
5
5
|
describe 'suppository binary' do
|
6
|
-
|
7
6
|
before(:each) do
|
8
|
-
|
9
|
-
|
7
|
+
@cmd = File.expand_path('./bin/suppository')
|
8
|
+
@repository_path = "/tmp/suppository_test_#{Time.now.to_f}"
|
10
9
|
end
|
11
10
|
|
12
11
|
after(:each) do
|
13
12
|
FileUtils.rm_r @repository_path if File.directory? @repository_path
|
14
13
|
end
|
15
|
-
|
16
|
-
it 'fails if no command is given' do
|
14
|
+
|
15
|
+
it 'fails if no command is given' do
|
17
16
|
output = `"#{@cmd}" 2>&1`
|
18
17
|
expect($CHILD_STATUS.success?).to be_falsy
|
19
18
|
expect(output).to include 'Error: Invalid usage'
|
20
|
-
end
|
21
|
-
|
19
|
+
end
|
20
|
+
|
22
21
|
describe 'create' do
|
23
|
-
|
24
|
-
it 'creates folder without error' do
|
22
|
+
it 'creates folder without error' do
|
25
23
|
`"#{@cmd}" create #{@repository_path}`
|
26
24
|
expect($CHILD_STATUS.success?).to be_truthy
|
27
25
|
expect(File.directory?("#{@repository_path}/dists")).to be_truthy
|
28
26
|
expect(File.directory?(@repository_path)).to be_truthy
|
29
27
|
expect(File.directory?("#{@repository_path}/.suppository")).to be_truthy
|
30
|
-
end
|
31
|
-
|
32
|
-
it 'fails if arguments invalid' do
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'fails if arguments invalid' do
|
33
31
|
output = `"#{@cmd}" create 2>&1`
|
34
32
|
expect($CHILD_STATUS.success?).to be_falsy
|
35
33
|
expect(output).to include 'Error: Invalid usage'
|
36
34
|
end
|
37
|
-
|
38
35
|
end
|
39
|
-
|
36
|
+
|
40
37
|
describe 'version' do
|
41
|
-
|
42
|
-
it 'runs without error' do
|
38
|
+
it 'runs without error' do
|
43
39
|
output = `"#{@cmd}" version`
|
44
40
|
expect($CHILD_STATUS.success?).to be_truthy
|
45
41
|
expect(output).to include "Suppository Version #{Suppository::VERSION}"
|
46
|
-
end
|
47
|
-
|
42
|
+
end
|
48
43
|
end
|
49
|
-
|
44
|
+
|
50
45
|
describe 'help' do
|
51
|
-
|
52
|
-
it 'runs without error' do
|
46
|
+
it 'runs without error' do
|
53
47
|
output = `"#{@cmd}" help`
|
54
48
|
expect($CHILD_STATUS.success?).to be_truthy
|
55
|
-
expect(output).to include
|
56
|
-
end
|
57
|
-
|
49
|
+
expect(output).to include 'Example usage:'
|
50
|
+
end
|
58
51
|
end
|
59
52
|
|
60
53
|
describe 'add' do
|
61
|
-
|
62
|
-
it 'runs without error' do
|
54
|
+
it 'runs without error' do
|
63
55
|
`"#{@cmd}" create #{@repository_path}`
|
64
56
|
`"#{@cmd}" add #{@repository_path} trusty internal "#{deb_file}" --unsigned`
|
65
57
|
expect($CHILD_STATUS.success?).to be_truthy
|
66
58
|
expect(File.file?("#{@repository_path}/dists/trusty/internal/binary-amd64/curl_7.22.0-3ubuntu4.11_amd64.deb")).to be_truthy
|
67
59
|
expect(File.file?("#{@repository_path}/dists/trusty/internal/binary-i386/curl_7.22.0-3ubuntu4.11_amd64.deb")).to be_truthy
|
68
|
-
end
|
69
|
-
|
70
|
-
it 'fails if arguments invalid' do
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'fails if arguments invalid' do
|
71
63
|
output = `"#{@cmd}" add #{@repository_path} trusty internal "#{deb_file} --unsigned" 2>&1`
|
72
64
|
expect($CHILD_STATUS.success?).to be_falsy
|
73
65
|
expect(output).to include "Error: #{@repository_path} is not a valid repository"
|
74
66
|
end
|
75
|
-
|
76
|
-
|
67
|
+
|
68
|
+
it 'fails if signing attempted (assumes no certificate)' do
|
77
69
|
output = `"#{@cmd}" add #{@repository_path} trusty internal "#{deb_file}" 2>&1`
|
78
70
|
expect($CHILD_STATUS.success?).to be_falsy
|
79
71
|
expect(output).to include "Error: #{@repository_path} is not a valid repository"
|
data/suppository.gemspec
CHANGED
@@ -4,32 +4,31 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'suppository/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'suppository'
|
8
8
|
spec.version = Suppository::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
9
|
+
spec.authors = ['William Griffiths', 'Luke Farrar']
|
10
|
+
spec.email = ['william.griffiths@thebookpeople.co.uk', 'luke.farrar@thebookpeople.co.uk']
|
11
|
+
spec.summary = 'Super Simple Apt Repository Manager'
|
12
|
+
spec.description = 'A utility for creating and managing simple apt repositories.'
|
13
|
+
spec.homepage = 'https://github.com/TheBookPeople/suppository'
|
14
|
+
spec.license = 'GNU'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.required_ruby_version =
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency 'rspec', '~> 3.1'
|
25
|
-
spec.add_development_dependency 'guard-rspec','~> 4.5'
|
26
|
-
spec.add_development_dependency 'rb-inotify','~> 0.9'
|
27
|
-
spec.add_development_dependency 'rb-fsevent'
|
28
|
-
spec.add_development_dependency 'rb-fchange', '~> 0.0'
|
21
|
+
spec.required_ruby_version = '>= 1.9.3'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.4'
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
25
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.5'
|
26
|
+
spec.add_development_dependency 'rb-inotify', '~> 0.9'
|
27
|
+
spec.add_development_dependency 'rb-fsevent', '~> 0.9'
|
28
|
+
spec.add_development_dependency 'rb-fchange', '~> 0.0'
|
29
29
|
spec.add_development_dependency 'terminal-notifier-guard', '~> 1.6'
|
30
|
-
spec.add_development_dependency 'rubocop'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 0.28'
|
31
31
|
spec.add_development_dependency 'fakefs', '~> 0'
|
32
32
|
spec.add_development_dependency 'simplecov', '~> 0.9'
|
33
33
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
|
34
|
-
|
35
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suppository
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Griffiths
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|