diff --git a/.travis.yml b/.travis.yml index 765f0e9..10668bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: crystal - -# Uncomment the following if you'd like Travis to run specs and check code formatting -# script: -# - crystal spec -# - crystal tool format --check +install: + - shards install +script: + - crystal bin/ameba.cr diff --git a/shard.lock b/shard.lock index b932c94..e28807d 100644 --- a/shard.lock +++ b/shard.lock @@ -1,5 +1,9 @@ version: 2.0 shards: + ameba: + git: https://github.com/crystal-ameba/ameba.git + version: 0.13.4 + crest: git: https://github.com/mamantoha/crest.git version: 0.27.0 diff --git a/shard.yml b/shard.yml index 52203fe..37bfb95 100644 --- a/shard.yml +++ b/shard.yml @@ -12,6 +12,11 @@ dependencies: crest: github: mamantoha/crest +development_dependencies: + ameba: + github: crystal-ameba/ameba + version: ~> 0.13.0 + crystal: 1.1.1 license: MIT diff --git a/src/vk0nline.cr b/src/vk0nline.cr index 521cd26..5e246d5 100644 --- a/src/vk0nline.cr +++ b/src/vk0nline.cr @@ -11,11 +11,11 @@ rescue exit 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" 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" puts token_url