bukkit 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7ced55fac2997afa5877dd165625d82bca1f8d1
4
- data.tar.gz: 36590a981aa62acd61f28e0cf23d37b59e6b1e7a
3
+ metadata.gz: ab1eddfa2399cee9b81907291db41a2a696b93ed
4
+ data.tar.gz: 3edfa82a96bbc098429993ee189d666dc4c9f1d1
5
5
  SHA512:
6
- metadata.gz: 5e39dddb56387717c3d715d225264d51a5cc7290df1c64ee733f7bda26d630438f4f1e7e3682b06700397fd5e53c6071cacbafbef2809faaccb309d15e61dee5
7
- data.tar.gz: 447d45871aae6430387cd021edbc195d057c6e75f288ba1102bddde54ee02aaf5f1fb952419d69322686ed89c0121e0f6cbca7438791bee6f9504582bc1920fe
6
+ metadata.gz: e9e9fec354d8db8b703b023b0da9999ebb6a006b441b077fc76f91b22946365b824a2025c1a511c630f95767a832c74b30a695e4249f51bd3e1585c89c2ae26e
7
+ data.tar.gz: 1fa1f6158c9189ae1d3849e73281dfc645b5046fe004d0374cd19f9919ccbbcc279f0ea35d4bd88672eb6778b04d45b97e850f860f0dc26e5ab19153f8ca2715
data/CHANGELOG CHANGED
@@ -3,4 +3,6 @@ v0.1.1: Major bug fix.
3
3
  v0.1.2: 'website' command fixed.
4
4
  v0.1.3: Minor bug fixes.
5
5
  v0.1.4: Much better documentation.
6
- v1.0.0: Total revamp of the CLI and docs. Definitely v1.0.
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.
data/README.md CHANGED
@@ -1,7 +1,13 @@
1
1
  Bukkit-CLI
2
2
  ======
3
3
 
4
- A command line wrapper for CraftBukkit.
4
+ A Bukkit Server command line interface.
5
+
6
+ ##Features (see [commands](https://github.com/JesseHerrick/Bukkit-CLI/blob/master/README.md#commands) for more details)
7
+ * Automatically creates a new server (your choice of build: rb, beta, or dev) with a simple command.
8
+ * Plugin manager. No more downloading and copying files.
9
+ * Update to the most recent build of your choice.
10
+ * And much more!
5
11
 
6
12
  ##Getting Started
7
13
 
@@ -16,7 +22,7 @@ __To View Command Options run:__ `bukkit [command] [options: --help, -h]`
16
22
 
17
23
  `bukkit [--help, -h]` Display global help.
18
24
 
19
- `bukkit install` Install a new bukkit plugin.
25
+ `bukkit install my-favorite-plugin` Install a new bukkit plugin.
20
26
 
21
27
  `bukkit new my-awesome-server-name [options: --rb, --beta, --dev]` Create a new Bukkit server.
22
28
 
@@ -34,3 +40,13 @@ __To View Command Options run:__ `bukkit [command] [options: --help, -h]`
34
40
  * `other versions` (may or may not work, if you find a bug though [report it!](https://github.com/JesseHerrick/bukkit/issues/new))
35
41
  * [Java](http://java.com/en/download/manual.jsp)
36
42
  * All Versions Allowed by [Bukkit](https://github.com/Bukkit/Bukkit).
43
+
44
+ ##Feature Requests:
45
+
46
+ To file a feature request just create an issue [here.](https://github.com/JesseHerrick/Bukkit-CLI/issues/new) If your request makes sense (please write with the best grammar you can) then I'll get to work right away!
47
+
48
+ ##Contributing:
49
+
50
+ To contribute to this awesome project just [fork it](https://github.com/JesseHerrick/Bukkit-CLI/fork) and send a [pull request](https://github.com/JesseHerrick/Bukkit-CLI/pulls).
51
+
52
+ Please follow the [Ruby Styleguide](https://github.com/styleguide/ruby). If you have any questions please feel free to [email me.](mailto:school@jessegrant.net)
data/bin/bukkit CHANGED
@@ -71,10 +71,14 @@ command :install do |c|
71
71
  c.option "--nowebsite", "Doesn't ask for website after install."
72
72
 
73
73
  c.action do |args, options|
74
- if options.nowebsite == true
75
- Bukkit::Install.normal(args.shift, true)
74
+ if args.empty?
75
+ abort "ERROR: ".red + "You didn't enter an argument."
76
76
  else
77
- Bukkit::Install.normal(args.shift)
77
+ if options.nowebsite == true
78
+ Bukkit::Install.normal(args.shift.downcase, true)
79
+ else
80
+ Bukkit::Install.normal(args.shift.downcase)
81
+ end
78
82
  end
79
83
  end
80
84
  end
@@ -86,11 +90,15 @@ command :website do |c|
86
90
  c.example "Open a plugin's website.", "bukkit website my-favorite-plugin"
87
91
  c.option "-u", "--url", "Only show the url."
88
92
  c.action do |args, options|
89
- plugin = args.shift.downcase
90
- if options.url == true
91
- Bukkit.url(plugin)
93
+ if args.empty?
94
+ abort "ERROR: ".red + "You didn't enter an argument."
92
95
  else
93
- Bukkit.website(plugin)
96
+ plugin = args.shift.downcase
97
+ if options.url == true
98
+ Bukkit.url(plugin)
99
+ else
100
+ Bukkit.website(plugin)
101
+ end
94
102
  end
95
103
  end
96
104
  end
data/bukkit.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["school@jessegrant.net"]
11
11
  spec.description = %q{A command line wrapper for CraftBukkit.}
12
12
  spec.summary = %q{A command line wrapper for CraftBukkit. Manage your server much easier.}
13
- spec.homepage = "https://github.com/JesseHerrick/bukkit"
13
+ spec.homepage = "https://github.com/JesseHerrick/Bukkit-CLI"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -2,12 +2,13 @@ require 'open-uri'
2
2
  require 'json'
3
3
  require 'archive/zip'
4
4
  require 'launchy'
5
+ require 'colorize'
5
6
 
6
7
  module Bukkit
7
8
  class Install
8
9
  def self.normal(plugin, nowebsite = false)
9
10
  # Check if in root
10
- abort "ERROR: Not in server's root directory.\nTry `bukkit new my-awesome-server-name`." if Bukkit::Check.root? == false
11
+ abort "ERROR:".red + " Not in server's root directory.\nTry `bukkit new my-awesome-server-name`.".yellow if Bukkit::Check.root? == false
11
12
 
12
13
  # BukGet API for Plugin Installs
13
14
  plugins_api = JSON.parse(open("http://api.bukget.org/3/plugins/bukkit/#{plugin}").read)
@@ -24,8 +25,11 @@ module Bukkit
24
25
  # Download File from dev.bukkit.org
25
26
  Bukkit::download(filename, download)
26
27
 
28
+ file_ext = File.extname(filename)
29
+
27
30
  # Unzip if it's a zip
28
- if File.extname(filename) == ".zip"
31
+ case file_ext
32
+ when ".zip"
29
33
  # Extract Zip Archive
30
34
  Archive::Zip.extract(filename, plugin)
31
35
  Dir.chdir(plugin)
@@ -45,12 +49,16 @@ module Bukkit
45
49
  if nowebsite == false
46
50
  website?
47
51
  end
48
- else
52
+ # If it's a jar... continue.
53
+ when ".jar"
49
54
  if nowebsite == true
50
55
  abort
51
56
  else
52
57
  website?
53
58
  end
59
+ # If it's anything else...
60
+ else
61
+ say "ERROR: ".red + "#{file_ext} is not supported at this time."
54
62
  end
55
63
  end
56
64
 
@@ -1,4 +1,4 @@
1
1
  module Bukkit
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  VERSION_FULL = "Bukkit-CLI v#{VERSION}"
4
4
  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: 1.0.1
4
+ version: 1.0.2
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-13 00:00:00.000000000 Z
11
+ date: 2013-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -89,7 +89,7 @@ files:
89
89
  - lib/bukkit/update.rb
90
90
  - lib/bukkit/version.rb
91
91
  - lib/bukkit/website.rb
92
- homepage: https://github.com/JesseHerrick/bukkit
92
+ homepage: https://github.com/JesseHerrick/Bukkit-CLI
93
93
  licenses:
94
94
  - MIT
95
95
  metadata: {}
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.0.3
112
+ rubygems_version: 2.1.8
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: A command line wrapper for CraftBukkit. Manage your server much easier.