bootstrappers 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/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bootstrappers.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2012 rocodev,inc
2
+ Copyright (c) 2010-2012 Mike Burns and thoughtbot, inc. ( from suspenders)
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Bootstrappers
2
+
3
+ Bootstrappers is the base Rails application used at [Rocodev](http://rocodev.com).
4
+
5
+ ## Installation
6
+
7
+ First install the bootstrappers gem:
8
+
9
+ gem install bootstrappers
10
+
11
+ Then run:
12
+
13
+ $ bootstrappers project_name
14
+
15
+
16
+ ## Gemfile
17
+
18
+ To see the latest and greatest gems, look at Suspenders' template/Gemfile_additions, which will be appended to the default generated projectname/Gemfile.
19
+
20
+
21
+ It includes application gems like:
22
+
23
+ * [Bootstrap SCSS](https://github.com/anjlab/bootstrap-rails)
24
+ * [Bootstrap Helper](https://github.com/xdite/bootstrap-helper)
25
+ * [SimpleForm](https://github.com/plataformatec/simple_form)
26
+ * [WillPaginate](https://github.com/mislav/will_paginate/)
27
+ * [Compass](http://compass-style.org/)
28
+ * [SeoHelper](https://github.com/techbang/seo_helper)
29
+ * [Capistrano](https://github.com/capistrano/capistrano)
30
+ * [Cape](https://github.com/njonsson/cape)
31
+ * [Magic encoding](https://github.com/m-ryan/magic_encoding)
32
+ * [Settingslogic](https://github.com/binarylogic/settingslogic)
33
+ * [Airbrake](https://github.com/airbrake/airbrake)
34
+ * [NewRelic RPM](https://github.com/newrelic/rpm)
35
+ * [Turbo Sprockets for Rails 3.2.x](https://github.com/ndbroadbent/turbo-sprockets-rails3) Speeds up your Rails 3 rake assets:precompile by only recompiling changed assets
36
+
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create new Pull Request
45
+
46
+
47
+ ## Issues
48
+
49
+
50
+ If you have problems, please create a [Github issue](https://github.com/xdite/bootstrappers/issues).
51
+
52
+ ## Credits
53
+
54
+ Bootstrappers is maintained and funded by [@xdite](http://github.com/xdite)
55
+
56
+ some codes of bootstrappers were borrowed from [suspenders](https://github.com/thoughtbot/suspenders)
57
+
58
+
59
+ License
60
+ -------
61
+
62
+ Suspenders is Copyright © 2012 rocodev. It is free software, and may be redistributed under the terms specified in the LICENSE file.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/setup'
2
+ require 'bundler/gem_tasks'
data/bin/bootstrapers ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.join('..', 'lib', 'bootstrappers', 'generators', 'app_generator'), File.dirname(__FILE__))
4
+ require File.expand_path(File.join('..', 'lib', 'bootstrappers', 'actions'), File.dirname(__FILE__))
5
+ require File.expand_path(File.join('..', 'lib', 'bootstrappers', 'app_builder'), File.dirname(__FILE__))
6
+
7
+ templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
8
+
9
+ Bootstrappers::AppGenerator.source_root templates_root
10
+ Bootstrappers::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
11
+ Bootstrappers::AppGenerator.start
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bootstrappers/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "bootstrappers"
8
+ gem.version = Bootstrappers::VERSION
9
+ gem.authors = ["xdite"]
10
+ gem.email = ["xdite@rocodev.com"]
11
+ gem.description = %q{ Write a gem description}
12
+ gem.summary = %q{ Write a gem summary}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency 'rails', '3.2.8'
21
+ gem.add_dependency 'bundler', '>= 1.1'
22
+ end
@@ -0,0 +1,5 @@
1
+ require "bootstrappers/version"
2
+
3
+ module Bootstrappers
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,35 @@
1
+ module Bootstrappers
2
+ module Actions
3
+ def concat_file(source, destination)
4
+ contents = IO.read(find_in_source_paths(source))
5
+ append_file destination, contents
6
+ end
7
+
8
+ def replace_in_file(relative_path, find, replace)
9
+ path = File.join(destination_root, relative_path)
10
+ contents = IO.read(path)
11
+ unless contents.gsub!(find, replace)
12
+ raise "#{find.inspect} not found in #{relative_path}"
13
+ end
14
+ File.open(path, "w") { |file| file.write(contents) }
15
+ end
16
+
17
+ def action_mailer_host(rails_env, host)
18
+ inject_into_file(
19
+ "config/environments/#{rails_env}.rb",
20
+ "\n\n config.action_mailer.default_url_options = { :host => '#{host}' }",
21
+ :before => "\nend"
22
+ )
23
+ end
24
+
25
+ def download_file(uri_string, destination)
26
+ uri = URI.parse(uri_string)
27
+ http = Net::HTTP.new(uri.host, uri.port)
28
+ http.use_ssl = true if uri_string =~ /^https/
29
+ request = Net::HTTP::Get.new(uri.path)
30
+ contents = http.request(request).body
31
+ path = File.join(destination_root, destination)
32
+ File.open(path, "w") { |file| file.write(contents) }
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,130 @@
1
+ module Bootstrappers
2
+ class AppBuilder < Rails::AppBuilder
3
+
4
+ include Bootstrappers::Actions
5
+
6
+ def readme
7
+ template 'README.md.erb', 'README.md'
8
+ end
9
+
10
+ def remove_public_index
11
+ remove_file 'public/index.html'
12
+ end
13
+
14
+ def remove_rails_logo_image
15
+ remove_file 'app/assets/images/rails.png'
16
+ end
17
+
18
+ def raise_delivery_errors
19
+ replace_in_file 'config/environments/development.rb',
20
+ 'raise_delivery_errors = false', 'raise_delivery_errors = true'
21
+ end
22
+
23
+ def create_partials_directory
24
+ empty_directory 'app/views/application'
25
+ empty_directory 'app/views/pages'
26
+ empty_directory 'app/views/common'
27
+ end
28
+
29
+ def create_application_layout
30
+ template 'bootstrappers_layout.html.erb.erb',
31
+ 'app/views/layouts/application.html.erb',
32
+ :force => true
33
+ end
34
+
35
+ def create_common_javascripts
36
+ directory 'javascripts', 'app/assets/javascripts'
37
+ end
38
+
39
+ def create_common_stylesheets
40
+ directory 'stylesheets', 'app/assets/stylesheets'
41
+ end
42
+
43
+ def create_common_partial
44
+ directory 'common', 'app/views/common'
45
+ end
46
+
47
+ def add_jquery_ui
48
+ inject_into_file 'app/assets/javascripts/application.js',
49
+ "//= require jquery-ui\n", :before => '//= require_tree .'
50
+ end
51
+
52
+ def add_bootstrap_js
53
+ inject_into_file 'app/assets/javascripts/application.js',
54
+ "//= require twitter/bootstrap/alert\n", :before => '//= require_tree .'
55
+ end
56
+
57
+ def add_custom_gems
58
+ additions_path = find_in_source_paths 'Gemfile_additions'
59
+ new_gems = File.open(additions_path).read
60
+ inject_into_file 'Gemfile', "\n#{new_gems}",
61
+ :after => /gem 'jquery-rails'/
62
+ end
63
+
64
+ def add_devise_gem
65
+ inject_into_file 'Gemfile', "\ngem 'devise'",
66
+ :after => /gem 'jquery-rails'/
67
+ end
68
+
69
+ def use_mysql_config_template
70
+
71
+ template 'mysql_database.yml.erb', 'config/database.yml',
72
+ :force => true
73
+ template 'mysql_database.yml.erb', 'config/database.yml.example',
74
+ :force => true
75
+ end
76
+
77
+ def create_database
78
+ bundle_command 'exec rake db:create'
79
+ end
80
+
81
+ def generate_devise
82
+ generate 'devise:install'
83
+ generate 'devise User'
84
+ end
85
+
86
+ def build_settings_from_config
87
+
88
+ template 'setting.rb', 'app/models/setting.rb',:force => true
89
+ ## seo_helper initialize setting
90
+ # FIXME : temp mark
91
+ # template 'seo_helper.rb', 'config/initializers/seo_helper.rb',:force => true
92
+ template 'config_yml.erb', 'config/config.yml',:force => true
93
+ end
94
+
95
+ def create_initializers
96
+ directory 'initializers', 'config/initializers'
97
+ end
98
+
99
+ def setup_stylesheets
100
+ copy_file 'app/assets/stylesheets/application.css', 'app/assets/stylesheets/application.css.scss'
101
+ remove_file 'app/assets/stylesheets/application.css'
102
+ concat_file 'import_scss_styles', 'app/assets/stylesheets/application.css.scss'
103
+ end
104
+
105
+ def setup_root_route
106
+ template 'welcome.html.erb', 'app/views/pages/welcome.html.erb',:force => true
107
+ route "root :to => 'high_voltage/pages#show', :id => 'welcome'"
108
+ end
109
+
110
+ def remove_routes_comment_lines
111
+ replace_in_file 'config/routes.rb', /Application\.routes\.draw do.*end/m, "Application.routes.draw do\nend"
112
+ end
113
+
114
+ def gitignore_files
115
+ concat_file 'bootstrappers_gitignore', '.gitignore'
116
+ ['app/models',
117
+ 'app/assets/images',
118
+ 'app/views/pages',
119
+ 'db/migrate',
120
+ 'log',
121
+ ].each do |dir|
122
+ empty_directory_with_gitkeep dir
123
+ end
124
+ end
125
+
126
+ def init_git
127
+ run 'git init'
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,146 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/rails/app/app_generator'
3
+
4
+
5
+ module Bootstrappers
6
+ class AppGenerator < Rails::Generators::AppGenerator
7
+
8
+ class_option :database, :type => :string, :aliases => '-d', :default => 'mysql',
9
+ :desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})"
10
+
11
+ def finish_template
12
+ invoke :bootstrappers_customization
13
+ super
14
+ end
15
+
16
+ def bootstrappers_customization
17
+ invoke :remove_files_we_dont_need
18
+ invoke :setup_development_environment
19
+ invoke :create_bootstrappers_views
20
+ invoke :create_common_partial
21
+ invoke :create_common_javascripts
22
+ invoke :create_common_stylesheets
23
+ invoke :add_common_js_library
24
+ invoke :customize_gemfile
25
+ invoke :setup_database
26
+ invoke :configure_app
27
+ # invoke :create_initializers
28
+ invoke :setup_stylesheets
29
+ invoke :remove_routes_comment_lines
30
+ invoke :setup_root_route
31
+ invoke :setup_git
32
+ end
33
+
34
+ def remove_files_we_dont_need
35
+ build :remove_public_index
36
+ build :remove_rails_logo_image
37
+ end
38
+
39
+ def setup_development_environment
40
+ say 'Setting up the development environment'
41
+ build :raise_delivery_errors
42
+ end
43
+
44
+ def create_bootstrappers_views
45
+ say 'Creating bootstrappers views'
46
+ build :create_partials_directory
47
+ build :create_application_layout
48
+ end
49
+
50
+ def create_common_partial
51
+ say 'Pulling in some common partials'
52
+ build :create_common_partial
53
+ end
54
+
55
+ def create_common_javascripts
56
+ say 'Pulling in some common javascripts'
57
+ build :create_common_javascripts
58
+ end
59
+
60
+ def create_common_stylesheets
61
+ say 'Pulling in some common stylesheets'
62
+ build :create_common_stylesheets
63
+ end
64
+
65
+ def add_common_js_library
66
+ say 'Add add_common_js_library to the standard application.js'
67
+ build :add_jquery_ui
68
+ build :add_bootstrap_js
69
+ end
70
+
71
+
72
+
73
+ def customize_gemfile
74
+ build :add_custom_gems
75
+ build :add_devise_gem
76
+ bundle_command 'install'
77
+ end
78
+
79
+ def setup_database
80
+ say 'Setting up database'
81
+
82
+ if 'mysql' == options[:database]
83
+ build :use_mysql_config_template
84
+ end
85
+
86
+ build :create_database
87
+ end
88
+
89
+ def configure_app
90
+ say 'Configuring app'
91
+ build :setup_devise
92
+ build :build_settings_from_config
93
+ # TODO
94
+ end
95
+
96
+ def create_initializers
97
+ say 'create_initializers'
98
+ build :create_initializers
99
+ end
100
+
101
+ def setup_devise
102
+ build :generate_devise
103
+ end
104
+
105
+
106
+ def customize_error_pages
107
+ say 'Customizing the 500/404/422 pages'
108
+ build :customize_error_pages
109
+ end
110
+
111
+
112
+ def setup_stylesheets
113
+ say 'Set up stylesheets'
114
+ build :setup_stylesheets
115
+ end
116
+
117
+ def remove_routes_comment_lines
118
+ build :remove_routes_comment_lines
119
+ end
120
+
121
+ def setup_root_route
122
+ build :setup_root_route
123
+ end
124
+
125
+ def setup_git
126
+ say 'Initializing git'
127
+ invoke :setup_gitignore
128
+ invoke :init_git
129
+ end
130
+
131
+ def setup_gitignore
132
+ build :gitignore_files
133
+ end
134
+
135
+ def init_git
136
+ build :init_git
137
+ end
138
+
139
+ protected
140
+
141
+ def get_builder_class
142
+ Bootstrappers::AppBuilder
143
+ end
144
+
145
+ end
146
+ end
@@ -0,0 +1,3 @@
1
+ module Bootstrappers
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,30 @@
1
+
2
+ gem 'seo_helper', '~> 1.0'
3
+
4
+ gem "settingslogic"
5
+
6
+ gem 'anjlab-bootstrap-rails', '>= 2.1', :require => 'bootstrap-rails'
7
+ gem "bootstrap_helper", "2.1.0"
8
+
9
+ gem "simple_form", "2.0.3"
10
+ gem "will_paginate", "3.0.3"
11
+
12
+ gem 'high_voltage'
13
+ gem 'airbrake'
14
+
15
+ gem 'turbo-sprockets-rails3'
16
+
17
+ group :assets do
18
+ gem "compass-rails"
19
+ end
20
+
21
+ group :development do
22
+ gem "capistrano"
23
+ gem "cape"
24
+ gem "magic_encoding"
25
+ gem "annotate"
26
+ end
27
+
28
+ group :production do
29
+ gem 'newrelic_rpm'
30
+ end
@@ -0,0 +1,5 @@
1
+ * [Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide)
2
+ * [Rails Style Guide](https://github.com/bbatsov/rails-style-guide)
3
+ * [Better Specs](http://betterspecs.org/)
4
+ * [Rails Best Practices](http://rails-bestpractices.com/)
5
+
@@ -0,0 +1,7 @@
1
+ *.DS_Store
2
+ *.swp
3
+ .env
4
+ public/uploads
5
+ vendor/bundler_gems
6
+ config/database.yml
7
+ config/config.yml
@@ -0,0 +1,53 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <%%= render_page_title_tag %>
5
+ <%%= render_page_description_meta_tag %>
6
+ <%%= render_page_keywords_meta_tag %>
7
+ <%%= render_page_image_link_tag %>
8
+ <%%= csrf_meta_tag %>
9
+
10
+ <%%= stylesheet_link_tag "application" %>
11
+
12
+ <%%= yield :stylesheets %>
13
+
14
+ <meta property="og:title" content="<%%= page_title || SeoHelper.configuration.site_name %>"/>
15
+ <meta property="og:description" content="<%%= page_description || SeoHelper.configuration.default_page_description %>"/>
16
+ <meta property="og:image:url" content="<%%= page_image || SeoHelper.configuration.default_page_image %>"/>
17
+
18
+ </head>
19
+
20
+ <%%= render_body_tag %>
21
+
22
+ <%%= render :partial => "common/menu" %>
23
+
24
+ <div class="container">
25
+
26
+ <%%= notice_message %>
27
+
28
+ <div class="content">
29
+ <div class="row">
30
+ <%%= yield %>
31
+ <%%= yield (:sidebar) %>
32
+ </div>
33
+
34
+ </div>
35
+
36
+ <%%= render :partial => "common/footer" %>
37
+ </div>
38
+
39
+
40
+
41
+
42
+
43
+ <%%= render :partial => "common/bootstrap_modal" %>
44
+ <%%= render :partial => "common/facebook_js" %>
45
+ <%%= render :partial => "common/google_analytics" %>
46
+
47
+ <%%= javascript_include_tag "application" %>
48
+
49
+ <%%= yield :javascripts %>
50
+
51
+
52
+ </body>
53
+ </html>
@@ -0,0 +1,4 @@
1
+
2
+ <div id="modal-from-dom" class="modal hide fade">
3
+
4
+ </div>
@@ -0,0 +1,9 @@
1
+
2
+ <div id="fb-root"></div>
3
+ <script>(function(d, s, id) {
4
+ var js, fjs = d.getElementsByTagName(s)[0];
5
+ if (d.getElementById(id)) {return;}
6
+ js = d.createElement(s); js.id = id;
7
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=289554394417824";
8
+ fjs.parentNode.insertBefore(js, fjs);
9
+ }(document, 'script', 'facebook-jssdk'));</script>
@@ -0,0 +1,10 @@
1
+ <footer class="footer">
2
+ <%= render_list :class => "nav nav-pills pull-right" do |li|
3
+ #li << link_to( "Link1", "#")
4
+ #li << link_to( "Link2", "#")
5
+ #li << link_to( "Link3", "#")
6
+ #li << link_to( "Link4", "#")
7
+ end %>
8
+ <p class="copyright">Copyright @2012 <%= Setting.app_name %> All rights reserved.</p>
9
+
10
+ </footer>
@@ -0,0 +1,13 @@
1
+ <script type="text/javascript">
2
+
3
+ var _gaq = _gaq || [];
4
+ _gaq.push(['_setAccount', '<%= Setting.google_analytics_key %>']);
5
+ _gaq.push(['_trackPageview']);
6
+
7
+ (function() {
8
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
9
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
10
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
11
+ })();
12
+
13
+ </script>
@@ -0,0 +1,32 @@
1
+ <div class="navbar navbar-fixed-top ">
2
+ <div class="navbar-inner top ">
3
+ <div class="container">
4
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5
+ <span class="icon-bar"></span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ </a>
9
+
10
+ <%= link_to(Setting.app_name, Setting.domain , :class => "brand" )%>
11
+
12
+ <%= render :partial => "common/search_form" %>
13
+
14
+
15
+
16
+ <div class="nav-collapse">
17
+
18
+ <%= render_list :class => "nav" do |li|
19
+ li << link_to("Link-1","Link-1")
20
+ li << link_to("Link-2","Link-2")
21
+ li << link_to("Link-3","Link-3")
22
+ end %>
23
+
24
+ <%= render :partial => "common/user_nav"%>
25
+
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ <%= yield :submenu %>
31
+
32
+ </div>
@@ -0,0 +1,5 @@
1
+ <%= form_tag "/search", :class => "navbar-search", :method => :get do %>
2
+ <span class="nav-toolbar-icon nav-toolbar-icon-search"></span>
3
+ <input type="text" name="q" class="search-query " value="<%= @query_string %>" placeholder="<%= @query_string || "Search" %>" />
4
+
5
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <ul class="nav pills pull-right">
2
+ <% if current_user %>
3
+
4
+ <li class="dropdown">
5
+ <%= link_to "/accoount" , :class => "dropdown-toggle", :data => { :toogle => "dropdown" } do %>
6
+ <%= current_user.email %>
7
+ <% end %>
8
+
9
+ <%= render_list :class => "dropdown-menu" do |li|
10
+ li << link_to("Logout",destroy_user_session_path, :method => :delete )
11
+ end %>
12
+
13
+ </li>
14
+
15
+ <% else %>
16
+ <li> <%= link_to( "Sing Up" ,new_user_registration_path) %> </li>
17
+ <li> <%= link_to( "Login", new_user_session_path ) %> </li>
18
+ <% end %>
19
+
20
+
21
+ </ul>
@@ -0,0 +1,18 @@
1
+ defaults: &defaults
2
+ app_name: "<%= app_name %>"
3
+ domain: "http://<%= app_name %>.dev"
4
+ facebook_app_id:
5
+ facebook_secret:
6
+ admin_emails:
7
+ - ""
8
+ google_analytics_key: ""
9
+ default_logo_url: "/logo.png"
10
+
11
+ development:
12
+ <<: *defaults
13
+
14
+ test:
15
+ <<: *defaults
16
+
17
+ production:
18
+ <<: *defaults
@@ -0,0 +1,3 @@
1
+ @import "bootstrap-setting";
2
+ @import "twitter/bootstrap";
3
+ @import "bootstrap-override";
@@ -0,0 +1,11 @@
1
+ # -*- encoding : utf-8 -*-
2
+ SeoHelper.configure do |config|
3
+ config.skip_blank = false
4
+ config.site_name = Setting.app_name
5
+ config.default_page_description = "The easiest way to keep like stuff on facebook"
6
+ config.default_page_keywords = "Facebook Likes Stuff"
7
+ config.default_page_image = Setting.domain + Setting.default_logo_url
8
+ config.site_name_formatter = lambda { |title, site_name| "#{title} « #{site_name}".html_safe }
9
+ config.pagination_formatter = lambda { |title, page_number| "#{title} - Page No.#{page_number}" }
10
+
11
+ end
File without changes
@@ -0,0 +1,12 @@
1
+ development: &default
2
+ adapter: mysql2
3
+ encoding: utf8
4
+ database: <%= app_name %>_development
5
+ host: localhost
6
+ username: root
7
+ password: "123456"
8
+
9
+ test: &TEST
10
+ <<: *default
11
+ database: <%= app_name %>_test
12
+
@@ -0,0 +1,5 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Setting < Settingslogic
3
+ source "#{Rails.root}/config/config.yml"
4
+ namespace Rails.env
5
+ end
@@ -0,0 +1,11 @@
1
+ body{
2
+ padding-top: 60px;
3
+ }
4
+
5
+ ul.nav li.dropdown:hover .dropdown-menu{
6
+ display: block;
7
+ }
8
+
9
+ .navbar .dropdown-menu {
10
+ margin-top: 0px;
11
+ }
File without changes
@@ -0,0 +1,3 @@
1
+ <div class="span12">
2
+ <h1> Welcome </h1>
3
+ </div>
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bootstrappers
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - xdite
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2012-10-08 00:00:00 +08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rails
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - "="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 3
29
+ - 2
30
+ - 8
31
+ version: 3.2.8
32
+ type: :runtime
33
+ prerelease: false
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: bundler
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 1
44
+ - 1
45
+ version: "1.1"
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: *id002
49
+ description: " Write a gem description"
50
+ email:
51
+ - xdite@rocodev.com
52
+ executables:
53
+ - bootstrapers
54
+ extensions: []
55
+
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - .gitignore
60
+ - Gemfile
61
+ - LICENSE.txt
62
+ - README.md
63
+ - Rakefile
64
+ - bin/bootstrapers
65
+ - bootstrapers.gemspec
66
+ - lib/bootstrapers.rb
67
+ - lib/bootstrappers/actions.rb
68
+ - lib/bootstrappers/app_builder.rb
69
+ - lib/bootstrappers/generators/app_generator.rb
70
+ - lib/bootstrappers/version.rb
71
+ - templates/Gemfile_additions
72
+ - templates/README.md.erb
73
+ - templates/bootstrappers_gitignore
74
+ - templates/bootstrappers_layout.html.erb.erb
75
+ - templates/common/_bootstrap_modal.html.erb
76
+ - templates/common/_facebook_js.erb
77
+ - templates/common/_footer.html.erb
78
+ - templates/common/_google_analytics.html.erb
79
+ - templates/common/_menu.html.erb
80
+ - templates/common/_search_form.html.erb
81
+ - templates/common/_user_nav.html.erb
82
+ - templates/config_yml.erb
83
+ - templates/import_scss_styles
84
+ - templates/initializers/seo_helper.rb
85
+ - templates/javascripts/README
86
+ - templates/mysql_database.yml.erb
87
+ - templates/setting.rb
88
+ - templates/stylesheets/bootstrap-override.css.scss
89
+ - templates/stylesheets/bootstrap-setting.css.scss
90
+ - templates/welcome.html.erb
91
+ has_rdoc: true
92
+ homepage: ""
93
+ licenses: []
94
+
95
+ post_install_message:
96
+ rdoc_options: []
97
+
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 2624694465842870349
106
+ segments:
107
+ - 0
108
+ version: "0"
109
+ required_rubygems_version: !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: 2624694465842870349
115
+ segments:
116
+ - 0
117
+ version: "0"
118
+ requirements: []
119
+
120
+ rubyforge_project:
121
+ rubygems_version: 1.3.7.1
122
+ signing_key:
123
+ specification_version: 3
124
+ summary: Write a gem summary
125
+ test_files: []
126
+