Skip to content

Commit

Permalink
Expose sprockets in volt app.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanstout committed Jun 7, 2015
1 parent b104c87 commit c77f6da
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- .inspect for models is now cleaner
- Volt.current_user now works in HttpController's
- You can now add your own middleware to the middleware stack. (see docs)
- Added a threadpool for Tasks, and options to customize pool size in config/app.rb

### Changed
- All methods on ArrayModel's under the store collection now return a Promise.
Expand Down
1 change: 1 addition & 0 deletions lib/volt/server/middleware/default_middleware_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def self.postboot_setup(volt_app, rack_app)

# Serve the opal files
opal_files = OpalFiles.new(rack_app, volt_app.app_path, volt_app.component_paths)
volt_app.sprockets = opal_files.environment

# Serve the main html files from public, also figure out
# which JS/CSS files to serve.
Expand Down
2 changes: 1 addition & 1 deletion lib/volt/server/rack/http_response_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def self.register_renderer(name, content_type, proc)

# Iterate through @renderes to find a matching renderer for the given
# content and call the given proc.
# Other params fromt he content are returned as additional headers
# Other params from the content are returned as additional headers
# Returns an empty string if no renderer could be found
def render(content)
content = content.symbolize_keys
Expand Down
1 change: 1 addition & 0 deletions lib/volt/volt/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class App
attr_reader :component_paths, :router, :page, :live_query_pool,
:channel_live_queries, :app_path, :database, :message_bus,
:middleware
attr_accessor :sprockets

def initialize(app_path=nil)
if Volt.server? && !app_path
Expand Down
5 changes: 4 additions & 1 deletion volt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opal', '~> 0.7.2'
spec.add_dependency 'bundler', '>= 1.5'
spec.add_dependency 'faye-websocket', '~> 0.9.2'
spec.add_dependency 'concurrent-ruby', '~> 0.8.0'

# Locking down concurrent-ruby because one currently used feature is going to
# be deprecated (which we need to build a work around for)
spec.add_dependency 'concurrent-ruby', '= 0.8.0'


# For user passwords
Expand Down

0 comments on commit c77f6da

Please sign in to comment.