bukkit 2.3.2 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +1 -0
- data/Rakefile +6 -9
- data/bin/bukkit +20 -2
- data/bukkit.gemspec +2 -0
- data/lib/bukkit.rb +9 -7
- data/lib/bukkit/uninstall.rb +44 -0
- data/lib/bukkit/version.rb +1 -1
- metadata +31 -3
- data/CHANGELOG +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91a89a5486b4939f3772d524bbcdac423541696
|
4
|
+
data.tar.gz: 34666baa89b9789b6f3ebdf0f399611014dd4232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7db58c7d226a1efcf91b0af527854ec69e65d2b59a6439e4cc5279670fa7b9a09434d52e341b620c7adb29ac7785d2e9e0163a2d84efc4e2a9b5b1ec23606bff
|
7
|
+
data.tar.gz: 576bd272a425c7e1c0f93cb5cb251fcc418dc250186b86f43991f94386d53ae3065c4e1f8e5fffd482f5502b405bea07b22215f7b176e70e68b6f03c344c9248
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -8,7 +8,12 @@
|
|
8
8
|
require "rubygems"
|
9
9
|
require "rake"
|
10
10
|
require "colorize"
|
11
|
-
require
|
11
|
+
require 'cucumber'
|
12
|
+
require 'cucumber/rake/task'
|
13
|
+
|
14
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
15
|
+
t.cucumber_opts = "features --format pretty"
|
16
|
+
end
|
12
17
|
|
13
18
|
# Helpers
|
14
19
|
def test(filename)
|
@@ -23,14 +28,6 @@ task :default do
|
|
23
28
|
puts "Run: ".yellow + "`bukkit --help` to list all commands."
|
24
29
|
end
|
25
30
|
|
26
|
-
# Run all tests.
|
27
|
-
Rake::TestTask.new do |t|
|
28
|
-
t.libs << "test"
|
29
|
-
t.libs << "bin"
|
30
|
-
t.test_files = FileList['test/test*.rb']
|
31
|
-
t.verbose = true
|
32
|
-
end
|
33
|
-
|
34
31
|
desc "Build gem."
|
35
32
|
task :build do
|
36
33
|
puts "Starting gem build...".yellow
|
data/bin/bukkit
CHANGED
@@ -5,6 +5,7 @@ $: << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
|
5
5
|
require 'rubygems'
|
6
6
|
require 'commander/import'
|
7
7
|
|
8
|
+
require 'bukkit/version'
|
8
9
|
require 'bukkit.rb'
|
9
10
|
|
10
11
|
program :version, Bukkit::VERSION
|
@@ -152,13 +153,13 @@ end
|
|
152
153
|
command :install do |c|
|
153
154
|
c.syntax = "bukkit install my-favorite-plugin"
|
154
155
|
c.summary = "Install a plugin to your server."
|
155
|
-
c.description =
|
156
|
+
c.description = "An easy way to install a plugin to your server. (case insensitive)"
|
156
157
|
c.example c.summary, "bukkit install my-favorite-plugin"
|
157
158
|
|
158
159
|
c.action do |args, options|
|
159
160
|
name = args.shift
|
160
161
|
|
161
|
-
if name.empty?
|
162
|
+
if name.nil? || name.empty?
|
162
163
|
abort "You didn't enter a plugin name."
|
163
164
|
else
|
164
165
|
plugin = Bukkit::Plugin.new(name)
|
@@ -166,3 +167,20 @@ command :install do |c|
|
|
166
167
|
end
|
167
168
|
end
|
168
169
|
end
|
170
|
+
|
171
|
+
command :uninstall do |c|
|
172
|
+
c.syntax = "bukkit uninstall my-not-so-favorite-plugin"
|
173
|
+
c.summary = "Uninstall a plugin from your server."
|
174
|
+
c.description = "An easy way to uninstall a plugin from your server. (case insensitive)"
|
175
|
+
c.example c.summary, "bukkit uninstall my-not-so-favorite-plugin"
|
176
|
+
|
177
|
+
c.action do |args, options|
|
178
|
+
name = args.shift
|
179
|
+
|
180
|
+
if name.nil? || name.empty?
|
181
|
+
abort "You didn't enter a plugin name."
|
182
|
+
else
|
183
|
+
Bukkit::Plugin.uninstall(name)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
data/bukkit.gemspec
CHANGED
data/lib/bukkit.rb
CHANGED
@@ -4,13 +4,15 @@ require 'colorize'
|
|
4
4
|
require 'open-uri'
|
5
5
|
require 'json'
|
6
6
|
|
7
|
-
require
|
8
|
-
require 'bukkit/
|
9
|
-
require 'bukkit/
|
10
|
-
require 'bukkit/
|
11
|
-
require 'bukkit/
|
12
|
-
require 'bukkit/
|
13
|
-
require 'bukkit/
|
7
|
+
# To require all files.
|
8
|
+
require 'bukkit/create.rb'
|
9
|
+
require 'bukkit/download.rb'
|
10
|
+
require 'bukkit/install.rb'
|
11
|
+
require 'bukkit/start.rb'
|
12
|
+
require 'bukkit/uninstall.rb'
|
13
|
+
require 'bukkit/update.rb'
|
14
|
+
require 'bukkit/version.rb'
|
15
|
+
require 'bukkit/website.rb'
|
14
16
|
|
15
17
|
module Bukkit
|
16
18
|
class Server
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Bukkit
|
2
|
+
class Plugin
|
3
|
+
def self.uninstall(name)
|
4
|
+
# First check if in root dir.
|
5
|
+
abort "You're not in a server's root directory!".red unless File.exists? "craftbukkit.jar"
|
6
|
+
|
7
|
+
if Dir.exists?("plugins")
|
8
|
+
# The plugins dir exists and is not empty.
|
9
|
+
Dir.chdir("plugins")
|
10
|
+
|
11
|
+
plugins = Dir.glob("*")
|
12
|
+
delete = []
|
13
|
+
|
14
|
+
# Case insensitively checks each file/dir for a match.
|
15
|
+
plugins.each do |plugin|
|
16
|
+
if /#{name}/i =~ plugin
|
17
|
+
# Make the plugin name look the way the plugin dev wanted.
|
18
|
+
name = plugin if File.ftype(plugin) == "directory"
|
19
|
+
|
20
|
+
delete << plugin
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Delete each matching file.
|
25
|
+
if delete.empty?
|
26
|
+
puts "No plugins found matching '#{name}'".yellow
|
27
|
+
else
|
28
|
+
delete.each do |file|
|
29
|
+
if File.ftype(file) == "directory"
|
30
|
+
file = "#{file}/"
|
31
|
+
end
|
32
|
+
|
33
|
+
FileUtils.rm_rf file
|
34
|
+
puts file.light_red + " deleted".red
|
35
|
+
end
|
36
|
+
|
37
|
+
puts "#{name} has been successfully uninstalled.".green
|
38
|
+
end
|
39
|
+
else
|
40
|
+
abort "You have no plugins to uninstall."
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/bukkit/version.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: 2.
|
4
|
+
version: 2.4.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: 2014-01-
|
11
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: archive-zip
|
@@ -122,6 +122,34 @@ dependencies:
|
|
122
122
|
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: cucumber
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: aruba
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
description: A command line wrapper for CraftBukkit.
|
126
154
|
email:
|
127
155
|
- school@jessegrant.net
|
@@ -133,7 +161,6 @@ files:
|
|
133
161
|
- .gitignore
|
134
162
|
- .ruby-version
|
135
163
|
- .travis.yml
|
136
|
-
- CHANGELOG
|
137
164
|
- Gemfile
|
138
165
|
- Gemfile.lock
|
139
166
|
- LICENSE
|
@@ -146,6 +173,7 @@ files:
|
|
146
173
|
- lib/bukkit/download.rb
|
147
174
|
- lib/bukkit/install.rb
|
148
175
|
- lib/bukkit/start.rb
|
176
|
+
- lib/bukkit/uninstall.rb
|
149
177
|
- lib/bukkit/update.rb
|
150
178
|
- lib/bukkit/version.rb
|
151
179
|
- lib/bukkit/website.rb
|
data/CHANGELOG
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
v0.1.0: Added 'update' command and a few bug fixes.
|
2
|
-
v0.1.1: Major bug fix.
|
3
|
-
v0.1.2: 'website' command fixed.
|
4
|
-
v0.1.3: Minor bug fixes.
|
5
|
-
v0.1.4: Much better documentation.
|
6
|
-
v1.0.0: Total revamp of the CLI and docs. Definitely v1.0.
|
7
|
-
v1.0.1: Got rid of the old docs.
|
8
|
-
v1.0.2: Fixed some cosmetic things and bugs.
|
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.
|
11
|
-
v1.2.0: Code refactored.
|
12
|
-
v1.3.0: Friendly output and '--ram' option.
|