slave 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +15 -0
  2. data/Rakefile +33 -53
  3. data/lib/slave.rb +6 -2
  4. metadata +23 -45
  5. data/slave.gemspec +0 -42
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZmE0ZTYxNmU0MjhmN2NhZTE4OGE2MzVkZWJjYjE1NGZlNWY1OWFiMg==
5
+ data.tar.gz: !binary |-
6
+ YWY1ZDg2NTBhZGRjYzI4ZmNlYjY1NTVlZmI1ZGUxZTI3OTFkNmNiOQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MWY0ZWI2YTkyMDZjYjI5ODIxZWZkNzg3OTFlMGIzYzFhM2IzN2Q1MWZkNjM0
10
+ NTY1ZDM5MzAwMDE4MWFiMDlmMDM1Njg4OGEzNjQ5MWY5NTlmMDU3MTZjMjYz
11
+ YjYwMzUzYWI4MDdhZThhN2Q2NGY3YTk0NWVkN2ZmYmM5YTRkMTE=
12
+ data.tar.gz: !binary |-
13
+ MDllZWIwMWMzM2NmMzgzMDI3N2E3ZTYxZTU1MTYwNmI2OTg5NzhmNGI5ODFk
14
+ MzFkZWVkNzFiMDkzYjZhZWY2NmQ3MDg0YzJiMWFlNWFmZjA5ZjBlMmY0MmNj
15
+ ZGY0MjY5N2U4NWQ2MDBlODhkMDhhMjMzMDBkYmQxM2RkOWVhYTA=
data/Rakefile CHANGED
@@ -3,6 +3,9 @@ This.author = "Ara T. Howard"
3
3
  This.email = "ara.t.howard@gmail.com"
4
4
  This.homepage = "https://github.com/ahoward/#{ This.lib }"
5
5
 
6
+ task :license do
7
+ open('LICENSE', 'w'){|fd| fd.puts "same as ruby's"}
8
+ end
6
9
 
7
10
  task :default do
8
11
  puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
@@ -29,7 +32,7 @@ def run_tests!(which = nil)
29
32
 
30
33
  test_rbs.each_with_index do |test_rb, index|
31
34
  testno = index + 1
32
- command = "#{ This.ruby } -I ./lib -I ./test/lib #{ test_rb }"
35
+ command = "#{ This.ruby } -w -I ./lib -I ./test/lib #{ test_rb }"
33
36
 
34
37
  puts
35
38
  say(div, :color => :cyan, :bold => true)
@@ -60,7 +63,7 @@ end
60
63
  task :gemspec do
61
64
  ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
62
65
  ignore_directories = ['pkg']
63
- ignore_files = ['test/log', 'a.rb'] + Dir['db/*'] + %w'db'
66
+ ignore_files = ['test/log']
64
67
 
65
68
  shiteless =
66
69
  lambda do |list|
@@ -87,9 +90,10 @@ task :gemspec do
87
90
  files = shiteless[Dir::glob("**/**")]
88
91
  executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
89
92
  #has_rdoc = true #File.exist?('doc')
90
- test_files = test(?e, "test/#{ lib }.rb") ? "test/#{ lib }.rb" : nil
93
+ test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
91
94
  summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
92
95
  description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
96
+ license = object.respond_to?(:license) ? object.license : "same as ruby's"
93
97
 
94
98
  if This.extensions.nil?
95
99
  This.extensions = []
@@ -100,51 +104,39 @@ task :gemspec do
100
104
  end
101
105
  extensions = [extensions].flatten.compact
102
106
 
103
- # TODO
104
- if This.dependencies.nil?
105
- dependencies = []
106
- else
107
- case This.dependencies
108
- when Hash
109
- dependencies = This.dependencies.values
110
- when Array
111
- dependencies = This.dependencies
112
- end
113
- end
114
-
115
107
  template =
116
108
  if test(?e, 'gemspec.erb')
117
109
  Template{ IO.read('gemspec.erb') }
118
110
  else
119
111
  Template {
120
112
  <<-__
121
- ## <%= lib %>.gemspec
113
+ ## #{ lib }.gemspec
122
114
  #
123
115
 
124
116
  Gem::Specification::new do |spec|
125
- spec.name = <%= lib.inspect %>
126
- spec.version = <%= version.inspect %>
117
+ spec.name = #{ lib.inspect }
118
+ spec.version = #{ version.inspect }
127
119
  spec.platform = Gem::Platform::RUBY
128
- spec.summary = <%= lib.inspect %>
129
- spec.description = <%= description.inspect %>
120
+ spec.summary = #{ lib.inspect }
121
+ spec.description = #{ description.inspect }
122
+ spec.license = #{ license.inspect }
130
123
 
131
- spec.files =\n<%= files.sort.pretty_inspect %>
132
- spec.executables = <%= executables.inspect %>
124
+ spec.files =\n#{ files.sort.pretty_inspect }
125
+ spec.executables = #{ executables.inspect }
133
126
 
134
127
  spec.require_path = "lib"
135
128
 
136
- spec.test_files = <%= test_files.inspect %>
129
+ spec.test_files = #{ test_files.inspect }
137
130
 
138
- <% dependencies.each do |lib_version| %>
139
- spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
140
- <% end %>
131
+ ### spec.add_dependency 'lib', '>= version'
132
+ #### spec.add_dependency 'map'
141
133
 
142
- spec.extensions.push(*<%= extensions.inspect %>)
134
+ spec.extensions.push(*#{ extensions.inspect })
143
135
 
144
- spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
145
- spec.author = <%= This.author.inspect %>
146
- spec.email = <%= This.email.inspect %>
147
- spec.homepage = <%= This.homepage.inspect %>
136
+ spec.rubyforge_project = #{ This.rubyforge_project.inspect }
137
+ spec.author = #{ This.author.inspect }
138
+ spec.email = #{ This.email.inspect }
139
+ spec.homepage = #{ This.homepage.inspect }
148
140
  end
149
141
  __
150
142
  }
@@ -187,13 +179,9 @@ task :readme do
187
179
  samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
188
180
  end
189
181
 
190
- @lib = lib
191
- @version = version
192
- @samples = samples
193
-
194
182
  template =
195
- if test(?e, 'readme.erb')
196
- Template{ IO.read('readme.erb') }
183
+ if test(?e, 'README.erb')
184
+ Template{ IO.read('README.erb') }
197
185
  else
198
186
  Template {
199
187
  <<-__
@@ -284,12 +272,6 @@ BEGIN {
284
272
  end
285
273
  This.version = version
286
274
 
287
- # see if dependencies are export by the module
288
- #
289
- if This.object.respond_to?(:dependencies)
290
- This.dependencies = This.object.dependencies
291
- end
292
-
293
275
  # we need to know the name of the lib an it's version
294
276
  #
295
277
  abort('no lib') unless This.lib
@@ -308,21 +290,19 @@ BEGIN {
308
290
  #
309
291
  module Util
310
292
  def indent(s, n = 2)
311
- margin = ' ' * Integer(n)
312
- unindent(s).gsub!(%r/^/, margin)
313
- s
293
+ s = unindent(s)
294
+ ws = ' ' * n
295
+ s.gsub(%r/^/, ws)
314
296
  end
315
297
 
316
298
  def unindent(s)
317
- margin = nil
299
+ indent = nil
318
300
  s.each_line do |line|
319
- next if line =~ %r/^\s*$/
320
- margin = line[%r/^\s*/] and break
321
- end
322
- s.gsub!(%r/^#{ margin }/, "") if margin
323
- s
301
+ next if line =~ %r/^\s*$/
302
+ indent = line[%r/^\s*/] and break
324
303
  end
325
-
304
+ indent ? s.gsub(%r/^#{ indent }/, "") : s
305
+ end
326
306
  extend self
327
307
  end
328
308
 
@@ -39,8 +39,12 @@ require 'sync'
39
39
  # of the two 'b' is preferred.
40
40
  #
41
41
  class Slave
42
- VERSION = '1.3.0'
42
+ VERSION = '1.3.1'
43
43
  def self.version() VERSION end
44
+
45
+ def Slave.description
46
+ 'easily start a drb server in another process'
47
+ end
44
48
 
45
49
  # env config
46
50
  #
@@ -157,7 +161,7 @@ require 'sync'
157
161
  def self.new(*a, &b) ThreadSafe.new(super) end
158
162
  end
159
163
 
160
- # the LifeLine class is used to communitacte between child and parent
164
+ # the LifeLine class is used to communicate between child and parent
161
165
  # processes and to prevent child processes from ever becoming zombies or
162
166
  # otherwise abandoned by their parents. the basic concept is that a socket
163
167
  # pair is setup between child and parent. the child process, because it is
metadata CHANGED
@@ -1,32 +1,21 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: slave
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 1
8
- - 3
9
- - 0
10
- version: 1.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.1
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Ara T. Howard
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-10-10 00:00:00 Z
11
+ date: 2014-02-15 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
- description: "description: slave kicks the ass"
13
+ description: easily start a drb server in another process
22
14
  email: ara.t.howard@gmail.com
23
15
  executables: []
24
-
25
16
  extensions: []
26
-
27
17
  extra_rdoc_files: []
28
-
29
- files:
18
+ files:
30
19
  - README
31
20
  - Rakefile
32
21
  - lib/slave-1.2.1.rb
@@ -39,39 +28,28 @@ files:
39
28
  - samples/e.rb
40
29
  - samples/f.rb
41
30
  - samples/g.rb
42
- - slave.gemspec
43
31
  homepage: https://github.com/ahoward/slave
44
- licenses: []
45
-
32
+ licenses:
33
+ - same as ruby's
34
+ metadata: {}
46
35
  post_install_message:
47
36
  rdoc_options: []
48
-
49
- require_paths:
37
+ require_paths:
50
38
  - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
60
- required_rubygems_version: !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- hash: 3
66
- segments:
67
- - 0
68
- version: "0"
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
69
49
  requirements: []
70
-
71
50
  rubyforge_project: codeforpeople
72
- rubygems_version: 1.8.11
51
+ rubygems_version: 2.0.3
73
52
  signing_key:
74
- specification_version: 3
53
+ specification_version: 4
75
54
  summary: slave
76
55
  test_files: []
77
-
@@ -1,42 +0,0 @@
1
- ## slave.gemspec
2
- #
3
-
4
- Gem::Specification::new do |spec|
5
- spec.name = "slave"
6
- spec.version = "1.3.0"
7
- spec.platform = Gem::Platform::RUBY
8
- spec.summary = "slave"
9
- spec.description = "description: slave kicks the ass"
10
-
11
- spec.files =
12
- ["README",
13
- "Rakefile",
14
- "lib",
15
- "lib/slave-1.2.1.rb",
16
- "lib/slave.rb",
17
- "readme.erb",
18
- "samples",
19
- "samples/a.rb",
20
- "samples/b.rb",
21
- "samples/c.rb",
22
- "samples/d.rb",
23
- "samples/e.rb",
24
- "samples/f.rb",
25
- "samples/g.rb",
26
- "slave.gemspec"]
27
-
28
- spec.executables = []
29
-
30
- spec.require_path = "lib"
31
-
32
- spec.test_files = nil
33
-
34
-
35
-
36
- spec.extensions.push(*[])
37
-
38
- spec.rubyforge_project = "codeforpeople"
39
- spec.author = "Ara T. Howard"
40
- spec.email = "ara.t.howard@gmail.com"
41
- spec.homepage = "https://github.com/ahoward/slave"
42
- end