aromancer 0.0.4 → 0.0.5

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
  SHA256:
3
- metadata.gz: 18b04d9a936ce283adb145a9263b4c8da8c90c1dea2ba9cc5a4901db49b383e8
4
- data.tar.gz: 535987d0dd891f7600443a2b2ce3c274e9cae47c019804e74a242bbeaae5c9b4
3
+ metadata.gz: 117a4ac8211f275343a236d489c481e073604599325d5df3d8f7032fe5c83256
4
+ data.tar.gz: 7fce17acc9a26840d6005d9ce16b91bac8a2c6f0cc0356827b3495b1ab6a6db4
5
5
  SHA512:
6
- metadata.gz: d49f02e835a1a95984dc84198f2d83c430ba28b6856532e4be09f763d3049ce18d0865bf90f6c08635d55a03c06b308d4519e10c33b53564f3abaa2f09de60c2
7
- data.tar.gz: ab697259cb83cf21e38210251157fbec2499da3f5a9d20595f4d0a2e780fa7e71031d313d10b1926cdf59e4d4ad190ca02fe8b97e5eeb1000e871f71470de6f8
6
+ metadata.gz: d0d2618429769e3253eaeb474ae51fd5a7cbfa704eef19bbbb730fa1dacc25f0439eeafe6d8268028d0596a9f4efb3a16392ce4e1f0253d5f193642612d6d8f4
7
+ data.tar.gz: 6a53306414b2c2921f57e3e2f497ff25901af7f126740a003b572f7d4b2723a1a132be4bf702c3582041eb2965a5adde5d7909c1b0fa7c7531b30f8d1a5a9dde
data/.gitignore CHANGED
@@ -6,4 +6,3 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- .aromancer_server_host
data/.ruby-version CHANGED
@@ -1,2 +1 @@
1
1
  4.0.7
2
-
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aromancer (0.0.2)
4
+ aromancer (0.0.5)
5
5
  activesupport (~> 8.1.4)
6
6
  faraday (~> 2.14.4)
7
7
  fileutils (~> 1.8.0)
@@ -11,6 +11,7 @@ PATH
11
11
  tty-prompt (~> 0.23.1)
12
12
  tty-screen (~> 0.8.2)
13
13
  tty-table (~> 0.12.0)
14
+ websocket-client-simple (~> 0.9.0)
14
15
 
15
16
  GEM
16
17
  remote: https://rubygems.org/
@@ -35,6 +36,7 @@ GEM
35
36
  diff-lcs (1.6.2)
36
37
  drb (2.2.3)
37
38
  erb (6.0.7)
39
+ event_emitter (0.2.6)
38
40
  faraday (2.14.4)
39
41
  faraday-net_http (>= 2.0, < 3.5)
40
42
  json
@@ -52,7 +54,7 @@ GEM
52
54
  ffi (1.17.4-x86_64-darwin)
53
55
  ffi (1.17.4-x86_64-linux-gnu)
54
56
  ffi (1.17.4-x86_64-linux-musl)
55
- fileutils (1.8.0)
57
+ fileutils (1.8.1)
56
58
  i18n (1.15.2)
57
59
  concurrent-ruby (~> 1.0)
58
60
  io-console (0.9.4)
@@ -62,7 +64,7 @@ GEM
62
64
  rdoc (>= 4.0.0)
63
65
  reline (>= 0.4.2)
64
66
  json (3.0.2)
65
- listen (3.10.0)
67
+ listen (3.10.1)
66
68
  logger
67
69
  rb-fsevent (~> 0.10, >= 0.10.3)
68
70
  rb-inotify (~> 0.9, >= 0.9.10)
@@ -70,13 +72,17 @@ GEM
70
72
  minitest (6.0.6)
71
73
  drb (~> 2.0)
72
74
  prism (~> 1.5)
73
- net-http (0.9.1)
75
+ mutex_m (0.3.0)
76
+ net-http (0.10.0)
77
+ net-protocol (>= 0.3.0)
74
78
  uri (>= 0.11.1)
79
+ net-protocol (0.4.0)
80
+ timeout
75
81
  pastel (0.8.0)
76
82
  tty-color (~> 0.5)
77
83
  pp (0.6.4)
78
84
  prettyprint
79
- prettyprint (0.2.0)
85
+ prettyprint (0.2.1)
80
86
  prism (1.9.0)
81
87
  rake (13.4.2)
82
88
  rb-fsevent (0.11.2)
@@ -86,7 +92,7 @@ GEM
86
92
  logger
87
93
  prism (>= 1.6.0)
88
94
  tsort
89
- rdoc (8.0.0)
95
+ rdoc (8.1.0)
90
96
  erb
91
97
  prism (>= 1.6.0)
92
98
  rbs (>= 4.0.0)
@@ -112,6 +118,7 @@ GEM
112
118
  unicode-display_width (>= 1.5, < 3.0)
113
119
  unicode_utils (~> 1.4)
114
120
  strings-ansi (0.2.0)
121
+ timeout (0.6.1)
115
122
  tsort (0.2.0)
116
123
  tty-color (0.6.0)
117
124
  tty-cursor (0.7.1)
@@ -132,7 +139,13 @@ GEM
132
139
  concurrent-ruby (~> 1.0)
133
140
  unicode-display_width (2.6.0)
134
141
  unicode_utils (1.4.0)
135
- uri (1.1.1)
142
+ uri (1.1.2)
143
+ websocket (1.2.11)
144
+ websocket-client-simple (0.9.0)
145
+ base64
146
+ event_emitter
147
+ mutex_m
148
+ websocket
136
149
  wisper (2.0.1)
137
150
 
138
151
  PLATFORMS
@@ -141,6 +154,7 @@ PLATFORMS
141
154
  arm-linux-gnu
142
155
  arm-linux-musl
143
156
  arm64-darwin
157
+ ruby
144
158
  x86-linux-gnu
145
159
  x86-linux-musl
146
160
  x86_64-darwin
@@ -149,7 +163,7 @@ PLATFORMS
149
163
 
150
164
  DEPENDENCIES
151
165
  aromancer!
152
- bundler (~> 4.0.21)
166
+ bundler (~> 4.0.22)
153
167
  irb (~> 1.18)
154
168
  listen (~> 3.10)
155
169
  rake (~> 13.4.2)
@@ -157,15 +171,16 @@ DEPENDENCIES
157
171
 
158
172
  CHECKSUMS
159
173
  activesupport (8.1.4) sha256=891dd3fe43c4fc8391934b237b1189bb1f661c932a84a840043db9d46a4e80df
160
- aromancer (0.0.2)
174
+ aromancer (0.0.5)
161
175
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
162
176
  bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
163
- bundler (4.0.21) sha256=7cbf5499b426076aa16c8d28a59e4c2c3aad5a438402abcd961f0119f29f1dd0
177
+ bundler (4.0.22) sha256=d8d5ec84c8555e0af71db63ed7aee4d1a8fb839ec46d84212d61979242a5d75a
164
178
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
165
179
  connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
166
180
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
167
181
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
168
182
  erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
183
+ event_emitter (0.2.6) sha256=c72697bd5cce9d36594be1972c17f1c9a573236f44303a4d1d548080364e1391
169
184
  faraday (2.14.4) sha256=9bb4408c44621b0dbaaaa39e5dbfc4dbe58cc6751b6eb94d16ae9e1f2f2fab6e
170
185
  faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588
171
186
  ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
@@ -179,24 +194,26 @@ CHECKSUMS
179
194
  ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
180
195
  ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
181
196
  ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
182
- fileutils (1.8.0) sha256=8c6b1df54e2540bdb2f39258f08af78853aa70bad52b4d394bbc6424593c6e02
197
+ fileutils (1.8.1) sha256=2d541a1ee34a9ed5c4f054be8fb819a26b5d654488a31dc8806917cf448b9cc3
183
198
  i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
184
199
  io-console (0.9.4) sha256=a403304f32928ee85e56d457b4612ca43f2703b561a3258844992bd24085fbb1
185
200
  irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
186
201
  json (3.0.2) sha256=8e6d7e7b11384c21230430cef90b71f14849a34a1f4452796670f7c981bd19df
187
- listen (3.10.0) sha256=c6e182db62143aeccc2e1960033bebe7445309c7272061979bb098d03760c9d2
202
+ listen (3.10.1) sha256=4c3f32855657f348747da4dd2372ff3790d90a6b1d3e4f21a3706adb2d04783c
188
203
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
189
204
  minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
190
- net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
205
+ mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751
206
+ net-http (0.10.0) sha256=1a2ff6e37a05724973c43f2bf7bf105f59c36a4cd0a7e9b1c021a0a566987c27
207
+ net-protocol (0.4.0) sha256=f9f90c8c6f64794a45160bf422177a336db12809de3beeeaa26b88fcd2e8c853
191
208
  pastel (0.8.0) sha256=481da9fb7d2f6e6b1a08faf11fa10363172dc40fd47848f096ae21209f805a75
192
209
  pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
193
- prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
210
+ prettyprint (0.2.1) sha256=d555d57ea6d7cf001d4774b693546a6bd88bec1e778ddffb5c60b68ceec4b7d4
194
211
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
195
212
  rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
196
213
  rb-fsevent (0.11.2) sha256=43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe
197
214
  rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e
198
215
  rbs (4.2.0) sha256=51f7b886dcc05bc09e10b901daa6a81829f6adc03101d6ca9ea4aac6103e0674
199
- rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
216
+ rdoc (8.1.0) sha256=befc37880a5cfd36dcb176c748b5fd5ee39dd3536a75e81824e4972ce230f60a
200
217
  reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
201
218
  rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
202
219
  rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
@@ -206,6 +223,7 @@ CHECKSUMS
206
223
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
207
224
  strings (0.2.1) sha256=933293b3c95cf85b81eb44b3cf673e3087661ba739bbadfeadf442083158d6fb
208
225
  strings-ansi (0.2.0) sha256=90262d760ea4a94cc2ae8d58205277a343409c288cbe7c29416b1826bd511c88
226
+ timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
209
227
  tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
210
228
  tty-color (0.6.0) sha256=6f9c37ca3a4e2367fb2e6d09722762647d6f455c111f05b59f35730eeb24332a
211
229
  tty-cursor (0.7.1) sha256=79534185e6a777888d88628b14b6a1fdf5154a603f285f80b1753e1908e0bf48
@@ -217,8 +235,10 @@ CHECKSUMS
217
235
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
218
236
  unicode-display_width (2.6.0) sha256=12279874bba6d5e4d2728cef814b19197dbb10d7a7837a869bab65da943b7f5a
219
237
  unicode_utils (1.4.0) sha256=b922d0cf2313b6b7136ada6645ce7154ffc86418ca07d53b058efe9eb72f2a40
220
- uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
238
+ uri (1.1.2) sha256=89292e98eabbef6248b0a0ed5e7e398e152f83f17560023a6d94a7f492b169fb
239
+ websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737
240
+ websocket-client-simple (0.9.0) sha256=f9a37c5e4922b35a711e21e6d73ed1e25892efa47d183203ab2f5beb4e563109
221
241
  wisper (2.0.1) sha256=ce17bc5c3a166f241a2e6613848b025c8146fce2defba505920c1d1f3f88fae6
222
242
 
223
243
  BUNDLED WITH
224
- 4.0.21
244
+ 4.0.22
data/README.md CHANGED
@@ -1,43 +1,6 @@
1
- # aromancer
1
+ ## aromancer gem
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aromancer`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- ## Installation
8
-
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
- ```
16
-
17
- If bundler is not being used to manage dependencies, install the gem by executing:
18
-
19
- ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
- ```
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aromancer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/aromancer/blob/main/CODE_OF_CONDUCT.md).
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Aromancer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/aromancer/blob/main/CODE_OF_CONDUCT.md).
3
+ # todos:
4
+ - settings
5
+ - server url
6
+ - force ssl
data/aromancer.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  # development gems
32
32
  spec.add_development_dependency "irb", "~> 1.18"
33
- spec.add_development_dependency "bundler", "~> 4.0.21"
33
+ spec.add_development_dependency "bundler", "~> 4.0.22"
34
34
  spec.add_development_dependency "listen", "~> 3.10"
35
35
  spec.add_development_dependency "rake", "~> 13.4.2"
36
36
  spec.add_development_dependency "rspec", "~> 3.13.2"
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_runtime_dependency "i18n", "~> 1.15.2"
41
41
  spec.add_runtime_dependency "faraday", "~> 2.14.4"
42
42
  spec.add_runtime_dependency "fileutils", "~> 1.8.0"
43
- # spec.add_runtime_dependency "websocket-client-simple", "~> 0.9.0"
43
+ spec.add_runtime_dependency "websocket-client-simple", "~> 0.9.0"
44
44
 
45
45
  # spec.add_runtime_dependency "tty-box", "~> 0.7.0"
46
46
  # spec.add_runtime_dependency "tty-color", "~> 0.6.0"
data/bin/aromancer CHANGED
@@ -12,15 +12,4 @@
12
12
 
13
13
  require :aromancer.to_s
14
14
 
15
- puts Aromancer::Server::SERVER_URL
16
- begin
17
- Aromancer::Prompt.say(I18n.t("shared.welcome", version: Aromancer::VERSION))
18
- if Aromancer::Storage.get_player
19
- Aromancer::Routes.main_menu
20
- else
21
- Aromancer::Routes.authentication
22
- end
23
- rescue Interrupt => e
24
- exit
25
- end
26
-
15
+ Aromancer::Cli.run
@@ -0,0 +1 @@
1
+ 1b4e59d835c7883f9902dec9a622a17ebf552de95869b89b41764a1d014a47f306f72cc5da12d6b817d00045cfb1dd144b3b40b484312c2367c14c96f02b7215
data/gem_graph.png CHANGED
Binary file
data/lib/aromancer/api.rb CHANGED
@@ -38,6 +38,8 @@ module Aromancer
38
38
  !error_body.nil? &&
39
39
  error_body.keys.include?(:error_message.to_s) &&
40
40
  error_body["error_message"] == "not signed in"
41
+
42
+ Aromancer::Storage.instance.clear_cache! if signed_out
41
43
  Aromancer::Storage.set_signed_out_flag(signed_out)
42
44
  end
43
45
 
@@ -126,7 +128,11 @@ module Aromancer
126
128
  end
127
129
 
128
130
  def self.set_active_legend_id(active_legend_id)
129
- result = Aromancer::Server.update_player({player: {active_legend_id: active_legend_id, status: active_legend_id.nil? ? :lobby : :playing}})
131
+ result = Aromancer::Server.update_player({player: {
132
+ active_legend_id: active_legend_id,
133
+ status: active_legend_id.nil? ? :lobby : :playing
134
+ }})
135
+
130
136
  if result.status == 200
131
137
  response = JSON.parse(result.body)
132
138
  Aromancer::Storage.set_player(response)
@@ -17,6 +17,10 @@ module Aromancer
17
17
  attr_accessor :prompt
18
18
 
19
19
  def initialize
20
+ reload!
21
+ end
22
+
23
+ def reload!
20
24
  self.prompt = TTY::Prompt.new
21
25
  end
22
26