team_page 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +9 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +29 -0
- data/app/controllers/team_page/team_controller.rb +8 -0
- data/app/models/team_page/team_member.rb +6 -0
- data/app/views/team_page/index.html.erb +12 -0
- data/config/routes.rb +4 -0
- data/lib/engine.rb +18 -0
- data/lib/generators/team_page/team_page_generator.rb +23 -0
- data/lib/generators/team_page/templates/migration.rb +16 -0
- data/lib/team_page.rb +9 -0
- data/lib/version.rb +3 -0
- metadata +67 -0
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
@@ -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.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'rubygems'
|
3
|
+
begin
|
4
|
+
require 'bundler/setup'
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'rake'
|
10
|
+
require 'rake/rdoctask'
|
11
|
+
|
12
|
+
require 'rake/testtask'
|
13
|
+
|
14
|
+
Rake::TestTask.new(:test) do |t|
|
15
|
+
t.libs << 'lib'
|
16
|
+
t.libs << 'test'
|
17
|
+
t.pattern = 'test/**/*_test.rb'
|
18
|
+
t.verbose = false
|
19
|
+
end
|
20
|
+
|
21
|
+
task :default => :test
|
22
|
+
|
23
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
24
|
+
rdoc.rdoc_dir = 'rdoc'
|
25
|
+
rdoc.title = 'TeamPage'
|
26
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
27
|
+
rdoc.rdoc_files.include('README.rdoc')
|
28
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!-- CURRENT FILE :: app/views/team_page/index.html.erb -->
|
2
|
+
<ul class="team-member-list">
|
3
|
+
<% @team_members.each do |team_member| %>
|
4
|
+
<li class="team-member">
|
5
|
+
<span class="team-member-name">
|
6
|
+
<%= link_to @team_member.name , @team_member.twitter_url %>
|
7
|
+
</span>
|
8
|
+
<%= @team_member.bio %>
|
9
|
+
<%= image_tag @team_member.image_url , :class => "team-member-image" %>
|
10
|
+
</li>
|
11
|
+
<% end %>
|
12
|
+
</ul>
|
data/config/routes.rb
ADDED
data/lib/engine.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# CURRENT FILE :: lib/team_page/engine.rb
|
2
|
+
module TeamPage
|
3
|
+
|
4
|
+
class Engine < Rails::Engine
|
5
|
+
|
6
|
+
initialize "team_page.load_app_instance_data" do |app|
|
7
|
+
TeamPage.setup do |config|
|
8
|
+
config.app_root = app.root
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
initialize "team_page.load_static_assets" do |app|
|
13
|
+
app.middleware.use ::ActionDispatch::Static, "#{root}/public"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# CURRENT FILE :: lib/generators/team_page/team_page_generator.rb
|
2
|
+
# Requires
|
3
|
+
require 'rails/generators'
|
4
|
+
require 'rails/generators/migration'
|
5
|
+
|
6
|
+
class TeamPageGenerator < Rails::Generators::Base
|
7
|
+
include Rails::Generators::Migration
|
8
|
+
def self.source_root
|
9
|
+
@source_root ||= File.join(File.dirname(__FILE__), 'templates')
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.next_migration_number(dirname)
|
13
|
+
if ActiveRecord::Base.timestamped_migrations
|
14
|
+
Time.new.utc.strftime("%Y%m%d%H%M%S")
|
15
|
+
else
|
16
|
+
"%.3d" % (current_migration_number(dirname) + 1)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_migration_file
|
21
|
+
migration_template 'migration.rb', 'db/migrate/create_team_members_table.rb'
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# CURRENT FILE :: lib/generators/team_page/templates/migration.rb
|
2
|
+
class CreateTeamMembers < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :team_members do |t|
|
5
|
+
t.string :name
|
6
|
+
t.string :twitter_url
|
7
|
+
t.string :bio
|
8
|
+
t.string :image_url
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :team_members
|
15
|
+
end
|
16
|
+
end
|
data/lib/team_page.rb
ADDED
data/lib/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: team_page
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- John Kealy
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-07-19 00:00:00 Z
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Insert TeamPage description.
|
17
|
+
email:
|
18
|
+
- jdkealy@gmail.com
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files: []
|
24
|
+
|
25
|
+
files:
|
26
|
+
- app/views/team_page/index.html.erb
|
27
|
+
- app/controllers/team_page/team_controller.rb
|
28
|
+
- app/models/team_page/team_member.rb
|
29
|
+
- lib/version.rb
|
30
|
+
- lib/generators/team_page/templates/migration.rb
|
31
|
+
- lib/generators/team_page/team_page_generator.rb
|
32
|
+
- lib/team_page.rb
|
33
|
+
- lib/engine.rb
|
34
|
+
- config/routes.rb
|
35
|
+
- MIT-LICENSE
|
36
|
+
- Rakefile
|
37
|
+
- Gemfile
|
38
|
+
- README.rdoc
|
39
|
+
homepage:
|
40
|
+
licenses: []
|
41
|
+
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
requirements: []
|
60
|
+
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 1.8.5
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: Insert TeamPage summary.
|
66
|
+
test_files: []
|
67
|
+
|