vagrant-cowsay-fortune 0.0.4 → 0.0.5

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/lib/ext/string.rb ADDED
@@ -0,0 +1,3 @@
1
+ class String
2
+ def works?() system("which #{self} 2>&1 > /dev/null") end
3
+ end
@@ -1,19 +1,12 @@
1
- begin
2
- require "vagrant"
3
- rescue LoadError
4
- raise "This is a vagrant plugin, do not use standalone."
5
- end
6
1
  require "vagrant/cowsay/fortune/version"
7
- #require "ext/string"
2
+ require "ext/string"
8
3
 
9
- module VagrantPlugins
4
+ module Vagrant
10
5
  module Cowsay
11
6
  module Fortune
12
- class Plugin < Vagrant.plugin("2")
13
- #name "vagrant-cowsay-fortune"
14
- #description "Cowsay + Fortune"
15
- puts "hello"
16
- #'fortune'.works? and 'cowsay'.works? and system('fortune -a | cowsay')
7
+ class VagrantCowsayFortune < Vagrant.plugin("2")
8
+ name "vagrant-cowsay-fortune"
9
+ 'fortune'.works? and 'cowsay'.works? and system('fortune -a | cowsay')
17
10
  end
18
11
  end
19
12
  end
@@ -1,7 +1,7 @@
1
1
  module Vagrant
2
2
  module Cowsay
3
3
  module Fortune
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-cowsay-fortune
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Wossal
@@ -61,6 +61,7 @@ files:
61
61
  - LICENSE.txt
62
62
  - README.md
63
63
  - Rakefile
64
+ - lib/ext/string.rb
64
65
  - lib/vagrant/cowsay/fortune.rb
65
66
  - lib/vagrant/cowsay/fortune/version.rb
66
67
  - vagrant-cowsay-fortune.gemspec