adavidev_batch_api 0.2.1.pre.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +30 -0
  4. data/changelog.md +60 -0
  5. data/lib/adavidev_batch_api.rb +28 -0
  6. data/lib/batch_api/batch_error.rb +41 -0
  7. data/lib/batch_api/configuration.rb +36 -0
  8. data/lib/batch_api/error_wrapper.rb +44 -0
  9. data/lib/batch_api/internal_middleware/decode_json_body.rb +24 -0
  10. data/lib/batch_api/internal_middleware/response_filter.rb +27 -0
  11. data/lib/batch_api/internal_middleware.rb +87 -0
  12. data/lib/batch_api/operation/rack.rb +74 -0
  13. data/lib/batch_api/operation/rails.rb +42 -0
  14. data/lib/batch_api/operation.rb +2 -0
  15. data/lib/batch_api/processor/executor.rb +18 -0
  16. data/lib/batch_api/processor/sequential.rb +29 -0
  17. data/lib/batch_api/processor.rb +114 -0
  18. data/lib/batch_api/rack_middleware.rb +37 -0
  19. data/lib/batch_api/response.rb +38 -0
  20. data/lib/batch_api/utils.rb +17 -0
  21. data/lib/batch_api/version.rb +3 -0
  22. data/lib/batch_api.rb +28 -0
  23. data/lib/tasks/batch_api_tasks.rake +4 -0
  24. data/readme.md +243 -0
  25. data/spec/dummy/README.rdoc +261 -0
  26. data/spec/dummy/Rakefile +15 -0
  27. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  28. data/spec/dummy/app/assets/javascripts/endpoints.js +2 -0
  29. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  30. data/spec/dummy/app/assets/stylesheets/endpoints.css +4 -0
  31. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  32. data/spec/dummy/app/controllers/endpoints_controller.rb +36 -0
  33. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  34. data/spec/dummy/app/helpers/endpoints_helper.rb +2 -0
  35. data/spec/dummy/app/views/endpoints/get.html.erb +2 -0
  36. data/spec/dummy/app/views/endpoints/post.html.erb +2 -0
  37. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  38. data/spec/dummy/config/application.rb +63 -0
  39. data/spec/dummy/config/boot.rb +10 -0
  40. data/spec/dummy/config/database.yml +25 -0
  41. data/spec/dummy/config/environment.rb +5 -0
  42. data/spec/dummy/config/environments/development.rb +37 -0
  43. data/spec/dummy/config/environments/production.rb +67 -0
  44. data/spec/dummy/config/environments/test.rb +37 -0
  45. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  46. data/spec/dummy/config/initializers/inflections.rb +15 -0
  47. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  48. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  49. data/spec/dummy/config/initializers/session_store.rb +8 -0
  50. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  51. data/spec/dummy/config/locales/en.yml +5 -0
  52. data/spec/dummy/config/routes.rb +64 -0
  53. data/spec/dummy/config.ru +4 -0
  54. data/spec/dummy/db/test.sqlite3 +0 -0
  55. data/spec/dummy/public/404.html +26 -0
  56. data/spec/dummy/public/422.html +26 -0
  57. data/spec/dummy/public/500.html +25 -0
  58. data/spec/dummy/public/favicon.ico +0 -0
  59. data/spec/dummy/script/rails +6 -0
  60. data/spec/dummy/test/functional/endpoints_controller_test.rb +14 -0
  61. data/spec/dummy/test/unit/helpers/endpoints_helper_test.rb +4 -0
  62. data/spec/integration/rails_spec.rb +10 -0
  63. data/spec/integration/shared_examples.rb +267 -0
  64. data/spec/integration/sinatra_integration_spec.rb +14 -0
  65. data/spec/lib/batch_api_spec.rb +20 -0
  66. data/spec/lib/batch_error_spec.rb +23 -0
  67. data/spec/lib/configuration_spec.rb +30 -0
  68. data/spec/lib/error_wrapper_spec.rb +68 -0
  69. data/spec/lib/internal_middleware/decode_json_body_spec.rb +37 -0
  70. data/spec/lib/internal_middleware/response_filter_spec.rb +61 -0
  71. data/spec/lib/internal_middleware_spec.rb +91 -0
  72. data/spec/lib/operation/rack_spec.rb +240 -0
  73. data/spec/lib/operation/rails_spec.rb +100 -0
  74. data/spec/lib/processor/executor_spec.rb +22 -0
  75. data/spec/lib/processor/sequential_spec.rb +39 -0
  76. data/spec/lib/processor_spec.rb +134 -0
  77. data/spec/lib/rack_middleware_spec.rb +103 -0
  78. data/spec/lib/response_spec.rb +53 -0
  79. data/spec/spec_helper.rb +28 -0
  80. data/spec/support/sinatra_app.rb +54 -0
  81. metadata +264 -0
@@ -0,0 +1,134 @@
1
+ require 'spec_helper'
2
+
3
+ describe BatchApi::Processor do
4
+
5
+ let(:ops) { [ {"url" => "/endpoint", "method" => "get"} ] }
6
+ let(:options) { { "sequential" => true } }
7
+ let(:env) { {
8
+ "CONTENT_TYPE"=>"application/x-www-form-urlencoded",
9
+ "GATEWAY_INTERFACE"=>"CGI/1.1",
10
+ "PATH_INFO"=>"/foo",
11
+ "QUERY_STRING"=>"",
12
+ "REMOTE_ADDR"=>"127.0.0.1",
13
+ "REMOTE_HOST"=>"1035.spotilocal.com",
14
+ "REQUEST_METHOD"=>"REPORT",
15
+ "REQUEST_URI"=>"http://localhost:3000/batch",
16
+ "SCRIPT_NAME"=>"",
17
+ "rack.input" => StringIO.new,
18
+ "rack.errors" => StringIO.new,
19
+ "SERVER_NAME"=>"localhost",
20
+ "SERVER_PORT"=>"3000",
21
+ "SERVER_PROTOCOL"=>"HTTP/1.1",
22
+ "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)",
23
+ "HTTP_USER_AGENT"=>"curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21",
24
+ "HTTP_HOST"=>"localhost:3000"
25
+ } }
26
+
27
+ let(:request) {
28
+ Rack::Request.new(env).tap do |r|
29
+ r.stub(:params).and_return({}.merge("ops" => ops).merge(options))
30
+ end
31
+ }
32
+ let(:app) { stub("application", call: [200, {}, ["foo"]]) }
33
+ let(:processor) { BatchApi::Processor.new(request, app) }
34
+
35
+ describe "#initialize" do
36
+ # this may be brittle...consider refactoring?
37
+ it "turns the ops params into processed operations at #ops" do
38
+ # simulate receiving several operations
39
+ klass = stub("op class")
40
+ BatchApi::Processor.stub(:operation_klass).and_return(klass)
41
+ operation_objects = 3.times.collect { stub("operation object") }
42
+ operation_params = 3.times.collect do |i|
43
+ stub("raw operation").tap do |o|
44
+ klass.should_receive(:new)
45
+ .with(o, env, app).and_return(operation_objects[i])
46
+ end
47
+ end
48
+
49
+ request.params["ops"] = operation_params
50
+ BatchApi::Processor.new(request, app).ops.should == operation_objects
51
+ end
52
+
53
+ it "makes the options available" do
54
+ BatchApi::Processor.new(request, app).options.should == options
55
+ end
56
+
57
+ it "makes the app available" do
58
+ BatchApi::Processor.new(request, app).app.should == app
59
+ end
60
+
61
+ context "error conditions" do
62
+ it "(currently) throws an error if sequential is not true" do
63
+ request.params.delete("sequential")
64
+ expect {
65
+ BatchApi::Processor.new(request, app)
66
+ }.to raise_exception(BatchApi::Errors::BadOptionError)
67
+ end
68
+
69
+ it "raise a OperationLimitExceeded error if too many ops provided" do
70
+ ops = (BatchApi.config.limit + 1).to_i.times.collect {|i| i}
71
+ request.params["ops"] = ops
72
+ expect {
73
+ BatchApi::Processor.new(request, app)
74
+ }.to raise_exception(BatchApi::Errors::OperationLimitExceeded)
75
+ end
76
+
77
+ it "raises a NoOperationError if operations.blank?" do
78
+ request.params["ops"] = nil
79
+ expect {
80
+ BatchApi::Processor.new(request, app)
81
+ }.to raise_exception(BatchApi::Errors::NoOperationsError)
82
+ request.params["ops"] = []
83
+ expect {
84
+ BatchApi::Processor.new(request, app)
85
+ }.to raise_exception(BatchApi::Errors::NoOperationsError)
86
+ end
87
+ end
88
+ end
89
+
90
+ describe "#strategy" do
91
+ it "returns BatchApi::Processor::Sequential" do
92
+ processor.strategy.should == BatchApi::Processor::Sequential
93
+ end
94
+ end
95
+
96
+ describe "#execute!" do
97
+ let(:result) { stub("result") }
98
+ let(:stack) { stub("stack", call: result) }
99
+ let(:middleware_env) { {
100
+ ops: processor.ops, # the processed Operation objects
101
+ rack_env: env,
102
+ rack_app: app,
103
+ options: options
104
+ } }
105
+
106
+ before :each do
107
+ BatchApi::InternalMiddleware.stub(:batch_stack).and_return(stack)
108
+ end
109
+
110
+ it "calls an internal middleware stacks with the appropriate data" do
111
+ stack.should_receive(:call).with(middleware_env)
112
+ processor.execute!
113
+ end
114
+
115
+ it "returns the formatted result of the strategy" do
116
+ stack.stub(:call).and_return(stubby = stub)
117
+ processor.execute!["results"].should == stubby
118
+ end
119
+ end
120
+
121
+ describe ".operation_klass" do
122
+ it "returns BatchApi::Operation::Rack if !Rails" do
123
+ BatchApi.stub(:rails?).and_return(false)
124
+ BatchApi::Processor.operation_klass.should ==
125
+ BatchApi::Operation::Rack
126
+ end
127
+
128
+ it "returns BatchApi::Operation::Rails if Rails" do
129
+ BatchApi.stub(:rails?).and_return(true)
130
+ BatchApi::Processor.operation_klass.should ==
131
+ BatchApi::Operation::Rails
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,103 @@
1
+ require 'spec_helper'
2
+
3
+ describe BatchApi::RackMiddleware do
4
+ describe "#initialize" do
5
+ it "allows access to the BatchApi configuration" do
6
+ limit = rand * 100
7
+ middleware = BatchApi::RackMiddleware.new(stub("app")) do |conf|
8
+ conf.limit = limit
9
+ end
10
+ BatchApi.config.limit.should == limit
11
+ end
12
+ end
13
+
14
+ describe "#call" do
15
+ let(:endpoint) { "/foo/bar" }
16
+ let(:verb) { "run" }
17
+ let(:app) { stub("app") }
18
+
19
+ let(:middleware) {
20
+ BatchApi::RackMiddleware.new(app) do |conf|
21
+ conf.endpoint = endpoint
22
+ conf.verb = verb
23
+ end
24
+ }
25
+
26
+ context "if it's a batch call" do
27
+ let(:env) { {
28
+ "PATH_INFO" => endpoint,
29
+ "REQUEST_METHOD" => verb.upcase,
30
+ # other stuff
31
+ "CONTENT_TYPE"=>"application/x-www-form-urlencoded",
32
+ "GATEWAY_INTERFACE"=>"CGI/1.1",
33
+ "QUERY_STRING"=>"",
34
+ "REMOTE_ADDR"=>"127.0.0.1",
35
+ "REMOTE_HOST"=>"1035.spotilocal.com",
36
+ "REQUEST_URI"=>"http://localhost:3000/batch",
37
+ "SCRIPT_NAME"=>"",
38
+ "rack.input" => StringIO.new,
39
+ "rack.errors" => StringIO.new,
40
+ "SERVER_NAME"=>"localhost",
41
+ "SERVER_PORT"=>"3000",
42
+ "SERVER_PROTOCOL"=>"HTTP/1.1",
43
+ "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)",
44
+ "HTTP_USER_AGENT"=>"curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5",
45
+ "HTTP_HOST"=>"localhost:3000"
46
+ } }
47
+
48
+ let(:request) { Rack::Request.new(env) }
49
+ let(:result) { {a: 2, b: {c: 3}} }
50
+ let(:processor) { stub("processor", :execute! => result) }
51
+
52
+ before :each do
53
+ BatchApi::Processor.stub(:new).and_return(processor)
54
+ end
55
+
56
+ it "processes the batch request" do
57
+ Rack::Request.stub(:new).with(env).and_return(request)
58
+ BatchApi::Processor.should_receive(:new).with(request, app).and_return(processor)
59
+ middleware.call(env)
60
+ end
61
+
62
+ context "for a successful set of calls" do
63
+ it "returns the JSON-encoded result as the body" do
64
+ output = middleware.call(env)
65
+ output[2].should == [MultiJson.dump(result)]
66
+ end
67
+
68
+ it "returns a 200" do
69
+ middleware.call(env)[0].should == 200
70
+ end
71
+
72
+ it "sets the content type" do
73
+ middleware.call(env)[1].should include("Content-Type" => "application/json")
74
+ end
75
+ end
76
+
77
+ context "for BatchApi errors" do
78
+ it "returns a rendered ErrorWrapper" do
79
+ err, result = StandardError.new, stub
80
+ error = stub("error object", render: result)
81
+ BatchApi::Processor.stub(:new).and_raise(err)
82
+ BatchApi::ErrorWrapper.should_receive(:new).with(err).and_return(
83
+ error
84
+ )
85
+ middleware.call(env).should == result
86
+ end
87
+ end
88
+ end
89
+
90
+ context "if it's not a batch request" do
91
+ let(:env) { {
92
+ "PATH_INFO" => "/not/batch",
93
+ "REQUEST_METHOD" => verb.upcase
94
+ } }
95
+
96
+ it "just calls the app onward and returns the result" do
97
+ output = stub("output")
98
+ app.should_receive(:call).with(env).and_return(output)
99
+ middleware.call(env)
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+ require 'batch_api/response'
3
+
4
+ describe BatchApi::Response do
5
+
6
+ let(:raw_response) { [200, {}, ["ab", "cd", "ef"]] }
7
+ let(:response) { BatchApi::Response.new(raw_response) }
8
+
9
+ [:status, :body, :headers].each do |attr|
10
+ local_attr = attr
11
+ it "has an accessor for #{local_attr}" do
12
+ response.should respond_to(local_attr)
13
+ end
14
+ end
15
+
16
+ describe "#initialize" do
17
+ it "sets status to the HTTP status code" do
18
+ response.status.should == raw_response.first
19
+ end
20
+
21
+ it "sets body to the HTTP body turned into a string" do
22
+ response.body.should == raw_response[2].join
23
+ end
24
+
25
+ it "sets headers to the HTTP headers" do
26
+ response.headers.should == raw_response[1]
27
+ end
28
+ end
29
+
30
+ describe "#as_json" do
31
+ it "creates the expected hash" do
32
+ response.as_json.should == {
33
+ body: response.body,
34
+ status: response.status,
35
+ headers: response.headers
36
+ }
37
+ end
38
+
39
+ it "accepts options" do
40
+ response.as_json(foo: :bar).should_not be_nil
41
+ end
42
+
43
+ it "leaves out items that are blank" do
44
+ response.status = response.body = nil
45
+ response.as_json.should == {headers: raw_response[1]}
46
+ end
47
+
48
+ it "includes items that are false" do
49
+ response.body = false
50
+ response.as_json[:body].should == false
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,28 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+ require 'rspec/rails'
7
+ require 'faker'
8
+ require 'timecop'
9
+
10
+ Rails.backtrace_cleaner.remove_silencers!
11
+
12
+ # Load support files
13
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
14
+
15
+ # Load fixtures from the engine
16
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
17
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
18
+ end
19
+
20
+ RSpec.configure do |config|
21
+ config.before :each do
22
+ BatchApi.config.limit = 20
23
+ BatchApi.config.endpoint = "/batch"
24
+ BatchApi.config.verb = :post
25
+
26
+ BatchApi.stub(:rails?).and_return(false)
27
+ end
28
+ end
@@ -0,0 +1,54 @@
1
+ require 'sinatra/base'
2
+ require 'rack/contrib'
3
+
4
+ class SinatraApp < Sinatra::Base
5
+ use Rack::PostBodyContentTypeParser
6
+ use BatchApi::RackMiddleware
7
+
8
+ get "/endpoint" do
9
+ headers["GET"] = "hello"
10
+ # including this in the body would mess the body up
11
+ # due to the other headers inserted
12
+ headers["REQUEST_HEADERS"] = header_output
13
+ content_type :json
14
+
15
+ status 422
16
+ {
17
+ result: "GET OK",
18
+ params: params.except(:endpoint)
19
+ }.to_json
20
+ end
21
+
22
+ get "/endpoint/capture/:captured" do
23
+ content_type :json
24
+ {result: params[:captured]}.to_json
25
+ end
26
+
27
+ post "/endpoint" do
28
+ headers["POST"] = "guten tag"
29
+ headers["REQUEST_HEADERS"] = header_output
30
+ content_type :json
31
+ status 203
32
+ {
33
+ result: "POST OK",
34
+ params: params.except(:endpoint)
35
+ }.to_json
36
+ end
37
+
38
+ get "/endpoint/error" do
39
+ raise StandardError
40
+ end
41
+
42
+ private
43
+
44
+ def header_output
45
+ # we only want the headers that were sent by the client
46
+ # headers in sinatra are just read directly from env
47
+ # env has a ton of additional information we don't want
48
+ # and that reference the request itself, causing an infinite loop
49
+ env.inject({}) do |h, (k, v)|
50
+ h.tap {|hash| hash[k.to_s] = v.to_s if k =~ /HTTP_/}
51
+ end
52
+ end
53
+ end
54
+
metadata ADDED
@@ -0,0 +1,264 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adavidev_batch_api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1.pre.2
5
+ platform: ruby
6
+ authors:
7
+ - Alex Koppel
8
+ - Alan Davis
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-02-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: middleware
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '3.2'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '3.2'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec-rails
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: sqlite3
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rack-contrib
86
+ requirement: !ruby/object:Gem::Requirement
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
+ description: A Batch API plugin that provides a RESTful syntax, allowing clients to
99
+ make any number of REST calls with a single HTTP request. This is a fork of arsduo/batch_api
100
+ email:
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - MIT-LICENSE
106
+ - Rakefile
107
+ - changelog.md
108
+ - lib/adavidev_batch_api.rb
109
+ - lib/batch_api.rb
110
+ - lib/batch_api/batch_error.rb
111
+ - lib/batch_api/configuration.rb
112
+ - lib/batch_api/error_wrapper.rb
113
+ - lib/batch_api/internal_middleware.rb
114
+ - lib/batch_api/internal_middleware/decode_json_body.rb
115
+ - lib/batch_api/internal_middleware/response_filter.rb
116
+ - lib/batch_api/operation.rb
117
+ - lib/batch_api/operation/rack.rb
118
+ - lib/batch_api/operation/rails.rb
119
+ - lib/batch_api/processor.rb
120
+ - lib/batch_api/processor/executor.rb
121
+ - lib/batch_api/processor/sequential.rb
122
+ - lib/batch_api/rack_middleware.rb
123
+ - lib/batch_api/response.rb
124
+ - lib/batch_api/utils.rb
125
+ - lib/batch_api/version.rb
126
+ - lib/tasks/batch_api_tasks.rake
127
+ - readme.md
128
+ - spec/dummy/README.rdoc
129
+ - spec/dummy/Rakefile
130
+ - spec/dummy/app/assets/javascripts/application.js
131
+ - spec/dummy/app/assets/javascripts/endpoints.js
132
+ - spec/dummy/app/assets/stylesheets/application.css
133
+ - spec/dummy/app/assets/stylesheets/endpoints.css
134
+ - spec/dummy/app/controllers/application_controller.rb
135
+ - spec/dummy/app/controllers/endpoints_controller.rb
136
+ - spec/dummy/app/helpers/application_helper.rb
137
+ - spec/dummy/app/helpers/endpoints_helper.rb
138
+ - spec/dummy/app/views/endpoints/get.html.erb
139
+ - spec/dummy/app/views/endpoints/post.html.erb
140
+ - spec/dummy/app/views/layouts/application.html.erb
141
+ - spec/dummy/config.ru
142
+ - spec/dummy/config/application.rb
143
+ - spec/dummy/config/boot.rb
144
+ - spec/dummy/config/database.yml
145
+ - spec/dummy/config/environment.rb
146
+ - spec/dummy/config/environments/development.rb
147
+ - spec/dummy/config/environments/production.rb
148
+ - spec/dummy/config/environments/test.rb
149
+ - spec/dummy/config/initializers/backtrace_silencers.rb
150
+ - spec/dummy/config/initializers/inflections.rb
151
+ - spec/dummy/config/initializers/mime_types.rb
152
+ - spec/dummy/config/initializers/secret_token.rb
153
+ - spec/dummy/config/initializers/session_store.rb
154
+ - spec/dummy/config/initializers/wrap_parameters.rb
155
+ - spec/dummy/config/locales/en.yml
156
+ - spec/dummy/config/routes.rb
157
+ - spec/dummy/db/test.sqlite3
158
+ - spec/dummy/public/404.html
159
+ - spec/dummy/public/422.html
160
+ - spec/dummy/public/500.html
161
+ - spec/dummy/public/favicon.ico
162
+ - spec/dummy/script/rails
163
+ - spec/dummy/test/functional/endpoints_controller_test.rb
164
+ - spec/dummy/test/unit/helpers/endpoints_helper_test.rb
165
+ - spec/integration/rails_spec.rb
166
+ - spec/integration/shared_examples.rb
167
+ - spec/integration/sinatra_integration_spec.rb
168
+ - spec/lib/batch_api_spec.rb
169
+ - spec/lib/batch_error_spec.rb
170
+ - spec/lib/configuration_spec.rb
171
+ - spec/lib/error_wrapper_spec.rb
172
+ - spec/lib/internal_middleware/decode_json_body_spec.rb
173
+ - spec/lib/internal_middleware/response_filter_spec.rb
174
+ - spec/lib/internal_middleware_spec.rb
175
+ - spec/lib/operation/rack_spec.rb
176
+ - spec/lib/operation/rails_spec.rb
177
+ - spec/lib/processor/executor_spec.rb
178
+ - spec/lib/processor/sequential_spec.rb
179
+ - spec/lib/processor_spec.rb
180
+ - spec/lib/rack_middleware_spec.rb
181
+ - spec/lib/response_spec.rb
182
+ - spec/spec_helper.rb
183
+ - spec/support/sinatra_app.rb
184
+ homepage: http://github.com/adavidev/batch_api
185
+ licenses: []
186
+ metadata: {}
187
+ post_install_message:
188
+ rdoc_options: []
189
+ require_paths:
190
+ - lib
191
+ required_ruby_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ required_rubygems_version: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">"
199
+ - !ruby/object:Gem::Version
200
+ version: 1.3.1
201
+ requirements: []
202
+ rubyforge_project:
203
+ rubygems_version: 2.4.1
204
+ signing_key:
205
+ specification_version: 4
206
+ summary: A RESTful Batch API for Rails
207
+ test_files:
208
+ - spec/dummy/app/assets/javascripts/application.js
209
+ - spec/dummy/app/assets/javascripts/endpoints.js
210
+ - spec/dummy/app/assets/stylesheets/application.css
211
+ - spec/dummy/app/assets/stylesheets/endpoints.css
212
+ - spec/dummy/app/controllers/application_controller.rb
213
+ - spec/dummy/app/controllers/endpoints_controller.rb
214
+ - spec/dummy/app/helpers/application_helper.rb
215
+ - spec/dummy/app/helpers/endpoints_helper.rb
216
+ - spec/dummy/app/views/endpoints/get.html.erb
217
+ - spec/dummy/app/views/endpoints/post.html.erb
218
+ - spec/dummy/app/views/layouts/application.html.erb
219
+ - spec/dummy/config/application.rb
220
+ - spec/dummy/config/boot.rb
221
+ - spec/dummy/config/database.yml
222
+ - spec/dummy/config/environment.rb
223
+ - spec/dummy/config/environments/development.rb
224
+ - spec/dummy/config/environments/production.rb
225
+ - spec/dummy/config/environments/test.rb
226
+ - spec/dummy/config/initializers/backtrace_silencers.rb
227
+ - spec/dummy/config/initializers/inflections.rb
228
+ - spec/dummy/config/initializers/mime_types.rb
229
+ - spec/dummy/config/initializers/secret_token.rb
230
+ - spec/dummy/config/initializers/session_store.rb
231
+ - spec/dummy/config/initializers/wrap_parameters.rb
232
+ - spec/dummy/config/locales/en.yml
233
+ - spec/dummy/config/routes.rb
234
+ - spec/dummy/config.ru
235
+ - spec/dummy/db/test.sqlite3
236
+ - spec/dummy/public/404.html
237
+ - spec/dummy/public/422.html
238
+ - spec/dummy/public/500.html
239
+ - spec/dummy/public/favicon.ico
240
+ - spec/dummy/Rakefile
241
+ - spec/dummy/README.rdoc
242
+ - spec/dummy/script/rails
243
+ - spec/dummy/test/functional/endpoints_controller_test.rb
244
+ - spec/dummy/test/unit/helpers/endpoints_helper_test.rb
245
+ - spec/integration/rails_spec.rb
246
+ - spec/integration/shared_examples.rb
247
+ - spec/integration/sinatra_integration_spec.rb
248
+ - spec/lib/batch_api_spec.rb
249
+ - spec/lib/batch_error_spec.rb
250
+ - spec/lib/configuration_spec.rb
251
+ - spec/lib/error_wrapper_spec.rb
252
+ - spec/lib/internal_middleware/decode_json_body_spec.rb
253
+ - spec/lib/internal_middleware/response_filter_spec.rb
254
+ - spec/lib/internal_middleware_spec.rb
255
+ - spec/lib/operation/rack_spec.rb
256
+ - spec/lib/operation/rails_spec.rb
257
+ - spec/lib/processor/executor_spec.rb
258
+ - spec/lib/processor/sequential_spec.rb
259
+ - spec/lib/processor_spec.rb
260
+ - spec/lib/rack_middleware_spec.rb
261
+ - spec/lib/response_spec.rb
262
+ - spec/spec_helper.rb
263
+ - spec/support/sinatra_app.rb
264
+ has_rdoc: