Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial import

  • Loading branch information...
commit 195cc6cbcfc2a872762ebd0e411b8bd778ee547a 0 parents
@atmos authored
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2008 [name of plugin creator]
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 README
@@ -0,0 +1,13 @@
+FitterHappier
+=============
+
+Introduction goes here.
+
+
+Example
+=======
+
+Example goes here.
+
+
+Copyright (c) 2008 [name of plugin creator], released under the MIT license
22 Rakefile
@@ -0,0 +1,22 @@
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+desc 'Default: run unit tests.'
+task :default => :test
+
+desc 'Test the fitter_happier plugin.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+desc 'Generate documentation for the fitter_happier plugin.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'FitterHappier'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
6 init.rb
@@ -0,0 +1,6 @@
+# Include hook code here
+require 'controllers/fitter_happier_controller'
+controller_path = File.dirname(__FILE__) + '/lib/controllers'
+$LOAD_PATH << controller_path
+Dependencies.load_paths << controller_path
+config.controller_paths << controller_path
1  install.rb
@@ -0,0 +1 @@
+# Install hook code here
10 lib/controllers/fitter_happier_controller.rb
@@ -0,0 +1,10 @@
+class FitterHappierController < ActionController::Base
+ session :off
+ layout nil
+
+ def index
+ logger.silence do
+ render :text => 'Hai!' and return
+ end
+ end
+end
4 tasks/fitter_happier_tasks.rake
@@ -0,0 +1,4 @@
+# desc "Explaining what the task does"
+# task :fitter_happier do
+# # Task goes here
+# end
23 test/fitter_happier_test.rb
@@ -0,0 +1,23 @@
+# require 'test/unit'
+ENV['RAILS_ENV'] = 'test'
+require '../../../../test/test_helper'
+
+class FitterHappierTest < Test::Unit::TestCase
+ def setup
+ @controller = FitterHappierController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ # Replace this with your real tests.
+ def test_this_plugin
+ get :index
+ assert_response :success
+ assert_equal "", @response.session.session_id
+ assert_equal "Hai!", @response.body
+ end
+
+ def test_routing_inclusion
+ assert_routing('/fitter_happier', :controller => 'fitter_happier', :action => 'index')
+ end
+end
1  uninstall.rb
@@ -0,0 +1 @@
+# Uninstall hook code here
Please sign in to comment.
Something went wrong with that request. Please try again.