Permalink
Browse files

renamed to rails_client_logger

  • Loading branch information...
1 parent a01e935 commit fdeaf10897470775280d4a67afa6df30f139abd0 @girishso committed Feb 4, 2013
View
@@ -1,6 +1,6 @@
source "http://rubygems.org"
-# Declare your gem's dependencies in js-logger.gemspec.
+# Declare your gem's dependencies in rails-client-logger.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
View
@@ -14,7 +14,7 @@ end
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'JsLogger'
+ rdoc.title = 'RailsClientLogger'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,5 +1,5 @@
-module JsLogger
- class JsLoggersController < ApplicationController
+module RailsClientLogger
+ class RailsClientLoggersController < ApplicationController
def log
if %w(debug info warn error fatal).include?(params[:level].to_s)
Rails.logger.send(params[:level].to_s.to_sym, params[:message])
View
@@ -1,5 +1,5 @@
-JsLogger::Engine.routes.draw do
- resource :js_logger, :only => [] do
+RailsClientLogger::Engine.routes.draw do
+ resource :rails_client_logger, :only => [] do
member do
post 'log'
end
@@ -1,9 +0,0 @@
-Description:
- Inserts required routes and requires the javascript files
-
-Example:
- rails generate js_logger
-
- This will create:
- route mount JsLogger::Engine, :at => "logger"
- require js_logger.js in app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
+Description:
+ Inserts required routes and requires the javascript files
+
+Example:
+ rails generate rails_client_logger
+
+ This will create:
+ route mount RailsClientLogger::Engine, :at => "logger"
+ require rails_client_logger.js in app/assets/javascripts/application.js
@@ -1,18 +1,18 @@
-class JsLoggerGenerator < Rails::Generators::Base
+class RailsClientLoggerGenerator < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
desc "inserts required routes and requires the javascript files"
def generate
# add route
- route(%Q{mount JsLogger::Engine, :at => "logger"})
+ route(%Q{mount RailsClientLogger::Engine, :at => "logger"})
# add to application.js manifest
original_js = File.binread("app/assets/javascripts/application.js")
- if original_js.include?("require 'js_logger'")
+ if original_js.include?("require rails_client_logger")
say_status("skipped", "insert into app/assets/javascripts/application.js", :yellow)
else
insert_into_file "app/assets/javascripts/application.js", :after => %r{//= require ['"]?jquery['"]?\s*$} do
- "\n//= require js_logger"
+ "\n//= require rails_client_logger"
end
end
end
View
@@ -1,4 +0,0 @@
-require "js-logger/engine"
-
-module JsLogger
-end
View
@@ -1,5 +0,0 @@
-module JsLogger
- class Engine < ::Rails::Engine
- isolate_namespace JsLogger
- end
-end
View
@@ -1,3 +0,0 @@
-module JsLogger
- VERSION = "0.0.1"
-end
@@ -0,0 +1,4 @@
+require "rails-client-logger/engine"
+
+module RailsClientLogger
+end
@@ -0,0 +1,5 @@
+module RailsClientLogger
+ class Engine < ::Rails::Engine
+ isolate_namespace RailsClientLogger
+ end
+end
@@ -0,0 +1,3 @@
+module RailsClientLogger
+ VERSION = "0.0.1"
+end
@@ -1,12 +1,12 @@
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
-require "js-logger/version"
+require "rails-client-logger/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
- s.name = "js-logger"
- s.version = JsLogger::VERSION
+ s.name = "rails-client-logger"
+ s.version = RailsClientLogger::VERSION
s.authors = ["Girish Sonawane"]
s.email = ["girish.sonawane@gmail.com"]
s.homepage = "https://github.com/girishso/js-logger"
@@ -1,4 +1,4 @@
Rails.application.routes.draw do
- mount JsLogger::Engine => "/js-logger"
+ mount RailsClientLogger::Engine => "/js-logger"
end
@@ -28,7 +28,7 @@
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
data: {level: level, message: message},
complete: function(request){},
- url: "/logger/js_logger/log"
+ url: "/logger/rails_client_logger/log"
})
}
}( window.jsLogger = window.jsLogger || {}, jQuery ));

0 comments on commit fdeaf10

Please sign in to comment.