amq-protocol 0.0.1.pre → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,31 @@
1
1
  # encoding: binary
2
2
 
3
- require "rspec"
4
- require_relative "../lib/amq/protocol.rb"
3
+ require 'bundler/setup'
4
+ require 'rspec'
5
+
6
+ begin
7
+ require 'simplecov'
8
+
9
+ SimpleCov.start do
10
+ add_filter '/spec/'
11
+ end
12
+ rescue LoadError
13
+ end
14
+
15
+ $: << File.expand_path('../../lib', __FILE__)
16
+
17
+ require "amq/protocol"
18
+
19
+ module RubyVersionsSUpport
20
+ def one_point_eight?
21
+ RUBY_VERSION =~ /^1.8/
22
+ end
23
+ end # RubyVersionsSUpport
24
+
5
25
 
6
26
  RSpec.configure do |config|
7
27
  config.include AMQ::Protocol
28
+
29
+ config.include(RubyVersionsSUpport)
30
+ config.extend(RubyVersionsSUpport)
8
31
  end
data/tasks.rb CHANGED
@@ -1,21 +1,26 @@
1
1
  #!/usr/bin/env nake
2
2
  # encoding: utf-8
3
3
 
4
+ # load "contributors.nake"
5
+
4
6
  Task.new(:generate) do |task|
5
- task.description = "Generate lib/amq/protocol.rb"
7
+ task.description = "Generate lib/amq/protocol/client.rb"
6
8
  task.define do |opts, spec = nil|
7
9
  if spec.nil?
8
10
  spec = "vendor/rabbitmq-codegen/amqp-rabbitmq-0.9.1.json"
9
11
  unless File.exist?(spec)
10
- sh "git submodule init"
11
- sh "git submodule update"
12
+ sh "git submodule update --init"
12
13
  end
13
14
  end
14
- output = "lib/amq/protocol.rb"
15
- sh "./codegen.py spec #{spec} #{output}"
16
- if File.file?(output)
17
- sh "./post-processing.rb #{output}"
18
- sh "ruby -c #{output}"
15
+
16
+ targets = %w{client} # add "server" to generate server code
17
+ targets.each do |type|
18
+ path = "lib/amq/protocol/#{type}.rb"
19
+ sh "./codegen.py #{type} #{spec} #{path}"
20
+ if File.file?(path)
21
+ sh "./post-processing.rb #{path}"
22
+ sh "ruby -c #{path}"
23
+ end
19
24
  end
20
25
  end
21
26
  end
metadata CHANGED
@@ -1,65 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amq-protocol
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ hash: 11
5
+ prerelease:
5
6
  segments:
6
7
  - 0
8
+ - 5
7
9
  - 0
8
- - 1
9
- - pre
10
- version: 0.0.1.pre
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jakub Stastny
14
+ - Michael S. Klishin
15
+ - Theo Hultberg
16
+ - Mark Abramov
14
17
  autorequire:
15
18
  bindir: bin
16
19
  cert_chain:
17
- date: 2010-12-15 00:00:00 +00:00
20
+ date: 2011-04-16 00:00:00 +04:00
18
21
  default_executable:
19
22
  dependencies: []
20
23
 
21
- description: This is an AMQP encoder & decoder for AMQP 0.9.1. It isn't an AMQP client, just the parser, so if you want to write your own AMQP client without digging into the protocol, this gem can help you with that.
22
- email: stastny@101ideas.cz
24
+ description: " amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not an\n AMQP client: amq-protocol only handles serialization and deserialization.\n If you want to write your own AMQP client, this gem can help you with that.\n"
25
+ email:
26
+ - michael@novemberain.com
27
+ - stastny@101ideas.cz
23
28
  executables: []
24
29
 
25
30
  extensions: []
26
31
 
27
- extra_rdoc_files: []
28
-
32
+ extra_rdoc_files:
33
+ - README.textile
29
34
  files:
30
35
  - .gitignore
31
36
  - .gitmodules
32
37
  - .rspec
38
+ - .travis.yml
33
39
  - CHANGELOG
40
+ - CONTRIBUTORS
41
+ - Gemfile
42
+ - Gemfile.lock
34
43
  - LICENSE
44
+ - PROFILING.md
35
45
  - README.textile
36
46
  - TODO.todo
47
+ - __init__.py
37
48
  - amq-protocol.gemspec
38
- - amq-protocol.pre.gemspec
39
49
  - amqp_0.9.1_changes.json
40
50
  - benchmark.rb
51
+ - bin/jenkins.sh
41
52
  - codegen.py
42
53
  - codegen_helpers.py
43
54
  - examples/00_manual_test.rb
44
- - examples/01_basics.rb
45
- - examples/02_eventmachine.rb
46
55
  - irb.rb
56
+ - lib/amq/hacks.rb
47
57
  - lib/amq/protocol.rb
58
+ - lib/amq/protocol/client.rb
48
59
  - lib/amq/protocol/frame.rb
49
60
  - lib/amq/protocol/table.rb
61
+ - lib/amq/protocol/version.rb
50
62
  - post-processing.rb
51
63
  - protocol.rb.pytemplate
64
+ - spec/amq/hacks_spec.rb
65
+ - spec/amq/protocol/basic_spec.rb
66
+ - spec/amq/protocol/channel_spec.rb
67
+ - spec/amq/protocol/confirm_spec.rb
68
+ - spec/amq/protocol/connection_spec.rb
69
+ - spec/amq/protocol/exchange_spec.rb
52
70
  - spec/amq/protocol/frame_spec.rb
71
+ - spec/amq/protocol/method_spec.rb
72
+ - spec/amq/protocol/queue_spec.rb
53
73
  - spec/amq/protocol/table_spec.rb
74
+ - spec/amq/protocol/tx_spec.rb
54
75
  - spec/amq/protocol_spec.rb
55
76
  - spec/spec_helper.rb
56
77
  - tasks.rb
57
78
  has_rdoc: true
58
- homepage: http://github.com/botanicus/amq-protocol
79
+ homepage: http://github.com/ruby-amqp/amq-protocol
59
80
  licenses: []
60
81
 
61
- post_install_message: "[\e[32mVersion 0.0.1\e[0m] [FEATURE] Basic code generation.\n\
62
- [\e[32mVersion 0.0.1\e[0m] [FEATURE] Generate only methods which are actually required by the client.\n"
82
+ post_install_message:
63
83
  rdoc_options: []
64
84
 
65
85
  require_paths:
@@ -67,26 +87,25 @@ require_paths:
67
87
  required_ruby_version: !ruby/object:Gem::Requirement
68
88
  none: false
69
89
  requirements:
70
- - - ~>
90
+ - - ">="
71
91
  - !ruby/object:Gem::Version
92
+ hash: 3
72
93
  segments:
73
- - 1
74
- - 9
75
- version: "1.9"
94
+ - 0
95
+ version: "0"
76
96
  required_rubygems_version: !ruby/object:Gem::Requirement
77
97
  none: false
78
98
  requirements:
79
- - - ">"
99
+ - - ">="
80
100
  - !ruby/object:Gem::Version
101
+ hash: 3
81
102
  segments:
82
- - 1
83
- - 3
84
- - 1
85
- version: 1.3.1
103
+ - 0
104
+ version: "0"
86
105
  requirements: []
87
106
 
88
107
  rubyforge_project: amq-protocol
89
- rubygems_version: 1.3.7
108
+ rubygems_version: 1.5.2
90
109
  signing_key:
91
110
  specification_version: 3
92
111
  summary: AMQP 0.9.1 encoder & decoder.
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env gem build
2
- # encoding: utf-8
3
-
4
- eval(File.read("amq-protocol.gemspec")).tap do |specification|
5
- specification.version = "#{specification.version}.pre"
6
- end
@@ -1,14 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require "socket"
4
- require_relative "../lib/amq/protocol.rb"
5
-
6
- server = TCPServer.new(5672)
7
-
8
- begin
9
- socket = server.accept_nonblock
10
- rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
11
- IO.select([server])
12
- retry
13
- end
14
- # AMQ::Protocol::Connection::Start.encode
@@ -1,4 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require "eventmachine"
4
- require_relative "../lib/amq/protocol.rb"