stats_lite 0.5.4 → 0.6.0
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/.gitignore +2 -1
- data/Gemfile.lock +40 -40
- data/README.md +10 -6
- data/Rakefile +1 -2
- data/exe/stats-lite +1 -1
- data/lib/stats_lite/default_commands.rb +3 -1
- data/lib/stats_lite/version.rb +1 -1
- data/stats_lite.gemspec +4 -4
- metadata +4 -5
- data/integration_test/ | awk '{=}1'} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92d4f3ed11d58ceea56fafbe33571e05f1c7ecbb0f1fda3e717a8bca83832635
|
|
4
|
+
data.tar.gz: 8bc82269a2510df0e9912125b71b1d2c2034ef4f88a99bb929771c869cb99619
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3270d262b40b38e313cebed70ca35f807dc40629eabdc43ef6dbbf9b7959ad76010dbf2762a8cece81c7b14e6d5849098af4ff021871178da41df35a57ee97f
|
|
7
|
+
data.tar.gz: b7984a5d5c5ebc8b268c9683b1d8232285f8c5774f20c8dd9ec88412f26bfede52d381ec29646d7ecc01cf9b67469ad92cfd34598cad4e9bfd9ae92d0a92aabb
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
stats_lite (0.
|
|
4
|
+
stats_lite (0.6.0)
|
|
5
5
|
filewatcher (~> 1.1.1)
|
|
6
6
|
puma (>= 3.0.0, < 5.0.0)
|
|
7
7
|
rack (>= 2.0.0, < 3.0.0)
|
|
@@ -11,51 +11,51 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
actionpack (6.0.
|
|
15
|
-
actionview (= 6.0.
|
|
16
|
-
activesupport (= 6.0.
|
|
14
|
+
actionpack (6.0.2)
|
|
15
|
+
actionview (= 6.0.2)
|
|
16
|
+
activesupport (= 6.0.2)
|
|
17
17
|
rack (~> 2.0)
|
|
18
18
|
rack-test (>= 0.6.3)
|
|
19
19
|
rails-dom-testing (~> 2.0)
|
|
20
20
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
21
|
-
actionview (6.0.
|
|
22
|
-
activesupport (= 6.0.
|
|
21
|
+
actionview (6.0.2)
|
|
22
|
+
activesupport (= 6.0.2)
|
|
23
23
|
builder (~> 3.1)
|
|
24
24
|
erubi (~> 1.4)
|
|
25
25
|
rails-dom-testing (~> 2.0)
|
|
26
26
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
27
|
-
activesupport (6.0.
|
|
27
|
+
activesupport (6.0.2)
|
|
28
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
29
29
|
i18n (>= 0.7, < 2)
|
|
30
30
|
minitest (~> 5.1)
|
|
31
31
|
tzinfo (~> 1.1)
|
|
32
|
-
zeitwerk (~> 2.
|
|
32
|
+
zeitwerk (~> 2.2)
|
|
33
33
|
ast (2.4.0)
|
|
34
|
-
builder (3.2.
|
|
34
|
+
builder (3.2.4)
|
|
35
35
|
concurrent-ruby (1.1.5)
|
|
36
|
-
crass (1.0.
|
|
36
|
+
crass (1.0.5)
|
|
37
37
|
diff-lcs (1.3)
|
|
38
38
|
erubi (1.9.0)
|
|
39
39
|
filewatcher (1.1.1)
|
|
40
40
|
optimist (~> 3.0)
|
|
41
41
|
i18n (1.7.0)
|
|
42
42
|
concurrent-ruby (~> 1.0)
|
|
43
|
-
jaro_winkler (1.5.
|
|
44
|
-
loofah (2.
|
|
43
|
+
jaro_winkler (1.5.4)
|
|
44
|
+
loofah (2.4.0)
|
|
45
45
|
crass (~> 1.0.2)
|
|
46
46
|
nokogiri (>= 1.5.9)
|
|
47
47
|
method_source (0.9.2)
|
|
48
48
|
mini_portile2 (2.4.0)
|
|
49
|
-
minitest (5.
|
|
49
|
+
minitest (5.13.0)
|
|
50
50
|
mustermann (1.0.3)
|
|
51
51
|
nio4r (2.5.2)
|
|
52
|
-
nokogiri (1.10.
|
|
52
|
+
nokogiri (1.10.7)
|
|
53
53
|
mini_portile2 (~> 2.4.0)
|
|
54
54
|
optimist (3.0.0)
|
|
55
|
-
parallel (1.
|
|
55
|
+
parallel (1.19.1)
|
|
56
56
|
parser (2.6.5.0)
|
|
57
57
|
ast (~> 2.4.0)
|
|
58
|
-
puma (4.
|
|
58
|
+
puma (4.3.1)
|
|
59
59
|
nio4r (~> 2.0)
|
|
60
60
|
rack (2.0.7)
|
|
61
61
|
rack-protection (2.0.7)
|
|
@@ -65,44 +65,44 @@ GEM
|
|
|
65
65
|
rails-dom-testing (2.0.3)
|
|
66
66
|
activesupport (>= 4.2.0)
|
|
67
67
|
nokogiri (>= 1.6)
|
|
68
|
-
rails-html-sanitizer (1.
|
|
69
|
-
loofah (~> 2.
|
|
70
|
-
railties (6.0.
|
|
71
|
-
actionpack (= 6.0.
|
|
72
|
-
activesupport (= 6.0.
|
|
68
|
+
rails-html-sanitizer (1.3.0)
|
|
69
|
+
loofah (~> 2.3)
|
|
70
|
+
railties (6.0.2)
|
|
71
|
+
actionpack (= 6.0.2)
|
|
72
|
+
activesupport (= 6.0.2)
|
|
73
73
|
method_source
|
|
74
74
|
rake (>= 0.8.7)
|
|
75
75
|
thor (>= 0.20.3, < 2.0)
|
|
76
76
|
rainbow (3.0.0)
|
|
77
77
|
rake (10.5.0)
|
|
78
|
-
rspec (3.
|
|
79
|
-
rspec-core (~> 3.
|
|
80
|
-
rspec-expectations (~> 3.
|
|
81
|
-
rspec-mocks (~> 3.
|
|
82
|
-
rspec-core (3.
|
|
83
|
-
rspec-support (~> 3.
|
|
84
|
-
rspec-expectations (3.
|
|
78
|
+
rspec (3.9.0)
|
|
79
|
+
rspec-core (~> 3.9.0)
|
|
80
|
+
rspec-expectations (~> 3.9.0)
|
|
81
|
+
rspec-mocks (~> 3.9.0)
|
|
82
|
+
rspec-core (3.9.0)
|
|
83
|
+
rspec-support (~> 3.9.0)
|
|
84
|
+
rspec-expectations (3.9.0)
|
|
85
85
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
86
|
-
rspec-support (~> 3.
|
|
87
|
-
rspec-mocks (3.
|
|
86
|
+
rspec-support (~> 3.9.0)
|
|
87
|
+
rspec-mocks (3.9.0)
|
|
88
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
89
|
-
rspec-support (~> 3.
|
|
90
|
-
rspec-support (3.
|
|
91
|
-
rubocop (0.
|
|
89
|
+
rspec-support (~> 3.9.0)
|
|
90
|
+
rspec-support (3.9.0)
|
|
91
|
+
rubocop (0.77.0)
|
|
92
92
|
jaro_winkler (~> 1.5.1)
|
|
93
93
|
parallel (~> 1.10)
|
|
94
94
|
parser (>= 2.6)
|
|
95
95
|
rainbow (>= 2.2.2, < 4.0)
|
|
96
96
|
ruby-progressbar (~> 1.7)
|
|
97
97
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
98
|
-
rubocop-performance (1.5.
|
|
98
|
+
rubocop-performance (1.5.1)
|
|
99
99
|
rubocop (>= 0.71.0)
|
|
100
|
-
rubocop-rails (2.
|
|
100
|
+
rubocop-rails (2.4.0)
|
|
101
101
|
rack (>= 1.1)
|
|
102
102
|
rubocop (>= 0.72.0)
|
|
103
|
-
rubocop-rails_config (0.
|
|
103
|
+
rubocop-rails_config (0.9.0)
|
|
104
104
|
railties (>= 3.0)
|
|
105
|
-
rubocop (~> 0.
|
|
105
|
+
rubocop (~> 0.77)
|
|
106
106
|
rubocop-performance (~> 1.3)
|
|
107
107
|
rubocop-rails (~> 2.0)
|
|
108
108
|
ruby-progressbar (1.10.1)
|
|
@@ -111,14 +111,14 @@ GEM
|
|
|
111
111
|
rack (~> 2.0)
|
|
112
112
|
rack-protection (= 2.0.7)
|
|
113
113
|
tilt (~> 2.0)
|
|
114
|
-
thor (0.
|
|
114
|
+
thor (1.0.0)
|
|
115
115
|
thread_safe (0.3.6)
|
|
116
116
|
tilt (2.0.10)
|
|
117
117
|
tzinfo (1.2.5)
|
|
118
118
|
thread_safe (~> 0.1)
|
|
119
119
|
unicode-display_width (1.6.0)
|
|
120
120
|
vidibus-sysinfo (1.2.0)
|
|
121
|
-
zeitwerk (2.
|
|
121
|
+
zeitwerk (2.2.2)
|
|
122
122
|
|
|
123
123
|
PLATFORMS
|
|
124
124
|
ruby
|
|
@@ -127,7 +127,7 @@ DEPENDENCIES
|
|
|
127
127
|
bundler (~> 2.0)
|
|
128
128
|
rake (~> 10.0)
|
|
129
129
|
rspec (~> 3.0)
|
|
130
|
-
rubocop-rails_config (~> 0.
|
|
130
|
+
rubocop-rails_config (~> 0.9.0)
|
|
131
131
|
stats_lite!
|
|
132
132
|
|
|
133
133
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -7,20 +7,24 @@ Embeddable in Rails
|
|
|
7
7
|
|
|
8
8
|
Requirements ruby, min version 2
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
```shell_script
|
|
11
12
|
sudo apt-get install -y ruby build-essential ruby-dev
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
Usage standalone, you might need to run some commands as __sudo__.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
```shell_script
|
|
17
19
|
gem install stats_lite --no-ri --no-rdoc
|
|
18
20
|
stats-lite
|
|
19
21
|
curl http://localhost:9111
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
Add to startup, crontab
|
|
23
|
-
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
```shell_script
|
|
24
28
|
crontab -e
|
|
25
29
|
# then add
|
|
26
30
|
@reboot /usr/local/bin/stats-lite
|
|
@@ -40,7 +44,7 @@ StatsLite.configure do |s|
|
|
|
40
44
|
end
|
|
41
45
|
```
|
|
42
46
|
|
|
43
|
-
```
|
|
47
|
+
```shell_script
|
|
44
48
|
# now it's protected by passowrd
|
|
45
49
|
curl http://localhost:9111?password=1234
|
|
46
50
|
```
|
|
@@ -60,10 +64,10 @@ mount StatsLite::App => "/server-stats"
|
|
|
60
64
|
|
|
61
65
|
StatsLite.configure do |s, h|
|
|
62
66
|
s.password ENV["STATS_LITE_PASS"] # defaults to nil, unprotected
|
|
63
|
-
s.port ENV["STATS_LITE_PORT"]
|
|
67
|
+
s.port ENV["STATS_LITE_PORT"] # defaults to 9111
|
|
64
68
|
|
|
65
69
|
s.data -> (data) do # add more data
|
|
66
|
-
data[:ruby_current_time] = Time.now #simple value
|
|
70
|
+
data[:ruby_current_time] = Time.now # simple value
|
|
67
71
|
data[:linux_time] = h.command("date") # bash command, supports {cache: true, expires_in: 60}
|
|
68
72
|
|
|
69
73
|
data[:slow_command] = h.fetch :slow_command, -> {
|
data/Rakefile
CHANGED
|
@@ -20,7 +20,7 @@ end
|
|
|
20
20
|
desc "integration"
|
|
21
21
|
task "integration" do
|
|
22
22
|
sh "rake test"
|
|
23
|
-
sh "cd integration_test && stats-lite"
|
|
23
|
+
sh "cd integration_test && stats-lite ./config.rb"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
|
|
@@ -30,4 +30,3 @@ task "deploy" do
|
|
|
30
30
|
sh "rake build"
|
|
31
31
|
sh "gem push #{get_gem_file.call}"
|
|
32
32
|
end
|
|
33
|
-
|
data/exe/stats-lite
CHANGED
data/lib/stats_lite/version.rb
CHANGED
data/stats_lite.gemspec
CHANGED
|
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
22
22
|
|
|
23
23
|
if spec.respond_to?(:metadata)
|
|
24
|
-
spec.metadata[
|
|
24
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
25
25
|
else
|
|
26
|
-
raise
|
|
27
|
-
|
|
26
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
|
27
|
+
"public gem pushes."
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
# Specify which files should be added to the gem when it is released.
|
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
|
39
39
|
spec.add_development_dependency "bundler", "~> 2.0"
|
|
40
40
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
42
|
-
spec.add_development_dependency "rubocop-rails_config", "~> 0.
|
|
42
|
+
spec.add_development_dependency "rubocop-rails_config", "~> 0.9.0"
|
|
43
43
|
|
|
44
44
|
spec.add_dependency "rack", ">= 2.0.0", "< 3.0.0"
|
|
45
45
|
spec.add_dependency "puma", ">= 3.0.0", "< 5.0.0"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stats_lite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sebi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -58,14 +58,14 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.
|
|
61
|
+
version: 0.9.0
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.
|
|
68
|
+
version: 0.9.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rack
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -176,7 +176,6 @@ files:
|
|
|
176
176
|
- bin/setup
|
|
177
177
|
- docs/example.png
|
|
178
178
|
- exe/stats-lite
|
|
179
|
-
- integration_test/ | awk '{=}1'}
|
|
180
179
|
- integration_test/config.rb
|
|
181
180
|
- lib/stats_lite.rb
|
|
182
181
|
- lib/stats_lite/app.rb
|
|
File without changes
|