em-langrove 0.0.4.5 → 0.0.4.6
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/.rvmrc +28 -38
- data/functional/lib/client/socket_to_file.rb +1 -1
- data/functional/lib/protocol/socket_to_file.rb +1 -1
- data/functional/libexec/daemon.rb +1 -1
- data/lib/{langrove/_base.rb → em-langrove.rb} +0 -0
- data/lib/langrove/adaptor_base.rb +3 -1
- data/lib/langrove/client_base.rb +8 -1
- data/lib/langrove/daemon_base.rb +1 -1
- data/lib/langrove/handler_base.rb +1 -1
- data/lib/langrove/protocol/syslog.rb +1 -1
- data/lib/langrove/protocol_base.rb +1 -1
- data/lib/langrove/version.rb +1 -1
- data/spec/functional/daemon/datagram_spec.rb +1 -1
- data/spec/langrove/adaptor_base_spec.rb +1 -1
- data/spec/langrove/client_base_spec.rb +1 -1
- data/spec/langrove/daemon_base_spec.rb +1 -1
- data/spec/langrove/handler_base_spec.rb +1 -1
- data/spec/langrove/job_base_spec.rb +1 -1
- data/spec/langrove/protocol_base_spec.rb +1 -1
- metadata +68 -21
- data/lib/langrove.rb +0 -1
data/.rvmrc
CHANGED
@@ -3,60 +3,50 @@
|
|
3
3
|
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
4
|
# development environment upon cd'ing into the directory
|
5
5
|
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional
|
7
|
-
|
6
|
+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
+
# Only full ruby name is supported here, for short names use:
|
8
|
+
# echo "rvm use 1.9.2" > .rvmrc
|
9
|
+
environment_id="ruby-1.9.2-p318@em-langrove"
|
10
|
+
|
11
|
+
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
+
# rvmrc_rvm_version="1.12.3 (master)" # 1.10.1 seams as a safe start
|
13
|
+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
+
# return 1
|
16
|
+
# }
|
8
17
|
|
9
|
-
#
|
10
|
-
# Uncomment following line if you want options to be set only for given project.
|
11
|
-
#
|
12
|
-
# PROJECT_JRUBY_OPTS=( --1.9 )
|
13
|
-
|
14
|
-
#
|
15
18
|
# First we attempt to load the desired environment directly from the environment
|
16
19
|
# file. This is very fast and efficient compared to running through the entire
|
17
20
|
# CLI and selector. If you want feedback on which environment was used then
|
18
21
|
# insert the word 'use' after --create as this triggers verbose mode.
|
19
|
-
|
20
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
22
|
+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
21
23
|
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
22
24
|
then
|
23
25
|
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
27
|
+
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
28
|
+
if [[ $- == *i* ]] # check for interactive shells
|
29
|
+
then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
|
30
|
+
else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
|
28
31
|
fi
|
29
32
|
else
|
30
33
|
# If the environment file has not yet been created, use the RVM CLI to select.
|
31
|
-
|
32
|
-
then
|
34
|
+
rvm --create use "$environment_id" || {
|
33
35
|
echo "Failed to create RVM environment '${environment_id}'."
|
34
36
|
return 1
|
35
|
-
|
37
|
+
}
|
36
38
|
fi
|
37
39
|
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
# filename=".gems"
|
44
|
-
# if [[ -s "$filename" ]]
|
40
|
+
# If you use bundler, this might be useful to you:
|
41
|
+
# if [[ -s Gemfile ]] && {
|
42
|
+
# ! builtin command -v bundle >/dev/null ||
|
43
|
+
# builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
|
44
|
+
# }
|
45
45
|
# then
|
46
|
-
#
|
46
|
+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
47
|
+
# gem install bundler
|
47
48
|
# fi
|
48
|
-
|
49
|
-
# If you use bundler, this might be useful to you:
|
50
|
-
# if command -v bundle && [[ -s Gemfile ]]
|
49
|
+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
51
50
|
# then
|
52
|
-
# bundle install
|
51
|
+
# bundle install | grep -vE '^Using|Your bundle is complete'
|
53
52
|
# fi
|
54
|
-
|
55
|
-
if [[ $- == *i* ]] # check for interactive shells
|
56
|
-
then
|
57
|
-
echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
|
58
|
-
else
|
59
|
-
echo "Using: $GEM_HOME" # don't use colors in interactive shells
|
60
|
-
fi
|
61
|
-
|
62
|
-
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'eventmachine'
|
2
2
|
|
3
|
-
require 'langrove'
|
3
|
+
require 'em-langrove'
|
4
4
|
|
5
5
|
module LanGrove::Adaptor
|
6
6
|
|
@@ -101,6 +101,8 @@ module LanGrove::Adaptor
|
|
101
101
|
handler.connect( client_connected )
|
102
102
|
client_connected.handler = handler
|
103
103
|
|
104
|
+
client_connected.start_client
|
105
|
+
|
104
106
|
#
|
105
107
|
# Client is ready and running inside the reactor
|
106
108
|
#
|
data/lib/langrove/client_base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'eventmachine'
|
2
|
-
require 'langrove'
|
2
|
+
require 'em-langrove'
|
3
3
|
|
4
4
|
module LanGrove
|
5
5
|
|
@@ -31,6 +31,13 @@ module LanGrove
|
|
31
31
|
attr_accessor :config
|
32
32
|
attr_accessor :logger
|
33
33
|
|
34
|
+
def start_client
|
35
|
+
@logger.debug 'start_client called'
|
36
|
+
end
|
37
|
+
|
38
|
+
def stop_client
|
39
|
+
@logger.debug 'stop_client called'
|
40
|
+
end
|
34
41
|
|
35
42
|
#
|
36
43
|
# Data arriving through the Adaptor is passed
|
data/lib/langrove/daemon_base.rb
CHANGED
data/lib/langrove/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-langrove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4.
|
4
|
+
version: 0.0.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,12 +12,11 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-04-24 00:00:00.000000000
|
16
|
-
default_executable:
|
15
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
17
16
|
dependencies:
|
18
17
|
- !ruby/object:Gem::Dependency
|
19
18
|
name: watchr
|
20
|
-
requirement:
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
21
20
|
none: false
|
22
21
|
requirements:
|
23
22
|
- - ! '>='
|
@@ -25,10 +24,15 @@ dependencies:
|
|
25
24
|
version: '0'
|
26
25
|
type: :development
|
27
26
|
prerelease: false
|
28
|
-
version_requirements:
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
29
33
|
- !ruby/object:Gem::Dependency
|
30
34
|
name: rspec
|
31
|
-
requirement:
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
32
36
|
none: false
|
33
37
|
requirements:
|
34
38
|
- - ~>
|
@@ -36,10 +40,15 @@ dependencies:
|
|
36
40
|
version: '2.9'
|
37
41
|
type: :development
|
38
42
|
prerelease: false
|
39
|
-
version_requirements:
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.9'
|
40
49
|
- !ruby/object:Gem::Dependency
|
41
50
|
name: rake
|
42
|
-
requirement:
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
43
52
|
none: false
|
44
53
|
requirements:
|
45
54
|
- - ~>
|
@@ -50,10 +59,18 @@ dependencies:
|
|
50
59
|
version: 0.8.7
|
51
60
|
type: :development
|
52
61
|
prerelease: false
|
53
|
-
version_requirements:
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.8'
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 0.8.7
|
54
71
|
- !ruby/object:Gem::Dependency
|
55
72
|
name: eventmachine
|
56
|
-
requirement:
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
57
74
|
none: false
|
58
75
|
requirements:
|
59
76
|
- - ~>
|
@@ -64,10 +81,18 @@ dependencies:
|
|
64
81
|
version: 0.12.10
|
65
82
|
type: :runtime
|
66
83
|
prerelease: false
|
67
|
-
version_requirements:
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.12'
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.12.10
|
68
93
|
- !ruby/object:Gem::Dependency
|
69
94
|
name: em-http-request
|
70
|
-
requirement:
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
71
96
|
none: false
|
72
97
|
requirements:
|
73
98
|
- - ~>
|
@@ -78,10 +103,18 @@ dependencies:
|
|
78
103
|
version: 0.3.0
|
79
104
|
type: :runtime
|
80
105
|
prerelease: false
|
81
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0.3'
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 0.3.0
|
82
115
|
- !ruby/object:Gem::Dependency
|
83
116
|
name: daemon-kit
|
84
|
-
requirement:
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
85
118
|
none: false
|
86
119
|
requirements:
|
87
120
|
- - ~>
|
@@ -92,10 +125,18 @@ dependencies:
|
|
92
125
|
version: 0.1.8.2
|
93
126
|
type: :runtime
|
94
127
|
prerelease: false
|
95
|
-
version_requirements:
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0.1'
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 0.1.8.2
|
96
137
|
- !ruby/object:Gem::Dependency
|
97
138
|
name: resque
|
98
|
-
requirement:
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
99
140
|
none: false
|
100
141
|
requirements:
|
101
142
|
- - ~>
|
@@ -106,7 +147,15 @@ dependencies:
|
|
106
147
|
version: 1.20.0
|
107
148
|
type: :runtime
|
108
149
|
prerelease: false
|
109
|
-
version_requirements:
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ~>
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '1.20'
|
156
|
+
- - ! '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 1.20.0
|
110
159
|
description: ''
|
111
160
|
email: ops@clue.co.za
|
112
161
|
executables:
|
@@ -133,7 +182,6 @@ files:
|
|
133
182
|
- functional/lib/protocol/socket_to_file.rb
|
134
183
|
- functional/libexec/daemon.rb
|
135
184
|
- functional/tmp/README
|
136
|
-
- lib/langrove/_base.rb
|
137
185
|
- lib/langrove/adaptor/base.rb
|
138
186
|
- lib/langrove/adaptor_base.rb
|
139
187
|
- lib/langrove/client/base.rb
|
@@ -157,7 +205,7 @@ files:
|
|
157
205
|
- lib/langrove/protocol/syslog.rb
|
158
206
|
- lib/langrove/protocol_base.rb
|
159
207
|
- lib/langrove/version.rb
|
160
|
-
- lib/langrove.rb
|
208
|
+
- lib/em-langrove.rb
|
161
209
|
- spec/functional/daemon/datagram_spec.rb
|
162
210
|
- spec/langrove/adaptor_base_spec.rb
|
163
211
|
- spec/langrove/client/datagram_spec.rb
|
@@ -175,7 +223,6 @@ files:
|
|
175
223
|
- spec/langrove/protocol/syslog_spec.rb
|
176
224
|
- spec/langrove/protocol_base_spec.rb
|
177
225
|
- spec/todo_spec.rb
|
178
|
-
has_rdoc: true
|
179
226
|
homepage: ''
|
180
227
|
licenses: []
|
181
228
|
post_install_message:
|
@@ -196,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
243
|
version: '0'
|
197
244
|
requirements: []
|
198
245
|
rubyforge_project:
|
199
|
-
rubygems_version: 1.
|
246
|
+
rubygems_version: 1.8.21
|
200
247
|
signing_key:
|
201
248
|
specification_version: 3
|
202
249
|
summary: eventmachine based networked daemon framework
|
data/lib/langrove.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'langrove/_base'
|