tramway-api 1.8.7.3 → 2.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.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/app/controllers/tramway/api/v1/records_controller.rb +1 -1
- data/lib/tramway/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d0caeaa1462195c9c7d270d716a7970ce658f6ffbfaf139662bc3c0e382630c
|
4
|
+
data.tar.gz: 7c7cef68dfa06f0cb0dcdfd530e28c0a41b42515bb175a9978946ed13c6b7600
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5659a1cad529417c3bdccc5766167690654008e0c2e903e6efb638277c4d7fe161ec9bfcb18a91088c3ba58a5204a3f13efbfd5fa6fef4a7746e03e60f6a872
|
7
|
+
data.tar.gz: 738e22ab29825ec1ebe351c5a3e5c64b2e92a87fee4e84e8285c16b31a664faefc0ec75a67e65c9c5c8705df2b59d24106c4bd26454abd68dedee5b0b9ec337f
|
data/README.md
CHANGED
@@ -257,7 +257,7 @@ RSpec.describe 'Post creating user', type: :feature do
|
|
257
257
|
|
258
258
|
it 'returns created status' do
|
259
259
|
post '/api/v1/user', params: { user: attributes }
|
260
|
-
expect(response
|
260
|
+
expect(response[:status]).to eq 201
|
261
261
|
end
|
262
262
|
|
263
263
|
it 'returns no errors' do
|
@@ -275,17 +275,17 @@ end
|
|
275
275
|
require 'rails_helper'
|
276
276
|
|
277
277
|
RSpec.describe 'Post generate token', type: :feature do
|
278
|
-
describe 'POST /api/v1/
|
278
|
+
describe 'POST /api/v1/user_tokens' do
|
279
279
|
let(:user) { create :user, password: '123456789' }
|
280
280
|
|
281
281
|
it 'returns created status' do
|
282
|
-
post '/api/v1/
|
282
|
+
post '/api/v1/user_tokens', params: { auth: { login: user.email, password: '123456789' } }
|
283
283
|
|
284
|
-
expect(response
|
284
|
+
expect(response[:status]).to eq 201
|
285
285
|
end
|
286
286
|
|
287
287
|
it 'returns token' do
|
288
|
-
post '/api/v1/
|
288
|
+
post '/api/v1/user_tokens', params: { auth: { login: user.email, password: '123456789' } }
|
289
289
|
|
290
290
|
expect(json_response[:auth_token].present?).to be_truthy
|
291
291
|
expect(json_response[:user]).to include_json({ email: user.email, uuid: user.uuid })
|
@@ -372,7 +372,7 @@ Then write test:
|
|
372
372
|
it 'returns status' do
|
373
373
|
get '/api/v1/records', params: { model: 'User' }, headers: headers
|
374
374
|
|
375
|
-
expect(response
|
375
|
+
expect(response[:status]).to eq 200
|
376
376
|
end
|
377
377
|
|
378
378
|
it 'returns needed count' do
|
@@ -455,7 +455,7 @@ RSpec.describe 'Post generate token', type: :feature do
|
|
455
455
|
it 'returns created status' do
|
456
456
|
post '/api/v1/user_token', params: { auth: { login: user.email, password: '123456789' } }
|
457
457
|
|
458
|
-
expect(response
|
458
|
+
expect(response[:status]).to eq 201
|
459
459
|
end
|
460
460
|
|
461
461
|
it 'returns token' do
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|