Skip to content

Commit 77a3cd3

Browse files
author
Jeff Dickey
committed
created rails engine
1 parent 73f66f8 commit 77a3cd3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+700
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.bundle/
2+
log/*.log
3+
pkg/
4+
test/dummy/db/*.sqlite3
5+
test/dummy/log/*.log
6+
test/dummy/tmp/

Gemfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source "http://rubygems.org"
2+
3+
# Declare your gem's dependencies in messaging.gemspec.
4+
# Bundler will treat runtime dependencies like base dependencies, and
5+
# development dependencies will be added by default to the :development group.
6+
gemspec
7+
8+
# jquery-rails is used by the dummy application
9+
gem "jquery-rails"
10+
11+
# Declare any dependencies that are still in development here instead of in
12+
# your gemspec. These might include edge Rails or gems from your path or
13+
# Git. Remember to move these dependencies to your gemspec before releasing
14+
# your gem to rubygems.org.
15+
16+
# To use debugger
17+
# gem 'ruby-debug19', :require => 'ruby-debug'

Gemfile.lock

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
PATH
2+
remote: .
3+
specs:
4+
messaging (0.0.1)
5+
rails (~> 3.1.3)
6+
7+
GEM
8+
remote: http://rubygems.org/
9+
specs:
10+
actionmailer (3.1.3)
11+
actionpack (= 3.1.3)
12+
mail (~> 2.3.0)
13+
actionpack (3.1.3)
14+
activemodel (= 3.1.3)
15+
activesupport (= 3.1.3)
16+
builder (~> 3.0.0)
17+
erubis (~> 2.7.0)
18+
i18n (~> 0.6)
19+
rack (~> 1.3.5)
20+
rack-cache (~> 1.1)
21+
rack-mount (~> 0.8.2)
22+
rack-test (~> 0.6.1)
23+
sprockets (~> 2.0.3)
24+
activemodel (3.1.3)
25+
activesupport (= 3.1.3)
26+
builder (~> 3.0.0)
27+
i18n (~> 0.6)
28+
activerecord (3.1.3)
29+
activemodel (= 3.1.3)
30+
activesupport (= 3.1.3)
31+
arel (~> 2.2.1)
32+
tzinfo (~> 0.3.29)
33+
activeresource (3.1.3)
34+
activemodel (= 3.1.3)
35+
activesupport (= 3.1.3)
36+
activesupport (3.1.3)
37+
multi_json (~> 1.0)
38+
arel (2.2.1)
39+
builder (3.0.0)
40+
erubis (2.7.0)
41+
hike (1.2.1)
42+
i18n (0.6.0)
43+
jquery-rails (1.0.19)
44+
railties (~> 3.0)
45+
thor (~> 0.14)
46+
json (1.6.3)
47+
mail (2.3.0)
48+
i18n (>= 0.4.0)
49+
mime-types (~> 1.16)
50+
treetop (~> 1.4.8)
51+
mime-types (1.17.2)
52+
multi_json (1.0.4)
53+
polyglot (0.3.3)
54+
rack (1.3.5)
55+
rack-cache (1.1)
56+
rack (>= 0.4)
57+
rack-mount (0.8.3)
58+
rack (>= 1.0.0)
59+
rack-ssl (1.3.2)
60+
rack
61+
rack-test (0.6.1)
62+
rack (>= 1.0)
63+
rails (3.1.3)
64+
actionmailer (= 3.1.3)
65+
actionpack (= 3.1.3)
66+
activerecord (= 3.1.3)
67+
activeresource (= 3.1.3)
68+
activesupport (= 3.1.3)
69+
bundler (~> 1.0)
70+
railties (= 3.1.3)
71+
railties (3.1.3)
72+
actionpack (= 3.1.3)
73+
activesupport (= 3.1.3)
74+
rack-ssl (~> 1.3.2)
75+
rake (>= 0.8.7)
76+
rdoc (~> 3.4)
77+
thor (~> 0.14.6)
78+
rake (0.9.2.2)
79+
rdoc (3.11)
80+
json (~> 1.4)
81+
sprockets (2.0.3)
82+
hike (~> 1.2)
83+
rack (~> 1.0)
84+
tilt (~> 1.1, != 1.3.0)
85+
sqlite3 (1.3.4)
86+
thor (0.14.6)
87+
tilt (1.3.3)
88+
treetop (1.4.10)
89+
polyglot
90+
polyglot (>= 0.3.1)
91+
tzinfo (0.3.31)
92+
93+
PLATFORMS
94+
ruby
95+
96+
DEPENDENCIES
97+
jquery-rails
98+
messaging!
99+
sqlite3

MIT-LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright 2011 YOURNAME
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.rdoc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
= Messaging
2+
3+
This project rocks and uses MIT-LICENSE.

Rakefile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env rake
2+
begin
3+
require 'bundler/setup'
4+
rescue LoadError
5+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6+
end
7+
begin
8+
require 'rdoc/task'
9+
rescue LoadError
10+
require 'rdoc/rdoc'
11+
require 'rake/rdoctask'
12+
RDoc::Task = Rake::RDocTask
13+
end
14+
15+
RDoc::Task.new(:rdoc) do |rdoc|
16+
rdoc.rdoc_dir = 'rdoc'
17+
rdoc.title = 'Messaging'
18+
rdoc.options << '--line-numbers'
19+
rdoc.rdoc_files.include('README.rdoc')
20+
rdoc.rdoc_files.include('lib/**/*.rb')
21+
end
22+
23+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24+
load 'rails/tasks/engine.rake'
25+
26+
27+
Bundler::GemHelper.install_tasks
28+
29+
require 'rake/testtask'
30+
31+
Rake::TestTask.new(:test) do |t|
32+
t.libs << 'lib'
33+
t.libs << 'test'
34+
t.pattern = 'test/**/*_test.rb'
35+
t.verbose = false
36+
end
37+
38+
39+
task :default => :test

app/assets/images/messaging/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This is a manifest file that'll be compiled into including all the files listed below.
2+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3+
// be included in the compiled file accessible from http://example.com/assets/application.js
4+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5+
// the compiled file.
6+
//
7+
//= require jquery
8+
//= require jquery_ujs
9+
//= require_tree .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
3+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4+
* the top of the compiled file, but it's generally better to create a new file per style scope.
5+
*= require_self
6+
*= require_tree .
7+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Messaging
2+
class ApplicationController < ActionController::Base
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Messaging
2+
module ApplicationHelper
3+
end
4+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Messaging</title>
5+
<%= stylesheet_link_tag "messaging/application" %>
6+
<%= javascript_include_tag "messaging/application" %>
7+
<%= csrf_meta_tags %>
8+
</head>
9+
<body>
10+
11+
<%= yield %>
12+
13+
</body>
14+
</html>

config/routes.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Messaging::Engine.routes.draw do
2+
end

lib/messaging.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require "messaging/engine"
2+
3+
module Messaging
4+
end

lib/messaging/engine.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Messaging
2+
class Engine < Rails::Engine
3+
isolate_namespace Messaging
4+
end
5+
end

lib/messaging/version.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Messaging
2+
VERSION = "0.0.1"
3+
end

lib/tasks/messaging_tasks.rake

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# desc "Explaining what the task does"
2+
# task :messaging do
3+
# # Task goes here
4+
# end

messaging.gemspec

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$:.push File.expand_path("../lib", __FILE__)
2+
3+
# Maintain your gem's version:
4+
require "messaging/version"
5+
6+
# Describe your gem and declare its dependencies:
7+
Gem::Specification.new do |s|
8+
s.name = "messaging"
9+
s.version = Messaging::VERSION
10+
s.authors = ["TODO: Your name"]
11+
s.email = ["TODO: Your email"]
12+
s.homepage = "TODO"
13+
s.summary = "TODO: Summary of Messaging."
14+
s.description = "TODO: Description of Messaging."
15+
16+
s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
17+
s.test_files = Dir["test/**/*"]
18+
19+
s.add_dependency "rails", "~> 3.1.3"
20+
# s.add_dependency "jquery-rails"
21+
22+
s.add_development_dependency "sqlite3"
23+
end

script/rails

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env ruby
2+
#!/usr/bin/env ruby
3+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4+
5+
ENGINE_PATH = File.expand_path('../..', __FILE__)
6+
load File.expand_path('../../test/dummy/script/rails', __FILE__)

test/dummy/Rakefile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env rake
2+
# Add your own tasks in files placed in lib/tasks ending in .rake,
3+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4+
5+
require File.expand_path('../config/application', __FILE__)
6+
7+
Dummy::Application.load_tasks
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This is a manifest file that'll be compiled into including all the files listed below.
2+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3+
// be included in the compiled file accessible from http://example.com/assets/application.js
4+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5+
// the compiled file.
6+
//
7+
//= require jquery
8+
//= require jquery_ujs
9+
//= require_tree .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
3+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4+
* the top of the compiled file, but it's generally better to create a new file per style scope.
5+
*= require_self
6+
*= require_tree .
7+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationController < ActionController::Base
2+
protect_from_forgery
3+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end

test/dummy/app/mailers/.gitkeep

Whitespace-only changes.

test/dummy/app/models/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Dummy</title>
5+
<%= stylesheet_link_tag "application" %>
6+
<%= javascript_include_tag "application" %>
7+
<%= csrf_meta_tags %>
8+
</head>
9+
<body>
10+
11+
<%= yield %>
12+
13+
</body>
14+
</html>

test/dummy/config.ru

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is used by Rack-based servers to start the application.
2+
3+
require ::File.expand_path('../config/environment', __FILE__)
4+
run Dummy::Application

test/dummy/config/application.rb

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
require File.expand_path('../boot', __FILE__)
2+
3+
require 'rails/all'
4+
5+
Bundler.require
6+
require "messaging"
7+
8+
module Dummy
9+
class Application < Rails::Application
10+
# Settings in config/environments/* take precedence over those specified here.
11+
# Application configuration should go into files in config/initializers
12+
# -- all .rb files in that directory are automatically loaded.
13+
14+
# Custom directories with classes and modules you want to be autoloadable.
15+
# config.autoload_paths += %W(#{config.root}/extras)
16+
17+
# Only load the plugins named here, in the order given (default is alphabetical).
18+
# :all can be used as a placeholder for all plugins not explicitly named.
19+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20+
21+
# Activate observers that should always be running.
22+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23+
24+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26+
# config.time_zone = 'Central Time (US & Canada)'
27+
28+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30+
# config.i18n.default_locale = :de
31+
32+
# Configure the default encoding used in templates for Ruby 1.9.
33+
config.encoding = "utf-8"
34+
35+
# Configure sensitive parameters which will be filtered from the log file.
36+
config.filter_parameters += [:password]
37+
38+
# Enable the asset pipeline
39+
config.assets.enabled = true
40+
41+
# Version of your assets, change this if you want to expire all your assets
42+
config.assets.version = '1.0'
43+
end
44+
end
45+

0 commit comments

Comments
 (0)