add travis

This commit is contained in:
Alexander Popov 2021-08-29 14:17:36 +03:00
parent dddaf080a7
commit 011f888601
4 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,5 @@
language: crystal language: crystal
install:
# Uncomment the following if you'd like Travis to run specs and check code formatting - shards install
# script: script:
# - crystal spec - crystal bin/ameba.cr
# - crystal tool format --check

View File

@ -1,5 +1,9 @@
version: 2.0 version: 2.0
shards: shards:
ameba:
git: https://github.com/crystal-ameba/ameba.git
version: 0.13.4
crest: crest:
git: https://github.com/mamantoha/crest.git git: https://github.com/mamantoha/crest.git
version: 0.27.0 version: 0.27.0

View File

@ -12,6 +12,11 @@ dependencies:
crest: crest:
github: mamantoha/crest github: mamantoha/crest
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 0.13.0
crystal: 1.1.1 crystal: 1.1.1
license: MIT license: MIT

View File

@ -11,11 +11,11 @@ rescue
exit exit
end end
def get_access_token(appId : Int32) def get_access_token(app_id : Int32)
puts "Open this page, and save token to config.json\n\n" puts "Open this page, and save token to config.json\n\n"
token_url = "https://oauth.vk.com/authorize?client_id="\ token_url = "https://oauth.vk.com/authorize?client_id="\
"#{appId}&redirect_uri=vk.com&response_type=token"\ "#{app_id}&redirect_uri=vk.com&response_type=token"\
"&display=mobile&v=5.131&revoke=1&state=01010&scope=offline" "&display=mobile&v=5.131&revoke=1&state=01010&scope=offline"
puts token_url puts token_url