rw_depot_theme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in rw-depot-theme.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2012 RubyWeekend
2
+ -- Jeremy Woertink
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,17 @@
1
+ = RwDepotTheme
2
+ This is a way to cut down development time for beginners when building the main depot application during RubyWeekend. This is specific to RubyWeekend, and to the application built during this workshop.
3
+
4
+ = Installation
5
+
6
+ In your Gemfile
7
+ gem "rw_depot_theme"
8
+
9
+ == Usage
10
+ This will copy over the layout needed for the application, and include the css and javascript into the pipeline.
11
+
12
+ $ rails generate rw_depot_theme:install
13
+
14
+
15
+ == Copyright
16
+ This project provided by members of the Las Vegas Ruby Group for purposes of RubyWeekend.com
17
+ Copyright (c) 2012 Jeremy Woertink. See LICENSE.txt for further details.
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'bundler/gem_tasks'
@@ -0,0 +1,55 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RubyWeekend Depot Store</title>
5
+ <meta charset="utf-8">
6
+ <%= stylesheet_link_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+ <div id="wrapper">
11
+ <div id="header">
12
+ <%= link_to(image_tag(asset_path('rw_depot_theme_logo.png')), root_path, :id => 'logo') %>
13
+ <div id="social">
14
+ <%= link_to(image_tag('twitter-icon.gif') + " Follow Us", 'http://twitter.com', :target => '_blank') %>
15
+ <%= link_to(image_tag('facebook-icon.gif') + " Like Us", 'http://www.facebook.com', :target => '_blank') %>
16
+ <div id="search">
17
+ <%= form_tag('/search', :method => "get") do %>
18
+ <%= text_field_tag(:q) %>
19
+ <%= submit_tag('Search') %>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+ <br clear="all">
24
+ <div id="navbar">
25
+ <ul id="nav">
26
+ <li><%= link_to('Home', root_path) %></li>
27
+ <li><%= link_to('About', root_path) %></li>
28
+ <li><%= link_to('Products', products_path) %></li>
29
+ <li><%= link_to('Contact Us', root_path) %></li>
30
+ </ul>
31
+ </div>
32
+ </div>
33
+ <div id="content">
34
+ <div id="flash"><%= notice %></div>
35
+ <!-- BEGIN CONTENT -->
36
+ <h1>Welcome to our Store!</h1>
37
+ <p>We have tons of products just for you! Pastrami short loin tongue, ham hock pancetta sirloin pork loin shankle bresaola rump pork beef chicken kielbasa. Drumstick bresaola boudin tenderloin meatloaf biltong short loin jowl, filet mignon fatback shank meatball. Salami andouille shoulder pork belly, pig swine ribeye prosciutto cow chicken biltong boudin corned beef shankle strip steak. Ball tip ham biltong tongue, rump fatback pork cow short ribs meatball andouille shoulder.</p>
38
+ <h3>Latest In Stock</h3>
39
+ <div id="products">
40
+ <div class="product">
41
+ <%= link_to('Some Product', '') %><br>
42
+ <%= image_tag('sample.gif', :size => '80x100') %><br>
43
+ <span class="price"><%= number_to_currency(3.0) %></span>
44
+ </div>
45
+ </div>
46
+ <!-- END CONTENT -->
47
+ </div>
48
+ <div id="footer">
49
+ <p>Copyright &copy; 2012. <a href="http://rubyweekend.com" target="_blank">RubyWeekend</a></p>
50
+ <p>Powered by <%= image_tag('rails.png') %>
51
+ </div>
52
+ </div>
53
+ <%= javascript_include_tag "application" %>
54
+ </body>
55
+ </html>
@@ -0,0 +1,25 @@
1
+ require 'rails'
2
+
3
+ module RwDepotTheme
4
+ module Generators
5
+ class InstallGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path("../../../../../app/views", __FILE__)
7
+
8
+ desc "This generator will create all the views for the depot front-end"
9
+
10
+ def copy_layout
11
+ say_status("copying", "Application Layout", :green)
12
+ remove_file("app/views/layouts/application.html.erb")
13
+ copy_file("application.html.erb", "app/views/layouts/application.html.erb")
14
+ end
15
+
16
+ def add_asset_loads
17
+ say_status("inserting", "Asset load paths", :green)
18
+ append_file("app/assets/javascripts/application.js", "//= require depot")
19
+ inject_into_file("app/assets/stylesheets/application.css", :before => '*/') do
20
+ " *= require depot\n"
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1 @@
1
+ require "rw_depot_theme/rails"
@@ -0,0 +1,7 @@
1
+ module RwDepotTheme
2
+ module Rails
3
+
4
+ require 'rw_depot_theme/rails/engine'
5
+ require 'rw_depot_theme/rails/version'
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ module RwDepotTheme
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module RwDepotTheme
2
+ module Rails
3
+ VERSION = "0.1.0"
4
+
5
+ end
6
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/rw_depot_theme/rails/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "rw_depot_theme"
6
+ s.version = RwDepotTheme::Rails::VERSION
7
+ s.authors = ["Jeremy Woertink"]
8
+ s.email = ["jeremywoertink@gmail.com"]
9
+ s.homepage = "http://rubyweekend.com"
10
+ s.summary = %q{Sample App theme for RubyWeekend}
11
+ s.description = %q{This gem will speed up development for RubyWeekend by including images, styles, and scripts}
12
+
13
+ s.rubyforge_project = "rw_depot_theme"
14
+
15
+ s.add_dependency "railties", "3.1.3"
16
+ s.add_dependency "thor", "~> 0.14"
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+ end
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ logger = (msg) ->
2
+ window.console.log(msg) if "console" in window
3
+
@@ -0,0 +1,110 @@
1
+ *
2
+ margin: 0
3
+ padding: 0
4
+ body
5
+ background: #27AAE1 url(background.png) repeat-x scroll center -200px
6
+ font-family: Arial, sans-serif
7
+ font-size: 14px
8
+ a
9
+ color: #569EE2
10
+ text-decoration: none
11
+ &:hover
12
+ text-decoration: underline
13
+ &:focus, &:active
14
+ outline: none
15
+ img
16
+ border: none
17
+ ul, ol
18
+ margin-left: 20px
19
+
20
+ #flash
21
+ font-size: 24px
22
+ text-align: center
23
+ color: #4BBF1D
24
+
25
+ #wrapper
26
+ margin: 0px auto
27
+ width: 980px
28
+ background-color: #eeeeee
29
+ padding: 10px
30
+ border: 1px solid #333333
31
+ box-shadow: 0 0 7px 0 #333333
32
+
33
+ h1
34
+ color: #333333
35
+ text-shadow: 1px 1px 0px #ffffff
36
+
37
+ .left
38
+ float: left
39
+ .right
40
+ float: right
41
+
42
+ #header
43
+ margin-bottom: 15px
44
+ overflow: hidden
45
+
46
+ #logo
47
+ float: left
48
+
49
+ #social
50
+ float: right
51
+ padding: 10px
52
+ a
53
+ font-size: 16px
54
+ margin-left: 10px
55
+ img
56
+ vertical-align: top
57
+ margin-right: 4px
58
+ #search
59
+ margin-top: 15px
60
+ #q
61
+ border: 1px solid #666666
62
+ padding: 3px
63
+ border-radius: 6px
64
+ font-size: 16px
65
+
66
+ #navbar
67
+ clear: both
68
+ background: -moz-linear-gradient(top, #27AAE1, #1987B6)
69
+ background: -webkit-gradient(linear, left top, left bottom, from(#27AAE1), to(#1987B6))
70
+ overflow: hidden
71
+ border-radius: 6px
72
+
73
+ #nav
74
+ list-style: none
75
+ li
76
+ float: left
77
+ border-left: 1px solid #cccccc
78
+ &:first-child
79
+ border-left: none
80
+ a
81
+ display: block
82
+ padding: 4px 20px
83
+ font-size: 18px
84
+ text-transform: uppercase
85
+ text-decoration: none
86
+ color: #ffffff
87
+ &:hover
88
+ background-color: #67BEE4
89
+
90
+ #content
91
+ min-height: 400px
92
+
93
+ #products
94
+ overflow: hidden
95
+ .product
96
+ text-align: center
97
+ padding: 10px
98
+ background-color: #ffffff
99
+ float: left
100
+ margin-right: 20px
101
+ margin-bottom: 20px
102
+ width: 100px
103
+ border: 1px solid #cccccc
104
+
105
+ #footer
106
+ border-top: 1px solid #666666
107
+ text-align: center
108
+ padding: 10px 0
109
+ margin-top: 20px
110
+ font-size: 11px
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rw_depot_theme
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Jeremy Woertink
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-01-25 00:00:00 -08:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: railties
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - "="
28
+ - !ruby/object:Gem::Version
29
+ hash: 5
30
+ segments:
31
+ - 3
32
+ - 1
33
+ - 3
34
+ version: 3.1.3
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: thor
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 23
46
+ segments:
47
+ - 0
48
+ - 14
49
+ version: "0.14"
50
+ type: :runtime
51
+ version_requirements: *id002
52
+ description: This gem will speed up development for RubyWeekend by including images, styles, and scripts
53
+ email:
54
+ - jeremywoertink@gmail.com
55
+ executables: []
56
+
57
+ extensions: []
58
+
59
+ extra_rdoc_files: []
60
+
61
+ files:
62
+ - .gitignore
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.rdoc
66
+ - Rakefile
67
+ - app/views/application.html.erb
68
+ - lib/generators/rw_depot_theme/install/install_generator.rb
69
+ - lib/rw_depot_theme.rb
70
+ - lib/rw_depot_theme/rails.rb
71
+ - lib/rw_depot_theme/rails/engine.rb
72
+ - lib/rw_depot_theme/rails/version.rb
73
+ - rw_depot_theme.gemspec
74
+ - vendor/assets/images/background.png
75
+ - vendor/assets/images/facebook-icon.gif
76
+ - vendor/assets/images/noise.png
77
+ - vendor/assets/images/rw_depot_theme_logo.png
78
+ - vendor/assets/images/sample.gif
79
+ - vendor/assets/images/twitter-icon.gif
80
+ - vendor/assets/javascripts/depot.js.coffee
81
+ - vendor/assets/stylesheets/depot.css.sass
82
+ has_rdoc: true
83
+ homepage: http://rubyweekend.com
84
+ licenses: []
85
+
86
+ post_install_message:
87
+ rdoc_options: []
88
+
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 3
106
+ segments:
107
+ - 0
108
+ version: "0"
109
+ requirements: []
110
+
111
+ rubyforge_project: rw_depot_theme
112
+ rubygems_version: 1.3.7
113
+ signing_key:
114
+ specification_version: 3
115
+ summary: Sample App theme for RubyWeekend
116
+ test_files: []
117
+