aro 0.2.1 → 0.2.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/aro +3 -3
  4. data/checksums/aro-0.2.1.gem.sha512 +1 -0
  5. data/checksums/aro-0.2.2.gem.sha512 +1 -0
  6. data/locale/en.amg.yml +44 -0
  7. data/locale/en.aos.yml +4 -38
  8. data/locale/en.data.yml +30 -0
  9. data/locale/en.dom.yml +8 -6
  10. data/locale/en.usage.yml +20 -20
  11. data/locale/en.yml +16 -12
  12. data/sys/aos/amg.rb +58 -56
  13. data/sys/aos/aos.rb +82 -49
  14. data/sys/aos/data.rb +117 -0
  15. data/sys/aos/db/migrate/1765148774_create_yous.rb +1 -0
  16. data/sys/aos/db/migrate/{1765762724_create_libs.rb → 1765762724_create_ilibs.rb} +5 -5
  17. data/sys/aos/db/migrate/1765907766_create_ilogs.rb +18 -0
  18. data/sys/aos/db.rb +37 -17
  19. data/sys/{shr/lib/lib.rb → aos/models/ilib.rb} +9 -6
  20. data/sys/aos/models/ilog.rb +27 -0
  21. data/sys/aos/models/you.rb +50 -0
  22. data/sys/aos/vws/base.rb +9 -58
  23. data/sys/aos/vws/dom.rb +0 -1
  24. data/sys/aos/vws/games/game.rb +10 -10
  25. data/sys/aos/vws/know/{temple.rb → body.rb} +3 -3
  26. data/sys/aos/vws/know/{library.rb → mind.rb} +3 -3
  27. data/sys/aos/vws/know/spirit.rb +19 -0
  28. data/sys/aos/vws/{setup → root}/amg.rb +1 -2
  29. data/sys/aos/vws/{setup → root}/config.rb +1 -1
  30. data/sys/aos/vws/root/data.rb +21 -0
  31. data/sys/aos/vws/{setup.rb → root.rb} +3 -3
  32. data/sys/aos/vws/welcome/waite.rb +1 -0
  33. data/sys/aos/vws/welcome.rb +11 -0
  34. data/sys/aro/db/migrate/{1763374647_create_decks.rb → 1763374647_create_tecks.rb} +5 -5
  35. data/sys/aro/db/migrate/1763432541_create_tlogs.rb +20 -0
  36. data/sys/aro/db.rb +11 -11
  37. data/sys/aro/mancy.rb +4 -4
  38. data/sys/{models/deck.rb → aro/models/teck.rb} +51 -52
  39. data/sys/aro/models/tlog.rb +20 -0
  40. data/sys/cli/constants.rb +1 -1
  41. data/sys/cli/dom.rb +1 -1
  42. data/sys/cli/{deck.rb → teck.rb} +15 -15
  43. data/sys/cli.rb +4 -3
  44. data/sys/dom/config.rb +196 -143
  45. data/sys/dom/d.rb +32 -19
  46. data/sys/dom/dom.rb +22 -13
  47. data/sys/reiquire.rb +6 -7
  48. data/sys/shr/prompt.rb +0 -4
  49. data/sys/shr/version.rb +1 -1
  50. metadata +28 -20
  51. data/locale/en.cngelog.yml +0 -5
  52. data/sys/aos/you.rb +0 -21
  53. data/sys/aro/db/migrate/1763432541_create_logs.rb +0 -20
  54. data/sys/models/log.rb +0 -20
  55. /data/sys/shr/{lib → ilib}/crs/CMakeLists.txt +0 -0
  56. /data/sys/shr/{lib → ilib}/crs/compile.sh +0 -0
  57. /data/sys/shr/{lib → ilib}/crs/crs.c +0 -0
  58. /data/sys/shr/{lib → ilib}/crs/crs.o +0 -0
  59. /data/sys/shr/{lib → ilib}/crs/libcrs.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1f1c3e26c91bbdc591e6ef19be185940727ad2dc3f742d55755158bd2f080ae
4
- data.tar.gz: 2da7a2917f1d59a472c88f13a502cf9e4e048b184d30b37e3619ad99814a2017
3
+ metadata.gz: f91a54d4e715e8e4d60abdc8995af38490ef59c8ce1a1e96cd705c719048a7fe
4
+ data.tar.gz: e511fd595d93feb729dd2d1a24d9d8fbffb2695a048c4beb1f7ca3879b082ba0
5
5
  SHA512:
6
- metadata.gz: 913970c4cdd1a9ccce0fa08a84b71d0717dc451431bd098cf1a56e4a5310b1070f16cfc17a837b36750e97e8b2be6cbffb1e6331b7948afa952accfae7713a9d
7
- data.tar.gz: 102e29375b1cd65b9381ec68156774a1e6d18ac3da98d87bc9f24cdbc43ed00cc5ab741be5933f32901080c5bf9aa7884f7c2812a9f0f3365cf50c262a98b531
6
+ metadata.gz: d78726504c8cea384672e6168ffbd28e1a49344534f18305ded0b6ba0c273444b65cc86f0d48c21e8b2890d1d37d220de792f95ab64ded12f495fb055d379327
7
+ data.tar.gz: 03dbf7645004603275e2d69ac2c5fbcf0fc22f7c02281e196d49533181d03db341e2087778132241b4281744019fbd68337f7582530cdb7849f442697eb10ef9
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ##### __current version:__
5
5
  [![Gem Version](https://badge.fury.io/rb/aro.svg)](https://badge.fury.io/rb/aro)
6
6
 
7
- aro is a command line interface that allows you to manage multiple tarot decks.
7
+ aro is a command line interface that allows you to manage multiple tarot tecks.
8
8
 
9
9
 
10
10
  ### install
data/bin/aro CHANGED
@@ -27,17 +27,17 @@ when CLI::CMDS[:ARO][:CONFIG]
27
27
  when CLI::CMDS[:ARO][:CREATE]
28
28
  CLI::create
29
29
  when CLI::CMDS[:ARO][:DECK]
30
- CLI::deck
30
+ CLI::teck
31
31
  when CLI::CMDS[:ARO][:DOM]
32
32
  CLI::dom
33
33
  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
- # unless ARGV.include?(:aos.to_s)
37
+ unless ARGV.include?(:aos.to_s)
38
38
  Aro::P.say(I18n.t("cli.messages.welcome", name: "#{Aro::Mancy.name}.game"))
39
39
  Aro::Mancy.game.show
40
- # end
40
+ end
41
41
 
42
42
  exit(CLI::EXIT_CODES[:SUCCESS])
43
43
  end
@@ -0,0 +1 @@
1
+ 98e520a4e76c2a04f79f7b7207759dae278b366625735757c7612b75fddf5acdd0d0942fb613a0c8ecc5cb8304814a09fd0336f775df46c164a7a13397400a5f
@@ -0,0 +1 @@
1
+ 580e42a13fb83232b8282a3d2888ced1fc36790739ebc8b5c3bf99b9d7c5664f10d117d967a2d75896c7a2cabfbe84e628b3359d7f4d6771a2cad4784cd178e5
data/locale/en.amg.yml ADDED
@@ -0,0 +1,44 @@
1
+ en:
2
+ amg:
3
+ commands:
4
+ description:
5
+ inst: "show installed ilibs or install a lib."
6
+ instun: "show uninstalled ilibs or uninstall a lib."
7
+ usage:
8
+ inst: "$ amg inst <lib>"
9
+ instun: "$ amg instun <lib>"
10
+ messages:
11
+ already_installed: "%{name} lib is already installed."
12
+ cannot_locate: "could not find %{name} lib."
13
+ ilib_name: "name: %{name}"
14
+ ilib_path: "path: %{path}"
15
+ ilib_usage: "usage: %{usage}"
16
+ install_success: "%{name} installed successfully."
17
+ install_failure: "failed to install %{name}."
18
+ listing_available: "listing available ilibs..."
19
+ listing_installed: "listing installed ilibs..."
20
+ none_available: "no ilibs available for install."
21
+ none_installed: "no ilibs installed."
22
+ not_installed: "%{name} lib is not installed."
23
+ uninstall_success: "%{name} uninstalled successfully."
24
+ uninstall_failure: "failed to uninstall %{name}."
25
+ usage: |
26
+
27
+ amg [-h | --help] <command>
28
+ aos system management.
29
+
30
+ COMMANDS
31
+
32
+ inst
33
+ show installed ilibs.
34
+
35
+ install a lib named <lib>.
36
+
37
+ $ amg inst <lib>
38
+
39
+ instun
40
+ show uninstalled ilibs.
41
+
42
+ uninstall a lib named <lib>.
43
+
44
+ $ amg instun <lib>
data/locale/en.aos.yml CHANGED
@@ -1,45 +1,11 @@
1
1
  en:
2
2
  aos:
3
- amg:
4
- lib:
5
- listing_available: "listing available libs..."
6
- listing_installed: "listing installed libs..."
7
- none_available: "no libs available for install."
8
- none_installed: "no libs installed."
9
- commands:
10
- description:
11
- inst: "show installed libs or install a lib."
12
- instun: "show uninstalled libs or uninstall a lib."
13
- usage:
14
- inst: "$ amg inst <lib>"
15
- instun: "$ amg instun <lib>"
16
- usage: |
17
-
18
- amg [-h | --help] <command>
19
- aos system management.
20
-
21
- COMMANDS
22
-
23
- inst
24
- show installed libs.
25
-
26
- install a lib named <lib>.
27
-
28
- $ amg inst <lib>
29
-
30
- instun
31
- show uninstalled libs.
32
-
33
- uninstall a lib named <lib>.
34
-
35
- $ amg instun <lib>
36
-
37
3
  commands:
38
4
  description:
39
5
  amg: "manage aos. a tool for package installation/management."
40
6
  cd: "change directory. no args navigates to arodome root."
41
- config: "prints loaded config."
42
- config_set: "sets an ivar to a specified value. the prefix '%{prefix}' can be omitted."
7
+ config: "read/write aos vars. (enter vars lowercase excluding bash prefix)."
8
+ data: "manage aos data."
43
9
  exit: "exit."
44
10
  help: "help."
45
11
  ll: "list files and folders in the pwd including hidden files."
@@ -48,8 +14,8 @@ en:
48
14
  usage:
49
15
  amg: "$ amg [-h | --help] <command>"
50
16
  cd: "$ cd <name>"
51
- config: "$ config"
52
- config_set: "$ config set <var_name> <var_value>"
17
+ config: "$ config <var_name> <var_value>"
18
+ data: "$ data [-h | --help] <command>"
53
19
  exit: "$ exit"
54
20
  help: "$ help"
55
21
  ll: "$ ll"
@@ -0,0 +1,30 @@
1
+ en:
2
+ data:
3
+ commands:
4
+ description:
5
+ ilogs: "show aos ilogs."
6
+ yous: "show aos ilogs."
7
+ usage:
8
+ ilogs: "$ data ilogs"
9
+ yous: "$ data yous"
10
+ ilogs:
11
+ display: "%{you} entered '%{cmd}' at %{timestamp} in %{pwd}."
12
+ yous:
13
+ display: "name: %{name}, access: %{access}, pwd: %{pwd}."
14
+ messages:
15
+ listing_ilogs: "listing aos input ilogs..."
16
+ listing_yous: "listing yous..."
17
+ no_ilogs: "no input ilogs."
18
+ no_yous: "no yous."
19
+ usage: |
20
+
21
+ data [-h | --help] <command>
22
+ aos data management.
23
+
24
+ COMMANDS
25
+
26
+ ilogs
27
+ show aos ilogs.
28
+
29
+ yous
30
+ show aos yous.
data/locale/en.dom.yml CHANGED
@@ -7,8 +7,8 @@ en:
7
7
  description: "aro game rooms."
8
8
  know:
9
9
  description: "information space."
10
- setup:
11
- description: "user configuration space."
10
+ root:
11
+ description: "aos system space."
12
12
  rooms:
13
13
  waite:
14
14
  description: "sign up."
@@ -22,10 +22,12 @@ en:
22
22
  description: "human and artificial beings."
23
23
  vipps:
24
24
  description: "only dev_tarot users. no ruby_facots allowed."
25
- library:
26
- description: "definition management."
27
- temple:
28
- description: "mindfulness management."
25
+ body:
26
+ description: "body."
27
+ mind:
28
+ description: "mind."
29
+ spirit:
30
+ description: "spirit."
29
31
  config:
30
32
  description: "user config and configuration."
31
33
  errors:
data/locale/en.usage.yml CHANGED
@@ -16,7 +16,7 @@ en:
16
16
  $ aro create <name>
17
17
 
18
18
  init
19
- set up the .aro directory that contains database and config
19
+ sets 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.
@@ -24,28 +24,28 @@ en:
24
24
  config
25
25
  aro config management.
26
26
 
27
- $ aro config <commands>
27
+ $ aro config <var_name> <var_value>
28
28
 
29
- passing no args opens prints the current config.
29
+ passing no args or only <var_name> prints the current config or <var_value>.
30
30
 
31
31
  SUBCOMMANDS
32
32
  set
33
33
  sets an ivar to a specified value. the aro var prefix can be omitted.
34
34
 
35
- $ aro config set <var_name> <var_value>
35
+ $ aro config <var_name> <var_value>
36
36
 
37
- deck
38
- manage decks in the current room.
37
+ teck
38
+ manage tecks in the current room.
39
39
 
40
- $ aro deck <commands>
40
+ $ aro teck <commands>
41
41
 
42
42
  passing no args opens the selection menu.
43
43
 
44
44
  note:
45
45
 
46
- deck subcommands do not require typing 'deck'. for example,
46
+ teck subcommands do not require typing 'teck'. for example,
47
47
 
48
- $ aro deck show
48
+ $ aro teck show
49
49
 
50
50
  is the same thing as:
51
51
 
@@ -53,29 +53,29 @@ en:
53
53
 
54
54
  SUBCOMMANDS
55
55
  draw
56
- draw a random card from the current deck.
56
+ draw a random card from the current teck.
57
57
 
58
58
  explore
59
- allows user to browse each card in the current deck.
59
+ allows user to browse each card in the current teck.
60
60
 
61
61
  new
62
- create a new deck with the specified name.
62
+ create a new teck with the specified name.
63
63
 
64
64
  example:
65
65
 
66
- $ aro deck new <name>
66
+ $ aro teck new <name>
67
67
 
68
68
  replace
69
69
  replaces all drawn cards FIFO and puts them on the bottom of
70
- the deck. this will preserve all card orientations.
70
+ the teck. this will preserve all card orientations.
71
71
 
72
72
  reset
73
- completely reset the deck. replace all drawn and reset order.
73
+ completely reset the teck. replace all drawn and reset order.
74
74
  all orientations will be set to upright. you must enter 'aroyes'
75
75
  to continue.
76
76
 
77
77
  show
78
- displays the current deck's log record(s).
78
+ displays the current teck's log record(s).
79
79
 
80
80
  the default behavior is to display only the most recent log record.
81
81
 
@@ -85,11 +85,11 @@ en:
85
85
 
86
86
  OPTIONS
87
87
 
88
- [-n | --count] specify number of deck logs to show.
88
+ [-n | --count] specify number of teck tlogs to show.
89
89
 
90
90
  default is 1 (latest/current state)
91
91
 
92
- passing 'all' display all logs
92
+ passing 'all' display all tlogs
93
93
 
94
94
  [-o | --order] specify the output order of the log records.
95
95
 
@@ -98,7 +98,7 @@ en:
98
98
  possible values: ['asc', 'desc']
99
99
 
100
100
  shuffle
101
- shuffles the current deck and generates a log record.
101
+ shuffles the current teck and generates a log record.
102
102
 
103
103
  dom
104
104
  aos arodome management.
@@ -106,7 +106,7 @@ en:
106
106
  $ aro dom <commands>
107
107
 
108
108
  SUBCOMMANDS
109
- init
109
+ init <username> <password>
110
110
  generate the arodome
111
111
  new
112
112
  create a new arodome with the specified name.
data/locale/en.yml CHANGED
@@ -21,13 +21,17 @@ en:
21
21
  dev_tarot_description: "reads from /dev/tarot device if available."
22
22
  ruby_facot_description: "generated ruby_facot (facade randomness)."
23
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."
24
+ description: "aos output format."
25
+ text_description: "show aos output in text format (default)."
26
+ json_description: "show aos output in json format."
27
+ interface:
28
+ description: "aos output interface."
29
+ terminal_description: "render terminal output (default)."
30
+ lanimret_description: "render flie web output."
27
31
  height_description: "display height. valid range: (${min}-${max})"
28
32
  width_description: "display width. valid range: (${min}-${max})"
29
33
  env:
30
- description: "aro run environment."
34
+ description: "aos run environment."
31
35
  development_description: "basic development logs and features."
32
36
  production_description: "game logging only."
33
37
  test_description: "logging and features tailored for tests."
@@ -50,15 +54,15 @@ en:
50
54
  header: "%{cmd} says there was a problem."
51
55
  invalid_usage: "%{cmd} says you're not supposed to be here."
52
56
  missing_args: "%{cmd} says missing required argument(s)."
53
- missing_deck: "%{cmd} says no deck selected. use 'aro deck' to select one or 'aro deck new <name>' to create one."
57
+ missing_teck: "%{cmd} says no teck selected. use 'aro teck' to select one or 'aro teck new <name>' to create one."
54
58
  not_in_aro: "%{cmd} says you are not in aro space. that command will not work here."
55
59
  not_in_aos: "%{cmd} says you are not in aos space. that command will not work here."
56
60
  not_initialized: "%{cmd} says you need to initialize aro. run 'aro init' to do so"
57
61
  warnings:
58
- invalid_order: "the order specified for displaying logs in invalid. using default (desc)."
62
+ invalid_order: "the order specified for displaying tlogs in invalid. using default (desc)."
59
63
  messages:
60
64
  choose_card: "choose a card."
61
- choose_deck: "choose a deck."
65
+ choose_teck: "choose a teck."
62
66
  confirmation_prompt: "input 'aroyes' to reset %{name}, or enter to cancel (cancel): "
63
67
  creating: "creating %{name}..."
64
68
  creation_attempt: "attempting to create aro table named %{name}..."
@@ -71,8 +75,8 @@ en:
71
75
  $ cd %{name}
72
76
 
73
77
  see aro --help for usage.
74
- deck_created_sucessfully: "%{name} deck created successfully"
75
- deck_selected: "%{name} deck selected in the %{room} room."
78
+ teck_created_sucessfully: "%{name} teck created successfully"
79
+ teck_selected: "%{name} teck selected in the %{room} room."
76
80
  drawing: "drawing a card from %{name}"
77
81
  drawing_from_dimension: "in the the %{dimension} dimension..."
78
82
  ruby_facot_random: |
@@ -80,12 +84,12 @@ en:
80
84
  for more information visit:
81
85
  https://github.com/arowmancy/dev_tarot
82
86
  history_drawn: "drawn cards"
83
- no_decks: |
84
- no decks created yet.
87
+ no_tecks: |
88
+ no tecks created yet.
85
89
 
86
90
  use the following command to create one:
87
91
 
88
- $ aro deck new <deck_name>
92
+ $ aro teck new <teck_name>
89
93
 
90
94
  see aro --help for usage.
91
95
  showing: "showing %{name} [count:%{count}, order:%{order}]..."
data/sys/aos/amg.rb CHANGED
@@ -17,13 +17,13 @@ module Aos
17
17
  CMDS = {
18
18
  INST: {
19
19
  key: :inst,
20
- description: I18n.t("aos.amg.commands.description.inst"),
21
- usage: I18n.t("aos.amg.commands.usage.inst"),
20
+ description: I18n.t("amg.commands.description.inst"),
21
+ usage: I18n.t("amg.commands.usage.inst"),
22
22
  },
23
23
  INSTUN: {
24
24
  key: :instun,
25
- description: I18n.t("aos.amg.commands.description.instun"),
26
- usage: I18n.t("aos.amg.commands.usage.instun"),
25
+ description: I18n.t("amg.commands.description.instun"),
26
+ usage: I18n.t("amg.commands.usage.instun"),
27
27
  },
28
28
  }
29
29
 
@@ -42,51 +42,51 @@ module Aos
42
42
  case args[Aro::Mancy::S].to_sym
43
43
  when Aos::Amg::CMDS[:INST][:key]
44
44
  unless args[Aro::Mancy::OS].nil?
45
- lib_name = args[Aro::Mancy::OS]
46
- lib = Aos::Lib.find_by(name: lib_name)
47
- unless lib.nil?
48
- if lib.installed?
49
- self.instance.display_lines << "#{lib_name} lib is already installed."
45
+ ilib_name = args[Aro::Mancy::OS]
46
+ ilib = Aos::Ilib.find_by(name: ilib_name)
47
+ unless ilib.nil?
48
+ if ilib.installed?
49
+ self.instance.display_lines << I18n.t("amg.messages.already_installed", name: ilib_name)
50
50
  else
51
- Aos::Amg.install(lib)
52
- if lib.reload.installed?
53
- self.instance.display_lines << "#{lib_name} installed successfully."
51
+ Aos::Amg.install(ilib)
52
+ if ilib.reload.installed?
53
+ self.instance.display_lines << I18n.t("amg.messages.install_success", name: ilib_name)
54
54
  self.instance.display_lines += self.inst_lines
55
55
  return true
56
56
  else
57
- self.instance.display_lines << "failed to install #{lib_name}."
57
+ self.instance.display_lines << I18n.t("amg.messages.install_failure", name: ilib_name)
58
58
  end
59
59
  end
60
60
  else
61
- self.instance.display_lines << "could not find #{lib_name} lib."
61
+ self.instance.display_lines << I18n.t("amg.messages.cannot_locate", name: ilib_name)
62
62
  end
63
63
  else
64
- # list installed libs
64
+ # list installed ilibs
65
65
  Aos::Amg.inst
66
66
  return true
67
67
  end
68
68
  when Aos::Amg::CMDS[:INSTUN][:key]
69
69
  unless args[Aro::Mancy::OS].nil?
70
- lib_name = args[Aro::Mancy::OS]
71
- lib = Aos::Lib.find_by(name: lib_name)
72
- unless lib.nil?
73
- if lib.available?
74
- self.instance.display_lines << "#{lib_name} lib is not installed."
70
+ ilib_name = args[Aro::Mancy::OS]
71
+ ilib = Aos::Ilib.find_by(name: ilib_name)
72
+ unless ilib.nil?
73
+ if ilib.available?
74
+ self.instance.display_lines << I18n.t("amg.messages.not_installed", name: ilib_name)
75
75
  else
76
- Aos::Amg.uninstall(lib)
77
- if lib.reload.available?
78
- self.instance.display_lines << "#{lib_name} uninstalled successfully."
76
+ Aos::Amg.uninstall(ilib)
77
+ if ilib.reload.available?
78
+ self.instance.display_lines << I18n.t("amg.messages.uninstall_success", name: ilib_name)
79
79
  self.instance.display_lines += self.instun_lines
80
80
  return true
81
81
  else
82
- self.instance.display_lines << "failed to uninstall #{lib_name}."
82
+ self.instance.display_lines << I18n.t("amg.messages.uninstall_failure", name: ilib_name)
83
83
  end
84
84
  end
85
85
  else
86
- self.instance.display_lines << "could not find #{lib_name} lib."
86
+ self.instance.display_lines << I18n.t("amg.messages.cannot_locate", name: ilib_name)
87
87
  end
88
88
  else
89
- # list available libs
89
+ # list available ilibs
90
90
  Aos::Amg.instun
91
91
  return true
92
92
  end
@@ -95,18 +95,18 @@ module Aos
95
95
  return false
96
96
  end
97
97
 
98
- def self.load(lib)
99
- Aos::Lib.find_or_create_by(name: lib)
98
+ def self.load(ilib_name)
99
+ Aos::Ilib.find_or_create_by(name: ilib_name)
100
100
  end
101
101
 
102
- def self.install(lib)
103
- return unless lib.kind_of?(Aos::Lib)
104
- lib.installed!
102
+ def self.install(ilib)
103
+ return unless ilib.kind_of?(Aos::Ilib)
104
+ ilib.installed!
105
105
  end
106
106
 
107
- def self.uninstall(lib)
108
- return unless lib.kind_of?(Aos::Lib)
109
- lib.available!
107
+ def self.uninstall(ilib)
108
+ return unless ilib.kind_of?(Aos::Ilib)
109
+ ilib.available!
110
110
  end
111
111
 
112
112
  def self.inst
@@ -137,20 +137,15 @@ module Aos
137
137
  end
138
138
 
139
139
  def self.inst_lines
140
- # list installed libs
140
+ # list installed ilibs
141
141
  lines = []
142
142
  lines << ""
143
- installed_libs = Aos::Lib.where(status: :installed)
144
- unless installed_libs.any?
145
- lines << I18n.t("aos.amg.lib.none_installed")
143
+ installed_ilibs = Aos::Ilib.where(status: :installed)
144
+ unless installed_ilibs.any?
145
+ lines << I18n.t("amg.messages.none_installed")
146
146
  else
147
- lines << I18n.t("aos.amg.lib.listing_installed")
148
- installed_libs.each_with_index{|lib, i|
149
- lines << "[#{i + Aro::Mancy::S} of #{Aos::Lib.count}]"
150
- lines << "name: #{lib.name}"
151
- lines << "path: " + lib.so_path.split("/").last(Aro::Mancy::N).join("/")
152
- lines << "usage: #{lib.usage}"
153
- }
147
+ lines << I18n.t("amg.messages.listing_installed")
148
+ lines += Aos::Amg.ilib_lines(installed_ilibs)
154
149
  end
155
150
  lines << ""
156
151
 
@@ -158,25 +153,32 @@ module Aos
158
153
  end
159
154
 
160
155
  def self.instun_lines
161
- # list installed libs
156
+ # list installed ilibs
162
157
  lines = []
163
158
  lines << ""
164
- available_libs = Aos::Lib.where(status: :available)
165
- unless available_libs.any?
166
- lines << I18n.t("aos.amg.lib.none_available")
159
+ available_ilibs = Aos::Ilib.where(status: :available)
160
+ unless available_ilibs.any?
161
+ lines << I18n.t("amg.messages.none_available")
167
162
  else
168
- lines << I18n.t("aos.amg.lib.listing_available")
169
- available_libs.each_with_index{|lib, i|
170
- lines << "[#{i + Aro::Mancy::S} of #{Aos::Lib.count}]"
171
- lines << "name: #{lib.name}"
172
- lines << "path: " + lib.so_path.split("/").last(Aro::Mancy::N).join("/")
173
- lines << "usage: #{lib.usage}"
174
- }
163
+ lines << I18n.t("amg.messages.listing_available")
164
+ lines += Aos::Amg.ilib_lines(available_ilibs)
175
165
  end
176
166
  lines << ""
177
167
 
178
168
  lines
179
169
  end
180
170
 
171
+ def self.ilib_lines(ilibs)
172
+ lines = []
173
+ ilibs.each_with_index{|ilib, i|
174
+ lines << "[#{i + Aro::Mancy::S} of #{ilibs.count}]"
175
+ lines << I18n.t("amg.messages.ilib_name", name: ilib.name)
176
+ lines << I18n.t("amg.messages.ilib_path", path: ilib.so_path.split("/").last(Aro::Mancy::N).join("/"))
177
+ lines << I18n.t("amg.messages.ilib_usage", usage: ilib.usage)
178
+ }
179
+
180
+ lines
181
+ end
182
+
181
183
  end
182
184
  end