Skip to content

Commit

Permalink
Merge pull request #56 from dblock/stream-sample
Browse files Browse the repository at this point in the history
Added streaming data sample.
  • Loading branch information
dblock authored Nov 8, 2023
2 parents 1f8649f + 4df47e0 commit 03e03b7
Show file tree
Hide file tree
Showing 16 changed files with 296 additions and 68 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ Style/FrozenStringLiteralComment:
Enabled: false

inherit_from: .rubocop_todo.yml

require:
- rubocop-capybara
- rubocop-rake
- rubocop-rspec

108 changes: 105 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,110 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-06-18 16:28:15 UTC using RuboCop version 1.30.1.
# on 2023-11-08 18:43:53 UTC using RuboCop version 1.57.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
Lint/UriEscapeUnescape:
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEql:
Exclude:
- 'api/upload_file.rb'
- 'spec/api/documentation_spec.rb'

# Offense count: 14
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/api/content_type_spec.rb'
- 'spec/api/cors_spec.rb'
- 'spec/api/documentation_spec.rb'
- 'spec/api/header_versioning_spec.rb'
- 'spec/api/post_put_spec.rb'
- 'spec/integration/grape_on_rack_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/api/documentation_spec.rb'

# Offense count: 12
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 11

# Offense count: 3
RSpec/ExpectInHook:
Exclude:
- 'spec/api/documentation_spec.rb'

# Offense count: 15
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/api/content_type_spec.rb'
- 'spec/api/cors_spec.rb'
- 'spec/api/documentation_spec.rb'
- 'spec/api/entities_spec.rb'
- 'spec/api/get_json_spec.rb'
- 'spec/api/header_versioning_spec.rb'
- 'spec/api/headers_spec.rb'
- 'spec/api/path_versioning_spec.rb'
- 'spec/api/ping_spec.rb'
- 'spec/api/post_json_spec.rb'
- 'spec/api/post_put_spec.rb'
- 'spec/api/rescue_from_spec.rb'
- 'spec/api/stream_data_spec.rb'
- 'spec/api/upload_file_spec.rb'
- 'spec/api/wrap_response_spec.rb'

# Offense count: 9
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/api/documentation_spec.rb'
- 'spec/api/post_put_spec.rb'
- 'spec/integration/grape_on_rack_spec.rb'

# Offense count: 26
RSpec/MultipleExpectations:
Max: 4

# Offense count: 2
RSpec/RepeatedExample:
Exclude:
- 'spec/api/headers_spec.rb'

# Offense count: 15
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- '**/spec/routing/**/*'
- 'spec/api/content_type_spec.rb'
- 'spec/api/cors_spec.rb'
- 'spec/api/documentation_spec.rb'
- 'spec/api/entities_spec.rb'
- 'spec/api/get_json_spec.rb'
- 'spec/api/header_versioning_spec.rb'
- 'spec/api/headers_spec.rb'
- 'spec/api/path_versioning_spec.rb'
- 'spec/api/ping_spec.rb'
- 'spec/api/post_json_spec.rb'
- 'spec/api/post_put_spec.rb'
- 'spec/api/rescue_from_spec.rb'
- 'spec/api/stream_data_spec.rb'
- 'spec/api/upload_file_spec.rb'
- 'spec/api/wrap_response_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Rake/Desc:
Exclude:
- 'Rakefile'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Expand All @@ -35,3 +130,10 @@ Style/OpenStructUse:
Style/RescueModifier:
Exclude:
- 'api/get_json.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'api/stream_data.rb'
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ gem 'json'
gem 'mime-types'
gem 'newrelic_rpm'
gem 'nokogiri'
gem 'rack', '< 3'
gem 'puma'
gem 'rack'
gem 'rack-cors'
gem 'webrick'
gem 'rackup'

group :development do
gem 'guard'
gem 'guard-bundler'
gem 'guard-rack'
gem 'rake'
gem 'rubocop'
gem 'rubocop-capybara'
gem 'rubocop-rake'
gem 'rubocop-rspec'
end
Expand Down
116 changes: 71 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
GEM
remote: http://rubygems.org/
specs:
activesupport (7.0.7.2)
activesupport (7.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.4)
builder (3.2.4)
capybara (3.38.0)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
Expand All @@ -21,7 +28,10 @@ GEM
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
diff-lcs (1.5.0)
drb (2.2.0)
ruby2_keywords
dry-core (1.0.0)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
Expand All @@ -36,10 +46,10 @@ GEM
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
ffi (1.15.5)
ffi (1.16.3)
formatador (1.1.0)
grape (1.7.0)
activesupport
grape (1.8.0)
activesupport (>= 5)
builder
dry-types (>= 1.1)
mustermann-grape (~> 1.0.0)
Expand All @@ -48,12 +58,12 @@ GEM
grape-entity (1.0.0)
activesupport (>= 3.0.0)
multi_json (>= 1.3.2)
grape-swagger (1.6.0)
grape-swagger (1.6.1)
grape (~> 1.3)
grape-swagger-entity (0.5.1)
grape-swagger-entity (0.5.2)
grape-entity (>= 0.6.0)
grape-swagger (>= 1.2.0)
guard (2.18.0)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
Expand All @@ -74,104 +84,118 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
lumberjack (1.2.9)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.19.0)
mime-types-data (3.2023.1003)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mustermann-grape (1.0.2)
mustermann (>= 1.0.0)
mutex_m (0.2.0)
nenv (0.3.0)
newrelic_rpm (9.0.0)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
newrelic_rpm (9.6.0)
base64
nio4r (2.5.9)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.22.1)
parser (3.2.1.1)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.1)
racc (1.6.2)
rack (2.2.6.4)
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.8)
rack-accept (0.4.5)
rack (>= 0.4)
rack-cors (2.0.1)
rack (>= 2.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rainbow (3.1.1)
rake (13.0.6)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.7.0)
rexml (3.2.5)
regexp_parser (2.8.2)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.4)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.48.1)
rspec-support (3.12.1)
rubocop (1.57.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.26.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.19.0)
rubocop (~> 1.33)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
selenium-webdriver (4.8.2)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
spoon (0.0.6)
ffi
thor (1.2.1)
thor (1.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
webrick (1.8.1)
websocket (1.2.9)
websocket (1.2.10)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.7)
zeitwerk (2.6.12)

PLATFORMS
ruby
Expand All @@ -189,16 +213,18 @@ DEPENDENCIES
mime-types
newrelic_rpm
nokogiri
rack (< 3)
puma
rack
rack-cors
rack-test
rackup
rake
rspec
rubocop
rubocop-capybara
rubocop-rake
rubocop-rspec
selenium-webdriver
webrick

BUNDLED WITH
2.3.15
2.4.2
Loading

0 comments on commit 03e03b7

Please sign in to comment.