aro 0.1.7 → 0.1.9
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/aro.gemspec +3 -3
- data/bin/aos +24 -0
- data/bin/aro +5 -2
- data/checksums/aro-0.1.7.gem.sha512 +1 -0
- data/checksums/aro-0.1.8.gem.sha512 +1 -0
- data/checksums/aro-0.1.9.gem.sha512 +1 -0
- data/db/migrate/1763374647_create_decks.rb +5 -2
- data/db/migrate/1763432541_create_logs.rb +1 -0
- data/db/migrate/1765148774_create_yous.rb +19 -0
- data/listen.rb +1 -1
- data/locale/en.aos.yml +31 -0
- data/locale/en.cngelog.yml +5 -0
- data/locale/en.dom.yml +42 -0
- data/locale/en.usage.yml +23 -13
- data/locale/en.yml +43 -34
- data/sys/aos/aos.rb +282 -0
- data/sys/aos/db.rb +80 -0
- data/sys/aos/s.rb +25 -0
- data/sys/aos/views/base.rb +155 -0
- data/sys/aos/views/dom.rb +36 -0
- data/sys/aos/views/games/abpps.rb +21 -0
- data/sys/aos/views/games/game.rb +114 -0
- data/sys/aos/views/games/hbpps.rb +21 -0
- data/sys/aos/views/games/shpps.rb +21 -0
- data/sys/aos/views/games/vipps.rb +21 -0
- data/sys/aos/views/games.rb +19 -0
- data/sys/aos/views/know/library.rb +19 -0
- data/sys/aos/views/know/temple.rb +19 -0
- data/sys/aos/views/know.rb +19 -0
- data/sys/aos/views/setup/settings.rb +37 -0
- data/sys/aos/views/setup.rb +19 -0
- data/sys/aos/views/welcome/waite.rb +19 -0
- data/sys/aos/views/welcome/winner.rb +19 -0
- data/sys/aos/views/welcome.rb +19 -0
- data/sys/aos/you.rb +19 -0
- data/sys/aro/d.rb +1 -1
- data/sys/aro/db.rb +5 -13
- data/sys/aro/mancy.rb +23 -19
- data/sys/aro/p.rb +2 -2
- data/sys/aro/v.rb +2 -3
- data/sys/aro.rb +1 -0
- data/sys/cli/config.rb +244 -123
- data/sys/cli/constants.rb +8 -5
- data/sys/cli/deck.rb +13 -8
- data/sys/cli/dom.rb +16 -17
- data/sys/cli/nterface.rb +6 -0
- data/sys/dom/d.rb +24 -19
- data/sys/dom/dom.rb +74 -96
- data/sys/dom/p.rb +1 -1
- data/sys/models/deck.rb +23 -13
- data/sys/models/log.rb +12 -2
- data/sys/reiquire.rb +3 -2
- data/sys/shr/prompt.rb +12 -4
- data/sys/shr/t.rb +12 -10
- data/sys/shr/version.rb +4 -4
- metadata +52 -27
- data/sys/views/base.rb +0 -29
- data/sys/views/dom.rb +0 -27
- data/sys/views/games/deck.rb +0 -97
- data/sys/views/games/menu.rb +0 -27
- data/sys/views/setup/setup.rb +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af49f44ed33c7342314aa4ac3a1672dcbe0a4e505bcc6f32e261f328e739f08d
|
|
4
|
+
data.tar.gz: 1c36315bc47db635417b7752617ba4810b5ee9703fcbc4e3da7cc42dbff9ffef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47bb0ac3b11da4fb079a67cbe4c8dab4b86726238f2b218eec6b6ac44865d3f97c2a640c59f0ee00e809c9530d86edf9c09cf051150f5e1946149fc17cdd07a1
|
|
7
|
+
data.tar.gz: 7f3fb149a031c91c3429018ed1704e2a819b480492a32bf832317b7f3b79279a5e04697036f935789a9ce078ab3832eb2be769c907a3469412cbcc05ba09ab14
|
data/aro.gemspec
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
aro.gemspec
|
|
4
4
|
|
|
5
5
|
aro gem specification.
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.license = "MIT"
|
|
22
22
|
spec.files = `git ls-files`.split("\n").reject{|p| p.match?(/^(spec|.release|.*.gem$)/)}
|
|
23
23
|
spec.bindir = "bin"
|
|
24
|
-
spec.executables = ["aro"]
|
|
24
|
+
spec.executables = ["aro", "aos"]
|
|
25
25
|
spec.require_paths = ["sys"]
|
|
26
26
|
spec.required_ruby_version = ">= 3.4.7"
|
|
27
27
|
|
|
@@ -29,11 +29,11 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.add_development_dependency "bundler", "~> 2.7", ">= 2.7.2"
|
|
30
30
|
spec.add_development_dependency "rake", "~> 13.3", ">= 13.3.1"
|
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.13", ">= 3.13.2"
|
|
32
|
+
spec.add_development_dependency "listen", "~> 3.9", ">= 3.9.0"
|
|
32
33
|
|
|
33
34
|
# runtime gems
|
|
34
35
|
spec.add_runtime_dependency "i18n", "~> 1.14", ">= 1.14.7"
|
|
35
36
|
spec.add_runtime_dependency "activerecord", "~> 8.1", ">= 8.1.1"
|
|
36
37
|
spec.add_runtime_dependency "sqlite3", "~> 2.8", ">= 2.8.0"
|
|
37
38
|
spec.add_runtime_dependency "tty-prompt", "~> 0.23.1", ">= 0.23.1"
|
|
38
|
-
spec.add_runtime_dependency "listen", "~> 3.9", ">= 3.9.0"
|
|
39
39
|
end
|
data/bin/aos
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#! /usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
|
|
5
|
+
aos
|
|
6
|
+
|
|
7
|
+
entry point for aos.
|
|
8
|
+
|
|
9
|
+
by i2097i
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require :aro.to_s
|
|
14
|
+
|
|
15
|
+
unless Aro::Dom.in_arodom?
|
|
16
|
+
Aos::S.say(I18n.t("cli.errors.not_in_aos" , cmd: Aos::Os.name))
|
|
17
|
+
exit(CLI::EXIT_CODES[:GENERAL_ERROR])
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
if CLI::ARGV0 == CLI::CMDS[:AOS][:WATCH]
|
|
21
|
+
Aos::watch
|
|
22
|
+
else CLI::ARGV0 == CLI::CMDS[:AOS][:RUN] || CLI::ARGV0.nil?
|
|
23
|
+
exit(Aos::run)
|
|
24
|
+
end
|
data/bin/aro
CHANGED
|
@@ -34,8 +34,11 @@ when CLI::CMDS[:ARO][:INIT]
|
|
|
34
34
|
Aro::Mancy.init
|
|
35
35
|
else
|
|
36
36
|
unless Aro::Mancy.game.nil? || CLI::FLAGS[:HELP].include?(CLI::ARGV0)
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
unless ARGV.include?(:aos.to_s)
|
|
38
|
+
Aro::P.say(I18n.t("cli.messages.welcome", name: "#{Aro::Mancy.name}.game"))
|
|
39
|
+
Aro::Mancy.game.show
|
|
40
|
+
end
|
|
41
|
+
|
|
39
42
|
exit(CLI::EXIT_CODES[:SUCCESS])
|
|
40
43
|
end
|
|
41
44
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e514a75bfef8d203ecb961b0488476804a588baf5ba04d43457adf3ae554028233205e289e633198bb88b46eac2a4a896a0c6beac350e742c82d04992b65a9ad
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a81a98088e88fd7b8a12c6919a8b4b3b27fc11258e1a453006b0c1eb856eb023c6219aab39343bbceeab6349bac0e2491176734fc840eb8945efa72d742ee9e8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
696d446a043f8261f31ec9750bccbe8749b00d119aa42ab98e164826df266e8b7f7260a88ca2223b36ad14fe6907d5f6305e238c10dc1bfa2cb31450007d911a
|
|
@@ -3,14 +3,17 @@ class CreateDecks < ActiveRecord::Migration[8.1]
|
|
|
3
3
|
def self.up
|
|
4
4
|
create_table :decks do |t|
|
|
5
5
|
t.string :name
|
|
6
|
-
t.string :cards
|
|
7
|
-
t.string :drawn
|
|
6
|
+
t.string :cards, null: false, default: ""
|
|
7
|
+
t.string :drawn, null: false, default: ""
|
|
8
8
|
|
|
9
9
|
t.timestamps
|
|
10
10
|
end
|
|
11
|
+
|
|
12
|
+
add_index :decks, :name, unique: true
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def self.down
|
|
16
|
+
remove_index :decks, :name
|
|
14
17
|
drop_table :decks
|
|
15
18
|
end
|
|
16
19
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class CreateYous < ActiveRecord::Migration[8.1]
|
|
2
|
+
|
|
3
|
+
def self.up
|
|
4
|
+
create_table :yous do |t|
|
|
5
|
+
t.string :name, null: false
|
|
6
|
+
t.string :pwd
|
|
7
|
+
|
|
8
|
+
t.timestamps
|
|
9
|
+
|
|
10
|
+
t.index :name, unique: true
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.down
|
|
15
|
+
remove_index :yous, :name
|
|
16
|
+
drop_table :yous
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
data/listen.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require :listen.to_s
|
|
2
2
|
|
|
3
|
-
listener = Listen.to(*[:sys.to_s, :bin.to_s, :spec.to_s, :locale.to_s], only: /[\.rb\.yml]/) {|modified, added, removed|
|
|
3
|
+
listener = Listen.to(*[:sys.to_s, :bin.to_s, :spec.to_s, :locale.to_s, :db.to_s], only: /[\.rb\.yml]/) {|modified, added, removed|
|
|
4
4
|
# puts modified
|
|
5
5
|
# puts added
|
|
6
6
|
# puts removed
|
data/locale/en.aos.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
en:
|
|
2
|
+
aos:
|
|
3
|
+
commands:
|
|
4
|
+
description:
|
|
5
|
+
cd: "change directory. no args navigates to arodom root."
|
|
6
|
+
config: "open settings."
|
|
7
|
+
config_set: "sets an ivar to a specified value. the prefix '%{prefix}' can be omitted."
|
|
8
|
+
exit: "exit."
|
|
9
|
+
ls: "list files and folders in the pwd including hidden files."
|
|
10
|
+
ls: "list files and folders in the pwd."
|
|
11
|
+
pwd: "show pwd."
|
|
12
|
+
usage:
|
|
13
|
+
cd: "$ cd <name>"
|
|
14
|
+
config: "$ config"
|
|
15
|
+
config_set: "$ config set <var_name> <var_value>"
|
|
16
|
+
exit: "$ exit"
|
|
17
|
+
ls: "$ ll"
|
|
18
|
+
ls: "$ ls"
|
|
19
|
+
pwd: "$ pwd"
|
|
20
|
+
constants:
|
|
21
|
+
commands: "COMMANDS"
|
|
22
|
+
views:
|
|
23
|
+
dom:
|
|
24
|
+
title: "welcome to the dom. this is the hub of the arodome running on Aos::Os."
|
|
25
|
+
description: "this is the root space where you begin. available commands are listed below."
|
|
26
|
+
quick_navigation: "the following room names are reserved for quick navigation. enter any of them to navigate to that room."
|
|
27
|
+
game:
|
|
28
|
+
title: "aro"
|
|
29
|
+
description: "enter commands to play."
|
|
30
|
+
is_the: "welcome to the %{name} game room."
|
|
31
|
+
designed_for: "originally designed for %{description}"
|
data/locale/en.dom.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
en:
|
|
2
|
+
dom:
|
|
3
|
+
wings:
|
|
4
|
+
welcome:
|
|
5
|
+
description: "sign up process."
|
|
6
|
+
games:
|
|
7
|
+
description: "aro game rooms."
|
|
8
|
+
know:
|
|
9
|
+
description: "information space."
|
|
10
|
+
setup:
|
|
11
|
+
description: "user configuration space."
|
|
12
|
+
rooms:
|
|
13
|
+
waite:
|
|
14
|
+
description: "sign up."
|
|
15
|
+
winner:
|
|
16
|
+
description: "win."
|
|
17
|
+
abpps:
|
|
18
|
+
description: "artificial beings."
|
|
19
|
+
hbpps:
|
|
20
|
+
description: "human beings."
|
|
21
|
+
shpps:
|
|
22
|
+
description: "human and artificial beings."
|
|
23
|
+
vipps:
|
|
24
|
+
description: "only dev_tarot users. no ruby_facots allowed."
|
|
25
|
+
library:
|
|
26
|
+
description: "definition management."
|
|
27
|
+
temple:
|
|
28
|
+
description: "mindfulness management."
|
|
29
|
+
settings:
|
|
30
|
+
description: "user settings and configuration."
|
|
31
|
+
errors:
|
|
32
|
+
directory_exists: "unable to create arodome at %{name}. file or directory already exists."
|
|
33
|
+
failed_already_in_arodom: "unable to create an arodome because you are already in arodom."
|
|
34
|
+
failed_in_aro_space: "unable to create an arodome inside of aro space."
|
|
35
|
+
failed_already_initialized: "arodome is already initialized. doing nothing."
|
|
36
|
+
messages:
|
|
37
|
+
arodome_created: "%{name} arodome created. enter the following commands to begin: $ cd %{name}"
|
|
38
|
+
creating_arodome: "creating arodome named %{name}"
|
|
39
|
+
generating_wings: "generating wings..."
|
|
40
|
+
generating_wing: "generating the %{wing} wing..."
|
|
41
|
+
generating_room: "generating the %{room} room."
|
|
42
|
+
initialization_complete: "%{name} initialization complete! use aos to begin."
|
data/locale/en.usage.yml
CHANGED
|
@@ -17,19 +17,30 @@ en:
|
|
|
17
17
|
|
|
18
18
|
init
|
|
19
19
|
set up the .aro directory that contains database and config
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
note:
|
|
22
22
|
this runs by default after create and has no effect if init is complete.
|
|
23
23
|
|
|
24
24
|
config
|
|
25
|
-
config management
|
|
26
|
-
|
|
25
|
+
aro config management.
|
|
26
|
+
|
|
27
|
+
$ aro config <commands>
|
|
28
|
+
|
|
29
|
+
passing no args opens prints the current config.
|
|
30
|
+
|
|
31
|
+
SUBCOMMANDS
|
|
32
|
+
set
|
|
33
|
+
sets an ivar to a specified value. the aro var prefix can be omitted.
|
|
34
|
+
|
|
35
|
+
$ config set <var_name> <var_value>
|
|
27
36
|
|
|
28
37
|
deck
|
|
29
|
-
manage decks in the current room
|
|
38
|
+
manage decks in the current room.
|
|
30
39
|
|
|
31
40
|
$ aro deck <commands>
|
|
32
41
|
|
|
42
|
+
passing no args opens the selection menu.
|
|
43
|
+
|
|
33
44
|
note:
|
|
34
45
|
|
|
35
46
|
deck subcommands do not require typing 'deck'. for example,
|
|
@@ -52,12 +63,12 @@ en:
|
|
|
52
63
|
|
|
53
64
|
example:
|
|
54
65
|
|
|
55
|
-
$ aro deck
|
|
66
|
+
$ aro deck new <name>
|
|
56
67
|
|
|
57
68
|
replace
|
|
58
69
|
replaces all drawn cards FIFO and puts them on the bottom of
|
|
59
70
|
the deck. this will preserve all card orientations.
|
|
60
|
-
|
|
71
|
+
|
|
61
72
|
reset
|
|
62
73
|
completely reset the deck. replace all drawn and reset order.
|
|
63
74
|
all orientations will be set to upright. you must enter 'aroyes'
|
|
@@ -94,16 +105,15 @@ en:
|
|
|
94
105
|
|
|
95
106
|
$ aro dom <commands>
|
|
96
107
|
|
|
97
|
-
|
|
98
|
-
init
|
|
99
|
-
generate the arodome
|
|
108
|
+
note: passing no arguments displays the main dom.
|
|
100
109
|
|
|
101
|
-
|
|
102
|
-
display arodome map
|
|
110
|
+
example
|
|
103
111
|
|
|
104
|
-
|
|
112
|
+
$ aro dom
|
|
105
113
|
|
|
106
|
-
|
|
114
|
+
SUBCOMMANDS
|
|
115
|
+
init
|
|
116
|
+
generate the arodome
|
|
107
117
|
new
|
|
108
118
|
create a new arodome with the specified name.
|
|
109
119
|
|
data/locale/en.yml
CHANGED
|
@@ -5,46 +5,55 @@ en:
|
|
|
5
5
|
# VERY IMPORTANT!
|
|
6
6
|
|
|
7
7
|
config:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
aro_env:
|
|
9
|
+
O_description: "read-only env var for holding O."
|
|
10
|
+
S_description: "read-only env var for holding S."
|
|
11
|
+
OS_description: "read-only env var for holding OS."
|
|
12
|
+
E_description: "read-only env var for holding E."
|
|
13
|
+
N_description: "read-only env var for holding N"
|
|
14
|
+
PS1_description: "read-only env var for holding default PS1."
|
|
15
|
+
NAME_FILE_description: "read-only env var for name file."
|
|
16
|
+
I2097I_description: "read-only env var for i2097i."
|
|
17
|
+
YES_description: "read-only env var for 'aroyes'."
|
|
18
|
+
ALL_description: "read-only env var for 'all'."
|
|
19
|
+
dimension:
|
|
20
|
+
description: "selected dimension of aro space."
|
|
21
|
+
dev_tarot_description: "reads from /dev/tarot device if available."
|
|
22
|
+
ruby_facot_description: "generated ruby_facot (facade randomness)."
|
|
23
|
+
format:
|
|
24
|
+
description: "aro output format."
|
|
25
|
+
text_description: "show aro responses in text format (default)"
|
|
26
|
+
json_description: "show aro responses in json format."
|
|
27
|
+
height_description: "display height. valid range: (${min}-${max})"
|
|
28
|
+
width_description: "display width. valid range: (${min}-${max})"
|
|
29
|
+
env:
|
|
30
|
+
description: "aro run environment."
|
|
31
|
+
development_description: "basic development logs and features."
|
|
32
|
+
production_description: "game logging only."
|
|
33
|
+
test_description: "logging and features tailored for tests."
|
|
34
|
+
verbose_description: "enable verbose logging in development env."
|
|
35
|
+
generate: "generating default config file at %{name}."
|
|
36
|
+
source: "installing ivars from %{name}..."
|
|
28
37
|
maximum: "max"
|
|
29
38
|
minimum: "min"
|
|
30
39
|
possible_values: "possible values"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
type:
|
|
41
|
+
bool_description: "true or false."
|
|
42
|
+
int_description: "a primitive decimal-less numeric."
|
|
43
|
+
string_description: "a blank-space-terminated string of characters."
|
|
44
|
+
values_description: "an enumerated type."
|
|
36
45
|
z_description: "sleep time between attempts to read /dev/tarot. valid range (%{min}-%{max})"
|
|
37
46
|
z_max_description: "max number of z long sleeps before giving up. valid range (%{min}-%{max})"
|
|
38
47
|
errors:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
header: "%{cmd} says there was a problem."
|
|
49
|
+
invalid_usage: "%{cmd} says you're not supposed to be here."
|
|
50
|
+
missing_args: "%{cmd} says missing required argument(s)."
|
|
51
|
+
missing_deck: "%{cmd} says no deck selected. use 'aro deck' to select one or 'aro deck new <name>' to create one."
|
|
52
|
+
not_in_aro: "%{cmd} says you are not in aro space. that command will not work here."
|
|
53
|
+
not_in_aos: "%{cmd} says you are not in aos space. that command will not work here."
|
|
54
|
+
not_initialized: "%{cmd} says you need to initialize aro. run 'aro init' to do so"
|
|
45
55
|
warnings:
|
|
46
56
|
invalid_order: "the order specified for displaying logs in invalid. using default (desc)."
|
|
47
|
-
not_initialized: "warning - you need to initialize aro. run 'aro init' to do so"
|
|
48
57
|
messages:
|
|
49
58
|
choose_card: "choose a card."
|
|
50
59
|
confirmation_prompt: "input 'aroyes' to reset %{name}, or enter to cancel (cancel): "
|
|
@@ -72,12 +81,12 @@ en:
|
|
|
72
81
|
|
|
73
82
|
use the following command to create one:
|
|
74
83
|
|
|
75
|
-
$ aro deck
|
|
84
|
+
$ aro deck new <deck_name>
|
|
76
85
|
|
|
77
86
|
see aro --help for usage.
|
|
78
87
|
showing: "showing %{name} [count:%{count}, order:%{order}]..."
|
|
79
88
|
shuffling: "shuffling %{name}'s cards..."
|
|
80
|
-
replacing_drawn: "all drawn cards to %{name}..."
|
|
89
|
+
replacing_drawn: "replacing all drawn cards to %{name}..."
|
|
81
90
|
resetting: "resetting %{name}'s cards..."
|
|
82
91
|
understood: "%{name} says: 'understood.'"
|
|
83
92
|
welcome: "welcome.to.the.%{name}."
|