bukkit 2.5.2 → 2.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ad2ffa1c9ab52f5b465e7a769a24b62d517eafa
4
- data.tar.gz: 03dfc67a75ad4b4fdb7b8ccc175a0d57107f43e8
3
+ metadata.gz: 60e76e7012eb4078a4bc60c931c9be6b64a67c63
4
+ data.tar.gz: e192cfebc9c104b1f8b8b8e2df6582a4b235c179
5
5
  SHA512:
6
- metadata.gz: 19909d78417c632c49c0541d40ed9bf1f0a213ecf234597344eceadbea527b82806991facee2bf72e51058d03c04cba878236c0e274698a17591a71d9217e041
7
- data.tar.gz: cd566ac78867901f23c81eedeffedd399a6a57140017d74b79baf631a5db435a342be3974cdf771d95cfe71b09edd5691d67e3e1a3dacd5e83122ac736811766
6
+ metadata.gz: 87a8daac45e797244eb25cdd8c36221527817a05952fd822de967b73d84837e552c1a22e840e8d86289e40f9f8a614dde456f36ee2b4e2dc0ee2ee719ee84b4f
7
+ data.tar.gz: a403a7ce21100e273249fbf67a8aeab6343509723a77c742581316fab539f68160fcc615fdfff9c9b87304900eafd7a85820f9ab9d1a531ae1b8133b7d59b541
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.1.5
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.2
4
+ - 2.1.1
3
5
  - 2.1.0
4
6
  - 2.0.0
5
7
  - 1.9.3
data/bin/bukkit CHANGED
@@ -23,49 +23,8 @@ command :new do |c|
23
23
  c.option "--nostart", "Just creates a new server, doesn't start it."
24
24
 
25
25
  c.action do |args, options|
26
- rb = options.rb
27
- beta = options.beta
28
- dev = options.dev
29
- force = options.force
30
- nostart = options.nostart
31
-
32
- name = args.shift
33
-
34
- new_options = Hash.new
35
-
36
- # If it doesn't have a name then just stop them right there.
37
- abort "You didn't enter a server name.\nTry `bukkit new my-awesome-server-name`." if name.nil?
38
-
39
- # Add the build to the new_options hash.
40
- if rb
41
- new_options.merge!(:build => :rb)
42
- elsif beta
43
- new_options.merge!(:build => :beta)
44
- elsif dev
45
- new_options.merge!(:build => :dev)
46
- else
47
- # If the user didn't give a build option then ask for it.
48
- build = ask "Build [rb/beta/dev]: "
49
- case build
50
- when "rb", "recommended"
51
- new_options.merge!(:build => :rb)
52
- when "beta"
53
- new_options.merge!(:build => :beta)
54
- when "dev", "development"
55
- new_options.merge!(:build => :dev)
56
- else
57
- abort "Invalid build option.".red
58
- end
59
- end
60
-
61
- # Add the force option if it's needed. Adds the bool returned from 'force'.
62
- force = false if force.nil?
63
- new_options.merge!(:force => force)
64
-
65
- # Now finally send the options to the method.
66
- server = Bukkit::Server.new(name)
67
- server.create(new_options)
68
- Bukkit::Server.start unless nostart == true
26
+ puts "I'm sorry, but it looks like the Bukkit project has been discontinued.".red
27
+ puts "Check out this link to see what's going on: ".green + "http://bukkit.org/threads/mojang-and-the-bukkit-project.309715/"
69
28
  end
70
29
  end
71
30
  alias_command :create, :new
@@ -185,4 +144,4 @@ command :uninstall do |c|
185
144
  Bukkit::Plugin.uninstall(name)
186
145
  end
187
146
  end
188
- end
147
+ end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Jesse Herrick"]
9
9
  spec.email = ["school@jessegrant.net"]
10
10
  spec.description = %q{A command line wrapper for CraftBukkit.}
11
- spec.summary = %q{A command line wrapper for CraftBukkit. Manage your server easier.}
11
+ spec.summary = %q{NOTE: Bukkit project discontinued. - A command line wrapper for CraftBukkit. Manage your server easier.}
12
12
  spec.homepage = "https://github.com/JesseHerrick/Bukkit-CLI"
13
13
  spec.license = "MIT"
14
14
 
@@ -30,7 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency('rake')
31
31
  spec.add_development_dependency('cucumber')
32
32
  spec.add_development_dependency('aruba')
33
- spec.add_development_dependency('guard')
34
- spec.add_development_dependency('guard-cucumber')
35
33
  spec.add_development_dependency('libnotify')
36
- end
34
+ end
@@ -15,16 +15,16 @@ require 'bukkit/version.rb'
15
15
  require 'bukkit/website.rb'
16
16
 
17
17
  module Bukkit
18
- class Server
19
- def initialize(name)
20
- @name = name
21
- end
22
- end
18
+ class Server
19
+ def initialize(name)
20
+ @name = name
21
+ end
22
+ end
23
23
 
24
- class Plugin
25
- def initialize(name)
26
- @name = name.downcase
27
- @plugin_api = JSON.parse(open("http://api.bukget.org/3/plugins/bukkit/#{@name}").read)
28
- end
29
- end
24
+ class Plugin
25
+ def initialize(name)
26
+ @name = name.downcase
27
+ @plugin_api = JSON.parse(open("http://api.bukget.org/3/plugins/bukkit/#{@name}").read)
28
+ end
29
+ end
30
30
  end
@@ -1,45 +1,45 @@
1
1
  module Bukkit
2
- class Server
3
- public
4
- # Create a new server.
5
- def create(options = {}) # Options: { :build => :rb/:beta/:dev, :force => false/true }
6
- @force = options[:force]
7
-
8
- # If the dir already exists, fail gracefully.
9
- check_for_dir(@name)
10
-
11
- # Let the dark side of the force flow through you...
12
- if @force == true
13
- puts "Overwriting: ".light_red + "#{@name}/"
14
- FileUtils.rm_rf(@name)
15
- end
16
-
17
- # Create the server directory and cd into it.
18
- Dir.mkdir(@name)
19
- puts " Create: ".green + "#{@name}/"
20
- Dir.chdir(@name)
21
-
22
- # Fail gracefully on control + C (SIGINT)
23
- trap("SIGINT") {
24
- FileUtils.rm_rf(@name)
25
- puts "#{@name} not created.".red
26
- }
27
-
28
- # Download build.
29
- Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
30
-
31
- # Give some friendly output.
32
- puts "New server build at: ".blue + "#{Dir.pwd}/".light_blue
33
- end
34
-
35
- private
36
- def check_for_dir(dirname)
37
- if Dir.exists?(dirname) && @force == false
38
- puts "'#{dirname}' already exists.".red
39
-
40
- names = %w{ minecraftyness mine-opolis mineville minetown bukkits-o-fun }
41
- abort "Try ".yellow + "`bukkit new #{names.sample}` ".light_yellow + "or".yellow + " `bukkit new #{dirname} --force`".light_blue
42
- end
43
- end
44
- end
2
+ class Server
3
+ public
4
+ # Create a new server.
5
+ def create(options = {}) # Options: { :build => :rb/:beta/:dev, :force => false/true }
6
+ @force = options[:force]
7
+
8
+ # If the dir already exists, fail gracefully.
9
+ check_for_dir(@name)
10
+
11
+ # Let the dark side of the force flow through you...
12
+ if @force == true
13
+ puts "Overwriting: ".light_red + "#{@name}/"
14
+ FileUtils.rm_rf(@name)
15
+ end
16
+
17
+ # Create the server directory and cd into it.
18
+ Dir.mkdir(@name)
19
+ puts " Create: ".green + "#{@name}/"
20
+ Dir.chdir(@name)
21
+
22
+ # Fail gracefully on control + C (SIGINT)
23
+ trap("SIGINT") {
24
+ FileUtils.rm_rf(@name)
25
+ puts "#{@name} not created.".red
26
+ }
27
+
28
+ # Download build.
29
+ Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
30
+
31
+ # Give some friendly output.
32
+ puts "New server build at: ".blue + "#{Dir.pwd}/".light_blue
33
+ end
34
+
35
+ private
36
+ def check_for_dir(dirname)
37
+ if Dir.exists?(dirname) && @force == false
38
+ puts "'#{dirname}' already exists.".red
39
+
40
+ names = %w{ minecraftyness mine-opolis mineville minetown bukkits-o-fun }
41
+ abort "Try ".yellow + "`bukkit new #{names.sample}` ".light_yellow + "or".yellow + " `bukkit new #{dirname} --force`".light_blue
42
+ end
43
+ end
44
+ end
45
45
  end
@@ -2,36 +2,36 @@ require 'rest-client'
2
2
  require 'fileutils'
3
3
 
4
4
  module Bukkit
5
- class Server
6
- # Download a file from a URI.
7
- def self.download(uri, options = {}) # Options: { :filename => "filename.ext" }
8
- # Get the filename. If it isn't defined, derive it from the URI.
9
- if options[:filename]
10
- filename = options[:filename]
11
- else
12
- filename = uri.split("\/").last
13
- end
5
+ class Server
6
+ # Download a file from a URI.
7
+ def self.download(uri, options = {}) # Options: { :filename => "filename.ext" }
8
+ # Get the filename. If it isn't defined, derive it from the URI.
9
+ if options[:filename]
10
+ filename = options[:filename]
11
+ else
12
+ filename = uri.split("\/").last
13
+ end
14
14
 
15
- # Catch SIGINT if needed.
16
- trap("SIGINT") {
17
- puts "\nDownload failed.".red
18
- FileUtils.rm(filename) if File.exists? filename
19
- exit
20
- }
15
+ # Catch SIGINT if needed.
16
+ trap("SIGINT") {
17
+ puts "\nDownload failed.".red
18
+ FileUtils.rm(filename) if File.exists? filename
19
+ exit
20
+ }
21
21
 
22
- # Give some friendly output.
23
- puts "Downloading: ".yellow + filename
24
- puts " From: ".yellow + uri
25
- puts "(This may take a while depending on your internet connection.)".light_yellow
22
+ # Give some friendly output.
23
+ puts "Downloading: ".yellow + filename
24
+ puts " From: ".yellow + uri
25
+ puts "(This may take a while depending on your internet connection.)".light_yellow
26
26
 
27
- # Download the file.
28
- data = RestClient.get(uri)
29
- File.open(filename, "wb") do |file|
30
- file.write(data)
31
- end
32
- # => filename.ext
27
+ # Download the file.
28
+ data = RestClient.get(uri)
29
+ File.open(filename, "wb") do |file|
30
+ file.write(data)
31
+ end
32
+ # => filename.ext
33
33
 
34
- puts filename.light_green + " successfully downloaded.".green
35
- end
36
- end
34
+ puts filename.light_green + " successfully downloaded.".green
35
+ end
36
+ end
37
37
  end
@@ -3,47 +3,47 @@ require 'json'
3
3
  require 'archive/zip'
4
4
 
5
5
  module Bukkit
6
- class Plugin
7
- # Install a new plugin.
8
- def install
9
- # Get server's download link.
10
- @download_url = @plugin_api["versions"][0]["download"]
11
- @filename = @plugin_api["versions"][0]["filename"]
6
+ class Plugin
7
+ # Install a new plugin.
8
+ def install
9
+ # Get server's download link.
10
+ @download_url = @plugin_api["versions"][0]["download"]
11
+ @filename = @plugin_api["versions"][0]["filename"]
12
12
 
13
- # Fail... gracefully, if craftbukkit.jar does not exist.
14
- abort "You're not in a server's root directory!".red unless File.exists? "craftbukkit.jar"
13
+ # Fail... gracefully, if craftbukkit.jar does not exist.
14
+ abort "You're not in a server's root directory!".red unless File.exists? "craftbukkit.jar"
15
15
 
16
- # Go into plugins and download the plugin.
17
- Dir.chdir("plugins")
18
- Bukkit::Server.download(@download_url, :filename => @filename)
16
+ # Go into plugins and download the plugin.
17
+ Dir.chdir("plugins")
18
+ Bukkit::Server.download(@download_url, :filename => @filename)
19
19
 
20
- file_ext = File.extname(@filename)
20
+ file_ext = File.extname(@filename)
21
21
 
22
- # Unzip if it's a zip
23
- case file_ext
24
- when ".zip"
25
- # Extract Zip Archive
26
- Archive::Zip.extract(@filename, @name)
27
- Dir.chdir(@name)
28
- jarfiles = Dir.glob("*.jar")
29
- # Move each jar file outside the folder.
30
- jarfiles.each do |jar|
31
- FileUtils.mv(jar, "../")
32
- end
33
- puts " Unarchived: ".yellow + @filename
22
+ # Unzip if it's a zip
23
+ case file_ext
24
+ when ".zip"
25
+ # Extract Zip Archive
26
+ Archive::Zip.extract(@filename, @name)
27
+ Dir.chdir(@name)
28
+ jarfiles = Dir.glob("*.jar")
29
+ # Move each jar file outside the folder.
30
+ jarfiles.each do |jar|
31
+ FileUtils.mv(jar, "../")
32
+ end
33
+ puts " Unarchived: ".yellow + @filename
34
34
 
35
- Dir.chdir("../")
36
- # Delete the extracted folder.
37
- FileUtils.rm_rf("#{@name}/")
38
- # Delete the archive.
39
- FileUtils.rm_rf(@filename)
40
- when ".jar"
41
- nil
42
- else
43
- abort "Something weird happened...\nThe file extension is #{file_ext}, not '.zip' or '.jar'."
44
- end
45
- puts " Installed: ".light_green + @name
46
- puts @name.light_green + " successfully installed!".green
47
- end
48
- end
35
+ Dir.chdir("../")
36
+ # Delete the extracted folder.
37
+ FileUtils.rm_rf("#{@name}/")
38
+ # Delete the archive.
39
+ FileUtils.rm_rf(@filename)
40
+ when ".jar"
41
+ nil
42
+ else
43
+ abort "Something weird happened...\nThe file extension is #{file_ext}, not '.zip' or '.jar'."
44
+ end
45
+ puts " Installed: ".light_green + @name
46
+ puts @name.light_green + " successfully installed!".green
47
+ end
48
+ end
49
49
  end
@@ -1,20 +1,20 @@
1
1
  module Bukkit
2
- class Server
3
- # Start the server.
4
- def self.start(options = {})
5
- if File.exists?("craftbukkit.jar")
6
- ram = options[:ram]
2
+ class Server
3
+ # Start the server.
4
+ def self.start(options = {})
5
+ if File.exists?("craftbukkit.jar")
6
+ ram = options[:ram]
7
7
 
8
- puts "Starting your CraftBukkit server...".green
9
- if ram.nil? or ram == 0
10
- system 'java -jar craftbukkit.jar'
11
- else
12
- puts "Ram: ".blue + ram.to_s.light_blue
13
- system "java -Xmx#{ram}M -Xms#{ram}M -jar craftbukkit.jar"
14
- end
15
- else
16
- abort "You're not in your server's root directory.".red
17
- end
18
- end
19
- end
8
+ puts "Starting your CraftBukkit server...".green
9
+ if ram.nil? or ram == 0
10
+ system 'java -jar craftbukkit.jar'
11
+ else
12
+ puts "Ram: ".blue + ram.to_s.light_blue
13
+ system "java -Xmx#{ram}M -Xms#{ram}M -jar craftbukkit.jar"
14
+ end
15
+ else
16
+ abort "You're not in your server's root directory.".red
17
+ end
18
+ end
19
+ end
20
20
  end
@@ -1,44 +1,44 @@
1
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")
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
10
 
11
- plugins = Dir.glob("*")
12
- delete = []
11
+ plugins = Dir.glob("*")
12
+ delete = []
13
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"
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
19
 
20
- delete << plugin
21
- end
22
- end
20
+ delete << plugin
21
+ end
22
+ end
23
23
 
24
- # Delete each matching file.
25
- if delete.empty?
26
- abort "No plugins found matching '#{name}'".yellow
27
- else
28
- delete.each do |file|
29
- if File.ftype(file) == "directory"
30
- file = "#{file}/"
31
- end
24
+ # Delete each matching file.
25
+ if delete.empty?
26
+ abort "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
32
 
33
- FileUtils.rm_rf file
34
- puts file.light_red + " deleted".red
35
- end
33
+ FileUtils.rm_rf file
34
+ puts file.light_red + " deleted".red
35
+ end
36
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
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
44
  end
@@ -1,13 +1,13 @@
1
1
  module Bukkit
2
- class Server
3
- # Download a new version of bukkit.
4
- def self.update(options = { :build => :rb }) # Options: { :build => :rb/:beta/:dev }
5
- Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
6
- end
2
+ class Server
3
+ # Download a new version of bukkit.
4
+ def self.update(options = { :build => :rb }) # Options: { :build => :rb/:beta/:dev }
5
+ Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
6
+ end
7
7
 
8
- # Download a new version of bukkit.
9
- def update(options = { :build => :rb }) # Options: { :build => :rb/:beta/:dev }
10
- Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
11
- end
12
- end
8
+ # Download a new version of bukkit.
9
+ def update(options = { :build => :rb }) # Options: { :build => :rb/:beta/:dev }
10
+ Bukkit::Server.download("http://dl.bukkit.org/latest-#{options[:build].to_s}/craftbukkit.jar")
11
+ end
12
+ end
13
13
  end
@@ -1,4 +1,4 @@
1
1
  module Bukkit
2
- VERSION = "2.5.2"
3
- VERSION_FULL = "Bukkit-CLI v#{VERSION}"
2
+ VERSION = "2.5.3"
3
+ VERSION_FULL = "Bukkit-CLI v#{VERSION}"
4
4
  end
@@ -1,20 +1,20 @@
1
1
  require 'launchy'
2
2
 
3
3
  module Bukkit
4
- class Plugin
5
- # Return the plugin's website URL.
6
- def website
7
- @website = @plugin_api["website"]
8
- end
9
- # => http://dev.bukkit.org/bukkit-plugins/pluginname
4
+ class Plugin
5
+ # Return the plugin's website URL.
6
+ def website
7
+ @website = @plugin_api["website"]
8
+ end
9
+ # => http://dev.bukkit.org/bukkit-plugins/pluginname
10
10
 
11
- # Open website in default browser.
12
- def view_website
13
- Launchy.open(website)
14
- puts "Opening #{@name}'s Website...".light_green
15
- puts " Website: ".yellow + website
16
- sleep 1.5
17
- return website
18
- end
11
+ # Open website in default browser.
12
+ def view_website
13
+ Launchy.open(website)
14
+ puts "Opening #{@name}'s Website...".light_green
15
+ puts " Website: ".yellow + website
16
+ sleep 1.5
17
+ return website
19
18
  end
19
+ end
20
20
  end
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.5.2
4
+ version: 2.5.3
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-04-15 00:00:00.000000000 Z
11
+ date: 2014-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: archive-zip
@@ -150,34 +150,6 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: guard
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: guard-cucumber
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
153
  - !ruby/object:Gem::Dependency
182
154
  name: libnotify
183
155
  requirement: !ruby/object:Gem::Requirement
@@ -245,10 +217,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
217
  version: '0'
246
218
  requirements: []
247
219
  rubyforge_project:
248
- rubygems_version: 2.2.0
220
+ rubygems_version: 2.2.2
249
221
  signing_key:
250
222
  specification_version: 4
251
- summary: A command line wrapper for CraftBukkit. Manage your server easier.
223
+ summary: 'NOTE: Bukkit project discontinued. - A command line wrapper for CraftBukkit.
224
+ Manage your server easier.'
252
225
  test_files:
253
226
  - features/create.feature
254
227
  - features/install.feature