lemondrop 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +6 -0
- data/README.md +10 -0
- data/lib/lemondrop.rb +1 -0
- data/lib/lemondrop/plugin.rb +0 -1
- data/lib/lemondrop/plugin/service.rb +5 -5
- data/lib/lemondrop/send_connection.rb +11 -0
- data/lib/lemondrop/version.rb +1 -1
- data/spec/lemondrop/send_connection_spec.rb +16 -0
- metadata +111 -113
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc2a5a5b680253c65240e9deb0d9ecb4b240cbed
|
4
|
+
data.tar.gz: f4a1ef007651c229d397692e029efcd92bdf4e4a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 71b17c7dcf92741b4726e0dfb7b6bbd6ff5c637649b9f7bca330a14b1eda3d29768a69044a1f5c4e00ca43a5047e2f62ae02d7fbf8a762e2113d28735aec7026
|
7
|
+
data.tar.gz: 7bfe5270a03a107d9889896369c7ec089420fd0442abaa803e064e87b3d564562c7440a15745ddb962309df42e0bb8d252d696302bc5c2c430960191b7b1c15f
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
# [0.1.0](https://github.com/bklang/lemondrop/compare/v0.0.1...v0.1.0) - [2013-11-30](https://rubygems.org/gems/lemondrop/versions/0.1.0)
|
2
|
+
* Allow accessing Redis keys on the Lemondrop constant directly
|
3
|
+
* Logging & comment tweaks by Justin Aiken
|
4
|
+
|
5
|
+
# [0.0.1](https://github.com/bklang/lemondrop/tree/v0.0.1)
|
6
|
+
* Initial plugin for connection Adhearsion to Redis
|
data/README.md
CHANGED
data/lib/lemondrop.rb
CHANGED
data/lib/lemondrop/plugin.rb
CHANGED
@@ -6,7 +6,7 @@ class Lemondrop::Plugin::Service
|
|
6
6
|
class << self
|
7
7
|
|
8
8
|
##
|
9
|
-
# Start the
|
9
|
+
# Start the Redis connection with the configured database
|
10
10
|
def start(config)
|
11
11
|
params = config.to_hash.select { |k,v| !v.nil? }
|
12
12
|
unless params[:uri].nil? || params[:uri].empty?
|
@@ -22,19 +22,19 @@ class Lemondrop::Plugin::Service
|
|
22
22
|
end
|
23
23
|
|
24
24
|
##
|
25
|
-
# Stop the
|
25
|
+
# Stop the redis connection
|
26
26
|
def stop
|
27
27
|
logger.warn "Todo: Close down Redis connections"
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
31
|
-
# Start the
|
31
|
+
# Start the connection to the configured Redis server
|
32
32
|
#
|
33
|
-
# @param params [Hash] Options to establish the
|
33
|
+
# @param params [Hash] Options to establish the Redis connection
|
34
34
|
def establish_connection(params)
|
35
35
|
::Redis.new params
|
36
|
+
logger.info "Lemondrop connected to Redis at #{params[:host]}:#{params[:port]}"
|
36
37
|
end
|
37
|
-
|
38
38
|
end # class << self
|
39
39
|
end # Service
|
40
40
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Lemondrop
|
2
|
+
class << self
|
3
|
+
def method_missing(meth, *args, &blk)
|
4
|
+
if Lemondrop::Plugin::Service.connection && Lemondrop::Plugin::Service.connection.respond_to?(meth)
|
5
|
+
Lemondrop::Plugin::Service.connection.send meth, *args, &blk
|
6
|
+
else
|
7
|
+
super
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/lib/lemondrop/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Lemondrop do
|
4
|
+
subject { Lemondrop::Plugin::Service }
|
5
|
+
|
6
|
+
describe 'Lemondrop.do_something' do
|
7
|
+
let(:connection) { double 'Lemondrop::Plugin::Service.connection' }
|
8
|
+
|
9
|
+
it 'gets sent to Redis' do
|
10
|
+
Lemondrop::Plugin::Service.stub(:connection).and_return connection
|
11
|
+
connection.should_receive(:set).with "foo", "bar"
|
12
|
+
|
13
|
+
Lemondrop.set "foo", "bar"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,122 +1,123 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: lemondrop
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Ben Klang
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-11-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: adhearsion
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
25
17
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 2
|
29
|
-
- 1
|
30
|
-
version: "2.1"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.1'
|
31
20
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: redis
|
35
21
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
38
|
-
- -
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: redis
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
44
33
|
version: 3.0.0
|
45
34
|
type: :runtime
|
46
|
-
version_requirements: *id002
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler
|
49
35
|
prerelease: false
|
50
|
-
|
51
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
52
45
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
- 1
|
56
|
-
- 0
|
57
|
-
version: "1.0"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
58
48
|
type: :development
|
59
|
-
version_requirements: *id003
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: rspec
|
62
49
|
prerelease: false
|
63
|
-
|
64
|
-
requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
65
52
|
- - ~>
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.5'
|
71
62
|
type: :development
|
72
|
-
version_requirements: *id004
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: rake
|
75
63
|
prerelease: false
|
76
|
-
|
77
|
-
requirements:
|
78
|
-
- -
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
|
82
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.5'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
83
76
|
type: :development
|
84
|
-
version_requirements: *id005
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: mocha
|
87
77
|
prerelease: false
|
88
|
-
|
89
|
-
requirements:
|
90
|
-
- -
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
|
93
|
-
|
94
|
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mocha
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
95
90
|
type: :development
|
96
|
-
version_requirements: *id006
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: guard-rspec
|
99
91
|
prerelease: false
|
100
|
-
|
101
|
-
requirements:
|
102
|
-
- -
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
|
105
|
-
|
106
|
-
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
107
104
|
type: :development
|
108
|
-
|
109
|
-
|
110
|
-
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: This gem provides a plugin for Adhearsion, allowing you to create and
|
112
|
+
use Redis as a queue or data source in your Adhearsion application.
|
113
|
+
email:
|
111
114
|
- bklang@mojolingo.com
|
112
115
|
executables: []
|
113
|
-
|
114
116
|
extensions: []
|
115
|
-
|
116
117
|
extra_rdoc_files: []
|
117
|
-
|
118
|
-
files:
|
118
|
+
files:
|
119
119
|
- .gitignore
|
120
|
+
- CHANGELOG.md
|
120
121
|
- Gemfile
|
121
122
|
- README.md
|
122
123
|
- Rakefile
|
@@ -124,39 +125,36 @@ files:
|
|
124
125
|
- lib/lemondrop.rb
|
125
126
|
- lib/lemondrop/plugin.rb
|
126
127
|
- lib/lemondrop/plugin/service.rb
|
128
|
+
- lib/lemondrop/send_connection.rb
|
127
129
|
- lib/lemondrop/version.rb
|
128
130
|
- spec/lemondrop/plugin/service_spec.rb
|
131
|
+
- spec/lemondrop/send_connection_spec.rb
|
129
132
|
- spec/spec_helper.rb
|
130
|
-
|
131
|
-
homepage: ""
|
133
|
+
homepage: ''
|
132
134
|
licenses: []
|
133
|
-
|
135
|
+
metadata: {}
|
134
136
|
post_install_message:
|
135
137
|
rdoc_options: []
|
136
|
-
|
137
|
-
require_paths:
|
138
|
+
require_paths:
|
138
139
|
- lib
|
139
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
segments:
|
151
|
-
- 0
|
152
|
-
version: "0"
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
153
150
|
requirements: []
|
154
|
-
|
155
151
|
rubyforge_project: lemondrop
|
156
|
-
rubygems_version:
|
152
|
+
rubygems_version: 2.0.6
|
157
153
|
signing_key:
|
158
|
-
specification_version:
|
154
|
+
specification_version: 4
|
159
155
|
summary: Redis plugin for Adhearsion
|
160
|
-
test_files:
|
156
|
+
test_files:
|
161
157
|
- spec/lemondrop/plugin/service_spec.rb
|
158
|
+
- spec/lemondrop/send_connection_spec.rb
|
162
159
|
- spec/spec_helper.rb
|
160
|
+
has_rdoc:
|