Ruby Gem to play nice with Lakatam
$ gem install lakatan
Or add to your Gemfile:
gem "lakatan"
bundle install
Initialize with the following code:
Lakatan.setup do |config|
config.site_url = "https://lakatan.dev"
config.url_prefix = "/api/v1/bearers/"
config.authorization_token = "XXX"
end
user = Lakatan::User.find(115)
user.id #=> 115
user.name #=> "Andrés Matte"
user.email #=> "andres@platan.us"
user.created_at #=> Thu, 17 Dec 2020 20:40:08 +0000
user.updated_at #=> Thu, 24 Dec 2020 20:23:00 +0000
user.team_ids #=> [103, 97, 96]
user.teams #=> [#<Lakatan::Team:0x00007f93be276178>, #<Lakatan::Team:0x00007f93be276171]
users = Lakatan::User.all
team = Lakatan::Team.find(115)
team.id #=> 115
team.name #=> "Keepers of the seven keys"
team.purpose #=> "Definir cómo se entregan accesos y permisos a los distintos sistemas que necesitamos dentro de Platanus."
team.created_at #=> Thu, 17 Dec 2020 20:40:08 +0000
team.updated_at #=> Thu, 24 Dec 2020 20:23:00 +0000
team.user_ids #=> [139, 140]
team.task_ids #=> [33, 99]
team.users #=> [#<Lakatan::User:0x00007f93be276178>, #<Lakatan::User:0x00007f93be276171]
team.tasks #=> [#<Lakatan::Task:0x00007f93be276178>, #<Lakatan::Task:0x00007f93be276171]
teams = Lakatan::Team.all
task = Lakatan::Task.find(115)
task.id #=> 115
task.name #=> "Primera entrevista startup"
task.goal #=> "Ir a la primera entrevista startup PV"
task.raffle_type #=> "Equity"
task.created_at #=> Thu, 17 Dec 2020 20:40:08 +0000
task.updated_at #=> Thu, 24 Dec 2020 20:23:00 +0000
task.label_id #=> 0
task.user_minimum #=> 100
task.team_id #=> 10
task.team #=> #<Lakatan::Team:0x00007f93be276178>
raffle = task.raffle #=> #<Lakatan::Raffle:0x00007f93be276178>
raffle.users #=> [#<Lakatan::User:0x00007f93be276178>, #<Lakatan::User:0x00007f93be276171]
raffle = task.raffle(user_ids: [1, 2]) #=> #<Lakatan::Raffle:0x00007f93be276178>
raffle.users #=> [#<Lakatan::User:0x00007f93be276178>, #<Lakatan::User:0x00007f93be276171]
tasks = Lakatan::Task.all
To run the specs you need to execute, in the root path of the gem, the following command:
bin/guard
You need to put all your tests in the /lakatan/spec/
directory.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Thank you contributors!
Lakatan is maintained by platanus.
Lakatan is © 2021 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.