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 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
- environment_id="ruby-1.9.2-p0@langrove"
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
- if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]
26
- then
27
- . "${rvm_path:-$HOME/.rvm}/hooks/after_use"
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
- if ! rvm --create use "$environment_id"
32
- then
34
+ rvm --create use "$environment_id" || {
33
35
  echo "Failed to create RVM environment '${environment_id}'."
34
36
  return 1
35
- fi
37
+ }
36
38
  fi
37
39
 
38
- #
39
- # If you use an RVM gemset file to install a list of gems (*.gems), you can have
40
- # it be automatically loaded. Uncomment the following and adjust the filename if
41
- # necessary.
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
- # rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
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
-
@@ -11,7 +11,7 @@
11
11
  # # 2. <YourClass>.transmit
12
12
  # #
13
13
 
14
- require 'langrove'
14
+ require 'em-langrove'
15
15
 
16
16
  module Client
17
17
 
@@ -15,7 +15,7 @@
15
15
  # #
16
16
 
17
17
 
18
- require 'langrove'
18
+ require 'em-langrove'
19
19
 
20
20
  module Protocol
21
21
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  CLASS_NAME = DAEMON_NAME.camelize
4
4
  CONFIG_FILE = "#{DAEMON_ROOT}/config/daemons.yml"
@@ -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
  #
@@ -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
@@ -1,6 +1,6 @@
1
1
  require 'eventmachine'
2
2
 
3
- require 'langrove'
3
+ require 'em-langrove'
4
4
 
5
5
  module LanGrove::Daemon class Base
6
6
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  module LanGrove::Handler class Base
4
4
 
@@ -1,5 +1,5 @@
1
1
  require 'date'
2
- require 'langrove'
2
+ require 'em-langrove'
3
3
 
4
4
  module LanGrove::Protocol class Syslog
5
5
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  module LanGrove::Protocol
4
4
 
@@ -1,3 +1,3 @@
1
1
  module LanGrove
2
- Version = VERSION = '0.0.4.5'
2
+ Version = VERSION = '0.0.4.6'
3
3
  end
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe 'A daemon' do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Adaptor::Base do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Client::Base do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Daemon::Base do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Handler::Base do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Job::Base do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'langrove'
1
+ require 'em-langrove'
2
2
 
3
3
  describe LanGrove::Protocol::Base do
4
4
 
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.5
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 +02:00
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: &70153154387320 !ruby/object:Gem::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: *70153154387320
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: &70153154386820 !ruby/object:Gem::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: *70153154386820
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: &70153154386300 !ruby/object:Gem::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: *70153154386300
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: &70153154385560 !ruby/object:Gem::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: *70153154385560
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: &70153154384820 !ruby/object:Gem::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: *70153154384820
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: &70153154384080 !ruby/object:Gem::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: *70153154384080
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: &70153154383340 !ruby/object:Gem::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: *70153154383340
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.6.2
246
+ rubygems_version: 1.8.21
200
247
  signing_key:
201
248
  specification_version: 3
202
249
  summary: eventmachine based networked daemon framework
@@ -1 +0,0 @@
1
- require 'langrove/_base'