oni 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTRkYjE1M2NkYjFkZjRjNzliMTRlNzMyNzgxYTY4ZGM4MjMwNWI2MA==
5
- data.tar.gz: !binary |-
6
- YzAwOWVlYzI1NDg3Y2ZhMzNlOWRhZmMxYTYyNTcwNzIyZTdjZGJhZg==
2
+ SHA1:
3
+ metadata.gz: 496b21105a465b6ad75b69b7dc1e9162bac470c7
4
+ data.tar.gz: 1b57098cd64f7ea40f0a805958a3142d5b066a33
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGI3ODc5Mzc3MGRjOTRiNDAzYTJkNzM2M2UzYTYxMmY4N2VlODBkMzEwNWNj
10
- MTRiYzM3N2QzODg5OGJlZjZjNmYzNWJjNWEyMGM1N2VlZWE2ZDJlNjc4Yjg5
11
- YmRkNjE4ZDJlNTk2YTM5MjU4NGQ0YjJhNjk0ZmYxNmFkMGJlZTg=
12
- data.tar.gz: !binary |-
13
- M2E2NTZmZjY3MDI3OTA2ZDQ2ZjkzN2I0NmY3Mjg5MGI5NDdiYmVhNGY2NmNj
14
- MjRiOGY1MGEzODY0MzYwNzNkMDc4ZmMyNTBhMzY2MTE3YjkwMWU2MTQ0MThi
15
- Yjc0YzAyZDAwNWQ3Y2JlZjhiOWY0MTNmMTY5ZDhhMmE2OGJkNmY=
6
+ metadata.gz: b6d009276db8c4eb6ed65df8cc82077b1083c87062781937aa427f075b7915824d65078aeb7cca9c1a96be3fbbf203dc6db34a0678cfd1a1c4ec41e9459c4446
7
+ data.tar.gz: 372078703c73e14fb5c226049bc87930821713dff25f9df4c05a10edcaa2cfa51cc3b8b4f6c3d61765d00fcfd490aabeda106a0b875731e4ab6ae55322fe326a
@@ -3,12 +3,10 @@ script: bundle exec rake
3
3
 
4
4
  rvm:
5
5
  - 1.9.3
6
- - 2.0.0
7
- - 2.1.0-preview1
6
+ - 2.0
7
+ - 2.1
8
8
  - jruby
9
- - jruby-head
10
- - jruby-1.7.4
11
- - rbx-2.2.1
9
+ - rbx-2.2
12
10
 
13
11
  notifications:
14
12
  email:
data/Gemfile CHANGED
@@ -1,7 +1,3 @@
1
1
  source 'https://rubygems.org/'
2
2
 
3
3
  gemspec
4
-
5
- group :testing do
6
- gem 'rubysl', :platform => :rbx
7
- end
data/README.md CHANGED
@@ -124,19 +124,37 @@ Basic usage of Oni is as following:
124
124
 
125
125
  require 'oni'
126
126
 
127
- class MyWorker < Oni::Worker
128
- def initialize(number)
129
- @number = number
127
+ # This example defines 3 classes: MyDaemon, MyMapper and MyWorker.
128
+ # Combined they form the basic structure of an Oni Daemon.
129
+
130
+ class MyDaemon < Oni::Daemon
131
+ set :mapper, MyMapper
132
+ set :worker, MyWorker
133
+
134
+ # Here you'd receive your message, e.g. from a queue. We'll use static
135
+ # data as an example.
136
+ def receive
137
+ yield({:number => 10})
130
138
  end
131
139
 
132
- def process
133
- return @number * 2
140
+ # This would get executed upon completion of a job.
141
+ def complete(message, result, timings)
142
+ puts result
134
143
  end
135
144
  end
136
145
 
137
146
  class MyMapper < Oni::Mapper
147
+ # Map the input given by MyDaemon#receive into the right arguments
148
+ # for MyWorker#initialize.
149
+ #
150
+ # NOTE: the return value should be an Array.
151
+ # Oni calls #to_a on the output (more specifically we use a splat) so your
152
+ # return value should be an Array. If you do not return an Array you risk
153
+ # that the object you return will wrongfully be converted into an Array.
154
+ # This is painful when it comes to Hashes, which, after the #to_a call
155
+ # will be converted into arrays of values in stead of your intended hash.
138
156
  def map_input(input)
139
- return input[:number]
157
+ return [input[:number]]
140
158
  end
141
159
 
142
160
  def map_output(output)
@@ -144,19 +162,13 @@ Basic usage of Oni is as following:
144
162
  end
145
163
  end
146
164
 
147
- class MyDaemon < Oni::Daemon
148
- set :mapper, MyMapper
149
- set :worker, MyWorker
150
-
151
- # Here you'd receive your message, e.g. from a queue. We'll use static
152
- # data as an example.
153
- def receive
154
- yield({:number => 10})
165
+ class MyWorker < Oni::Worker
166
+ def initialize(number)
167
+ @number = number
155
168
  end
156
169
 
157
- # This would get executed upon completion of a job.
158
- def complete(message, result, timings)
159
- puts result
170
+ def process
171
+ return @number * 2
160
172
  end
161
173
  end
162
174
 
data/Rakefile CHANGED
@@ -2,7 +2,6 @@ require_relative 'lib/oni/version'
2
2
 
3
3
  require 'rake/clean'
4
4
  require 'bundler/gem_tasks'
5
- require 'ci/reporter/rake/rspec'
6
5
 
7
6
  CLEAN.include('coverage', 'yardoc')
8
7
 
@@ -1,6 +1,11 @@
1
1
  # @title Changelog
2
2
  # Changelog
3
3
 
4
+ ## 3.1.1 - February 20th, 2015
5
+
6
+ Oni now depends on version 1 of the AWS SDK (`aws-sdk-v1`) due to the `aws-sdk`
7
+ now installing version 2 (which is not compatible).
8
+
4
9
  ## 3.1.0 - December 17th, 2013
5
10
 
6
11
  Added the `Oni::WrappedError` class that can be used to wrap existing error
@@ -1,4 +1,4 @@
1
- require 'aws-sdk'
1
+ require 'aws-sdk-v1'
2
2
 
3
3
  module Oni
4
4
  module Daemons
@@ -1,3 +1,3 @@
1
1
  module Oni
2
- VERSION = '3.1.0'
2
+ VERSION = '3.1.1'
3
3
  end # Oni
@@ -18,7 +18,7 @@ module Oni
18
18
  #
19
19
  # @param [StandardError] error
20
20
  # @param [Mixed] parameters
21
- # @return [FeedbackDaemon::WorkerError]
21
+ # @return [Oni::WrappedError]
22
22
  #
23
23
  def self.from(error, parameters = nil)
24
24
  return new(
@@ -21,10 +21,9 @@ Gem::Specification.new do |gem|
21
21
 
22
22
  gem.add_development_dependency 'rake'
23
23
  gem.add_development_dependency 'bundler'
24
- gem.add_development_dependency 'rspec'
24
+ gem.add_development_dependency 'rspec', '~> 3.0'
25
25
  gem.add_development_dependency 'yard'
26
26
  gem.add_development_dependency 'simplecov'
27
27
  gem.add_development_dependency 'kramdown'
28
- gem.add_development_dependency 'ci_reporter'
29
- gem.add_development_dependency 'aws-sdk'
28
+ gem.add_development_dependency 'aws-sdk-v1'
30
29
  end
@@ -5,4 +5,12 @@ require_relative '../lib/oni'
5
5
 
6
6
  RSpec.configure do |config|
7
7
  config.color = true
8
+
9
+ config.expect_with :rspec do |c|
10
+ c.syntax = [:should, :expect]
11
+ end
12
+
13
+ config.mock_with :rspec do |c|
14
+ c.syntax = [:should, :expect]
15
+ end
8
16
  end
@@ -1,2 +1,2 @@
1
1
  desc 'Runs all the tests for Jenkins'
2
- task :jenkins => ['ci:setup:rspec', 'test']
2
+ task :jenkins => ['test']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oni
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yorick Peterse
@@ -9,118 +9,104 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-17 00:00:00.000000000 Z
12
+ date: 2015-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ! '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: '3.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: yard
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ! '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: simplecov
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ! '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ! '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: kramdown
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ! '>='
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ! '>='
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: ci_reporter
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ! '>='
88
+ - - ">="
103
89
  - !ruby/object:Gem::Version
104
90
  version: '0'
105
91
  type: :development
106
92
  prerelease: false
107
93
  version_requirements: !ruby/object:Gem::Requirement
108
94
  requirements:
109
- - - ! '>='
95
+ - - ">="
110
96
  - !ruby/object:Gem::Version
111
97
  version: '0'
112
98
  - !ruby/object:Gem::Dependency
113
- name: aws-sdk
99
+ name: aws-sdk-v1
114
100
  requirement: !ruby/object:Gem::Requirement
115
101
  requirements:
116
- - - ! '>='
102
+ - - ">="
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
108
  requirements:
123
- - - ! '>='
109
+ - - ">="
124
110
  - !ruby/object:Gem::Version
125
111
  version: '0'
126
112
  description: Framework for building concurrent daemons in Ruby.
@@ -129,9 +115,9 @@ executables: []
129
115
  extensions: []
130
116
  extra_rdoc_files: []
131
117
  files:
132
- - .gitignore
133
- - .travis.yml
134
- - .yardopts
118
+ - ".gitignore"
119
+ - ".travis.yml"
120
+ - ".yardopts"
135
121
  - Gemfile
136
122
  - LICENSE
137
123
  - README.md
@@ -172,17 +158,17 @@ require_paths:
172
158
  - lib
173
159
  required_ruby_version: !ruby/object:Gem::Requirement
174
160
  requirements:
175
- - - ! '>='
161
+ - - ">="
176
162
  - !ruby/object:Gem::Version
177
163
  version: 1.9.3
178
164
  required_rubygems_version: !ruby/object:Gem::Requirement
179
165
  requirements:
180
- - - ! '>='
166
+ - - ">="
181
167
  - !ruby/object:Gem::Version
182
168
  version: '0'
183
169
  requirements: []
184
170
  rubyforge_project:
185
- rubygems_version: 2.1.2
171
+ rubygems_version: 2.4.5
186
172
  signing_key:
187
173
  specification_version: 4
188
174
  summary: Framework for building concurrent daemons in Ruby.