mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 13:26:39 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 65e7745419 | |||
| 490356ee96 | |||
| a6c4600aa5 | |||
| 85ba61b2cc | |||
| 8f6a4a6820 | |||
| 81ee2ec0b6 | |||
| 20280f2c5d | |||
| bf29696c46 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -16,11 +16,11 @@ tmtags
|
|||||||
## PROJECT::GENERAL
|
## PROJECT::GENERAL
|
||||||
coverage
|
coverage
|
||||||
rdoc
|
rdoc
|
||||||
pkg
|
pkg/*
|
||||||
|
*.gem
|
||||||
|
.bundle
|
||||||
|
|
||||||
## PROJECT::SPECIFIC
|
## PROJECT::SPECIFIC
|
||||||
.bundle/*
|
|
||||||
.yardoc/*
|
.yardoc/*
|
||||||
spec/db/*
|
spec/db/*
|
||||||
doc
|
doc/*
|
||||||
redistat.gemspec
|
|
||||||
|
|||||||
9
Gemfile
9
Gemfile
@@ -1,14 +1,9 @@
|
|||||||
source 'http://rubygems.org/'
|
source 'http://rubygems.org/'
|
||||||
|
|
||||||
gem 'activesupport', '>= 2.3.0'
|
# Specify your gem's dependencies in redistat.gemspec
|
||||||
gem 'json', '>= 1.4.6'
|
gemspec
|
||||||
gem 'redis', '>= 2.1.1'
|
|
||||||
gem 'system_timer', '>= 1.0.0'
|
|
||||||
gem 'time_ext', '>= 0.2.6'
|
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'jeweler', '>= 1.5.1'
|
|
||||||
gem 'rspec', '>= 2.1.0'
|
gem 'rspec', '>= 2.1.0'
|
||||||
gem 'yard', '>= 0.6.3'
|
gem 'yard', '>= 0.6.3'
|
||||||
gem 'i18n'
|
|
||||||
end
|
end
|
||||||
24
Gemfile.lock
24
Gemfile.lock
@@ -1,16 +1,20 @@
|
|||||||
|
PATH
|
||||||
|
remote: .
|
||||||
|
specs:
|
||||||
|
redistat (0.0.4)
|
||||||
|
activesupport (>= 2.3.0)
|
||||||
|
json (>= 1.4.6)
|
||||||
|
redis (>= 2.1.1)
|
||||||
|
system_timer (>= 1.0.0)
|
||||||
|
time_ext (>= 0.2.8)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (3.0.3)
|
activesupport (3.0.3)
|
||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
git (1.2.5)
|
|
||||||
i18n (0.4.2)
|
i18n (0.4.2)
|
||||||
jeweler (1.5.1)
|
|
||||||
bundler (~> 1.0.0)
|
|
||||||
git (>= 1.2.5)
|
|
||||||
rake
|
|
||||||
json (1.4.6)
|
json (1.4.6)
|
||||||
rake (0.8.7)
|
|
||||||
redis (2.1.1)
|
redis (2.1.1)
|
||||||
rspec (2.1.0)
|
rspec (2.1.0)
|
||||||
rspec-core (~> 2.1.0)
|
rspec-core (~> 2.1.0)
|
||||||
@@ -21,8 +25,9 @@ GEM
|
|||||||
diff-lcs (~> 1.1.2)
|
diff-lcs (~> 1.1.2)
|
||||||
rspec-mocks (2.1.0)
|
rspec-mocks (2.1.0)
|
||||||
system_timer (1.0)
|
system_timer (1.0)
|
||||||
time_ext (0.2.6)
|
time_ext (0.2.8)
|
||||||
activesupport (>= 2.3.0)
|
activesupport (>= 2.3.0)
|
||||||
|
i18n (>= 0.4.2)
|
||||||
yard (0.6.3)
|
yard (0.6.3)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@@ -30,11 +35,10 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
activesupport (>= 2.3.0)
|
activesupport (>= 2.3.0)
|
||||||
i18n
|
|
||||||
jeweler (>= 1.5.1)
|
|
||||||
json (>= 1.4.6)
|
json (>= 1.4.6)
|
||||||
redis (>= 2.1.1)
|
redis (>= 2.1.1)
|
||||||
|
redistat!
|
||||||
rspec (>= 2.1.0)
|
rspec (>= 2.1.0)
|
||||||
system_timer (>= 1.0.0)
|
system_timer (>= 1.0.0)
|
||||||
time_ext (>= 0.2.6)
|
time_ext (>= 0.2.8)
|
||||||
yard (>= 0.6.3)
|
yard (>= 0.6.3)
|
||||||
|
|||||||
51
Rakefile
51
Rakefile
@@ -1,31 +1,11 @@
|
|||||||
require 'rubygems'
|
require 'bundler'
|
||||||
require 'rake'
|
Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
begin
|
|
||||||
require 'jeweler'
|
|
||||||
Jeweler::Tasks.new do |gem|
|
|
||||||
gem.name = 'redistat'
|
|
||||||
gem.summary = 'A Redis-backed statistics storage and querying library written in Ruby.'
|
|
||||||
gem.description = 'A Redis-backed statistics storage and querying library written in Ruby.'
|
|
||||||
gem.email = 'contact@jimeh.me'
|
|
||||||
gem.homepage = 'http://github.com/jimeh/redistat'
|
|
||||||
gem.authors = ['Jim Myhrberg']
|
|
||||||
gem.add_dependency 'activesupport', '>= 2.3.0'
|
|
||||||
gem.add_dependency 'json', '>= 1.4.6'
|
|
||||||
gem.add_dependency 'redis', '>= 2.1.1'
|
|
||||||
gem.add_dependency 'system_timer', '>= 1.0.0'
|
|
||||||
gem.add_dependency 'time_ext', '>= 0.2.6'
|
|
||||||
gem.add_development_dependency 'jeweler', '>= 1.5.1'
|
|
||||||
gem.add_development_dependency 'rspec', '>= 2.1.0'
|
|
||||||
gem.add_development_dependency 'yard', '>= 0.6.1'
|
|
||||||
end
|
|
||||||
Jeweler::GemcutterTasks.new
|
|
||||||
rescue LoadError
|
|
||||||
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
# Rspec
|
# Rspec
|
||||||
|
#
|
||||||
|
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
RSpec::Core::RakeTask.new(:spec) do |spec|
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
||||||
spec.pattern = 'spec/**/*_spec.rb'
|
spec.pattern = 'spec/**/*_spec.rb'
|
||||||
@@ -36,12 +16,13 @@ RSpec::Core::RakeTask.new(:rcov) do |spec|
|
|||||||
spec.rcov = true
|
spec.rcov = true
|
||||||
end
|
end
|
||||||
|
|
||||||
task :spec => :check_dependencies
|
|
||||||
|
|
||||||
task :default => [:start, :spec, :stop]
|
task :default => [:start, :spec, :stop]
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
# Start/stop Redis test server
|
# Start/stop Redis test server
|
||||||
|
#
|
||||||
|
|
||||||
REDIS_DIR = File.expand_path(File.join("..", "spec"), __FILE__)
|
REDIS_DIR = File.expand_path(File.join("..", "spec"), __FILE__)
|
||||||
REDIS_CNF = File.join(REDIS_DIR, "redis-test.conf")
|
REDIS_CNF = File.join(REDIS_DIR, "redis-test.conf")
|
||||||
REDIS_PID = File.join(REDIS_DIR, "db", "redis.pid")
|
REDIS_PID = File.join(REDIS_DIR, "db", "redis.pid")
|
||||||
@@ -62,7 +43,10 @@ task :stop do
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# YARD Documentation
|
#
|
||||||
|
# Yard
|
||||||
|
#
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'yard'
|
require 'yard'
|
||||||
YARD::Rake::YardocTask.new
|
YARD::Rake::YardocTask.new
|
||||||
@@ -71,3 +55,14 @@ rescue LoadError
|
|||||||
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Misc.
|
||||||
|
#
|
||||||
|
|
||||||
|
desc "Start an irb console with Redistat pre-loaded."
|
||||||
|
task :console do
|
||||||
|
exec "irb -r spec/spec_helper"
|
||||||
|
end
|
||||||
|
task :c => :console
|
||||||
|
|||||||
3
lib/redistat/version.rb
Normal file
3
lib/redistat/version.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module Redistat
|
||||||
|
VERSION = "0.0.4"
|
||||||
|
end
|
||||||
27
redistat.gemspec
Normal file
27
redistat.gemspec
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
$:.push File.expand_path("../lib", __FILE__)
|
||||||
|
require "redistat/version"
|
||||||
|
|
||||||
|
Gem::Specification.new do |s|
|
||||||
|
s.name = "redistat"
|
||||||
|
s.version = Redistat::VERSION
|
||||||
|
s.platform = Gem::Platform::RUBY
|
||||||
|
s.authors = ["Jim Myhrberg"]
|
||||||
|
s.email = ["contact@jimeh.me"]
|
||||||
|
s.homepage = "http://github.com/jimeh/redistat"
|
||||||
|
s.summary = %q{A Redis-backed statistics storage and querying library written in Ruby.}
|
||||||
|
s.description = %q{A Redis-backed statistics storage and querying library written in Ruby.}
|
||||||
|
|
||||||
|
s.rubyforge_project = "redistat"
|
||||||
|
|
||||||
|
s.files = `git ls-files`.split("\n")
|
||||||
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
||||||
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
||||||
|
s.require_paths = ["lib"]
|
||||||
|
|
||||||
|
s.add_runtime_dependency 'activesupport', '>= 2.3.0'
|
||||||
|
s.add_runtime_dependency 'json', '>= 1.4.6'
|
||||||
|
s.add_runtime_dependency 'redis', '>= 2.1.1'
|
||||||
|
s.add_runtime_dependency 'system_timer', '>= 1.0.0'
|
||||||
|
s.add_runtime_dependency 'time_ext', '>= 0.2.8'
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user