stats_lite 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87df10097356b68dee6b2e514498514c4ec28d063bdc81d71dbfbc16a2e75d1b
4
- data.tar.gz: 501cb2d3dbe709e3255ed0a6f7ce074010d800a85bfde886c22c2bb3bb5cbc58
3
+ metadata.gz: 92d4f3ed11d58ceea56fafbe33571e05f1c7ecbb0f1fda3e717a8bca83832635
4
+ data.tar.gz: 8bc82269a2510df0e9912125b71b1d2c2034ef4f88a99bb929771c869cb99619
5
5
  SHA512:
6
- metadata.gz: 57dbb7641d419c72817d52d3081829452cd2c5919d13103f3825a40dfc331ddb2fe7f4fb7296bee07d51725c1a11eb8956910926acb55a18664b9840a4dd6e9f
7
- data.tar.gz: cb57c47110076f1e6bfcc6243275344ba127a400d55b392875b405b4a0a6579cf84b7ee6824da60e0dcf6f1a3b427e6446f4adc4aa0e67315fa78665b3937101
6
+ metadata.gz: a3270d262b40b38e313cebed70ca35f807dc40629eabdc43ef6dbbf9b7959ad76010dbf2762a8cece81c7b14e6d5849098af4ff021871178da41df35a57ee97f
7
+ data.tar.gz: b7984a5d5c5ebc8b268c9683b1d8232285f8c5774f20c8dd9ec88412f26bfede52d381ec29646d7ecc01cf9b67469ad92cfd34598cad4e9bfd9ae92d0a92aabb
data/.gitignore CHANGED
@@ -9,4 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
- .idea/
12
+ .idea/
13
+ .rake_tasks~
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stats_lite (0.5.4)
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.0)
15
- actionview (= 6.0.0)
16
- activesupport (= 6.0.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.0)
22
- activesupport (= 6.0.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.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.1, >= 2.1.8)
32
+ zeitwerk (~> 2.2)
33
33
  ast (2.4.0)
34
- builder (3.2.3)
34
+ builder (3.2.4)
35
35
  concurrent-ruby (1.1.5)
36
- crass (1.0.4)
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.3)
44
- loofah (2.3.0)
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.12.2)
49
+ minitest (5.13.0)
50
50
  mustermann (1.0.3)
51
51
  nio4r (2.5.2)
52
- nokogiri (1.10.4)
52
+ nokogiri (1.10.7)
53
53
  mini_portile2 (~> 2.4.0)
54
54
  optimist (3.0.0)
55
- parallel (1.17.0)
55
+ parallel (1.19.1)
56
56
  parser (2.6.5.0)
57
57
  ast (~> 2.4.0)
58
- puma (4.2.0)
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.2.0)
69
- loofah (~> 2.2, >= 2.2.2)
70
- railties (6.0.0)
71
- actionpack (= 6.0.0)
72
- activesupport (= 6.0.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.7.0)
79
- rspec-core (~> 3.7.0)
80
- rspec-expectations (~> 3.7.0)
81
- rspec-mocks (~> 3.7.0)
82
- rspec-core (3.7.1)
83
- rspec-support (~> 3.7.0)
84
- rspec-expectations (3.7.0)
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.7.0)
87
- rspec-mocks (3.7.0)
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.7.0)
90
- rspec-support (3.7.1)
91
- rubocop (0.75.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.0)
98
+ rubocop-performance (1.5.1)
99
99
  rubocop (>= 0.71.0)
100
- rubocop-rails (2.3.2)
100
+ rubocop-rails (2.4.0)
101
101
  rack (>= 1.1)
102
102
  rubocop (>= 0.72.0)
103
- rubocop-rails_config (0.7.2)
103
+ rubocop-rails_config (0.9.0)
104
104
  railties (>= 3.0)
105
- rubocop (~> 0.74)
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.20.3)
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.1.10)
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.7.2)
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
- ```shell script
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
- ```shell script
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
- ```shell script
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
- ```shell script
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"], defaults to 9111
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
@@ -6,7 +6,7 @@ require "rack/handler/puma"
6
6
  require "filewatcher"
7
7
 
8
8
  print StatsLite::Log.yellow("\nStarting stats-lite\n")
9
- config = "./config.rb"
9
+ config = "./config.rb" || ARGV[0]
10
10
 
11
11
  load_config = -> do
12
12
  if File.exist?(config)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module StatsLite
2
4
  DEFAULT_COMMANDS = {
3
5
  host: {
@@ -14,4 +16,4 @@ module StatsLite
14
16
  CMD
15
17
  }
16
18
  }
17
- end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StatsLite
4
- VERSION = "0.5.4"
4
+ VERSION = "0.6.0"
5
5
  end
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['allowed_push_host'] = "https://rubygems.org"
24
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
25
25
  else
26
- raise 'RubyGems 2.0 or newer is required to protect against ' \
27
- 'public gem pushes.'
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.7.2"
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.5.4
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-10-04 00:00:00.000000000 Z
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.7.2
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.7.2
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