rubypitaya 2.11.0 → 2.11.1
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/lib/rubypitaya/app-template/Gemfile +1 -1
- data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
- data/lib/rubypitaya/app-template/features/player.feature +13 -5
- data/lib/rubypitaya/app-template/features/step_definitions/application_steps.rb +1 -1
- data/lib/rubypitaya/app-template/features/step_definitions/rubypitaya_steps.rb +7 -0
- data/lib/rubypitaya/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 484a04f94edf96a0610d7756b48a08ac349f1a2e72a244ff07046bec55f1f7be
|
4
|
+
data.tar.gz: 9951a60c18f4baaa0e34e88ef29c97a140aa00e328efb4bfdc9661a257ce6960
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 275cfad81877d43ada6941369801ffb438e88d825bd9a1d7f4bdd777bbef56a4a9fcb2e1a06b7753d1d100c716da1b8ce61e5e331f1e27a471df1ae91e7a5182
|
7
|
+
data.tar.gz: cc9b47f3f138bb73474fcd726a88644c806b7c79c908b4334734fbd3171da6fc03db17735de3121af3ad7cde73bb57982b991d0b3cd32e67b295e9b29fa0f3f3
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
rspec-support (~> 3.8.0)
|
85
85
|
rspec-support (3.8.3)
|
86
86
|
ruby2_keywords (0.0.2)
|
87
|
-
rubypitaya (2.11.
|
87
|
+
rubypitaya (2.11.1)
|
88
88
|
activerecord (= 6.0.2)
|
89
89
|
etcdv3 (= 0.10.2)
|
90
90
|
eventmachine (= 1.2.7)
|
@@ -123,7 +123,7 @@ DEPENDENCIES
|
|
123
123
|
listen (= 3.2.1)
|
124
124
|
pry (= 0.12.2)
|
125
125
|
rspec (= 3.8.0)
|
126
|
-
rubypitaya (= 2.11.
|
126
|
+
rubypitaya (= 2.11.1)
|
127
127
|
|
128
128
|
BUNDLED WITH
|
129
129
|
1.17.2
|
@@ -12,10 +12,18 @@ Feature: Player
|
|
12
12
|
|
13
13
|
Scenario: Get player info
|
14
14
|
Given the following player:
|
15
|
-
| name | gold |
|
16
|
-
| Someone | 15 |
|
15
|
+
| name | gold | user_id |
|
16
|
+
| Someone | 15 | 00000000-0000-0000-0000-000000000001 |
|
17
17
|
And the player 'Someone' is authenticated
|
18
18
|
When client call route 'rubypitaya.playerHandler.getInfo'
|
19
|
-
Then server should response
|
20
|
-
|
21
|
-
|
19
|
+
Then server should response the following json:
|
20
|
+
"""
|
21
|
+
{
|
22
|
+
'code': 'RP-200',
|
23
|
+
'data': {
|
24
|
+
'name': 'Someone',
|
25
|
+
'gold': 15,
|
26
|
+
'userId': '00000000-0000-0000-0000-000000000001'
|
27
|
+
}
|
28
|
+
}
|
29
|
+
"""
|
@@ -6,7 +6,7 @@ end
|
|
6
6
|
Given(/^[Tt]he following [Pp]layer[s]*[:]*$/) do |table|
|
7
7
|
player_hashes = table.hashes
|
8
8
|
player_hashes.each do |player_hash|
|
9
|
-
player_hash[:user] = User.new
|
9
|
+
player_hash[:user] = User.new(id: player_hash[:user_id])
|
10
10
|
MyApp::Player.create(player_hash)
|
11
11
|
end
|
12
12
|
end
|
@@ -15,6 +15,13 @@ Given(/^[Ss]erver should response ["'](.+)["'] as ["'](.+)["']$/) do |response_k
|
|
15
15
|
expect(response_value.to_s).to eq(expected_value)
|
16
16
|
end
|
17
17
|
|
18
|
+
Given(/^[Ss]erver should response the following json[:]*$/) do |expected_json|
|
19
|
+
expected_json = expected_json.delete("\n").delete(' ')
|
20
|
+
response_json = @handler_helper.response.to_json.gsub("\"", "'")
|
21
|
+
|
22
|
+
expect(response_json).to eq(expected_json)
|
23
|
+
end
|
24
|
+
|
18
25
|
Given(/^[Ss]etup key ["'](.+)["'] is ["'](.+)["']$/) do |key, value|
|
19
26
|
@handler_helper.add_setup(key, value)
|
20
27
|
end
|
data/lib/rubypitaya/version.rb
CHANGED