gunnertechnology 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,25 @@
1
1
  class ProjectGenerator < Rails::Generators::Base
2
+ include Rails::Generators::Migration
3
+
2
4
  source_root File.expand_path('../templates', __FILE__)
3
5
  argument :devise_model_name, :type => :string, :default => "User"
4
6
 
7
+ def self.next_migration_number(dirname)
8
+ if ActiveRecord::Base.timestamped_migrations
9
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
10
+ else
11
+ "%.3d" % (current_migration_number(dirname) + 1)
12
+ end
13
+ end
14
+
5
15
  def generate_layout
6
16
  template "app/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
17
+ copy_file "app/helpers/gunner_technology_helper.rb", "app/helpers/gunner_technology_helper.rb"
18
+ directory "app/views/shared", "app/views/shared"
7
19
  directory "public/javascripts", "public/javascripts"
8
20
  directory "public/stylesheets", "public/stylesheets"
9
21
  directory "public/swfs", "public/swfs"
22
+ route('root :to => "doesnot/#exist"')
10
23
  end
11
24
 
12
25
  def generate_facebook_config
@@ -15,7 +28,7 @@ class ProjectGenerator < Rails::Generators::Base
15
28
  end
16
29
 
17
30
  def generate_google_analytics_config
18
- copy_file "config/google_analytics_config.yml", "config/facebook_config.yml"
31
+ copy_file "config/google_analytics_config.yml", "config/google_analytics_config.yml"
19
32
  copy_file "config/initializers/load_google_analytics_config.rb", "config/initializers/load_google_analytics_config.rb"
20
33
  end
21
34
 
@@ -48,7 +61,7 @@ class ProjectGenerator < Rails::Generators::Base
48
61
  # controller
49
62
  template "app/controllers/authentications_controller.rb", "app/controllers/authentications_controller.rb"
50
63
  # migration
51
- migration_template "create_authentications.rb", "db/migrate/add_foo_to_bar.rb"
64
+ migration_template "db/migrate/create_authentications.rb", "db/migrate/create_authentications.rb"
52
65
  # route
53
66
  route("match '/auth/:provider/callback' => 'authentications#create'")
54
67
  end
@@ -0,0 +1,13 @@
1
+ module GunnerTechnologyHelper
2
+ def use_fluid_layout?
3
+ !!@use_fluid_layout
4
+ end
5
+
6
+ def inline_modal(title, id, &block)
7
+ header = content_tag_string('h2', title, {:class => "modal-header"}, false)
8
+ body = content_tag_string('div', capture(&block), {:class => "modal-body"}, false)
9
+ inner_wrapper = content_tag_string('div', "#{header}#{body}", {:id => id}, false)
10
+
11
+ content_tag_string('div', inner_wrapper, {:style => 'display:none;'}, false)
12
+ end
13
+ end
@@ -1,77 +1,77 @@
1
1
  <!doctype html>
2
- <!--[if lt IE 7 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie6<%%= use_fluid_layout? ? ' fluid' : '' %%> "> <![endif]-->
3
- <!--[if IE 7 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie7<%%= use_fluid_layout? ? ' fluid' : '' %%>"> <![endif]-->
4
- <!--[if IE 8 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie8<%%= use_fluid_layout? ? ' fluid' : '' %%>"> <![endif]-->
5
- <!--[if IE 9 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie9<%%= use_fluid_layout? ? ' fluid' : '' %%>"> <![endif]-->
6
- <!--[if (gt IE 9)|!(IE)]><!--> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js<%%= use_fluid_layout? ? ' fluid' : '' %%>"> <!--<![endif]-->
2
+ <!--[if lt IE 7 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie6<%%= use_fluid_layout? ? ' fluid' : '' %> "> <![endif]-->
3
+ <!--[if IE 7 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie7<%%= use_fluid_layout? ? ' fluid' : '' %>"> <![endif]-->
4
+ <!--[if IE 8 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie8<%%= use_fluid_layout? ? ' fluid' : '' %>"> <![endif]-->
5
+ <!--[if IE 9 ]> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js ie9<%%= use_fluid_layout? ? ' fluid' : '' %>"> <![endif]-->
6
+ <!--[if (gt IE 9)|!(IE)]><!--> <html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en" class="no-js<%%= use_fluid_layout? ? ' fluid' : '' %>"> <!--<![endif]-->
7
7
  <head>
8
- <title><%%= content_for?(:title) ? "#{content_for(:title)} - #{SEO_CONFIG[:title]}" : t(:site_title) %%></title>
9
- <%%= stylesheet_link_tag :defaults %%>
10
- <%%= javascript_include_tag "libs/head.js" %%>
8
+ <title><%%= content_for?(:title) ? "#{content_for(:title)} - #{SEO_CONFIG[:title]}" : t(:site_title) %></title>
9
+ <%%= stylesheet_link_tag :defaults %>
10
+ <%%= javascript_include_tag "libs/head.js" %>
11
11
  <script>
12
- head.js(<%%= raw (javascript_include_tag(:defaults)+content_for(:javascripts)).scan(/<script .*src=(['"][^'"]+['"]).*> *<\/script>/).join(",") %%>);
12
+ head.js(<%%= raw (javascript_include_tag(:defaults)+content_for(:javascripts)).scan(/<script .*src=(['"][^'"]+['"]).*> *<\/script>/).join(",") %>);
13
13
  </script>
14
- <%%= csrf_meta_tag %%>
14
+ <%%= csrf_meta_tag %>
15
15
 
16
- <%%= favicon_link_tag %%>
16
+ <%%= favicon_link_tag %>
17
17
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
18
18
 
19
19
  <meta charset="utf-8" />
20
20
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
21
- <%%= yield(:meta) %%>
21
+ <%%= yield(:meta) %>
22
22
  <script>
23
23
  head.ready(function() {
24
24
  (function($){
25
25
  $(function(){
26
- <%%= content_for(:javascripts).gsub(/<script[^>]*>/,"").gsub(/<\/script>/,"") %%>
26
+ <%%= content_for(:javascripts).gsub(/<script[^>]*>/,"").gsub(/<\/script>/,"") %>
27
27
  });
28
28
  }(jQuery));
29
29
  });
30
30
  </script>
31
31
  <style>
32
32
  html.fluid .container_24 {
33
- max-width:<%%= content_for?(:max_width) ? content_for(:max_width) : '1300' %%>px;
34
- min-width:<%%= content_for?(:min_width) ? content_for(:min_width) : '1008' %%>px;
33
+ max-width:<%%= content_for?(:max_width) ? content_for(:max_width) : '1300' %>px;
34
+ min-width:<%%= content_for?(:min_width) ? content_for(:min_width) : '1008' %>px;
35
35
  }
36
36
  </style>
37
- <%%= yield(:stylesheets) %%>
38
- <%%= yield(:head) %%>
39
- <%% if content_for?(:opengraph) %%>
40
- <%%= yield(:opengraph) %%>
41
- <%% else %%>
42
- <meta property="og:title" content="<%%= FACEBOOK_CONFIG[:opengraph]['title'] %%>"/>
43
- <meta property="og:type" content="<%%= FACEBOOK_CONFIG[:opengraph]['type'] %%>"/>
44
- <meta property="og:url" content="<%%= FACEBOOK_CONFIG[:opengraph]['url'] %%>"/>
45
- <meta property="og:image" content="<%%= FACEBOOK_CONFIG[:opengraph]['image'] %%>"/>
46
- <meta property="og:site_name" content="<%%= FACEBOOK_CONFIG[:opengraph]['site_name'] %%>"/>
47
- <meta property="fb:admins" content="<%%= FACEBOOK_CONFIG[:admins].join(",") %%>"/>
48
- <meta property="og:description" content="<%%= FACEBOOK_CONFIG[:opengraph]['description'] %%>"/>
49
- <%% end %%>
50
- <%%= render :partial => "shared/google_analytics" %%>
37
+ <%%= yield(:stylesheets) %>
38
+ <%%= yield(:head) %>
39
+ <%% if content_for?(:opengraph) %>
40
+ <%%= yield(:opengraph) %>
41
+ <%% else %>
42
+ <meta property="og:title" content="<%%= FACEBOOK_CONFIG[:opengraph]['title'] %>"/>
43
+ <meta property="og:type" content="<%%= FACEBOOK_CONFIG[:opengraph]['type'] %>"/>
44
+ <meta property="og:url" content="<%%= FACEBOOK_CONFIG[:opengraph]['url'] %>"/>
45
+ <meta property="og:image" content="<%%= FACEBOOK_CONFIG[:opengraph]['image'] %>"/>
46
+ <meta property="og:site_name" content="<%%= FACEBOOK_CONFIG[:opengraph]['site_name'] %>"/>
47
+ <meta property="fb:admins" content="<%%= FACEBOOK_CONFIG[:admins].join(",") %>"/>
48
+ <meta property="og:description" content="<%%= FACEBOOK_CONFIG[:opengraph]['description'] %>"/>
49
+ <%% end %>
50
+ <%%= render :partial => "shared/google_analytics" %>
51
51
  </head>
52
- <body class="<%%= controller.controller_name %%> <%%= "#{controller.controller_name}-#{controller.action_name}" %%> <%%= content_for(:body_classes) %%>">
53
- <%%= render :partial => "shared/facebook_init" %%>
52
+ <body class="<%%= controller.controller_name %> <%%= "#{controller.controller_name}-#{controller.action_name}" %> <%%= content_for(:body_classes) %>">
53
+ <%%= render :partial => "shared/facebook_init" %>
54
54
  <div id="container" class="container_24">
55
- <%%= render :partial => "shared/header" %%>
55
+ <%%= render :partial => "shared/header" %>
56
56
 
57
57
  <section id="main" class="grid_24 clearfix">
58
- <%%= render :partial => "shared/flash_messages" %%>
59
- <%% if content_for?(:complex_page_title) %%>
60
- <%%= yield :complex_page_title %%>
61
- <%% elsif content_for?(:page_title) %%>
58
+ <%%= render :partial => "shared/flash_messages" %>
59
+ <%% if content_for?(:complex_page_title) %>
60
+ <%%= yield :complex_page_title %>
61
+ <%% elsif content_for?(:page_title) %>
62
62
  <h1>
63
- <%%= yield :page_title %%>
63
+ <%%= yield :page_title %>
64
64
  </h1>
65
- <%% end %%>
66
- <article class="<%%= content_for?(:article_classes) ? content_for(:article_classes) : 'grid_23 alpha omega' %%>">
67
- <%%= yield %%>
65
+ <%% end %>
66
+ <article class="<%%= content_for?(:article_classes) ? content_for(:article_classes) : 'grid_23 alpha omega' %>">
67
+ <%%= yield %>
68
68
  </article>
69
- <%%= yield :sidebar %%>
69
+ <%%= yield :sidebar %>
70
70
  </section>
71
71
 
72
- <%%= render :partial => "shared/footer" %%>
72
+ <%%= render :partial => "shared/footer" %>
73
73
  </div>
74
74
 
75
- <%%= yield :bottom %%>
75
+ <%%= yield :bottom %>
76
76
  </body>
77
77
  </html>
@@ -5,10 +5,6 @@
5
5
 
6
6
  <nav>
7
7
  <ul>
8
- <li><%= link_to(t(:about_us) ,page_path(:about)) %> <span class="separator"> | </span></li>
9
- <li><%= link_to(t(:contact_us) ,page_path(:contact)) %> <span class="separator"> | </span></li>
10
- <li><%= link_to(t(:privacy_policy) ,page_path(:privacy)) %> <span class="separator"> | </span></li>
11
- <li><%= link_to(t(:terms_of_service) ,page_path(:tos)) %></li>
12
8
  </ul>
13
9
  </nav>
14
10
 
@@ -5,19 +5,7 @@
5
5
 
6
6
  <nav class="clearfix">
7
7
  <ul>
8
- <% if user_signed_in? %>
9
- <li>Welcome <%= current_user.login %><span class="separator"></span></li>
10
- <li><%= link_to t(:support), page_path('support') %><span class="separator"> | </span></li>
11
- <li><%= link_to t(:profile), "" %><span class="separator"> | </span></li>
12
- <li><%= link_to t(:settings), "" %><span class="separator"> | </span></li>
13
- <li><%= link_to t(:sign_out), destroy_user_session_path %></li>
14
- <% else %>
15
- <li><%= link_to t(:about_us), page_path('about') %><span class="separator"> | </span></li>
16
- <li><%= link_to t(:sign_in), new_user_session_path %><span class="separator"> | </span></li>
17
- <li><%= link_to t(:contact_us), page_path('contact') %></li>
18
- <% end %>
19
8
  </ul>
20
9
  </nav>
21
10
 
22
- <%= link_to t(:consumer_app_teaser), page_path('consumer'), :class => "teaser" %>
23
11
  </header>
@@ -1,3 +1,3 @@
1
1
  module Gunnertechnology
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -23,6 +23,8 @@ module Gunnertechnology
23
23
  end
24
24
 
25
25
  config.before_configuration do
26
+ config.action_view.stylesheet_expansions[:defaults] = ["reset", "profiling/yahoo-profiling", "text", "grids/1008_24_10_10", "colorbox", "grids/fluid", "application"]
27
+ config.action_view.javascript_expansions[:defaults] += ["libs/modernizr-1.6.min.js","plugins.js","script.js","libs/dd_belatedpng.js","profiling/yahoo-profiling.min.js"]
26
28
  end
27
29
 
28
30
  config.before_eager_load do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gunnertechnology
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cody Swann
@@ -131,6 +131,7 @@ files:
131
131
  - lib/generators/project/USAGE
132
132
  - lib/generators/project/project_generator.rb
133
133
  - lib/generators/project/templates/app/controllers/authentications_controller.rb
134
+ - lib/generators/project/templates/app/helpers/gunner_technology_helper.rb
134
135
  - lib/generators/project/templates/app/models/authentication.rb
135
136
  - lib/generators/project/templates/app/views/layouts/application.html.erb
136
137
  - lib/generators/project/templates/app/views/shared/_facebook_init.html.erb
@@ -146,7 +147,7 @@ files:
146
147
  - lib/generators/project/templates/config/initializers/omniauth.rb
147
148
  - lib/generators/project/templates/config/providers.yml
148
149
  - lib/generators/project/templates/config/seo_config.yml
149
- - lib/generators/project/templates/db/create_authentications.rb
150
+ - lib/generators/project/templates/db/migrate/create_authentications.rb
150
151
  - lib/generators/project/templates/public/javascripts/libs/PIE.htc
151
152
  - lib/generators/project/templates/public/javascripts/libs/colorpicker.js
152
153
  - lib/generators/project/templates/public/javascripts/libs/dd_belatedpng.js