MonkeyEngine 1.0.0 → 2.0.0

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 (72) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +19 -16
  3. data/.rspec +3 -0
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +6 -0
  6. data/Gemfile +3 -1
  7. data/Gemfile.lock +71 -0
  8. data/README.md +5 -1
  9. data/Rakefile +3 -2
  10. data/dictionaries/en-US.txt +466554 -0
  11. data/lib/Action/action.rb +5 -4
  12. data/lib/Monkey/monkey.rb +17 -12
  13. data/lib/Monkey.rb +3 -1
  14. data/lib/MonkeyAction/monkey_action.rb +3 -1
  15. data/lib/MonkeyAction/monkey_action_dead.rb +8 -6
  16. data/lib/MonkeyAction/monkey_action_eat.rb +6 -4
  17. data/lib/MonkeyAction/monkey_action_pause.rb +6 -5
  18. data/lib/MonkeyAction/monkey_action_sleep.rb +6 -4
  19. data/lib/MonkeyAction/monkey_action_type.rb +15 -10
  20. data/lib/MonkeyAction/monkey_action_wake.rb +8 -6
  21. data/lib/MonkeyAction/monkey_timed_action.rb +6 -4
  22. data/lib/MonkeyActions.rb +2 -0
  23. data/lib/MonkeyEngine/action_rules.rb +20 -18
  24. data/lib/MonkeyEngine/exceptions.rb +7 -7
  25. data/lib/MonkeyEngine/monkey_engine.rb +13 -10
  26. data/lib/MonkeyEngine/version.rb +3 -1
  27. data/lib/MonkeyEngine.rb +3 -1
  28. data/lib/MonkeyFactory/monkey_factory.rb +3 -4
  29. data/lib/MonkeyFactory.rb +3 -1
  30. data/lib/MonkeyKeyboard/keyboard_char.rb +3 -2
  31. data/lib/MonkeyKeyboard/keyboard_input.rb +4 -3
  32. data/lib/MonkeyKeyboard/keyboard_key.rb +3 -1
  33. data/lib/MonkeyKeyboard/keyboard_key_evaluator.rb +5 -7
  34. data/lib/MonkeyKeyboard/monkey_keyboard_en_us.rb +100 -80
  35. data/lib/MonkeyKeyboardEnUs.rb +3 -1
  36. data/lib/MonkeyManager/monkey_manager.rb +13 -11
  37. data/lib/MonkeyManager.rb +3 -1
  38. data/lib/MonkeyService/monkey_service.rb +8 -9
  39. data/lib/MonkeyService.rb +3 -1
  40. data/lib/tasks/engine.rb +64 -47
  41. data/monkeyengine.gemspec +22 -20
  42. data/spec/action_rules_spec.rb +9 -9
  43. data/spec/engine_spec.rb +5 -10
  44. data/spec/keyboard_char_spec.rb +3 -4
  45. data/spec/keyboard_key_spec.rb +3 -4
  46. data/spec/monkey_action_eat_spec.rb +14 -15
  47. data/spec/monkey_action_pause_spec.rb +15 -16
  48. data/spec/monkey_action_sleep_spec.rb +15 -16
  49. data/spec/monkey_action_type_spec.rb +22 -21
  50. data/spec/monkey_action_wake_spec.rb +6 -7
  51. data/spec/monkey_factory_spec.rb +5 -5
  52. data/spec/monkey_keyboard_en_us_spec.rb +8 -14
  53. data/spec/monkey_manager_spec.rb +2 -1
  54. data/spec/monkey_service_spec.rb +15 -18
  55. data/spec/monkey_spec.rb +2 -1
  56. data/spec/{spec_helpers.rb → spec_helper.rb} +6 -4
  57. data/spec/support/shared_examples.rb +12 -12
  58. metadata +72 -56
  59. data/.idea/.name +0 -1
  60. data/.idea/.rakeTasks +0 -7
  61. data/.idea/MonkeyEngine.iml +0 -133
  62. data/.idea/codeStyleSettings.xml +0 -13
  63. data/.idea/encodings.xml +0 -5
  64. data/.idea/misc.xml +0 -5
  65. data/.idea/modules.xml +0 -9
  66. data/.idea/runConfigurations/All_specs_in_test__MonkeyEngine.xml +0 -38
  67. data/.idea/runConfigurations/IRB_console.xml +0 -25
  68. data/.idea/runConfigurations/Start_Yard_Server.xml +0 -26
  69. data/.idea/runConfigurations/monkey_run.xml +0 -26
  70. data/.idea/scopes/scope_settings.xml +0 -5
  71. data/.idea/vcs.xml +0 -7
  72. data/.idea/workspace.xml +0 -886
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 09d197e83bd2486b0665ab6d6de1d35e71580599
4
- data.tar.gz: e8a828dc4d63eaf19dc0d0db9ef13224aa3d12e9
2
+ SHA256:
3
+ metadata.gz: 0b7e24ee3c17b88e0c4f772fa86fe917e6d481d8a9ee2215ddd10aab1702fc15
4
+ data.tar.gz: e16ca7bda19a747153ecae1b19a84accb916a6d48c0f3ed7e00bc645fd745463
5
5
  SHA512:
6
- metadata.gz: 461cb39ee9d18de96c6b3500f050c5c6237b7a140cde90bca9bb347b77d4d5fe665614911a51dff1568f624c94b790fe913df0ffce38643d8d7affad29cee8fc
7
- data.tar.gz: 74f14f7e1c92f92095e096e4c4168b37ba7503261b17de1df1277025d243276b3baf4220115fd2ce8a22ef1ff00f7b4cdd77aa38d5dcf70475482e365b209cef
6
+ metadata.gz: f82982d32dbbb02c011e029386d7ce52df2f85b95f8ef0bfcd88062b5be94a1b118ed6b4dd2bfd9ce48ad2db846e398bd160a89227af96aafbff98dda4f46262
7
+ data.tar.gz: 7644666c7517d63232da357eda0cc1c95262395ea0680e059e151de5f3a65c6367f70fe65335318a8f39ec479630361faa8582cd69b8c15f21a7a897091716f1
data/.gitignore CHANGED
@@ -1,17 +1,20 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ /rdoc/
1
11
  *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
12
+
13
+ # rspec failure tracking
14
+ .rspec_status
15
+
16
+ /.vscode/
17
+ *.code-workspace
18
+
19
+ scratch.rb
20
+ readme.txt
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 3.0.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ ### Version 2.0.0
2
+ * Use LittleWeasel gem for dictionary.
3
+ * Gem update to patch CVEs.
4
+ ### Version 1.1.0
5
+ * Made some changes to the sample rake task $ bundle exec rake engine:run
6
+ * Added this CHANGELOG.md file
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in monkeyengine.gemspec
4
- gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,71 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ MonkeyEngine (2.0.0)
5
+ LittleWeasel (~> 5.0, >= 5.0.3)
6
+ ProtectedConstructor (~> 2.0, >= 2.0.3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ LittleWeasel (5.0.3)
12
+ activesupport (~> 6.1, >= 6.1.3.2)
13
+ ProtectedConstructor (2.1.3)
14
+ activesupport (6.1.7.3)
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ tzinfo (~> 2.0)
19
+ zeitwerk (~> 2.3)
20
+ byebug (11.1.3)
21
+ coderay (1.1.3)
22
+ colorize (0.8.1)
23
+ concurrent-ruby (1.2.2)
24
+ diff-lcs (1.5.0)
25
+ i18n (1.12.0)
26
+ concurrent-ruby (~> 1.0)
27
+ method_source (1.0.0)
28
+ minitest (5.18.0)
29
+ pry (0.14.2)
30
+ coderay (~> 1.1)
31
+ method_source (~> 1.0)
32
+ pry-byebug (3.10.1)
33
+ byebug (~> 11.0)
34
+ pry (>= 0.13, < 0.15)
35
+ rake (13.0.6)
36
+ redcarpet (2.3.0)
37
+ rspec (3.12.0)
38
+ rspec-core (~> 3.12.0)
39
+ rspec-expectations (~> 3.12.0)
40
+ rspec-mocks (~> 3.12.0)
41
+ rspec-core (3.12.1)
42
+ rspec-support (~> 3.12.0)
43
+ rspec-expectations (3.12.2)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.12.0)
46
+ rspec-mocks (3.12.5)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.12.0)
49
+ rspec-support (3.12.0)
50
+ tzinfo (2.0.6)
51
+ concurrent-ruby (~> 1.0)
52
+ webrick (1.7.0)
53
+ yard (0.9.28)
54
+ webrick (~> 1.7.0)
55
+ zeitwerk (2.6.7)
56
+
57
+ PLATFORMS
58
+ x86_64-darwin-19
59
+
60
+ DEPENDENCIES
61
+ MonkeyEngine!
62
+ bundler (~> 2.3, >= 2.3.20)
63
+ colorize (~> 0.8.1)
64
+ pry-byebug (~> 3.9)
65
+ rake (~> 13.0, >= 13.0.6)
66
+ redcarpet (~> 2.3, >= 2.3.0)
67
+ rspec (~> 3.10)
68
+ yard (~> 0.9.28)
69
+
70
+ BUNDLED WITH
71
+ 2.3.20
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # MonkeyEngine
2
2
 
3
- Have some fun! MonkeyEngine is a gem that allows virtual monkeys to tap away on a virtual keyboard.
3
+ Have some fun! MonkeyEngine is a gem that allows virtual monkeys to tap away on a virtual keyboard! Can any of them complete a sentence? write a book? The sky's the limit! Add your own AI! Publish the results! Go...BANANAS!
4
+
5
+ Run the following rake task at the command line to see a little sample app:
6
+
7
+ $ bundle exec rake engine:run
4
8
 
5
9
  ## Installation
6
10
 
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
- require "bundler/gem_tasks"
2
- require File.expand_path('../lib/tasks/engine.rb', __FILE__)
1
+ # frozen_string_literal: true
3
2
 
3
+ require 'bundler/gem_tasks'
4
+ require File.expand_path('lib/tasks/engine.rb', __dir__)