gooddata-bricks-poc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,9 +12,8 @@ require 'gooddata'
12
12
  require 'logger'
13
13
 
14
14
  require "gooddata/bricks/brick"
15
+ require 'pathname'
15
16
 
16
17
 
17
- FileUtils::cd "lib" do
18
- Dir.glob('gooddata/bricks/user/*.rb').each {|p| require p}
19
- Dir.glob('gooddata/bricks/middleware/*.rb').each {|p| require p}
20
- end
18
+ Gem.find_files("gooddata/bricks/middleware/*.rb").each { |path| require path }
19
+ Gem.find_files("gooddata/bricks/user/*.rb").each { |path| require path }
@@ -1,6 +1,12 @@
1
1
  module Gooddata
2
2
  module Bricks
3
3
 
4
+ class Pipeline
5
+ def self.prepare(pipeline)
6
+ pipeline.reverse.reduce(nil) {|memo, app| memo.nil? ? app.new : app.new(memo)}
7
+ end
8
+ end
9
+
4
10
  class Middleware
5
11
  def initialize(app)
6
12
  @app = app
@@ -1,5 +1,5 @@
1
1
  module Gooddata
2
2
  module Bricks
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata-bricks-poc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: 3603635754472092291
134
+ hash: 2041220054817083021
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: 3603635754472092291
143
+ hash: 2041220054817083021
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.25