Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# не версионируем вывод программы
/data.txt
/result.json
data_large.txt
/tmp
12 changes: 12 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
source 'https://rubygems.org'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Плюсик за гемфайл


git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

gem 'benchmark-ips'
gem 'memory_profiler'
gem 'ruby-prof'
gem 'stackprof'

gem 'pry-byebug'
gem 'rspec'
gem 'rubocop'
64 changes: 64 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
benchmark-ips (2.7.2)
byebug (11.0.0)
coderay (1.1.2)
diff-lcs (1.3)
jaro_winkler (1.5.2)
memory_profiler (0.9.12)
method_source (0.9.2)
parallel (1.14.0)
parser (2.6.0.0)
ast (~> 2.4.0)
powerpack (0.1.2)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.7.0)
byebug (~> 11.0)
pry (~> 0.10)
psych (3.1.0)
rainbow (3.0.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.65.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
psych (>= 3.1.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-prof (0.17.0)
ruby-progressbar (1.10.0)
stackprof (0.2.12)
unicode-display_width (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
benchmark-ips
memory_profiler
pry-byebug
rspec
rubocop
ruby-prof
stackprof

BUNDLED WITH
1.16.6
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
### Note
*Для работы скрипта требуется Ruby 2.4+*

# Задание №1
В файле `task-1.rb` находится ruby-программа, которая выполняет обработку данных из файла.

Expand Down
226 changes: 226 additions & 0 deletions case-study.md

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions spec/fixtures/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
user,0,Leida,Cira,0
session,0,0,Safari 29,87,2016-10-23
session,0,1,Firefox 12,118,2017-02-27
session,0,2,Internet Explorer 28,31,2017-03-28
session,0,3,Internet Explorer 28,109,2016-09-15
session,0,4,Safari 39,104,2017-09-27
session,0,5,Internet Explorer 35,6,2016-09-01
user,1,Palmer,Katrina,65
session,1,0,Safari 17,12,2016-10-21
session,1,1,Firefox 32,3,2016-12-20
session,1,2,Chrome 6,59,2016-11-11
session,1,3,Internet Explorer 10,28,2017-04-29
session,1,4,Chrome 13,116,2016-12-28
user,2,Gregory,Santos,86
session,2,0,Chrome 35,6,2018-09-21
session,2,1,Safari 49,85,2017-05-22
session,2,2,Firefox 47,17,2018-02-02
session,2,3,Chrome 20,84,2016-11-25
Binary file added spec/fixtures/data_large.txt.gz
Binary file not shown.
Loading