warden-protocol 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ module Warden
54
54
 
55
55
  def self.protocol_type_to_str(protocol_type)
56
56
  if protocol_type.class == Module
57
- return "#{protocol_type.constants.join(", ")}"
57
+ return "#{protocol_type.constants.sort.join(", ")}"
58
58
  elsif protocol_type.is_a?(Symbol)
59
59
  return "#{protocol_type.to_s}"
60
60
  end
@@ -6,8 +6,12 @@ cd $(dirname $0)/pb
6
6
 
7
7
  export BEEFCAKE_NAMESPACE=Warden::Protocol
8
8
 
9
- out=bundle
10
- (echo "package protocol;" && (find . -name '*.proto' | sort | xargs cat | sed /^package/d)) > $out
11
- protoc --beefcake_out=. $out
12
- sed -e "s/Beefcake::Message/Warden::Protocol::BaseMessage/" $out.pb.rb > ../pb.rb
13
- rm -f $out*
9
+ protoc --beefcake_out=. *.proto
10
+
11
+ rm ../pb.rb
12
+
13
+ for generated in *.pb.rb; do
14
+ sed -e "s/Beefcake::Message/Warden::Protocol::BaseMessage/" $generated >> ../pb.rb
15
+ done
16
+
17
+ rm -f *.pb.rb
@@ -1,4 +1,4 @@
1
- ## Generated from bundle for protocol
1
+ ## Generated from copy_in.proto for warden
2
2
  require "beefcake"
3
3
 
4
4
  module Warden
@@ -20,6 +20,13 @@ module Warden
20
20
 
21
21
 
22
22
  end
23
+ end
24
+ end
25
+ ## Generated from copy_out.proto for warden
26
+ require "beefcake"
27
+
28
+ module Warden
29
+ module Protocol
23
30
 
24
31
  class CopyOutRequest
25
32
  include Warden::Protocol::BaseMessage
@@ -38,6 +45,13 @@ module Warden
38
45
 
39
46
 
40
47
  end
48
+ end
49
+ end
50
+ ## Generated from create.proto for warden
51
+ require "beefcake"
52
+
53
+ module Warden
54
+ module Protocol
41
55
 
42
56
  class CreateRequest
43
57
  include Warden::Protocol::BaseMessage
@@ -72,6 +86,13 @@ module Warden
72
86
  required :handle, :string, 1
73
87
 
74
88
  end
89
+ end
90
+ end
91
+ ## Generated from destroy.proto for warden
92
+ require "beefcake"
93
+
94
+ module Warden
95
+ module Protocol
75
96
 
76
97
  class DestroyRequest
77
98
  include Warden::Protocol::BaseMessage
@@ -87,6 +108,13 @@ module Warden
87
108
 
88
109
 
89
110
  end
111
+ end
112
+ end
113
+ ## Generated from echo.proto for warden
114
+ require "beefcake"
115
+
116
+ module Warden
117
+ module Protocol
90
118
 
91
119
  class EchoRequest
92
120
  include Warden::Protocol::BaseMessage
@@ -103,6 +131,13 @@ module Warden
103
131
  required :message, :string, 1
104
132
 
105
133
  end
134
+ end
135
+ end
136
+ ## Generated from error.proto for warden
137
+ require "beefcake"
138
+
139
+ module Warden
140
+ module Protocol
106
141
 
107
142
  class ErrorResponse
108
143
  include Warden::Protocol::BaseMessage
@@ -113,6 +148,13 @@ module Warden
113
148
  repeated :backtrace, :string, 3
114
149
 
115
150
  end
151
+ end
152
+ end
153
+ ## Generated from info.proto for warden
154
+ require "beefcake"
155
+
156
+ module Warden
157
+ module Protocol
116
158
 
117
159
  class InfoRequest
118
160
  include Warden::Protocol::BaseMessage
@@ -203,6 +245,13 @@ module Warden
203
245
  repeated :job_ids, :uint64, 44
204
246
 
205
247
  end
248
+ end
249
+ end
250
+ ## Generated from limit_bandwidth.proto for warden
251
+ require "beefcake"
252
+
253
+ module Warden
254
+ module Protocol
206
255
 
207
256
  class LimitBandwidthRequest
208
257
  include Warden::Protocol::BaseMessage
@@ -222,6 +271,37 @@ module Warden
222
271
  required :burst, :uint64, 2
223
272
 
224
273
  end
274
+ end
275
+ end
276
+ ## Generated from limit_cpu.proto for warden
277
+ require "beefcake"
278
+
279
+ module Warden
280
+ module Protocol
281
+
282
+ class LimitCpuRequest
283
+ include Warden::Protocol::BaseMessage
284
+
285
+
286
+ required :handle, :string, 1
287
+ optional :limit_in_shares, :uint64, 2
288
+
289
+ end
290
+
291
+ class LimitCpuResponse
292
+ include Warden::Protocol::BaseMessage
293
+
294
+
295
+ optional :limit_in_shares, :uint64, 1
296
+
297
+ end
298
+ end
299
+ end
300
+ ## Generated from limit_disk.proto for warden
301
+ require "beefcake"
302
+
303
+ module Warden
304
+ module Protocol
225
305
 
226
306
  class LimitDiskRequest
227
307
  include Warden::Protocol::BaseMessage
@@ -261,6 +341,13 @@ module Warden
261
341
  optional :byte_hard, :uint64, 33
262
342
 
263
343
  end
344
+ end
345
+ end
346
+ ## Generated from limit_memory.proto for warden
347
+ require "beefcake"
348
+
349
+ module Warden
350
+ module Protocol
264
351
 
265
352
  class LimitMemoryRequest
266
353
  include Warden::Protocol::BaseMessage
@@ -278,6 +365,13 @@ module Warden
278
365
  optional :limit_in_bytes, :uint64, 1
279
366
 
280
367
  end
368
+ end
369
+ end
370
+ ## Generated from link.proto for warden
371
+ require "beefcake"
372
+
373
+ module Warden
374
+ module Protocol
281
375
 
282
376
  class LinkRequest
283
377
  include Warden::Protocol::BaseMessage
@@ -298,6 +392,13 @@ module Warden
298
392
  optional :info, InfoResponse, 4
299
393
 
300
394
  end
395
+ end
396
+ end
397
+ ## Generated from list.proto for warden
398
+ require "beefcake"
399
+
400
+ module Warden
401
+ module Protocol
301
402
 
302
403
  class ListRequest
303
404
  include Warden::Protocol::BaseMessage
@@ -313,6 +414,13 @@ module Warden
313
414
  repeated :handles, :string, 1
314
415
 
315
416
  end
417
+ end
418
+ end
419
+ ## Generated from message.proto for warden
420
+ require "beefcake"
421
+
422
+ module Warden
423
+ module Protocol
316
424
 
317
425
  class Message
318
426
  include Warden::Protocol::BaseMessage
@@ -334,6 +442,7 @@ module Warden
334
442
  LimitMemory = 51
335
443
  LimitDisk = 52
336
444
  LimitBandwidth = 53
445
+ LimitCpu = 54
337
446
  Ping = 91
338
447
  List = 92
339
448
  Echo = 93
@@ -343,6 +452,13 @@ module Warden
343
452
  required :payload, :bytes, 2
344
453
 
345
454
  end
455
+ end
456
+ end
457
+ ## Generated from net_in.proto for warden
458
+ require "beefcake"
459
+
460
+ module Warden
461
+ module Protocol
346
462
 
347
463
  class NetInRequest
348
464
  include Warden::Protocol::BaseMessage
@@ -362,14 +478,30 @@ module Warden
362
478
  required :container_port, :uint32, 2
363
479
 
364
480
  end
481
+ end
482
+ end
483
+ ## Generated from net_out.proto for warden
484
+ require "beefcake"
485
+
486
+ module Warden
487
+ module Protocol
365
488
 
366
489
  class NetOutRequest
367
490
  include Warden::Protocol::BaseMessage
368
491
 
492
+ module Protocol
493
+ TCP = 0
494
+ UDP = 1
495
+ ICMP = 2
496
+ end
369
497
 
370
498
  required :handle, :string, 1
371
499
  optional :network, :string, 2
372
500
  optional :port, :uint32, 3
501
+ optional :port_range, :string, 4
502
+ optional :protocol, NetOutRequest::Protocol, 5
503
+ optional :icmp_type, :int32, 6
504
+ optional :icmp_code, :int32, 7
373
505
 
374
506
  end
375
507
 
@@ -379,6 +511,13 @@ module Warden
379
511
 
380
512
 
381
513
  end
514
+ end
515
+ end
516
+ ## Generated from ping.proto for warden
517
+ require "beefcake"
518
+
519
+ module Warden
520
+ module Protocol
382
521
 
383
522
  class PingRequest
384
523
  include Warden::Protocol::BaseMessage
@@ -393,6 +532,13 @@ module Warden
393
532
 
394
533
 
395
534
  end
535
+ end
536
+ end
537
+ ## Generated from resource_limits.proto for warden
538
+ require "beefcake"
539
+
540
+ module Warden
541
+ module Protocol
396
542
 
397
543
  class ResourceLimits
398
544
  include Warden::Protocol::BaseMessage
@@ -415,6 +561,13 @@ module Warden
415
561
  optional :stack, :uint64, 15
416
562
 
417
563
  end
564
+ end
565
+ end
566
+ ## Generated from run.proto for warden
567
+ require "beefcake"
568
+
569
+ module Warden
570
+ module Protocol
418
571
 
419
572
  class RunRequest
420
573
  include Warden::Protocol::BaseMessage
@@ -424,6 +577,8 @@ module Warden
424
577
  required :script, :string, 2
425
578
  optional :privileged, :bool, 3, :default => false
426
579
  optional :rlimits, ResourceLimits, 4
580
+ optional :discard_output, :bool, 5, :default => false
581
+ optional :log_tag, :string, 6
427
582
 
428
583
  end
429
584
 
@@ -437,6 +592,13 @@ module Warden
437
592
  optional :info, InfoResponse, 4
438
593
 
439
594
  end
595
+ end
596
+ end
597
+ ## Generated from spawn.proto for warden
598
+ require "beefcake"
599
+
600
+ module Warden
601
+ module Protocol
440
602
 
441
603
  class SpawnRequest
442
604
  include Warden::Protocol::BaseMessage
@@ -446,6 +608,8 @@ module Warden
446
608
  required :script, :string, 2
447
609
  optional :privileged, :bool, 3, :default => false
448
610
  optional :rlimits, ResourceLimits, 4
611
+ optional :discard_output, :bool, 5, :default => false
612
+ optional :log_tag, :string, 6
449
613
 
450
614
  end
451
615
 
@@ -456,6 +620,13 @@ module Warden
456
620
  required :job_id, :uint32, 1
457
621
 
458
622
  end
623
+ end
624
+ end
625
+ ## Generated from stop.proto for warden
626
+ require "beefcake"
627
+
628
+ module Warden
629
+ module Protocol
459
630
 
460
631
  class StopRequest
461
632
  include Warden::Protocol::BaseMessage
@@ -473,6 +644,13 @@ module Warden
473
644
 
474
645
 
475
646
  end
647
+ end
648
+ end
649
+ ## Generated from stream.proto for warden
650
+ require "beefcake"
651
+
652
+ module Warden
653
+ module Protocol
476
654
 
477
655
  class StreamRequest
478
656
  include Warden::Protocol::BaseMessage
@@ -0,0 +1,32 @@
1
+ // Limits the cpu shares for a container.
2
+ //
3
+ // ### Request
4
+ //
5
+ // The field `limit_in_shares` is optional.
6
+ // When it is not specified, the cpu limit will not be changed.
7
+ //
8
+ // * `handle`: Container handle.
9
+ // * `limit_in_shares`: New cpu limit in shares.
10
+ //
11
+ // ### Response
12
+ //
13
+ // * `limit_in_shares`: CPU limit in shares.
14
+ //
15
+ // ### Errors
16
+ //
17
+ // > **TODO**
18
+ //
19
+ // ### Definition
20
+ //
21
+
22
+ package warden;
23
+
24
+ message LimitCpuRequest {
25
+ required string handle = 1;
26
+
27
+ optional uint64 limit_in_shares = 2;
28
+ }
29
+
30
+ message LimitCpuResponse {
31
+ optional uint64 limit_in_shares = 1;
32
+ }
@@ -26,6 +26,8 @@
26
26
 
27
27
  package warden;
28
28
 
29
+ import "info.proto";
30
+
29
31
  message LinkRequest {
30
32
  required string handle = 1;
31
33
 
@@ -25,6 +25,7 @@ message Message {
25
25
  LimitMemory = 51;
26
26
  LimitDisk = 52;
27
27
  LimitBandwidth = 53;
28
+ LimitCpu = 54;
28
29
 
29
30
  Ping = 91;
30
31
  List = 92;
@@ -10,6 +10,11 @@
10
10
  // * `handle`: Container handle.
11
11
  // * `network`: Network to whitelist (in the form `1.2.3.4/8`).
12
12
  // * `port`: Port to whitelist.
13
+ // * `port_range`: Colon separated port range (in the form `8080:9080`).
14
+ // Note: port_range takes precedence over port
15
+ // * `protocol`: Network protocol (`TCP`, `UDP` or `ICMP`). Defaults to `TCP` if not set.
16
+ // * `icmp_type`: ICMP type (use -1 to specify all ICMP types).
17
+ // * `icmp_code`: ICMP code (use -1 to specify all ICMP codes for the given type).
13
18
  //
14
19
  // ### Response
15
20
  //
@@ -25,10 +30,19 @@
25
30
  package warden;
26
31
 
27
32
  message NetOutRequest {
28
- required string handle = 1;
33
+ enum Protocol {
34
+ TCP = 0;
35
+ UDP = 1;
36
+ ICMP = 2;
37
+ }
38
+ required string handle = 1;
29
39
 
30
- optional string network = 2;
31
- optional uint32 port = 3;
40
+ optional string network = 2;
41
+ optional uint32 port = 3;
42
+ optional string port_range = 4;
43
+ optional Protocol protocol = 5;
44
+ optional int32 icmp_type = 6;
45
+ optional int32 icmp_code = 7;
32
46
  }
33
47
 
34
48
  message NetOutResponse {
@@ -13,12 +13,19 @@
13
13
 
14
14
  package warden;
15
15
 
16
+ import "resource_limits.proto";
17
+ import "info.proto";
18
+
16
19
  message RunRequest {
17
20
  required string handle = 1;
18
21
 
19
22
  required string script = 2;
20
23
  optional bool privileged = 3 [default = false];
21
24
  optional ResourceLimits rlimits = 4;
25
+
26
+ optional bool discard_output = 5 [default = false];
27
+
28
+ optional string log_tag = 6;
22
29
  }
23
30
 
24
31
  message RunResponse {
@@ -24,12 +24,18 @@
24
24
 
25
25
  package warden;
26
26
 
27
+ import "resource_limits.proto";
28
+
27
29
  message SpawnRequest {
28
30
  required string handle = 1;
29
31
 
30
32
  required string script = 2;
31
33
  optional bool privileged = 3 [default = false];
32
34
  optional ResourceLimits rlimits = 4;
35
+
36
+ optional bool discard_output = 5 [default = false];
37
+
38
+ optional string log_tag = 6;
33
39
  }
34
40
 
35
41
  message SpawnResponse {
@@ -27,6 +27,8 @@
27
27
 
28
28
  package warden;
29
29
 
30
+ import "info.proto";
31
+
30
32
  message StreamRequest {
31
33
  required string handle = 1;
32
34
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Warden
4
4
  module Protocol
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
@@ -89,8 +89,8 @@ end
89
89
  describe Warden::Protocol do
90
90
  before :all do
91
91
  module Test
92
- A = 1
93
92
  B = 2
93
+ A = 1
94
94
  end
95
95
  end
96
96
 
@@ -7,6 +7,8 @@ describe Warden::Protocol::Buffer do
7
7
  let(:request) { Warden::Protocol::EchoRequest.new(:message => "request") }
8
8
  let(:response) { Warden::Protocol::EchoResponse.new(:message => "response") }
9
9
 
10
+ subject { described_class.new }
11
+
10
12
  it "should support iterating over requests" do
11
13
  subject << Warden::Protocol::Buffer.request_to_wire(request)
12
14
  subject.each_request do |request|
@@ -28,7 +30,7 @@ describe Warden::Protocol::Buffer do
28
30
  data = Warden::Protocol::Buffer.request_to_wire(request)
29
31
 
30
32
  loop do
31
- chunk = data.slice!(0)
33
+ chunk = data.slice!(0).chr
32
34
  subject << chunk
33
35
  break if data.empty?
34
36
 
@@ -47,7 +49,7 @@ describe Warden::Protocol::Buffer do
47
49
  data = Warden::Protocol::Buffer.response_to_wire(response)
48
50
 
49
51
  loop do
50
- chunk = data.slice!(0)
52
+ chunk = data.slice!(0).chr
51
53
  subject << chunk
52
54
  break if data.empty?
53
55
 
@@ -7,7 +7,7 @@ describe Warden::Protocol::CopyInRequest do
7
7
  described_class.new(
8
8
  :handle => "handle",
9
9
  :src_path => "/src",
10
- :dst_path => "/dst",
10
+ :dst_path => "/dst"
11
11
  )
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ describe Warden::Protocol::CopyOutRequest do
7
7
  described_class.new(
8
8
  :handle => "handle",
9
9
  :src_path => "/src",
10
- :dst_path => "/dst",
10
+ :dst_path => "/dst"
11
11
  )
12
12
  end
13
13
 
@@ -0,0 +1,47 @@
1
+ # coding: UTF-8
2
+
3
+ require "spec_helper"
4
+
5
+ describe Warden::Protocol::LimitCpuRequest do
6
+ subject(:request) do
7
+ described_class.new(:handle => "handle")
8
+ end
9
+
10
+ it_should_behave_like "wrappable request"
11
+
12
+ its("class.type_camelized") { should == "LimitCpu" }
13
+ its("class.type_underscored") { should == "limit_cpu" }
14
+
15
+ field :handle do
16
+ it_should_be_required
17
+ it_should_be_typed_as_string
18
+ end
19
+
20
+ field :limit_in_shares do
21
+ it_should_be_optional
22
+ it_should_be_typed_as_uint64
23
+ end
24
+
25
+ it "should respond to #create_response" do
26
+ request.create_response.should be_a(Warden::Protocol::LimitCpuResponse)
27
+ end
28
+ end
29
+
30
+ describe Warden::Protocol::LimitCpuResponse do
31
+ subject(:response) do
32
+ described_class.new
33
+ end
34
+
35
+ it_should_behave_like "wrappable response"
36
+
37
+ its("class.type_camelized") { should == "LimitCpu" }
38
+ its("class.type_underscored") { should == "limit_cpu" }
39
+
40
+ it { should be_ok }
41
+ it { should_not be_error }
42
+
43
+ field :limit_in_shares do
44
+ it_should_be_optional
45
+ it_should_be_typed_as_uint64
46
+ end
47
+ end
@@ -26,6 +26,16 @@ module Warden::Protocol
26
26
  it_should_default_to false
27
27
  end
28
28
 
29
+ field :discard_output do
30
+ it_should_be_optional
31
+ it_should_default_to false
32
+ end
33
+
34
+ field :log_tag do
35
+ it_should_be_optional
36
+ it_should_default_to nil
37
+ end
38
+
29
39
  field :rlimits do
30
40
  it_should_be_optional
31
41
 
@@ -25,6 +25,16 @@ describe Warden::Protocol::SpawnRequest do
25
25
  it_should_default_to false
26
26
  end
27
27
 
28
+ field :discard_output do
29
+ it_should_be_optional
30
+ it_should_default_to false
31
+ end
32
+
33
+ field :log_tag do
34
+ it_should_be_optional
35
+ it_should_default_to nil
36
+ end
37
+
28
38
  it "should be populated with ResourceLimits object" do
29
39
  request.rlimits = Warden::Protocol::ResourceLimits.new
30
40
  request.should be_valid
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-12 00:00:00.000000000 Z
12
+ date: 2014-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beefcake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: 0.3.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '2.11'
37
+ version: 2.11.0
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '2.11'
45
+ version: 2.11.0
46
46
  description: Protocol specification for Warden
47
47
  email:
48
48
  - pcnoordhuis@gmail.com
@@ -50,18 +50,10 @@ executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
- - .gitignore
54
- - .rspec
55
- - CHANGELOG.md
56
- - Gemfile
57
- - README.md
58
- - Rakefile
59
- - lib/warden/protocol.rb
60
53
  - lib/warden/protocol/base.rb
61
54
  - lib/warden/protocol/buffer.rb
62
55
  - lib/warden/protocol/build.sh
63
56
  - lib/warden/protocol/message.rb
64
- - lib/warden/protocol/pb.rb
65
57
  - lib/warden/protocol/pb/copy_in.proto
66
58
  - lib/warden/protocol/pb/copy_out.proto
67
59
  - lib/warden/protocol/pb/create.proto
@@ -70,6 +62,7 @@ files:
70
62
  - lib/warden/protocol/pb/error.proto
71
63
  - lib/warden/protocol/pb/info.proto
72
64
  - lib/warden/protocol/pb/limit_bandwidth.proto
65
+ - lib/warden/protocol/pb/limit_cpu.proto
73
66
  - lib/warden/protocol/pb/limit_disk.proto
74
67
  - lib/warden/protocol/pb/limit_memory.proto
75
68
  - lib/warden/protocol/pb/link.proto
@@ -83,7 +76,9 @@ files:
83
76
  - lib/warden/protocol/pb/spawn.proto
84
77
  - lib/warden/protocol/pb/stop.proto
85
78
  - lib/warden/protocol/pb/stream.proto
79
+ - lib/warden/protocol/pb.rb
86
80
  - lib/warden/protocol/version.rb
81
+ - lib/warden/protocol.rb
87
82
  - spec/base_spec.rb
88
83
  - spec/buffer_spec.rb
89
84
  - spec/copy_in_spec.rb
@@ -94,6 +89,7 @@ files:
94
89
  - spec/error_spec.rb
95
90
  - spec/info_spec.rb
96
91
  - spec/limit_bandwidth_spec.rb
92
+ - spec/limit_cpu_spec.rb
97
93
  - spec/limit_disk_spec.rb
98
94
  - spec/limit_memory_spec.rb
99
95
  - spec/link_spec.rb
@@ -111,7 +107,6 @@ files:
111
107
  - spec/support/examples/wrappable_request.rb
112
108
  - spec/support/helper.rb
113
109
  - spec/support/matchers.rb
114
- - warden-protocol.gemspec
115
110
  homepage: ''
116
111
  licenses: []
117
112
  post_install_message:
@@ -132,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
127
  version: '0'
133
128
  requirements: []
134
129
  rubyforge_project:
135
- rubygems_version: 1.8.25
130
+ rubygems_version: 1.8.23.2
136
131
  signing_key:
137
132
  specification_version: 3
138
133
  summary: Protocol specification for Warden
@@ -147,6 +142,7 @@ test_files:
147
142
  - spec/error_spec.rb
148
143
  - spec/info_spec.rb
149
144
  - spec/limit_bandwidth_spec.rb
145
+ - spec/limit_cpu_spec.rb
150
146
  - spec/limit_disk_spec.rb
151
147
  - spec/limit_memory_spec.rb
152
148
  - spec/link_spec.rb
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --fail-fast --backtrace --color
@@ -1,14 +0,0 @@
1
- ## 0.0.3
2
-
3
- * Ignore string encoding when a request or response is encoded
4
-
5
- ## 0.0.2
6
-
7
- ### `StopRequest`
8
-
9
- * Added `background` flag
10
- * Added `kill` flag
11
-
12
- ## 0.0.1
13
-
14
- * Initial version.
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in warden-protocol.gemspec
4
- gemspec
5
-
6
- gem 'rake'
data/README.md DELETED
@@ -1,13 +0,0 @@
1
- # warden-protocol
2
-
3
- > This README describes the **protocol** library. Please refer to the top
4
- > level [README][tlr] for an overview of all components.
5
-
6
- [tlr]: /README.md
7
-
8
- ## License
9
-
10
- The project is licensed under the Apache 2.0 license (see the
11
- [`LICENSE`][license] file in the root directory of the repository).
12
-
13
- [license]: /LICENSE
data/Rakefile DELETED
@@ -1,40 +0,0 @@
1
- # coding: UTF-8
2
-
3
- require "rspec/core/rake_task"
4
- require "rspec/core/version"
5
-
6
- task :default => :spec
7
-
8
- desc "Run all examples"
9
- RSpec::Core::RakeTask.new(:spec) do |t|
10
- # See .rspec
11
- end
12
-
13
- desc "Build pb.rb"
14
- task :build do
15
- sh("lib/warden/protocol/build.sh")
16
- end
17
-
18
- task :ensure_coding do
19
- patterns = [
20
- /Rakefile$/,
21
- /\.rb$/,
22
- ]
23
-
24
- files = `git ls-files`.split.select do |file|
25
- patterns.any? { |e| e.match(file) }
26
- end
27
-
28
- header = "# coding: UTF-8\n\n"
29
-
30
- files.each do |file|
31
- content = File.read(file)
32
-
33
- unless content.start_with?(header)
34
- File.open(file, "w") do |f|
35
- f.write(header)
36
- f.write(content)
37
- end
38
- end
39
- end
40
- end
@@ -1,21 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/warden/protocol/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Pieter Noordhuis"]
6
- gem.email = ["pcnoordhuis@gmail.com"]
7
- gem.description = %q{Protocol specification for Warden}
8
- gem.summary = %q{Protocol specification for Warden}
9
- gem.homepage = ""
10
-
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "warden-protocol"
15
- gem.require_paths = ["lib"]
16
- gem.version = Warden::Protocol::VERSION
17
-
18
- gem.add_dependency "beefcake"
19
-
20
- gem.add_development_dependency "rspec", "~> 2.11"
21
- end