mount 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/README.md +1 -1
- data/Rakefile +11 -1
- data/lib/mount.rb +2 -3
- data/lib/mount/command.rb +9 -0
- data/lib/mount/command/base.rb +22 -0
- data/lib/mount/command/linux.rb +6 -0
- data/lib/mount/command/redhat.rb +9 -0
- data/lib/mount/version.rb +1 -1
- data/mount.gemspec +9 -8
- data/spec/lib/mount/command/base_spec.rb +15 -0
- data/spec/lib/mount/command/linux_spec.rb +5 -0
- data/spec/lib/mount/command/redhat_spec.rb +11 -0
- data/spec/spec_helper.rb +1 -0
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cdee59ab7d3253e00a36921a26341ee52b50b39
|
4
|
+
data.tar.gz: 04390e8cacbfb8b47def815b16742007e15acb14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 017a8ec0192f4abb7080f6404aa97e505563eeae2aade6368d118471b5549eb14c64c68d2c1abc1b9559ff8186aea1c7ba95ebb2625fa30eb2b3f3c08b009e02
|
7
|
+
data.tar.gz: f22013b06d5a1a08331b8d10674ac2adca208fb4d3e2add840f41ab44db3a995a4ec48ee4b4233c83ed0abbaed20cb14e0f534ce6d09b9bb627f429e75c63a8d
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
require 'rspec/core'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
7
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
8
|
+
spec.ruby_opts = %w[-w]
|
9
|
+
end
|
10
|
+
|
11
|
+
task :default => :spec
|
data/lib/mount.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
|
3
|
+
module Mount
|
4
|
+
module Command
|
5
|
+
class Base
|
6
|
+
def escape(target)
|
7
|
+
str = case target
|
8
|
+
when Regexp
|
9
|
+
target.source
|
10
|
+
else
|
11
|
+
target.to_s
|
12
|
+
end
|
13
|
+
|
14
|
+
Shellwords.shellescape(str)
|
15
|
+
end
|
16
|
+
|
17
|
+
def install(package, version=nil)
|
18
|
+
raise NotImplementedError.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/mount/version.rb
CHANGED
data/mount.gemspec
CHANGED
@@ -4,20 +4,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'mount/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'mount'
|
8
8
|
spec.version = Mount::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Kentaro Kuribayashi']
|
10
|
+
spec.email = ['kentarok@gmail.com']
|
11
11
|
spec.description = %q{Common foundation of DevOps tools}
|
12
12
|
spec.summary = %q{Common foundation of DevOps tools}
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
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.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'rspec'
|
23
24
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Mount::Command::Base do
|
4
|
+
subject { described_class.new }
|
5
|
+
|
6
|
+
describe '#escape' do
|
7
|
+
it { expect(subject.escape('foo|bar')).to be == 'foo\|bar' }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#install' do
|
11
|
+
it {
|
12
|
+
expect { subject.install('httpd') }.to raise_error(Mount::Command::NotImplementedError)
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative '../lib/mount'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kentaro Kuribayashi
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Common foundation of DevOps tools
|
42
56
|
email:
|
43
57
|
- kentarok@gmail.com
|
@@ -46,13 +60,22 @@ extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- .gitignore
|
63
|
+
- .travis.yml
|
49
64
|
- Gemfile
|
50
65
|
- LICENSE.txt
|
51
66
|
- README.md
|
52
67
|
- Rakefile
|
53
68
|
- lib/mount.rb
|
69
|
+
- lib/mount/command.rb
|
70
|
+
- lib/mount/command/base.rb
|
71
|
+
- lib/mount/command/linux.rb
|
72
|
+
- lib/mount/command/redhat.rb
|
54
73
|
- lib/mount/version.rb
|
55
74
|
- mount.gemspec
|
75
|
+
- spec/lib/mount/command/base_spec.rb
|
76
|
+
- spec/lib/mount/command/linux_spec.rb
|
77
|
+
- spec/lib/mount/command/redhat_spec.rb
|
78
|
+
- spec/spec_helper.rb
|
56
79
|
homepage: ''
|
57
80
|
licenses:
|
58
81
|
- MIT
|
@@ -77,4 +100,8 @@ rubygems_version: 2.0.3
|
|
77
100
|
signing_key:
|
78
101
|
specification_version: 4
|
79
102
|
summary: Common foundation of DevOps tools
|
80
|
-
test_files:
|
103
|
+
test_files:
|
104
|
+
- spec/lib/mount/command/base_spec.rb
|
105
|
+
- spec/lib/mount/command/linux_spec.rb
|
106
|
+
- spec/lib/mount/command/redhat_spec.rb
|
107
|
+
- spec/spec_helper.rb
|