log-analyser 0.1.3.pre.documentation.20201108192110 → 0.1.3.pre.documentation.20201108193310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a645c762e28326585af1cbe7f3d96e4bb46d6a72996d775692ba74c555ba6fc
|
|
4
|
+
data.tar.gz: f98bbcd840b509840304dd1f7176e484938e29e9200326b2561f9c6dcea79962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21314628d221eefc3a808c71847137a8c7ef06b2910085060c58c5f771012bb8950f00c677deaecf2c47e1b775ecfd395b0a57310dfe9e321c2cc73b2be72296
|
|
7
|
+
data.tar.gz: 6c0243885a4c600c13b6b58145a64102c47d9e8f661e45c477f64d5b1f535a89245bba8e8e459a62ee40380c36b6870df7db1cd6c945759aa04c14a20e0685f4
|
data/README.md
CHANGED
|
@@ -56,13 +56,26 @@ Or install it yourself as:
|
|
|
56
56
|
|
|
57
57
|
#### Gem Usage
|
|
58
58
|
|
|
59
|
+
```ruby
|
|
60
|
+
#!/usr/bin/env ruby
|
|
61
|
+
|
|
62
|
+
require 'pageviews_log_aggregator'
|
|
63
|
+
|
|
64
|
+
file_path = '/Users/dmazzei/projects/personal/ruby/sp_test/log-analyser/resources/webserver.log'
|
|
65
|
+
log_aggregator = LogAnalyser::PageviewsLogAggregator.new(file_path)
|
|
66
|
+
|
|
67
|
+
puts "\nAll pageviews"
|
|
68
|
+
log_aggregator.all.each do |key, value|
|
|
69
|
+
puts "#{key&.to_s&.ljust(28, '.')} | #{value}"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
puts "\nUnique pageviews"
|
|
73
|
+
log_aggregator.unique.each do |key, value|
|
|
74
|
+
puts "#{key&.to_s&.ljust(28, '.')} | #{value}"
|
|
75
|
+
end
|
|
59
76
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
...
|
|
63
|
-
...
|
|
64
|
-
...
|
|
65
|
-
```
|
|
77
|
+
|
|
78
|
+

|
|
66
79
|
|
|
67
80
|
### Project
|
|
68
81
|
|
|
@@ -147,7 +160,14 @@ A space must separate the page name (first column) from the user identifier (e.g
|
|
|
147
160
|
|
|
148
161
|
#### Start with the project:
|
|
149
162
|
|
|
163
|
+
```
|
|
164
|
+
$ git clone git@github.com:DMazzei/log-analyser.git
|
|
165
|
+
$ cd log-analyser
|
|
166
|
+
$ gem install bundler
|
|
167
|
+
$ bundle install
|
|
168
|
+
```
|
|
150
169
|
|
|
170
|
+
And the world is your oyster...
|
|
151
171
|
|
|
152
172
|
You can also run `Bundle exec console` for an interactive prompt that will allow you to experiment.
|
|
153
173
|
|