vz 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/.rspec +7 -0
- data/.rvmrc +48 -0
- data/.simplecov +8 -0
- data/Gemfile +18 -0
- data/Guardfile +32 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +9 -0
- data/lib/vz.rb +5 -0
- data/lib/vz/version.rb +3 -0
- data/spec/lib/vz/version_spec.rb +3 -0
- data/spec/lib/vz_spec.rb +3 -0
- data/spec/spec_helper.rb +44 -0
- data/vz.gemspec +23 -0
- metadata +117 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rvmrc
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
|
4
|
+
# development environment upon cd'ing into the directory
|
|
5
|
+
|
|
6
|
+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
|
7
|
+
# Only full ruby name is supported here, for short names use:
|
|
8
|
+
# echo "rvm use 1.9.3" > .rvmrc
|
|
9
|
+
environment_id="ruby-1.9.3-p194@vz"
|
|
10
|
+
|
|
11
|
+
# Uncomment the following lines if you want to verify rvm version per project
|
|
12
|
+
# rvmrc_rvm_version="1.16.8 (master)" # 1.10.1 seams as a safe start
|
|
13
|
+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
|
14
|
+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
|
15
|
+
# return 1
|
|
16
|
+
# }
|
|
17
|
+
|
|
18
|
+
# First we attempt to load the desired environment directly from the environment
|
|
19
|
+
# file. This is very fast and efficient compared to running through the entire
|
|
20
|
+
# CLI and selector. If you want feedback on which environment was used then
|
|
21
|
+
# insert the word 'use' after --create as this triggers verbose mode.
|
|
22
|
+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
|
23
|
+
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
|
24
|
+
then
|
|
25
|
+
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
|
26
|
+
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
|
27
|
+
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
|
28
|
+
else
|
|
29
|
+
# If the environment file has not yet been created, use the RVM CLI to select.
|
|
30
|
+
rvm --create "$environment_id" || {
|
|
31
|
+
echo "Failed to create RVM environment '${environment_id}'."
|
|
32
|
+
return 1
|
|
33
|
+
}
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# If you use bundler, this might be useful to you:
|
|
37
|
+
# if [[ -s Gemfile ]] && {
|
|
38
|
+
# ! builtin command -v bundle >/dev/null ||
|
|
39
|
+
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
|
|
40
|
+
# }
|
|
41
|
+
# then
|
|
42
|
+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
|
43
|
+
# gem install bundler
|
|
44
|
+
# fi
|
|
45
|
+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
|
46
|
+
# then
|
|
47
|
+
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
|
|
48
|
+
# fi
|
data/.simplecov
ADDED
data/Gemfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Specify your gem's dependencies in vz.gemspec
|
|
4
|
+
gemspec
|
|
5
|
+
|
|
6
|
+
group :test do
|
|
7
|
+
gem 'coolline'
|
|
8
|
+
gem 'guard'
|
|
9
|
+
gem 'guard-rspec'
|
|
10
|
+
gem 'guard-spork'
|
|
11
|
+
|
|
12
|
+
gem 'fuubar'
|
|
13
|
+
gem 'simplecov'
|
|
14
|
+
|
|
15
|
+
gem 'growl', require: !!(RUBY_PLATFORM =~ /darwin/i) ? 'growl' : false
|
|
16
|
+
gem 'libnotify', require: !!(RUBY_PLATFORM =~ /linux/i) ? 'libnotify' : false
|
|
17
|
+
gem 'terminal-notifier', require: !!(RUBY_PLATFORM =~ /darwin/i) ? 'growl' : false
|
|
18
|
+
end
|
data/Guardfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# A sample Guardfile
|
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
|
3
|
+
|
|
4
|
+
guard 'spork', cucumber: false, test_unit: false, rspec: true, bundler: false, wait: 15, rspec_env: { 'RAILS_ENV' => 'test' } do
|
|
5
|
+
watch('Gemfile')
|
|
6
|
+
watch('Gemfile.lock')
|
|
7
|
+
watch('spec/spec_helper.rb') { :rspec }
|
|
8
|
+
watch('test/test_helper.rb') { :test_unit }
|
|
9
|
+
watch(%r{features/support/}) { :cucumber }
|
|
10
|
+
watch(%r{^spec/support/(.+)\.rb$}) { :rspec }
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
guard 'rspec', version: 2, bundler: false, all_after_pass: !ENV['ALL'].nil?, all_on_start: !ENV['ALL'].nil?, cli: '--drb --colour --format nested' do
|
|
14
|
+
watch(%r{^spec/.+_spec\.rb$})
|
|
15
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
|
16
|
+
watch('spec/spec_helper.rb') { "spec" }
|
|
17
|
+
|
|
18
|
+
# Rails example
|
|
19
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
20
|
+
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
|
21
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
|
22
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
|
23
|
+
watch('config/routes.rb') { "spec/routing" }
|
|
24
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
|
25
|
+
|
|
26
|
+
# Capybara request specs
|
|
27
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
|
28
|
+
|
|
29
|
+
# Turnip features and steps
|
|
30
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
|
31
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
|
32
|
+
end
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2012 Andrew Bennett
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Vz
|
|
2
|
+
|
|
3
|
+
TODO: Write a gem description
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
gem 'vz'
|
|
10
|
+
|
|
11
|
+
And then execute:
|
|
12
|
+
|
|
13
|
+
$ bundle
|
|
14
|
+
|
|
15
|
+
Or install it yourself as:
|
|
16
|
+
|
|
17
|
+
$ gem install vz
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
TODO: Write usage instructions here
|
|
22
|
+
|
|
23
|
+
## Contributing
|
|
24
|
+
|
|
25
|
+
1. Fork it
|
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/lib/vz.rb
ADDED
data/lib/vz/version.rb
ADDED
data/spec/lib/vz_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'spork'
|
|
3
|
+
#uncomment the following line to use spork with the debugger
|
|
4
|
+
#require 'spork/ext/ruby-debug'
|
|
5
|
+
|
|
6
|
+
Spork.prefork do
|
|
7
|
+
# Loading more in this block will cause your tests to run faster. However,
|
|
8
|
+
# if you change any configuration or code from libraries loaded here, you'll
|
|
9
|
+
# need to restart spork for it take effect.
|
|
10
|
+
|
|
11
|
+
ENV['RACK_ENV'] = ENV['RAILS_ENV'] = 'test'
|
|
12
|
+
require 'bundler/setup'
|
|
13
|
+
require 'simplecov'
|
|
14
|
+
require 'rspec/autorun'
|
|
15
|
+
|
|
16
|
+
require 'pry'
|
|
17
|
+
require 'vz'
|
|
18
|
+
|
|
19
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
20
|
+
# in spec/support/ and its subdirectories.
|
|
21
|
+
Dir[File.expand_path('../support/**/*.rb', __FILE__)].each {|f| require f}
|
|
22
|
+
|
|
23
|
+
RSpec.configure do |config|
|
|
24
|
+
# ## Mock Framework
|
|
25
|
+
#
|
|
26
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
|
27
|
+
#
|
|
28
|
+
# config.mock_with :mocha
|
|
29
|
+
# config.mock_with :flexmock
|
|
30
|
+
# config.mock_with :rr
|
|
31
|
+
config.mock_with :rspec
|
|
32
|
+
|
|
33
|
+
# Run specs in random order to surface order dependencies. If you find an
|
|
34
|
+
# order dependency and want to debug it, you can fix the order by providing
|
|
35
|
+
# the seed, which is printed after each run.
|
|
36
|
+
# --seed 1234
|
|
37
|
+
config.order = "random"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Spork.each_run do
|
|
43
|
+
# This code will be run each time you run your specs.
|
|
44
|
+
end
|
data/vz.gemspec
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'vz/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |gem|
|
|
7
|
+
gem.name = "vz"
|
|
8
|
+
gem.version = Vz::VERSION
|
|
9
|
+
gem.authors = ["Andrew Bennett"]
|
|
10
|
+
gem.email = ["andrew@delorum.com"]
|
|
11
|
+
gem.description = %q{OpenVZ utilities}
|
|
12
|
+
gem.summary = %q{OpenVZ utilities}
|
|
13
|
+
gem.homepage = "https://github.com/potatosalad/vz"
|
|
14
|
+
|
|
15
|
+
gem.files = `git ls-files`.split($/)
|
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
18
|
+
gem.require_paths = ["lib"]
|
|
19
|
+
|
|
20
|
+
gem.add_development_dependency 'pry'
|
|
21
|
+
gem.add_development_dependency 'rake'
|
|
22
|
+
gem.add_development_dependency 'rspec'
|
|
23
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: vz
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.0
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Andrew Bennett
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-10-13 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: pry
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0'
|
|
22
|
+
type: :development
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '0'
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: rake
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
type: :development
|
|
39
|
+
prerelease: false
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: rspec
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
none: false
|
|
50
|
+
requirements:
|
|
51
|
+
- - ! '>='
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
description: OpenVZ utilities
|
|
63
|
+
email:
|
|
64
|
+
- andrew@delorum.com
|
|
65
|
+
executables: []
|
|
66
|
+
extensions: []
|
|
67
|
+
extra_rdoc_files: []
|
|
68
|
+
files:
|
|
69
|
+
- .gitignore
|
|
70
|
+
- .rspec
|
|
71
|
+
- .rvmrc
|
|
72
|
+
- .simplecov
|
|
73
|
+
- Gemfile
|
|
74
|
+
- Guardfile
|
|
75
|
+
- LICENSE.txt
|
|
76
|
+
- README.md
|
|
77
|
+
- Rakefile
|
|
78
|
+
- lib/vz.rb
|
|
79
|
+
- lib/vz/version.rb
|
|
80
|
+
- spec/lib/vz/version_spec.rb
|
|
81
|
+
- spec/lib/vz_spec.rb
|
|
82
|
+
- spec/spec_helper.rb
|
|
83
|
+
- vz.gemspec
|
|
84
|
+
homepage: https://github.com/potatosalad/vz
|
|
85
|
+
licenses: []
|
|
86
|
+
post_install_message:
|
|
87
|
+
rdoc_options: []
|
|
88
|
+
require_paths:
|
|
89
|
+
- lib
|
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
|
+
none: false
|
|
92
|
+
requirements:
|
|
93
|
+
- - ! '>='
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
96
|
+
segments:
|
|
97
|
+
- 0
|
|
98
|
+
hash: 3316142756705297668
|
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
|
+
none: false
|
|
101
|
+
requirements:
|
|
102
|
+
- - ! '>='
|
|
103
|
+
- !ruby/object:Gem::Version
|
|
104
|
+
version: '0'
|
|
105
|
+
segments:
|
|
106
|
+
- 0
|
|
107
|
+
hash: 3316142756705297668
|
|
108
|
+
requirements: []
|
|
109
|
+
rubyforge_project:
|
|
110
|
+
rubygems_version: 1.8.24
|
|
111
|
+
signing_key:
|
|
112
|
+
specification_version: 3
|
|
113
|
+
summary: OpenVZ utilities
|
|
114
|
+
test_files:
|
|
115
|
+
- spec/lib/vz/version_spec.rb
|
|
116
|
+
- spec/lib/vz_spec.rb
|
|
117
|
+
- spec/spec_helper.rb
|