Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add namespace to development mode plugin #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/hypernova/plugins/development_mode_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'erb'

class DevelopmentModePlugin
class Hypernova::DevelopmentModePlugin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably move the file into a hypernova dir to be consistent with ruby conventions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or add Hypernova::Plugin::DevelopmentMode and add plugin.rb file ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable too.

def after_response(current_response, _)
current_response.each do |name, result|
current_response[name] = result.merge({ "html" => render(name, result) }) if result["error"]
Expand Down
2 changes: 1 addition & 1 deletion spec/plugins/development_mode_plugin_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "spec_helper"
require "hypernova/plugins/development_mode_plugin"

describe DevelopmentModePlugin do
describe Hypernova::DevelopmentModePlugin do
describe "#after_response" do
let(:name1) { "Melkor.jsx" }
let(:name2) { "Noldor.jsx" }
Expand Down