Skip to content

Instantly share code, notes, and snippets.

@milushov
Created November 11, 2015 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milushov/d44cf605501ab5452c36 to your computer and use it in GitHub Desktop.
Save milushov/d44cf605501ab5452c36 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'json'
require 'faker'
POSITION = %w(
Новичок
Даритель
Наставник
Меценат
)
def people(count)
count.times.map do |id|
{
id: id+1,
name: Faker::Name.name,
position: POSITION[rand(0..3)],
tems_count: rand(10..100),
tickets_count: rand(100..5000),
}
end
end
get '/team.json' do
content_type :json
count = params[:count] ? params[:count].to_i : 100
people(count).to_json
end
Copy link

ghost commented Nov 11, 2015

Focused dashboard,!Fine-grained permissions..?Repositoryne..!

@milushov
Copy link
Author

@imi44 what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment