icodebreaker_gem 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 347e81d6f8a975f1f098cfc8f2a6b020d716b9ea98d1cf42070e163c625c38e4
4
- data.tar.gz: f118662c52300ff261a39451de93575cad0607c46fad4bbe9a20e2f6549febdf
3
+ metadata.gz: 4b2c433d4d680d34546db1dd48696176293335553fd1de88c7c282712f89bd43
4
+ data.tar.gz: 0ca9ab3534dc7e92c0cd5fe7aad427c2fdda33e8c2a7223d759cb0724b9617ce
5
5
  SHA512:
6
- metadata.gz: 201b6f72d7afb800495ad1695cc096caf9175993f0bbca482c5d2f21a5af6c8bc15fe3c1e6963c1964a4fcbc4bd0e363bcf4ee198ca988aff6294a12ab82de7d
7
- data.tar.gz: 211a669fc83604daefcde7155e87bff3791b52f10af7b6a0a0826ee444578e4725139084182b2525c553b08cb7e9b4c48f2ffd65c6d99d56d9b5a2d7b0b0aeeb
6
+ metadata.gz: ac6bcdba4e9e847ac4090e044640f0b9c047f682c4959fe1b3df835bee36eb5a130181aeb7400db5f36a215007c2eb6de4a12871dbe27e7c49f6a9c640643d28
7
+ data.tar.gz: bbb8f2e92f5392c131d3124875d66ac2f0fc9ac34289718de789b5e0ce64d5a87892680fc44586572ebec45d95efeb7cae1238fbb7124c919462e889af616632
data/.rspec_status CHANGED
@@ -1,30 +1,30 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------ | ------ | --------------- |
3
- ./spec/game_core_spec.rb[1:1] | passed | 0.00027 seconds |
4
- ./spec/game_core_spec.rb[1:2] | passed | 0.00075 seconds |
5
- ./spec/game_core_spec.rb[1:3:1] | passed | 0.00043 seconds |
6
- ./spec/game_core_spec.rb[1:4:1] | passed | 0.00065 seconds |
7
- ./spec/game_core_spec.rb[1:5:1:1] | passed | 0.00008 seconds |
8
- ./spec/game_core_spec.rb[1:5:1:2] | passed | 0.00008 seconds |
9
- ./spec/game_core_spec.rb[1:5:1:3] | passed | 0.00009 seconds |
10
- ./spec/game_core_spec.rb[1:5:1:4] | passed | 0.00009 seconds |
11
- ./spec/game_core_spec.rb[1:5:1:5] | passed | 0.00006 seconds |
12
- ./spec/game_core_spec.rb[1:5:1:6] | passed | 0.00008 seconds |
13
- ./spec/game_core_spec.rb[1:5:1:7] | passed | 0.00007 seconds |
3
+ ./spec/game_core_spec.rb[1:1] | passed | 0.00038 seconds |
4
+ ./spec/game_core_spec.rb[1:2] | passed | 0.00086 seconds |
5
+ ./spec/game_core_spec.rb[1:3:1] | passed | 0.00057 seconds |
6
+ ./spec/game_core_spec.rb[1:4:1] | passed | 0.00072 seconds |
7
+ ./spec/game_core_spec.rb[1:5:1:1] | passed | 0.00009 seconds |
8
+ ./spec/game_core_spec.rb[1:5:1:2] | passed | 0.00009 seconds |
9
+ ./spec/game_core_spec.rb[1:5:1:3] | passed | 0.00011 seconds |
10
+ ./spec/game_core_spec.rb[1:5:1:4] | passed | 0.00006 seconds |
11
+ ./spec/game_core_spec.rb[1:5:1:5] | passed | 0.00005 seconds |
12
+ ./spec/game_core_spec.rb[1:5:1:6] | passed | 0.00009 seconds |
13
+ ./spec/game_core_spec.rb[1:5:1:7] | passed | 0.00006 seconds |
14
14
  ./spec/game_core_spec.rb[1:5:2:1] | passed | 0.00008 seconds |
15
15
  ./spec/game_core_spec.rb[1:5:2:2] | passed | 0.00005 seconds |
16
16
  ./spec/game_core_spec.rb[1:5:3:1] | passed | 0.00005 seconds |
17
- ./spec/game_core_spec.rb[1:5:3:2] | passed | 0.00007 seconds |
17
+ ./spec/game_core_spec.rb[1:5:3:2] | passed | 0.00005 seconds |
18
18
  ./spec/game_core_spec.rb[1:5:3:3] | passed | 0.00004 seconds |
19
- ./spec/game_spec.rb[1:1:1] | passed | 0.00012 seconds |
20
- ./spec/game_spec.rb[1:2:1] | passed | 0.00018 seconds |
21
- ./spec/game_spec.rb[1:2:2] | passed | 0.00006 seconds |
22
- ./spec/game_spec.rb[1:2:3] | passed | 0.00006 seconds |
19
+ ./spec/game_spec.rb[1:1:1] | passed | 0.0001 seconds |
20
+ ./spec/game_spec.rb[1:2:1] | passed | 0.00021 seconds |
21
+ ./spec/game_spec.rb[1:2:2] | passed | 0.00012 seconds |
22
+ ./spec/game_spec.rb[1:2:3] | passed | 0.0001 seconds |
23
23
  ./spec/game_spec.rb[1:2:4] | passed | 0.00006 seconds |
24
24
  ./spec/game_spec.rb[1:2:5] | passed | 0.00005 seconds |
25
- ./spec/game_spec.rb[1:3:1] | passed | 0.00045 seconds |
26
- ./spec/game_spec.rb[1:3:2] | passed | 0.00016 seconds |
27
- ./spec/game_spec.rb[1:3:3] | passed | 0.00012 seconds |
28
- ./spec/game_spec.rb[1:4:1] | passed | 0.00272 seconds |
29
- ./spec/game_spec.rb[1:5:1] | passed | 0.001 seconds |
30
- ./spec/icodebreaker_gem_spec.rb[1:1] | passed | 0.00006 seconds |
25
+ ./spec/game_spec.rb[1:3:1] | passed | 0.00051 seconds |
26
+ ./spec/game_spec.rb[1:3:2] | passed | 0.00017 seconds |
27
+ ./spec/game_spec.rb[1:3:3] | passed | 0.00014 seconds |
28
+ ./spec/game_spec.rb[1:4:1] | passed | 0.00376 seconds |
29
+ ./spec/game_spec.rb[1:5:1] | passed | 0.00123 seconds |
30
+ ./spec/icodebreaker_gem_spec.rb[1:1] | passed | 0.00007 seconds |
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- icodebreaker_gem (0.3.3)
4
+ icodebreaker_gem (0.3.4)
5
5
  rake (~> 13.0)
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IcodebreakerGem
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
@@ -4,15 +4,18 @@ module IcodebreakerGem
4
4
  module Storage
5
5
  DATA_FILE = 'codebreakers.yml'
6
6
  STORAGE_PATH = './storage/'
7
- def save_storage(game)
8
- create_storage
9
- games = load_storage
10
- games << game
11
- File.open(data_path, 'w') do |file|
12
- YAML.dump(games, file)
13
- end
14
- end
7
+
15
8
  class << self
9
+
10
+ def save_storage
11
+ create_storage
12
+ games = load_storage
13
+ games << game_data
14
+ File.open(data_path, 'w') do |file|
15
+ YAML.dump(games, file)
16
+ end
17
+
18
+ end
16
19
  def load_storage
17
20
  create_storage
18
21
  YAML.safe_load(File.read(data_path)) || []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icodebreaker_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - JohnnyGsy