waffle 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ .bundle
2
+ /vendor/bundle
3
+ Gemfile.lock
data/Gemfile CHANGED
@@ -1,15 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'rake'
4
-
5
- group :development, :test do
6
- gem 'pry'
7
- gem 'yajl-ruby', require: 'yajl'
8
- gem 'bunny'
9
- gem "hiredis", "~> 0.3.1", :platforms => :ruby
10
- gem "redis", "~> 2.2.0", require: RUBY_PLATFORM =~ /mingw|mswin/ ? 'redis' : ["redis/connection/hiredis", "redis"]
11
- end
12
-
13
- group :test do
14
- gem 'rspec'
15
- end
3
+ gemspec
data/README.md CHANGED
@@ -6,23 +6,26 @@ An abstract flow publisher and subscriber.
6
6
 
7
7
  It supports the following transports:
8
8
 
9
- - RabbitMQ.
10
- - Redis.
9
+ - RabbitMQ
10
+ - Redis
11
11
 
12
12
  ## Configuration
13
13
 
14
14
  Insert in your Gemfile:
15
15
 
16
+ gem 'bunny' # for RabbitMQ transport
17
+ gem 'hiredis' # for Redis transport
18
+ gem 'redis', require: ['redis', 'redis/connection/hiredis'] # for Redis transport
16
19
  gem 'waffle', :gem => 'git://github.com/undr/waffle.git'
17
20
 
18
- and create config file:
21
+ Create config file:
19
22
 
20
23
  production:
21
24
  transport: rabbitmq
22
25
  encoder: marshal
23
26
  url: amqp://anyhost.com:5678
24
27
 
25
- and load config file:
28
+ and load it:
26
29
 
27
30
  Waffle.configure(:path => 'config/waffle.yml')
28
31
 
@@ -1,13 +1,12 @@
1
1
  $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
2
2
  require 'rubygems'
3
- require 'bundler'
4
- environment = defined?(Rails) && Rails.respond_to?(:env) ? Rails.env : (ENV['RACK_ENV'] || 'development')
5
- Bundler.require :default, environment.to_sym
3
+ require 'bundler/setup'
6
4
  require 'waffle/version'
5
+ require 'multi_json'
7
6
  require 'time'
8
7
 
9
8
  module Waffle
10
- extend self
9
+ extend self
11
10
  module Transports
12
11
  autoload :Base, 'waffle/transports/base'
13
12
  autoload :Rabbitmq, 'waffle/transports/rabbitmq' if defined?(Bunny)
@@ -27,7 +26,7 @@ module Waffle
27
26
  end
28
27
 
29
28
  module Encoders
30
- autoload :Json, 'waffle/encoders/json' if defined?(Yajl)
29
+ autoload :Json, 'waffle/encoders/json'
31
30
  autoload :Marshal, 'waffle/encoders/marshal'
32
31
  end
33
32
 
@@ -1,15 +1,13 @@
1
- require 'yajl'
2
-
3
1
  module Waffle
4
2
  module Encoders
5
3
  module Json
6
4
  module_function
7
5
  def encode message
8
- Yajl::Encoder.encode(message)
6
+ ::MultiJson.encode(message)
9
7
  end
10
8
 
11
9
  def decode message
12
- Yajl::Parser.parse(message)
10
+ ::MultiJson.decode(message)
13
11
  end
14
12
  end
15
13
  end
@@ -1,3 +1,3 @@
1
1
  module Waffle
2
- VERSION = '0.5.1'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -1,7 +1,9 @@
1
1
  $LOAD_PATH.unshift File.expand_path("../..", __FILE__)
2
2
  ENV['RACK_ENV'] = 'test'
3
3
 
4
- require "rspec"
4
+ require 'rspec'
5
+ require 'redis'
6
+ require 'bunny'
5
7
  require 'waffle'
6
8
 
7
9
  RSpec.configure do |config|
@@ -47,7 +47,7 @@ describe Waffle do
47
47
  specify{Waffle.config.transport.should == 'redis'}
48
48
  end
49
49
  end
50
-
50
+
51
51
  context do
52
52
  before do
53
53
  Waffle.configure
@@ -1,11 +1,11 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
- require "waffle/version"
3
+ require 'waffle/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'waffle'
7
7
  s.version = Waffle::VERSION
8
- s.rubyforge_project = "waffle"
8
+ s.rubyforge_project = 'waffle'
9
9
 
10
10
  s.homepage = 'http://github.com/undr/waffle'
11
11
  s.authors = ['Alexander Lomakin', 'Andrey Lepeshkin']
@@ -15,5 +15,12 @@ Gem::Specification.new do |s|
15
15
  s.description = 'Abstract flow publisher and subscriber'
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
18
- s.add_dependency("rake")
18
+ s.add_runtime_dependency 'rake'
19
+ s.add_runtime_dependency 'multi_json'
20
+
21
+ s.add_development_dependency 'pry'
22
+ s.add_development_dependency 'bunny'
23
+ s.add_development_dependency 'hiredis'
24
+ s.add_development_dependency 'redis'
25
+ s.add_development_dependency 'rspec'
19
26
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waffle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
5
4
  prerelease:
5
+ version: 0.6.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alexander Lomakin
@@ -10,24 +10,120 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-08 00:00:00.000000000 Z
13
+ date: 2012-12-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ none: false
22
+ prerelease: false
16
23
  name: rake
17
24
  requirement: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ! '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0'
18
29
  none: false
30
+ type: :runtime
31
+ - !ruby/object:Gem::Dependency
32
+ version_requirements: !ruby/object:Gem::Requirement
19
33
  requirements:
20
34
  - - ! '>='
21
35
  - !ruby/object:Gem::Version
22
36
  version: '0'
37
+ none: false
38
+ prerelease: false
39
+ name: multi_json
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ none: false
23
46
  type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ none: false
24
54
  prerelease: false
55
+ name: pry
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ none: false
62
+ type: :development
63
+ - !ruby/object:Gem::Dependency
25
64
  version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
26
69
  none: false
70
+ prerelease: false
71
+ name: bunny
72
+ requirement: !ruby/object:Gem::Requirement
27
73
  requirements:
28
74
  - - ! '>='
29
75
  - !ruby/object:Gem::Version
30
76
  version: '0'
77
+ none: false
78
+ type: :development
79
+ - !ruby/object:Gem::Dependency
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ none: false
86
+ prerelease: false
87
+ name: hiredis
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ none: false
94
+ type: :development
95
+ - !ruby/object:Gem::Dependency
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ none: false
102
+ prerelease: false
103
+ name: redis
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ! '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ none: false
110
+ type: :development
111
+ - !ruby/object:Gem::Dependency
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ none: false
118
+ prerelease: false
119
+ name: rspec
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ none: false
126
+ type: :development
31
127
  description: Abstract flow publisher and subscriber
32
128
  email:
33
129
  - alexander.lomakin@gmail.com
@@ -36,11 +132,10 @@ executables: []
36
132
  extensions: []
37
133
  extra_rdoc_files: []
38
134
  files:
135
+ - .gitignore
39
136
  - .rspec
40
- - .rvmrc
41
137
  - .travis.yml
42
138
  - Gemfile
43
- - Gemfile.lock
44
139
  - README.md
45
140
  - Rakefile
46
141
  - config/config.rb
@@ -69,20 +164,23 @@ rdoc_options: []
69
164
  require_paths:
70
165
  - lib
71
166
  required_ruby_version: !ruby/object:Gem::Requirement
72
- none: false
73
167
  requirements:
74
168
  - - ! '>='
75
169
  - !ruby/object:Gem::Version
76
170
  version: '0'
77
171
  segments:
78
172
  - 0
79
- hash: 332701600399495824
80
- required_rubygems_version: !ruby/object:Gem::Requirement
173
+ hash: 2032572459978125397
81
174
  none: false
175
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
176
  requirements:
83
177
  - - ! '>='
84
178
  - !ruby/object:Gem::Version
85
179
  version: '0'
180
+ segments:
181
+ - 0
182
+ hash: 2032572459978125397
183
+ none: false
86
184
  requirements: []
87
185
  rubyforge_project: waffle
88
186
  rubygems_version: 1.8.24
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use ruby-1.9.3-p125@waffle --create
@@ -1,36 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- bunny (0.7.9)
5
- coderay (1.0.6)
6
- diff-lcs (1.1.3)
7
- hiredis (0.3.2)
8
- method_source (0.7.1)
9
- pry (0.9.9.6)
10
- coderay (~> 1.0.5)
11
- method_source (~> 0.7.1)
12
- slop (>= 2.4.4, < 3)
13
- rake (0.9.2.2)
14
- redis (2.2.2)
15
- rspec (2.10.0)
16
- rspec-core (~> 2.10.0)
17
- rspec-expectations (~> 2.10.0)
18
- rspec-mocks (~> 2.10.0)
19
- rspec-core (2.10.1)
20
- rspec-expectations (2.10.0)
21
- diff-lcs (~> 1.1.3)
22
- rspec-mocks (2.10.1)
23
- slop (2.4.4)
24
- yajl-ruby (1.1.0)
25
-
26
- PLATFORMS
27
- ruby
28
-
29
- DEPENDENCIES
30
- bunny
31
- hiredis (~> 0.3.1)
32
- pry
33
- rake
34
- redis (~> 2.2.0)
35
- rspec
36
- yajl-ruby