redis-kit 0.0.2
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/.gitignore +2 -0
- data/.travis.yml +17 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +55 -0
- data/Guardfile +6 -0
- data/Makefile +26 -0
- data/README.md +122 -0
- data/Rakefile +10 -0
- data/lib/redis-kit/railtie.rb +16 -0
- data/lib/redis-kit/resque.rb +31 -0
- data/lib/redis-kit/version.rb +3 -0
- data/lib/redis-kit.rb +92 -0
- data/redis-kit.gemspec +28 -0
- data/test/railsapi/.gitignore +15 -0
- data/test/railsapi/Gemfile.rails_3_2 +14 -0
- data/test/railsapi/Gemfile.rails_3_2.lock +139 -0
- data/test/railsapi/Gemfile.rails_head +14 -0
- data/test/railsapi/Gemfile.rails_head.lock +143 -0
- data/test/railsapi/README.rdoc +261 -0
- data/test/railsapi/Rakefile +7 -0
- data/test/railsapi/app/controllers/application_controller.rb +2 -0
- data/test/railsapi/app/controllers/redis_controller.rb +5 -0
- data/test/railsapi/app/mailers/.gitkeep +0 -0
- data/test/railsapi/app/models/.gitkeep +0 -0
- data/test/railsapi/config/application.rb +46 -0
- data/test/railsapi/config/boot.rb +6 -0
- data/test/railsapi/config/environment.rb +5 -0
- data/test/railsapi/config/environments/development.rb +23 -0
- data/test/railsapi/config/environments/production.rb +44 -0
- data/test/railsapi/config/environments/test.rb +29 -0
- data/test/railsapi/config/initializers/wrap_parameters.rb +13 -0
- data/test/railsapi/config/locales/en.yml +5 -0
- data/test/railsapi/config/redis.mock.yml +2 -0
- data/test/railsapi/config/redis.yml +4 -0
- data/test/railsapi/config/redis_bad_syntax.yml +2 -0
- data/test/railsapi/config/routes.rb +60 -0
- data/test/railsapi/config.ru +4 -0
- data/test/railsapi/doc/README_FOR_APP +2 -0
- data/test/railsapi/lib/assets/.gitkeep +0 -0
- data/test/railsapi/lib/tasks/.gitkeep +0 -0
- data/test/railsapi/log/.gitkeep +0 -0
- data/test/railsapi/public/404.html +26 -0
- data/test/railsapi/public/422.html +26 -0
- data/test/railsapi/public/500.html +25 -0
- data/test/railsapi/public/favicon.ico +0 -0
- data/test/railsapi/public/index.html +241 -0
- data/test/railsapi/public/robots.txt +5 -0
- data/test/railsapi/script/rails +6 -0
- data/test/railsapi/test/fixtures/.gitkeep +0 -0
- data/test/railsapi/test/functional/.gitkeep +0 -0
- data/test/railsapi/test/functional/redis_controller_test.rb +9 -0
- data/test/railsapi/test/integration/.gitkeep +0 -0
- data/test/railsapi/test/test_helper.rb +63 -0
- data/test/railsapi/test/unit/.gitkeep +0 -0
- data/test/railsapi/test/unit/redis-kit_test.rb +108 -0
- data/test/redis-kit_test.rb +72 -0
- data/test/support/redis.blank.yml +0 -0
- data/test/support/redis.good.yml +7 -0
- data/test/support/redis.invalid.yml +1 -0
- data/test/test_helper.rb +33 -0
- metadata +266 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
script: make ci
|
|
2
|
+
gemfile:
|
|
3
|
+
- test/railsapi/Gemfile.rails_3_2
|
|
4
|
+
- test/railsapi/Gemfile.rails_head
|
|
5
|
+
branches:
|
|
6
|
+
only:
|
|
7
|
+
- master
|
|
8
|
+
- develop
|
|
9
|
+
rvm:
|
|
10
|
+
- 1.9.3
|
|
11
|
+
- 2.0.0
|
|
12
|
+
- ruby-head
|
|
13
|
+
- jruby-19mode
|
|
14
|
+
- rbx-19mode
|
|
15
|
+
before_install:
|
|
16
|
+
- gem install bundler --version '= 1.3.1'
|
|
17
|
+
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
0.0.2
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
* Add support for Ruby 2.0.0.
|
|
5
|
+
* Drop support for Rails < 3.2 and Ruby < 1.9.3.
|
|
6
|
+
* Fix bug whereby redis-kit would clobber Resque hooks, replacing them with its
|
|
7
|
+
own.
|
|
8
|
+
* Allow MockRedis as a back-end (for tests).
|
|
9
|
+
|
|
10
|
+
0.0.1
|
|
11
|
+
=====
|
|
12
|
+
|
|
13
|
+
* Initial release with support for:
|
|
14
|
+
* Rails 3.0, 3.1, 3.2
|
|
15
|
+
* Ruby 1.9.1, 1.9.2, 1.9.3, 2.0
|
|
16
|
+
* JRuby in 1.9 mode
|
|
17
|
+
* Rubinius in 1.9 mode
|
|
18
|
+
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
redis-kit (0.0.1)
|
|
5
|
+
hiredis (~> 0.4.0)
|
|
6
|
+
mock_redis (~> 0.6.0)
|
|
7
|
+
redis (~> 3.0.0)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
coderay (1.0.9)
|
|
13
|
+
guard (1.6.2)
|
|
14
|
+
listen (>= 0.6.0)
|
|
15
|
+
lumberjack (>= 1.0.2)
|
|
16
|
+
pry (>= 0.9.10)
|
|
17
|
+
terminal-table (>= 1.4.3)
|
|
18
|
+
thor (>= 0.14.6)
|
|
19
|
+
guard-test (0.7.0)
|
|
20
|
+
guard (>= 1.1)
|
|
21
|
+
test-unit (~> 2.2)
|
|
22
|
+
hiredis (0.4.5)
|
|
23
|
+
hiredis (0.4.5-java)
|
|
24
|
+
listen (0.7.3)
|
|
25
|
+
lumberjack (1.0.2)
|
|
26
|
+
method_source (0.8.1)
|
|
27
|
+
mock_redis (0.6.4)
|
|
28
|
+
pry (0.9.12)
|
|
29
|
+
coderay (~> 1.0.5)
|
|
30
|
+
method_source (~> 0.8)
|
|
31
|
+
slop (~> 3.4)
|
|
32
|
+
pry (0.9.12-java)
|
|
33
|
+
coderay (~> 1.0.5)
|
|
34
|
+
method_source (~> 0.8)
|
|
35
|
+
slop (~> 3.4)
|
|
36
|
+
spoon (~> 0.0)
|
|
37
|
+
rake (10.0.3)
|
|
38
|
+
rb-fsevent (0.9.3)
|
|
39
|
+
redis (3.0.3)
|
|
40
|
+
slop (3.4.3)
|
|
41
|
+
spoon (0.0.1)
|
|
42
|
+
terminal-table (1.4.5)
|
|
43
|
+
test-unit (2.5.4)
|
|
44
|
+
thor (0.17.0)
|
|
45
|
+
|
|
46
|
+
PLATFORMS
|
|
47
|
+
java
|
|
48
|
+
ruby
|
|
49
|
+
|
|
50
|
+
DEPENDENCIES
|
|
51
|
+
guard
|
|
52
|
+
guard-test
|
|
53
|
+
rake
|
|
54
|
+
rb-fsevent
|
|
55
|
+
redis-kit!
|
data/Guardfile
ADDED
data/Makefile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
dependencies:
|
|
2
|
+
@bundle install
|
|
3
|
+
@cd test/railsapi/ ; BUNDLE_GEMFILE=Gemfile.rails_3_2 bundle install
|
|
4
|
+
@cd test/railsapi/ ; BUNDLE_GEMFILE=Gemfile.rails_head bundle install
|
|
5
|
+
|
|
6
|
+
ci:
|
|
7
|
+
bundle exec rake
|
|
8
|
+
cd test/railsapi/ ; bundle exec rake
|
|
9
|
+
|
|
10
|
+
test:
|
|
11
|
+
@echo "======================"
|
|
12
|
+
@echo "Running base gem tests"
|
|
13
|
+
@echo "======================"
|
|
14
|
+
@bundle exec rake
|
|
15
|
+
@echo ""
|
|
16
|
+
@echo "=================================="
|
|
17
|
+
@echo "Running tests against Rails 3.2..."
|
|
18
|
+
@echo "=================================="
|
|
19
|
+
@cd test/railsapi/ && BUNDLE_GEMFILE=Gemfile.rails_3_2 bundle exec rake
|
|
20
|
+
@echo ""
|
|
21
|
+
@echo "==================================="
|
|
22
|
+
@echo "Running tests against Edge Rails..."
|
|
23
|
+
@echo "==================================="
|
|
24
|
+
@cd test/railsapi/ && BUNDLE_GEMFILE=Gemfile.rails_head bundle exec rake
|
|
25
|
+
|
|
26
|
+
.PHONY: test ci dependencies
|
data/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
RedisKit
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
[](https://travis-ci.org/stvp/redis-kit) (master)
|
|
5
|
+
|
|
6
|
+
[](https://travis-ci.org/stvp/redis-kit) (develop)
|
|
7
|
+
|
|
8
|
+
[](https://gemnasium.com/stvp/redis-kit)
|
|
9
|
+
|
|
10
|
+
RedisKit is an (in-progress) gem that greatly simplifies the use of Redis in
|
|
11
|
+
Ruby when used with any of the following:
|
|
12
|
+
|
|
13
|
+
* Rails
|
|
14
|
+
* Resque
|
|
15
|
+
* *More soon...*
|
|
16
|
+
|
|
17
|
+
Using RedisKit
|
|
18
|
+
--------------
|
|
19
|
+
|
|
20
|
+
Add the following to your `Gemfile`:
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
gem "redis-kit"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
And run `bundle install`. This will install the RedisKit gem as well as the
|
|
27
|
+
latest stable `redis` and `hiredis` gems.
|
|
28
|
+
|
|
29
|
+
Redis connections created by RedisKit automatically use [Hiredis][hiredis], the
|
|
30
|
+
the [fast][hiredis_bench] and reliable (and official) C client library for
|
|
31
|
+
Redis. In JRuby, however, RedisKit falls back to the pure-Ruby Redis client
|
|
32
|
+
because JRuby doesn't support C extensions like hiredis.
|
|
33
|
+
|
|
34
|
+
[hiredis]: https://github.com/pietern/hiredis-rb
|
|
35
|
+
[hiredis_bench]: https://gist.github.com/894026
|
|
36
|
+
|
|
37
|
+
With Rails
|
|
38
|
+
----------
|
|
39
|
+
|
|
40
|
+
If you're using Rails, RedisKit includes a [Rails initializer][rails_init] that
|
|
41
|
+
sets up a global Redis connection when your app loads. This Redis connection is
|
|
42
|
+
available via `$redis`.
|
|
43
|
+
|
|
44
|
+
[rails_init]: https://github.com/stvp/redis-kit/blob/master/lib/redis-kit/railtie.rb
|
|
45
|
+
|
|
46
|
+
The configuration for Redis can come from one of two places:
|
|
47
|
+
|
|
48
|
+
1. An environment variable like "REDIS_URL". Heroku add-ons like
|
|
49
|
+
[RedisGreen][rg] use environment variables to supply your Redis URL.
|
|
50
|
+
|
|
51
|
+
2. A configuration file (`config/redis.yml`) containing a section for each
|
|
52
|
+
environment with settings that will be passed straight to `Redis.new`:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
development:
|
|
56
|
+
url: <%= ENV['REDIS_URL']%>
|
|
57
|
+
test:
|
|
58
|
+
mock: true
|
|
59
|
+
production:
|
|
60
|
+
host: sprightly-lemur-251.redisgreen.net
|
|
61
|
+
port: 10092
|
|
62
|
+
password: foobarbazbiz
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This file will be passed through ERB, so you can include ERB tags as shown
|
|
66
|
+
above under "development" to evaluate the configuration at runtime.
|
|
67
|
+
|
|
68
|
+
You can also include "mock: true" to use a [MockRedis][mock_redis] object.
|
|
69
|
+
This should only be used in development and test environments.
|
|
70
|
+
|
|
71
|
+
[rg]: http://redisgreen.net
|
|
72
|
+
[mock_redis]: https://github.com/causes/mock_redis
|
|
73
|
+
|
|
74
|
+
If the environment variable doesn't exist, RedisKit will use the settings from
|
|
75
|
+
the config file.
|
|
76
|
+
|
|
77
|
+
With Resque
|
|
78
|
+
-----------
|
|
79
|
+
|
|
80
|
+
If `$redis` is a different Redis connection than `Resque.redis`, RedisKit will
|
|
81
|
+
handle reconnecting the connection after Resque forks. If they're the same
|
|
82
|
+
connection, Resque will handle the connection as usual.
|
|
83
|
+
|
|
84
|
+
Support
|
|
85
|
+
-------
|
|
86
|
+
|
|
87
|
+
RedisKit officially supports the following Rubies:
|
|
88
|
+
|
|
89
|
+
* Ruby >= 1.9.3
|
|
90
|
+
* JRuby >= 1.7.0 (in 1.9 mode)
|
|
91
|
+
* Rubinius >= 1.2.0 (in 1.9 mode)
|
|
92
|
+
|
|
93
|
+
And the following libraries:
|
|
94
|
+
|
|
95
|
+
* Rails 3.2, 4.0
|
|
96
|
+
* Resque >= 1.6
|
|
97
|
+
|
|
98
|
+
Development
|
|
99
|
+
-----------
|
|
100
|
+
|
|
101
|
+
Set up and run tests with:
|
|
102
|
+
|
|
103
|
+
make dependencies
|
|
104
|
+
make test
|
|
105
|
+
|
|
106
|
+
TODO
|
|
107
|
+
----
|
|
108
|
+
|
|
109
|
+
* Add generators for common files
|
|
110
|
+
* Resque initializer
|
|
111
|
+
* Unicorn config (after fork hook)
|
|
112
|
+
* Under forking servers (Unicorn, Rainbows, Passenger), automatically
|
|
113
|
+
re-establish the connection after forking.
|
|
114
|
+
* Under threaded servers, provide a connection pool of Redis connections.
|
|
115
|
+
* Under Sidekiq, provide a pool of Redis connections for your workers to use
|
|
116
|
+
based on your Sidekiq settings (when Sidekiq's redis connection != your main
|
|
117
|
+
connection)
|
|
118
|
+
* Ensure support for all servers:
|
|
119
|
+
* Multi-Process, preforking: Unicorn, Rainbows, Passenger
|
|
120
|
+
* Evented (suited for sinatra-synchrony): Thin, Rainbows, Zbatery
|
|
121
|
+
* Threaded: Net::HTTP::Server, Threaded Mongrel, Puma, Rainbows, Zbatery, Thin[1]
|
|
122
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module RedisKit
|
|
2
|
+
class Railtie < Rails::Railtie
|
|
3
|
+
initializer "redis-kit.setup_redis" do |app|
|
|
4
|
+
# Register the path with Rails so that users can change it, if they want.
|
|
5
|
+
unless app.paths["config/redis"]
|
|
6
|
+
app.paths.add "config/redis", with: "config/redis.yml"
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
# Set up a new global Redis connection.
|
|
10
|
+
path = app.paths["config/redis"].first
|
|
11
|
+
env = Rails.env
|
|
12
|
+
$redis = RedisKit.new_redis( path, env )
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Resque handles its own Redis connection, reconnecting after forks. If $redis
|
|
2
|
+
# is a separate connection, however, we'll disconnect it automatically after a
|
|
3
|
+
# fork so that the job can use the connection if it wants. If Resque is using
|
|
4
|
+
# the $redis connection, we let Resque handle it.
|
|
5
|
+
|
|
6
|
+
module RedisKit
|
|
7
|
+
module Resque
|
|
8
|
+
def self.setup
|
|
9
|
+
# Don't clobber any existing hooks.
|
|
10
|
+
if existing_hook = ::Resque.after_fork
|
|
11
|
+
::Resque.after_fork do |job|
|
|
12
|
+
existing_hook.call( job )
|
|
13
|
+
check_redis
|
|
14
|
+
end
|
|
15
|
+
else
|
|
16
|
+
::Resque.after_fork do |job|
|
|
17
|
+
check_redis
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.check_redis
|
|
23
|
+
if $redis != ::Resque.redis.redis
|
|
24
|
+
$redis.client.disconnect
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
RedisKit::Resque.setup
|
|
31
|
+
|
data/lib/redis-kit.rb
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
require "rubygems"
|
|
2
|
+
require "bundler/setup"
|
|
3
|
+
require "yaml"
|
|
4
|
+
require "redis"
|
|
5
|
+
require "hiredis" if RUBY_ENGINE != "jruby"
|
|
6
|
+
|
|
7
|
+
module RedisKit
|
|
8
|
+
class MissingConfigError < StandardError ; end
|
|
9
|
+
class InvalidConfigSyntaxError < StandardError ; end
|
|
10
|
+
|
|
11
|
+
CUSTOM_CONFIG_KEYS = [:mock]
|
|
12
|
+
|
|
13
|
+
def self.new_redis( path, env )
|
|
14
|
+
config = load_config( path, env )
|
|
15
|
+
if config[:mock]
|
|
16
|
+
require 'mock_redis'
|
|
17
|
+
MockRedis.new
|
|
18
|
+
else
|
|
19
|
+
Redis.new( config.reject{ |k, v| CUSTOM_CONFIG_KEYS.include?( k ) } )
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Try loading the Redis config from an environment variable or, if there isn't
|
|
24
|
+
# one, a YAML config file.
|
|
25
|
+
def self.load_config( path, env )
|
|
26
|
+
opts = {}
|
|
27
|
+
opts[:driver] = :hiredis if use_hiredis?
|
|
28
|
+
|
|
29
|
+
if url = url_from_env
|
|
30
|
+
opts.merge( url: url )
|
|
31
|
+
else
|
|
32
|
+
config = config_from_yml( path, env )
|
|
33
|
+
opts.merge( config )
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Try to find a Redis URL in one of the usual ENV variables.
|
|
38
|
+
def self.url_from_env
|
|
39
|
+
%w{ REDIS_URL REDISGREEN_URL OPENREDIS_URL REDISTOGO_URL }.map do |var|
|
|
40
|
+
ENV[var]
|
|
41
|
+
end.find do |url|
|
|
42
|
+
url
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Load the Redis configuration for the given environment. The YAML file will
|
|
47
|
+
# be passed through ERB before being parsed.
|
|
48
|
+
def self.config_from_yml( path, env )
|
|
49
|
+
require 'erb'
|
|
50
|
+
config = YAML.load ERB.new( IO.read( path ) ).result
|
|
51
|
+
|
|
52
|
+
if config == false
|
|
53
|
+
raise MissingConfigError.new "The Redis configuration file at " \
|
|
54
|
+
"#{path} is empty. See the RedisKit README for information about how " \
|
|
55
|
+
"to format this file: https://github.com/stvp/redis-kit"
|
|
56
|
+
elsif config.key?( env )
|
|
57
|
+
symbolize_keys( config[env] )
|
|
58
|
+
else
|
|
59
|
+
raise MissingConfigError.new "There is no Redis config for the " \
|
|
60
|
+
"#{env.inspect} environment in #{path}. Either add one or set your "\
|
|
61
|
+
"Redis URL with an ENV variable like \"REDIS_URL\"."
|
|
62
|
+
end
|
|
63
|
+
rescue Errno::ENOENT
|
|
64
|
+
raise MissingConfigError.new "#{path} doesn't exist. Please add a Redis " \
|
|
65
|
+
"config YAML file or supply an ENV variable like \"REDIS_URL\"."
|
|
66
|
+
rescue Exception => e
|
|
67
|
+
if Object.const_defined?('Psych') && e.class == Psych::SyntaxError
|
|
68
|
+
raise InvalidConfigSyntaxError.new "A YAML syntax error occurred while " \
|
|
69
|
+
"parsing #{path}. Please note that YAML must be consistently indented " \
|
|
70
|
+
"using spaces. Tabs are not allowed.\nError: #{e.message}"
|
|
71
|
+
else
|
|
72
|
+
raise
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
private
|
|
77
|
+
|
|
78
|
+
def self.use_hiredis?
|
|
79
|
+
RUBY_ENGINE != "jruby"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def self.symbolize_keys( hash )
|
|
83
|
+
hash.each_with_object({}) do |(k,v), h|
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
require "redis-kit/version"
|
|
90
|
+
require "redis-kit/railtie" if defined?( Rails )
|
|
91
|
+
require "redis-kit/resque" if defined?( Resque )
|
|
92
|
+
|
data/redis-kit.gemspec
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "redis-kit/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "redis-kit"
|
|
7
|
+
s.version = RedisKit::VERSION
|
|
8
|
+
s.authors = ["Tyson Tate"]
|
|
9
|
+
s.email = ["tyson@stovepipestudios.com"]
|
|
10
|
+
s.homepage = "http://github.com/stvp/redis-kit-rb"
|
|
11
|
+
s.summary = "simple redis init"
|
|
12
|
+
s.description = "simple redis init for rails projects"
|
|
13
|
+
|
|
14
|
+
s.rubyforge_project = "redis-kit"
|
|
15
|
+
|
|
16
|
+
s.files = `git ls-files`.split("\n")
|
|
17
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
19
|
+
s.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
s.add_dependency "redis", "~> 3.0.0"
|
|
22
|
+
s.add_dependency "hiredis", "~> 0.4.0" if RUBY_ENGINE != "jruby"
|
|
23
|
+
s.add_dependency "mock_redis", "~> 0.6.0"
|
|
24
|
+
s.add_development_dependency "rake"
|
|
25
|
+
s.add_development_dependency "rb-fsevent"
|
|
26
|
+
s.add_development_dependency "guard"
|
|
27
|
+
s.add_development_dependency "guard-test"
|
|
28
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
#
|
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
|
6
|
+
|
|
7
|
+
# Ignore bundler config
|
|
8
|
+
/.bundle
|
|
9
|
+
|
|
10
|
+
# Ignore the default SQLite database.
|
|
11
|
+
/db/*.sqlite3
|
|
12
|
+
|
|
13
|
+
# Ignore all logfiles and tempfiles.
|
|
14
|
+
/log/*.log
|
|
15
|
+
/tmp
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ../../
|
|
3
|
+
specs:
|
|
4
|
+
redis-kit (0.0.1)
|
|
5
|
+
hiredis (~> 0.4.0)
|
|
6
|
+
mock_redis (~> 0.6.0)
|
|
7
|
+
redis (~> 3.0.0)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
actionmailer (3.2.12)
|
|
13
|
+
actionpack (= 3.2.12)
|
|
14
|
+
mail (~> 2.4.4)
|
|
15
|
+
actionpack (3.2.12)
|
|
16
|
+
activemodel (= 3.2.12)
|
|
17
|
+
activesupport (= 3.2.12)
|
|
18
|
+
builder (~> 3.0.0)
|
|
19
|
+
erubis (~> 2.7.0)
|
|
20
|
+
journey (~> 1.0.4)
|
|
21
|
+
rack (~> 1.4.5)
|
|
22
|
+
rack-cache (~> 1.2)
|
|
23
|
+
rack-test (~> 0.6.1)
|
|
24
|
+
sprockets (~> 2.2.1)
|
|
25
|
+
activemodel (3.2.12)
|
|
26
|
+
activesupport (= 3.2.12)
|
|
27
|
+
builder (~> 3.0.0)
|
|
28
|
+
activerecord (3.2.12)
|
|
29
|
+
activemodel (= 3.2.12)
|
|
30
|
+
activesupport (= 3.2.12)
|
|
31
|
+
arel (~> 3.0.2)
|
|
32
|
+
tzinfo (~> 0.3.29)
|
|
33
|
+
activeresource (3.2.12)
|
|
34
|
+
activemodel (= 3.2.12)
|
|
35
|
+
activesupport (= 3.2.12)
|
|
36
|
+
activesupport (3.2.12)
|
|
37
|
+
i18n (~> 0.6)
|
|
38
|
+
multi_json (~> 1.0)
|
|
39
|
+
arel (3.0.2)
|
|
40
|
+
builder (3.0.4)
|
|
41
|
+
coderay (1.0.9)
|
|
42
|
+
erubis (2.7.0)
|
|
43
|
+
hike (1.2.1)
|
|
44
|
+
hiredis (0.4.5)
|
|
45
|
+
hiredis (0.4.5-java)
|
|
46
|
+
i18n (0.6.4)
|
|
47
|
+
journey (1.0.4)
|
|
48
|
+
json (1.7.7)
|
|
49
|
+
json (1.7.7-java)
|
|
50
|
+
mail (2.4.4)
|
|
51
|
+
i18n (>= 0.4.0)
|
|
52
|
+
mime-types (~> 1.16)
|
|
53
|
+
treetop (~> 1.4.8)
|
|
54
|
+
method_source (0.8.1)
|
|
55
|
+
mime-types (1.21)
|
|
56
|
+
minitest (4.6.2)
|
|
57
|
+
mock_redis (0.6.4)
|
|
58
|
+
multi_json (1.6.1)
|
|
59
|
+
polyglot (0.3.3)
|
|
60
|
+
pry (0.9.12)
|
|
61
|
+
coderay (~> 1.0.5)
|
|
62
|
+
method_source (~> 0.8)
|
|
63
|
+
slop (~> 3.4)
|
|
64
|
+
pry (0.9.12-java)
|
|
65
|
+
coderay (~> 1.0.5)
|
|
66
|
+
method_source (~> 0.8)
|
|
67
|
+
slop (~> 3.4)
|
|
68
|
+
spoon (~> 0.0)
|
|
69
|
+
rack (1.4.5)
|
|
70
|
+
rack-cache (1.2)
|
|
71
|
+
rack (>= 0.4)
|
|
72
|
+
rack-protection (1.4.0)
|
|
73
|
+
rack
|
|
74
|
+
rack-ssl (1.3.3)
|
|
75
|
+
rack
|
|
76
|
+
rack-test (0.6.2)
|
|
77
|
+
rack (>= 1.0)
|
|
78
|
+
rails (3.2.12)
|
|
79
|
+
actionmailer (= 3.2.12)
|
|
80
|
+
actionpack (= 3.2.12)
|
|
81
|
+
activerecord (= 3.2.12)
|
|
82
|
+
activeresource (= 3.2.12)
|
|
83
|
+
activesupport (= 3.2.12)
|
|
84
|
+
bundler (~> 1.0)
|
|
85
|
+
railties (= 3.2.12)
|
|
86
|
+
rails-api (0.0.3)
|
|
87
|
+
actionpack (>= 3.2.6)
|
|
88
|
+
railties (>= 3.2.6)
|
|
89
|
+
tzinfo (~> 0.3.31)
|
|
90
|
+
railties (3.2.12)
|
|
91
|
+
actionpack (= 3.2.12)
|
|
92
|
+
activesupport (= 3.2.12)
|
|
93
|
+
rack-ssl (~> 1.3.2)
|
|
94
|
+
rake (>= 0.8.7)
|
|
95
|
+
rdoc (~> 3.4)
|
|
96
|
+
thor (>= 0.14.6, < 2.0)
|
|
97
|
+
rake (0.9.6)
|
|
98
|
+
rdoc (3.12.2)
|
|
99
|
+
json (~> 1.4)
|
|
100
|
+
redis (3.0.3)
|
|
101
|
+
redis-namespace (1.2.1)
|
|
102
|
+
redis (~> 3.0.0)
|
|
103
|
+
resque (1.23.0)
|
|
104
|
+
multi_json (~> 1.0)
|
|
105
|
+
redis-namespace (~> 1.0)
|
|
106
|
+
sinatra (>= 0.9.2)
|
|
107
|
+
vegas (~> 0.1.2)
|
|
108
|
+
sinatra (1.3.5)
|
|
109
|
+
rack (~> 1.4)
|
|
110
|
+
rack-protection (~> 1.3)
|
|
111
|
+
tilt (~> 1.3, >= 1.3.3)
|
|
112
|
+
slop (3.4.3)
|
|
113
|
+
spoon (0.0.1)
|
|
114
|
+
sprockets (2.2.2)
|
|
115
|
+
hike (~> 1.2)
|
|
116
|
+
multi_json (~> 1.0)
|
|
117
|
+
rack (~> 1.0)
|
|
118
|
+
tilt (~> 1.1, != 1.3.0)
|
|
119
|
+
thor (0.17.0)
|
|
120
|
+
tilt (1.3.4)
|
|
121
|
+
treetop (1.4.12)
|
|
122
|
+
polyglot
|
|
123
|
+
polyglot (>= 0.3.1)
|
|
124
|
+
tzinfo (0.3.36)
|
|
125
|
+
vegas (0.1.11)
|
|
126
|
+
rack (>= 1.0.0)
|
|
127
|
+
|
|
128
|
+
PLATFORMS
|
|
129
|
+
java
|
|
130
|
+
ruby
|
|
131
|
+
|
|
132
|
+
DEPENDENCIES
|
|
133
|
+
minitest
|
|
134
|
+
pry
|
|
135
|
+
rails (~> 3.2.0)
|
|
136
|
+
rails-api (~> 0.0.3)
|
|
137
|
+
rake (~> 0.9.0)
|
|
138
|
+
redis-kit!
|
|
139
|
+
resque (~> 1.23.0)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
gem "rails", git: "git://github.com/rails/rails.git"
|
|
4
|
+
gem "rails-api", "~> 0.0.3"
|
|
5
|
+
gem "rake", "~> 0.9.0"
|
|
6
|
+
gem "resque", "~> 1.23.0"
|
|
7
|
+
|
|
8
|
+
gem "redis-kit", path: "../../"
|
|
9
|
+
|
|
10
|
+
group :test do
|
|
11
|
+
gem "pry"
|
|
12
|
+
gem "minitest"
|
|
13
|
+
end
|
|
14
|
+
|