team_page 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "3.0.9"
4
+ gem "capybara", ">= 0.4.0"
5
+ gem "sqlite3"
6
+
7
+ # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
8
+ # gem 'ruby-debug'
9
+ # gem 'ruby-debug19'
@@ -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.
@@ -0,0 +1,3 @@
1
+ = TeamPage
2
+
3
+ This project rocks and uses MIT-LICENSE.
@@ -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,8 @@
1
+ # CURRENT FILE :: app/controllers/team_page/team_controller.rb
2
+ module TeamPage
3
+ class TeamController < ::ApplicationController
4
+ def index
5
+ @team_members = TeamMember.all
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ # CURRENT FILE :: app/models/team_page/team_member.rb
2
+ module TeamPage
3
+ class TeamMember < ActiveRecord::Base
4
+ attr_accessible :name , :twitter_url , :bio , :image_url
5
+ end
6
+ 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>
@@ -0,0 +1,4 @@
1
+ # CURRENT FILE :: config/routes.rb
2
+ Rails.application.routes.draw do
3
+ get "team" => "team_page/team#index" , :as => :team_page
4
+ end
@@ -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
@@ -0,0 +1,9 @@
1
+ module TeamPage
2
+ mattr_accessor :app_root
3
+
4
+ def self.setup
5
+ yield self
6
+ end
7
+
8
+ require "team_page/engine"
9
+ end
@@ -0,0 +1,3 @@
1
+ module TeamPage
2
+ VERSION = "0.0.1"
3
+ end
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
+