bukkit 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG +2 -1
- data/Gemfile.lock +6 -5
- data/README.md +7 -2
- data/Rakefile +29 -27
- data/bin/bukkit +9 -1
- data/bukkit.gemspec +11 -7
- data/lib/bukkit/install.rb +3 -3
- data/lib/bukkit/new.rb +11 -2
- data/lib/bukkit/version.rb +1 -1
- metadata +22 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15f530d8c4377ef0efe8388352f6d260f77113df
|
4
|
+
data.tar.gz: 79f7702c95236e6791488f710fad8036e36f0385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51606b8e0906b8b95a688cfccdfe9a56b952919e44ea85b305dc03b2d50ae492bc5ea886e8a61860ad8228036482a408d64d6e7fe0b4a93f622a2d7425f1f7eb
|
7
|
+
data.tar.gz: 0f11c78afbc3b4a78067bcb83d191b4570f4041b88ecdeb1f0d77ce57e79f2253a3da45b3253b7b751fc1dd1992bb82c521c36268a4d76492fc8f561719af0a1
|
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
@@ -6,4 +6,5 @@ v0.1.4: Much better documentation.
|
|
6
6
|
v1.0.0: Total revamp of the CLI and docs. Definitely v1.0.
|
7
7
|
v1.0.1: Got rid of the old docs.
|
8
8
|
v1.0.2: Fixed some cosmetic things and bugs.
|
9
|
-
v1.0.3: Just made the CLI little bit nicer.
|
9
|
+
v1.0.3: Just made the CLI little bit nicer.
|
10
|
+
v1.0.4: Better Windows support and '--force' option to the 'new' command.
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bukkit (1.0
|
4
|
+
bukkit (1.1.0)
|
5
5
|
archive-zip
|
6
6
|
colorize
|
7
7
|
commander
|
8
8
|
json
|
9
9
|
launchy
|
10
|
-
rake
|
11
10
|
|
12
11
|
GEM
|
13
12
|
remote: https://rubygems.org/
|
@@ -15,12 +14,12 @@ GEM
|
|
15
14
|
addressable (2.3.5)
|
16
15
|
archive-zip (0.6.0)
|
17
16
|
io-like (>= 0.3.0)
|
18
|
-
colorize (0.
|
17
|
+
colorize (0.6.0)
|
19
18
|
commander (4.1.5)
|
20
19
|
highline (~> 1.6.11)
|
21
|
-
highline (1.6.
|
20
|
+
highline (1.6.20)
|
22
21
|
io-like (0.3.0)
|
23
|
-
json (1.8.
|
22
|
+
json (1.8.1)
|
24
23
|
launchy (2.3.0)
|
25
24
|
addressable (~> 2.3)
|
26
25
|
rake (10.1.0)
|
@@ -30,3 +29,5 @@ PLATFORMS
|
|
30
29
|
|
31
30
|
DEPENDENCIES
|
32
31
|
bukkit!
|
32
|
+
bundler
|
33
|
+
rake
|
data/README.md
CHANGED
@@ -3,6 +3,11 @@ Bukkit-CLI
|
|
3
3
|
|
4
4
|
A Bukkit Server command line interface.
|
5
5
|
|
6
|
+
![Gem Version](https://badge.fury.io/rb/bukkit.png)
|
7
|
+
|
8
|
+
[![Dependency Status](https://gemnasium.com/JesseHerrick/Bukkit-CLI.png)](https://gemnasium.com/JesseHerrick/Bukkit-CLI)
|
9
|
+
[![Build Status](https://travis-ci.org/JesseHerrick/Bukkit-CLI.png?branch=master)](https://travis-ci.org/JesseHerrick/Bukkit-CLI)
|
10
|
+
|
6
11
|
##Features (see [commands](https://github.com/JesseHerrick/Bukkit-CLI/blob/master/README.md#commands) for more details)
|
7
12
|
* Automatically creates a new server (your choice of build: rb, beta, or dev) with a simple command.
|
8
13
|
* Plugin manager. No more downloading and copying files.
|
@@ -18,13 +23,13 @@ A Bukkit Server command line interface.
|
|
18
23
|
```
|
19
24
|
|
20
25
|
###Commands:
|
21
|
-
__To View Command Options run:__ `bukkit [command] [options:
|
26
|
+
__To View Command Options run:__ `bukkit [command] [options: -[-h]elp]`
|
22
27
|
|
23
28
|
`bukkit [--help, -h]` Display global help.
|
24
29
|
|
25
30
|
`bukkit install my-favorite-plugin` Install a new bukkit plugin.
|
26
31
|
|
27
|
-
`bukkit new my-awesome-server-name [options: --rb, --beta, --dev]` Create a new Bukkit server.
|
32
|
+
`bukkit new my-awesome-server-name [options: --rb, --beta, --dev, -[-f]orce (Overwrite any conflicting dirs.)], ` Create a new Bukkit server.
|
28
33
|
|
29
34
|
`bukkit start` Start your server.
|
30
35
|
|
data/Rakefile
CHANGED
@@ -1,38 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$: << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
4
|
+
|
5
|
+
# Lib Files
|
6
|
+
require 'bukkit/version'
|
7
|
+
|
8
|
+
# Gems
|
1
9
|
require "rubygems"
|
2
10
|
require "rake"
|
3
11
|
require "colorize"
|
4
12
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
desc "Create a new Bukkit server."
|
12
|
-
task :new do
|
13
|
-
puts "Checking `new` command...".yellow
|
14
|
-
`bukkit new test --rb`
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Start your server."
|
18
|
-
task :start do
|
19
|
-
puts "Checking `start` command...".yellow
|
20
|
-
check = `bukkit start`
|
21
|
-
puts check
|
13
|
+
# Tasks
|
14
|
+
desc "Get version"
|
15
|
+
task :version do
|
16
|
+
version = Bukkit::VERSION_FULL.split
|
17
|
+
puts "#{version[0].blue} #{version[1].yellow}"
|
22
18
|
end
|
23
19
|
|
24
|
-
desc "
|
25
|
-
task :
|
26
|
-
|
20
|
+
desc "Default task."
|
21
|
+
task :default do
|
22
|
+
`rake version`
|
23
|
+
puts "Nothing to see here... move along.".green
|
24
|
+
puts "Run".yellow + " `bukkit new my-awesome-server-name` to start a new server."
|
27
25
|
end
|
28
26
|
|
29
|
-
desc "
|
30
|
-
task :
|
27
|
+
desc "Build gem."
|
28
|
+
task :build do
|
29
|
+
puts "Starting gem build...".yellow
|
30
|
+
puts " Building...".yellow
|
31
|
+
`gem build bukkit.gemspec`
|
31
32
|
|
32
|
-
|
33
|
+
version = Bukkit::VERSION
|
34
|
+
puts "Bukkit-CLI successfully built! ".green + "Gem ".blue + "v" + version
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
puts "
|
36
|
+
gem = Dir.glob("*.gem")[0]
|
37
|
+
Dir.mkdir("gem") unless Dir.exists?("gem")
|
38
|
+
FileUtils.mv(gem, "gem/")
|
39
|
+
puts " Gem: ".red + "#{Dir.getwd}/gem/" + gem.yellow
|
38
40
|
end
|
data/bin/bukkit
CHANGED
@@ -18,6 +18,7 @@ command :new do |c|
|
|
18
18
|
c.option "--rb", "Create a new server with the recommended build."
|
19
19
|
c.option "--beta", "Create a new server with the beta build."
|
20
20
|
c.option "--dev", "Create a new server with the dev build."
|
21
|
+
c.option "-f", "--force", "Overwrites the chosen directory if it already exists."
|
21
22
|
# TODO: Those are bools, pass the t/f values to a case statement then pass that to Bukkit::new
|
22
23
|
c.action do |args, options|
|
23
24
|
# Make 'dir' = to first arg
|
@@ -42,8 +43,15 @@ command :new do |c|
|
|
42
43
|
abort "ERROR: Invalid option '#{build}'\nTry `bukkit new --help`"
|
43
44
|
end
|
44
45
|
end
|
46
|
+
|
47
|
+
if options.force == true
|
48
|
+
force = true
|
49
|
+
else
|
50
|
+
force = nil
|
51
|
+
end
|
52
|
+
|
45
53
|
begin
|
46
|
-
Bukkit::new(build, dir)
|
54
|
+
Bukkit::new(build, dir, force)
|
47
55
|
rescue TypeError
|
48
56
|
abort "ERROR: Server name not specified.\nTry `bukkit new my-awesome-server-name`"
|
49
57
|
end
|
data/bukkit.gemspec
CHANGED
@@ -18,10 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
|
22
|
-
spec.
|
23
|
-
spec.
|
24
|
-
spec.
|
25
|
-
spec.
|
26
|
-
spec.
|
27
|
-
|
21
|
+
# Runtime Dependencies
|
22
|
+
spec.add_runtime_dependency('archive-zip')
|
23
|
+
spec.add_runtime_dependency('colorize')
|
24
|
+
spec.add_runtime_dependency('commander')
|
25
|
+
spec.add_runtime_dependency('json')
|
26
|
+
spec.add_runtime_dependency('launchy')
|
27
|
+
|
28
|
+
# Dev Dependencies
|
29
|
+
spec.add_development_dependency('bundler')
|
30
|
+
spec.add_development_dependency('rake')
|
31
|
+
end
|
data/lib/bukkit/install.rb
CHANGED
@@ -36,13 +36,13 @@ module Bukkit
|
|
36
36
|
jarfiles = Dir.glob("*.jar")
|
37
37
|
# Move each jar file outside the folder.
|
38
38
|
jarfiles.each do |jar|
|
39
|
-
|
39
|
+
FileUtils.mv(jar, "../")
|
40
40
|
end
|
41
41
|
Dir.chdir("../")
|
42
42
|
# Delete the extracted folder.
|
43
|
-
|
43
|
+
FileUtils.rm_r("#{plugin}/", :force => true)
|
44
44
|
# Delete the archive.
|
45
|
-
|
45
|
+
FileUtils.rm_r("filename", :force => true)
|
46
46
|
|
47
47
|
puts "#{plugin.capitalize!} successfully installed!"
|
48
48
|
|
data/lib/bukkit/new.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
module Bukkit
|
2
2
|
# N2K: http://cbukk.it/craftbukkit.jar http://cbukk.it/craftbukkit-beta.jar http://cbukk.it/craftbukkit-dev.jar
|
3
|
-
def self.new(build, dir)
|
3
|
+
def self.new(build, dir, force = false)
|
4
4
|
# Create a Folder for the Server
|
5
5
|
if Dir.exists?(dir)
|
6
|
-
|
6
|
+
# Error unless forced dir overwrite.
|
7
|
+
abort "ERROR:".red + " Directory already exists. Try a different name." unless force == true
|
8
|
+
|
9
|
+
# If it didn't abort, overwrite the dir because it was forced.
|
10
|
+
FileUtils.rm_r("#{dir}/")
|
11
|
+
Dir.mkdir(dir)
|
12
|
+
Dir.chdir(dir)
|
7
13
|
else
|
8
14
|
Dir.mkdir(dir)
|
9
15
|
Dir.chdir(dir)
|
@@ -24,6 +30,9 @@ module Bukkit
|
|
24
30
|
Bukkit::download("craftbukkit.jar", "http://cbukk.it/craftbukkit-dev.jar")
|
25
31
|
end
|
26
32
|
|
33
|
+
puts "Server built!".green
|
34
|
+
puts "Dir: ".yellow + Dir.getwd
|
35
|
+
|
27
36
|
# Start the Server
|
28
37
|
Bukkit.start
|
29
38
|
end
|
data/lib/bukkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bukkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
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-10-
|
11
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: archive-zip
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: commander
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '>='
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: launchy
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '>='
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rake
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,7 +101,7 @@ dependencies:
|
|
87
101
|
- - '>='
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
|
-
type: :
|
104
|
+
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|