redis_status 0.1.0 → 0.1.1
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.
- data/README.rdoc +23 -2
- data/VERSION +1 -1
- data/lib/redis_status.rb +2 -2
- data/redis_status.gemspec +62 -0
- metadata +4 -3
data/README.rdoc
CHANGED
@@ -1,9 +1,30 @@
|
|
1
1
|
= redis_status
|
2
2
|
|
3
|
-
|
3
|
+
== Usage
|
4
|
+
|
5
|
+
require 'redis_status'
|
6
|
+
require 'fileutils'
|
7
|
+
|
8
|
+
if RedisStatus.running?
|
9
|
+
|
10
|
+
puts "Redis Server is running as #{RedisStatus.pid}, with its data consuming #{RedisStatus.cli_info[:used_memory]} bytes"
|
11
|
+
|
12
|
+
RedisStatus.cli_exec :bgsave
|
13
|
+
|
14
|
+
while RedisStatus.cli_info[:bgsave_in_progress] == "1"
|
15
|
+
# wait
|
16
|
+
end
|
17
|
+
|
18
|
+
FileUtils.cp RedisStatus.db_file, "/home/me/redis_backups/dump.rdb.bk"
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
|
4
25
|
|
5
26
|
== Contributing to redis_status
|
6
|
-
|
27
|
+
|
7
28
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
29
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
30
|
* Fork the project
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/redis_status.rb
CHANGED
@@ -42,7 +42,7 @@ class RedisStatus
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.conf
|
45
|
-
parse_settings(`cat #{config_filename
|
45
|
+
parse_settings(`cat #{self.config_filename}`)
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.set_status(*args)
|
@@ -90,7 +90,7 @@ class RedisStatus
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def self.tail
|
93
|
-
`tail -n 50 #{self.conf[:logfile]
|
93
|
+
`tail -n 50 #{self.conf[:logfile]}`.split(/\n|\r/)
|
94
94
|
end
|
95
95
|
|
96
96
|
def self.recent_errors
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{redis_status}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Justin Thibault"]
|
12
|
+
s.date = %q{2011-05-17}
|
13
|
+
s.default_executable = %q{redis-status}
|
14
|
+
s.description = %q{redis-status combines information from redis-cli info, redis.conf, and other sources to give a snapshot of the current state of redis-server}
|
15
|
+
s.email = %q{jvthibault@gmail.com}
|
16
|
+
s.executables = ["redis-status"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/redis-status",
|
30
|
+
"lib/redis_status.rb",
|
31
|
+
"redis_status.gemspec",
|
32
|
+
"test/helper.rb",
|
33
|
+
"test/test_redis_status.rb"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/justinvt/redis_status}
|
36
|
+
s.licenses = ["MIT"]
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = %q{1.6.1}
|
39
|
+
s.summary = %q{Provides information about redis-server}
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
s.specification_version = 3
|
43
|
+
|
44
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
46
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
47
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
|
48
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
51
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
53
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
54
|
+
end
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
57
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
58
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
59
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Thibault
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- VERSION
|
98
98
|
- bin/redis-status
|
99
99
|
- lib/redis_status.rb
|
100
|
+
- redis_status.gemspec
|
100
101
|
- test/helper.rb
|
101
102
|
- test/test_redis_status.rb
|
102
103
|
has_rdoc: true
|