bukkit 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -1
- data/README.md +9 -0
- data/lib/bukkit.rb +6 -5
- data/lib/bukkit/download.rb +1 -0
- data/lib/bukkit/help.rb +48 -23
- data/lib/bukkit/install.rb +1 -1
- data/lib/bukkit/new.rb +2 -0
- data/lib/bukkit/start.rb +1 -0
- data/lib/bukkit/update.rb +1 -0
- data/lib/bukkit/version.rb +1 -1
- data/lib/bukkit/website.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28cb8d634661578cf277b6fc98310b33d3cfa09f
|
4
|
+
data.tar.gz: 78c6d26768e07272475313a00d1047f30f4fa1c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f607ffc2ff9803d38f69f652d8ec8211cae91d345e5c8b024bf1871ff017055fe703410011d24b9c221025827458639c48cbaa47b3df0afc4b248f576b0bbcd
|
7
|
+
data.tar.gz: 1535f425f630dfe2f6cf43db46fd1247e968dad1ea41d89404bf8f7cf8ab02f1692c23d11d4f5f5e82dc869669e6296c85cfc4b78cae1c88c3b1b177de75ad0e
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -19,3 +19,12 @@ A command line wrapper for CraftBukkit.
|
|
19
19
|
`bukkit install pluginname` Installs a new plugin. As long as it is on [dev.bukkit.org](http://dev.bukkit.org/).
|
20
20
|
|
21
21
|
`bukkit website pluginname` Opens the website of a plugin.
|
22
|
+
|
23
|
+
`bukkit update` Get's latest version of CraftBukkit.
|
24
|
+
|
25
|
+
`bukkit [-[-h]elp]` Displays help for commands.
|
26
|
+
|
27
|
+
`bukkit [-[-v]ersion]` Gives current Bukkit CLI version
|
28
|
+
|
29
|
+
###Prerequisites:
|
30
|
+
|
data/lib/bukkit.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Orderly and Alphabetical
|
1
|
+
# Orderly and Alphabetical Require Statements
|
2
2
|
require 'rubygems'
|
3
3
|
|
4
4
|
require 'bukkit/download'
|
@@ -15,10 +15,10 @@ module Bukkit
|
|
15
15
|
|
16
16
|
# First arg control flow
|
17
17
|
case opt1
|
18
|
-
when "-v", "--version", "version"
|
18
|
+
when "-v", "--version", "version", "v"
|
19
19
|
puts Bukkit::VERSION_FULL
|
20
|
-
when "-h", "--help", "help"
|
21
|
-
Bukkit::
|
20
|
+
when "-h", "--help", "help", "h"
|
21
|
+
Bukkit::Help.all
|
22
22
|
when "new"
|
23
23
|
Bukkit::new
|
24
24
|
when "start"
|
@@ -32,10 +32,11 @@ module Bukkit
|
|
32
32
|
else
|
33
33
|
if opt1.nil?
|
34
34
|
puts "You didn't enter a command.\n"
|
35
|
-
Bukkit::
|
35
|
+
Bukkit::Help.all
|
36
36
|
else
|
37
37
|
puts "'#{opt1}' is not a command."
|
38
38
|
puts "Run 'bukkit --help' for a list of commands."
|
39
|
+
Bukkit::Help.all
|
39
40
|
end
|
40
41
|
end
|
41
42
|
end
|
data/lib/bukkit/download.rb
CHANGED
data/lib/bukkit/help.rb
CHANGED
@@ -1,26 +1,51 @@
|
|
1
1
|
module Bukkit
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
2
|
+
class Help
|
3
|
+
|
4
|
+
# All Help Commands
|
5
|
+
|
6
|
+
def self.all
|
7
|
+
puts "Usage: bukkit COMMAND [OPTIONS]"
|
8
|
+
puts ""
|
9
|
+
puts "COMMANDS:"
|
10
|
+
|
11
|
+
new
|
12
|
+
start
|
13
|
+
install
|
14
|
+
website
|
15
|
+
update
|
16
|
+
help
|
17
|
+
version
|
18
|
+
end
|
19
|
+
|
20
|
+
# Individual Help Commands
|
21
|
+
|
22
|
+
def self.new
|
23
|
+
puts " USAGE: bukkit new my-awesome-server-name"
|
24
|
+
puts " Creates a new server."
|
25
|
+
end
|
26
|
+
def self.start
|
27
|
+
puts " USAGE: bukkit start"
|
28
|
+
puts " Starts up your server. Must be run in the server's root directory."
|
29
|
+
end
|
30
|
+
def self.install
|
31
|
+
puts " USAGE: bukkit install pluginname"
|
32
|
+
puts " Installs a new plugin. As long as it is on http://dev.bukkit.org."
|
33
|
+
end
|
34
|
+
def self.website
|
35
|
+
puts " USAGE: bukkit website pluginname"
|
36
|
+
puts " Opens the website of a plugin."
|
37
|
+
end
|
38
|
+
def self.update
|
39
|
+
puts " USAGE: bukkit update"
|
40
|
+
puts " Get's latest version of CraftBukkit."
|
41
|
+
end
|
42
|
+
def self.help
|
43
|
+
puts " USAGE: bukkit [-[-h]elp]"
|
44
|
+
puts " Displays help for commands."
|
45
|
+
end
|
46
|
+
def self.version
|
47
|
+
puts " USAGE: bukkit [-[-v]ersion]"
|
48
|
+
puts " Gives current Bukkit CLI version"
|
49
|
+
end
|
25
50
|
end
|
26
51
|
end
|
data/lib/bukkit/install.rb
CHANGED
@@ -6,7 +6,7 @@ require 'launchy'
|
|
6
6
|
module Bukkit
|
7
7
|
def self.install
|
8
8
|
$opt2 = ARGV[1].downcase
|
9
|
-
abort(
|
9
|
+
abort(Bukkit::Help.install) if $opt2.nil?
|
10
10
|
begin
|
11
11
|
plugins_api = JSON.parse(open("http://api.bukget.org/3/plugins/bukkit/#{$opt2}").read)
|
12
12
|
website = plugins_api["website"]
|
data/lib/bukkit/new.rb
CHANGED
data/lib/bukkit/start.rb
CHANGED
@@ -8,6 +8,7 @@ module Bukkit
|
|
8
8
|
puts "Make sure that you're in your server's root directory."
|
9
9
|
puts "If Java runtime is not present, run 'bukkit start' once Java is installed to complete the installation."
|
10
10
|
system 'java -jar craftbukkit.jar'
|
11
|
+
Bukkit::Help.start
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
data/lib/bukkit/update.rb
CHANGED
data/lib/bukkit/version.rb
CHANGED
data/lib/bukkit/website.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bukkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Herrick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|