carbonmu 0.0.1 → 0.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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +0 -2
- data/Rakefile +23 -0
- data/bin/carbonmu +6 -0
- data/carbonmu.gemspec +1 -16
- data/{mongoid.yml → config/database.yml} +0 -0
- data/lib/carbonmu.rb +1 -1
- data/lib/cli/cli.rb +34 -0
- data/lib/core/internationalization.rb +2 -1
- data/lib/core/server.rb +1 -1
- data/lib/edge_router/edge_router.rb +1 -1
- data/lib/version.rb +1 -1
- data/spec/lib/core/internationalization_spec.rb +4 -6
- data/spec/spec_helper.rb +0 -1
- metadata +6 -20
- data/console +0 -9
- data/start +0 -5
- data/start-server-only +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b4d4a83001aaf98215282b5a850822d56915f89
|
4
|
+
data.tar.gz: b2844a5cefe2228312075bb0702e726866e61733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 061181719392b61fb2a05dce2de3de5d95b60bfbca03673ed17153fcb37bb3d1b064b52933f3a5358361582b62da896e6cf638a8660f5e711455791f5bba8269
|
7
|
+
data.tar.gz: e5ee87d82e8f7ba9d3f742aff2eab23413cdf1fa8794255befc15c6980bca1f4abb7fd9b4b61f8abdda770ffeb86a67543c7ef4f63932be8dd0e4ab951b1cfd2
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -44,7 +44,6 @@ GEM
|
|
44
44
|
thread
|
45
45
|
thread_safe
|
46
46
|
erubis (2.7.0)
|
47
|
-
fakefs (0.6.7)
|
48
47
|
ffi (1.9.6)
|
49
48
|
ffi-rzmq (2.0.4)
|
50
49
|
ffi-rzmq-core (>= 1.0.1)
|
@@ -150,7 +149,6 @@ DEPENDENCIES
|
|
150
149
|
awesome_print
|
151
150
|
carbonmu!
|
152
151
|
database_cleaner (~> 1.3.0)
|
153
|
-
fakefs
|
154
152
|
guard (~> 2.12.4)
|
155
153
|
guard-rspec (~> 4.5.0)
|
156
154
|
i18n-tasks (~> 0.7.12)
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
$:.push('lib')
|
2
|
+
require 'version'
|
1
3
|
require 'rspec/core/rake_task'
|
2
4
|
|
3
5
|
RSpec::Core::RakeTask.new(:spec)
|
@@ -8,3 +10,24 @@ desc "Run I18n specs (check for missing & unused keys)."
|
|
8
10
|
RSpec::Core::RakeTask.new('spec:i18n') do |task|
|
9
11
|
task.rspec_opts = "--tag i18n"
|
10
12
|
end
|
13
|
+
|
14
|
+
desc "Launch console"
|
15
|
+
task :console do
|
16
|
+
require 'carbonmu'
|
17
|
+
require 'awesome_print'
|
18
|
+
require 'pry'
|
19
|
+
CarbonMU::Server.initialize_database
|
20
|
+
Pry.start CarbonMU
|
21
|
+
end
|
22
|
+
|
23
|
+
namespace :gem do
|
24
|
+
desc "Build new gem."
|
25
|
+
task :build do
|
26
|
+
system "gem build carbonmu.gemspec"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Release new gem."
|
30
|
+
task :release => :build do
|
31
|
+
system "gem push carbonmu-#{CarbonMU::VERSION}.gem"
|
32
|
+
end
|
33
|
+
end
|
data/bin/carbonmu
ADDED
data/carbonmu.gemspec
CHANGED
@@ -36,29 +36,14 @@ EOF
|
|
36
36
|
s.add_development_dependency "timecop"
|
37
37
|
s.add_development_dependency "database_cleaner", "~> 1.3.0"
|
38
38
|
s.add_development_dependency "i18n-tasks", "~> 0.7.12"
|
39
|
-
s.add_development_dependency "fakefs"
|
40
|
-
|
41
|
-
dependencies = [
|
42
|
-
# Examples:
|
43
|
-
# [:runtime, "rack", "~> 1.1"],
|
44
|
-
# [:development, "rspec", "~> 2.1"],
|
45
|
-
]
|
46
39
|
|
47
40
|
s.files = `git ls-files`.split
|
48
41
|
s.test_files = Dir['spec/**/*']
|
49
|
-
|
42
|
+
s.executables = Dir['bin/*'].map { |f| File.basename(f) }
|
50
43
|
s.require_paths = ["lib"]
|
51
44
|
|
52
45
|
## Make sure you can build the s.add_dependency on older versions of RubyGems too:
|
53
46
|
s.rubygems_version = "2.2.2"
|
54
47
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
55
48
|
s.specification_version = 3 if s.respond_to? :specification_version
|
56
|
-
|
57
|
-
dependencies.each do |type, name, version|
|
58
|
-
if s.respond_to?("add_#{type}_dependency")
|
59
|
-
s.send("add_#{type}_dependency", name, version)
|
60
|
-
else
|
61
|
-
s.add_dependency(name, version)
|
62
|
-
end
|
63
|
-
end
|
64
49
|
end
|
File without changes
|
data/lib/carbonmu.rb
CHANGED
data/lib/cli/cli.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
module CarbonMU
|
2
|
+
class CLI
|
3
|
+
attr_reader :argv
|
4
|
+
|
5
|
+
def initialize(argv)
|
6
|
+
@argv = argv
|
7
|
+
end
|
8
|
+
|
9
|
+
def execute
|
10
|
+
if @argv.length == 0 || !COMMAND_WHITELIST.include?(@argv[0])
|
11
|
+
puts USAGE
|
12
|
+
exit(1)
|
13
|
+
end
|
14
|
+
|
15
|
+
command = @argv.shift
|
16
|
+
send(command, *@argv)
|
17
|
+
end
|
18
|
+
|
19
|
+
def start
|
20
|
+
CarbonMU.start
|
21
|
+
end
|
22
|
+
|
23
|
+
def start_server_only(port)
|
24
|
+
CarbonMU.edge_router_receive_port = port
|
25
|
+
CarbonMU.start_server
|
26
|
+
end
|
27
|
+
|
28
|
+
COMMAND_WHITELIST = ["start", "start_server_only"]
|
29
|
+
|
30
|
+
USAGE = <<-USAGE
|
31
|
+
Usage: carbonmu start
|
32
|
+
USAGE
|
33
|
+
end
|
34
|
+
end
|
@@ -6,7 +6,8 @@ module CarbonMU
|
|
6
6
|
|
7
7
|
def self.setup
|
8
8
|
I18n.enforce_available_locales = false
|
9
|
-
|
9
|
+
core_locales_dir = File.expand_path("../../../config/locales", __FILE__)
|
10
|
+
I18n.load_path = Dir["#{core_locales_dir}/*.yml"] # TODO Check support for plugins too.
|
10
11
|
end
|
11
12
|
|
12
13
|
def self.translate(str, *opts)
|
data/lib/core/server.rb
CHANGED
@@ -101,7 +101,7 @@ module CarbonMU
|
|
101
101
|
|
102
102
|
def self.initialize_database
|
103
103
|
Mongoid.logger.level = ::Logger::DEBUG
|
104
|
-
Mongoid.load!("
|
104
|
+
Mongoid.load!("config/database.yml", ENV["MONGOID_ENV"] || :production)
|
105
105
|
::Mongoid::Tasks::Database.create_indexes
|
106
106
|
end
|
107
107
|
|
data/lib/version.rb
CHANGED
@@ -3,13 +3,11 @@ require "spec_helper"
|
|
3
3
|
describe Internationalization do
|
4
4
|
|
5
5
|
context ".setup" do
|
6
|
-
|
7
|
-
|
8
|
-
it "loads the right loadpath" do
|
9
|
-
FileUtils.mkdir_p("config/locales")
|
10
|
-
FileUtils.touch("config/locales/boo.yml")
|
6
|
+
it "loads the core locale files" do
|
11
7
|
CarbonMU::Internationalization.setup
|
12
|
-
|
8
|
+
core_locales_dir = File.expand_path("../../../../config/locales", __FILE__)
|
9
|
+
|
10
|
+
expect(I18n.load_path).to include("#{core_locales_dir}/en.yml")
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carbonmu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Krajcar
|
@@ -248,25 +248,12 @@ dependencies:
|
|
248
248
|
- - "~>"
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: 0.7.12
|
251
|
-
- !ruby/object:Gem::Dependency
|
252
|
-
name: fakefs
|
253
|
-
requirement: !ruby/object:Gem::Requirement
|
254
|
-
requirements:
|
255
|
-
- - ">="
|
256
|
-
- !ruby/object:Gem::Version
|
257
|
-
version: '0'
|
258
|
-
type: :development
|
259
|
-
prerelease: false
|
260
|
-
version_requirements: !ruby/object:Gem::Requirement
|
261
|
-
requirements:
|
262
|
-
- - ">="
|
263
|
-
- !ruby/object:Gem::Version
|
264
|
-
version: '0'
|
265
251
|
description: |
|
266
252
|
CarbonMU is a general-purpose, extendable MUD/MUSH server written in Ruby. CarbonMU is still
|
267
253
|
under active development and not yet ready for general use.
|
268
254
|
email: allegro@conmolto.org
|
269
|
-
executables:
|
255
|
+
executables:
|
256
|
+
- carbonmu
|
270
257
|
extensions: []
|
271
258
|
extra_rdoc_files: []
|
272
259
|
files:
|
@@ -281,13 +268,15 @@ files:
|
|
281
268
|
- LICENSE.txt
|
282
269
|
- README.md
|
283
270
|
- Rakefile
|
271
|
+
- bin/carbonmu
|
284
272
|
- carbonmu.gemspec
|
273
|
+
- config/database.yml
|
285
274
|
- config/i18n-tasks.yml
|
286
275
|
- config/locales/en.yml
|
287
276
|
- config/locales/nl.yml
|
288
|
-
- console
|
289
277
|
- doc/architecture.png
|
290
278
|
- lib/carbonmu.rb
|
279
|
+
- lib/cli/cli.rb
|
291
280
|
- lib/commands/locale_command.rb
|
292
281
|
- lib/commands/ping_command.rb
|
293
282
|
- lib/commands/reboot_command.rb
|
@@ -323,7 +312,6 @@ files:
|
|
323
312
|
- lib/ipc/read_socket.rb
|
324
313
|
- lib/ipc/write_socket.rb
|
325
314
|
- lib/version.rb
|
326
|
-
- mongoid.yml
|
327
315
|
- spec/carbonmu_spec.rb
|
328
316
|
- spec/i18n_spec.rb
|
329
317
|
- spec/lib/commands/say_command_spec.rb
|
@@ -355,8 +343,6 @@ files:
|
|
355
343
|
- spec/support/shared_examples/container.rb
|
356
344
|
- spec/support/shared_examples/game_object.rb
|
357
345
|
- spec/support/shared_examples/movable.rb
|
358
|
-
- start
|
359
|
-
- start-server-only
|
360
346
|
homepage: http://github.com/tkrajcar/carbonmu
|
361
347
|
licenses:
|
362
348
|
- MIT
|
data/console
DELETED
data/start
DELETED