Skip to content

Commit

Permalink
Rename Rake::Ui constant to RakeUi so that gem is isolated from the R…
Browse files Browse the repository at this point in the history
…ake namespace
  • Loading branch information
Austio committed Feb 1, 2021
1 parent 1d12377 commit ef62306
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rake::Ui
# RakeUi
Short description and motivation.

## Usage
Expand Down
6 changes: 2 additions & 4 deletions app/controllers/rake/ui/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module Rake
module Ui
class ApplicationController < ActionController::Base
end
module RakeUi
class ApplicationController < ActionController::Base
end
end
6 changes: 2 additions & 4 deletions app/helpers/rake/ui/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module Rake
module Ui
module ApplicationHelper
end
module RakeUi
module ApplicationHelper
end
end
6 changes: 2 additions & 4 deletions app/jobs/rake/ui/application_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module Rake
module Ui
class ApplicationJob < ActiveJob::Base
end
module RakeUi
class ApplicationJob < ActiveJob::Base
end
end
10 changes: 4 additions & 6 deletions app/mailers/rake/ui/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module Rake
module Ui
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end
module RakeUi
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end
end
8 changes: 3 additions & 5 deletions app/models/rake/ui/application_record.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Rake
module Ui
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
module RakeUi
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
end
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Rake::Ui::Engine.routes.draw do
RakeUi::Engine.routes.draw do
end
5 changes: 1 addition & 4 deletions lib/rake/ui.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require "rake/ui/version"
require "rake/ui/engine"

module Rake
module Ui
# Your code goes here...
end
module RakeUi
end
8 changes: 3 additions & 5 deletions lib/rake/ui/engine.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Rake
module Ui
class Engine < ::Rails::Engine
isolate_namespace Rake::Ui
end
module RakeUi
class Engine < ::Rails::Engine
isolate_namespace RakeUi
end
end
6 changes: 2 additions & 4 deletions lib/rake/ui/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module Rake
module Ui
VERSION = '0.1.0'
end
module RakeUi
VERSION = '0.1.0'
end
2 changes: 1 addition & 1 deletion rake-ui.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require_relative "lib/rake/ui/version"

Gem::Specification.new do |spec|
spec.name = "rake-ui"
spec.version = Rake::Ui::VERSION
spec.version = RakeUi::VERSION
spec.authors = ["Austin Story"]
spec.email = ["lonnieastory@gmail.com"]
spec.homepage = "https://github.com/doximity/rake-ui"
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Rails.application.routes.draw do
mount Rake::Ui::Engine => "/rake-ui"
mount RakeUi::Engine => "/rake-ui"
end
7 changes: 0 additions & 7 deletions test/rake/ui_test.rb

This file was deleted.

7 changes: 7 additions & 0 deletions test/rake_ui/rake_ui_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "test_helper"

class RakeUiTest < ActiveSupport::TestCase
test "it has a version number" do
assert RakeUi::VERSION
end
end

0 comments on commit ef62306

Please sign in to comment.