rails_mongo_backbone_bootstrap_tmpl 0.0.2

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.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +29 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +52 -0
  7. data/Rakefile +13 -0
  8. data/bin/rmbb_generator +65 -0
  9. data/lib/rails_mongo_backbone_bootstrap_tmpl/version.rb +3 -0
  10. data/lib/rails_mongo_backbone_bootstrap_tmpl.rb +5 -0
  11. data/rails_mongo_backbone_bootstrap_tmpl.gemspec +25 -0
  12. data/spec/base_spec.rb +6 -0
  13. data/spec/spec_helper.rb +10 -0
  14. data/template/Gemfile +107 -0
  15. data/template/Gemfile.lock +421 -0
  16. data/template/README.rdoc +261 -0
  17. data/template/Rakefile +7 -0
  18. data/template/app/assets/images/rails.png +0 -0
  19. data/template/app/assets/javascripts/app/app.js.coffee +41 -0
  20. data/template/app/assets/javascripts/app/views/common/popup_window.js.coffee +45 -0
  21. data/template/app/assets/javascripts/app/views/common/popup_window_template.jst.skim +11 -0
  22. data/template/app/assets/javascripts/application.js +19 -0
  23. data/template/app/assets/javascripts/home.js.coffee +7 -0
  24. data/template/app/assets/javascripts/vendor/backbone-min.js +4 -0
  25. data/template/app/assets/javascripts/vendor/backbone-min.map +1 -0
  26. data/template/app/assets/javascripts/vendor/bootstrap.min.js +6 -0
  27. data/template/app/assets/javascripts/vendor/jquery-1.7.2.min.js +4 -0
  28. data/template/app/assets/javascripts/vendor/select2.min.js +22 -0
  29. data/template/app/assets/javascripts/vendor/select2_locale_zh-CN.js +14 -0
  30. data/template/app/assets/javascripts/vendor/underscore-min.js +1 -0
  31. data/template/app/assets/stylesheets/application.css +14 -0
  32. data/template/app/assets/stylesheets/bootstrap.css +6805 -0
  33. data/template/app/assets/stylesheets/bootstrap_and_overrides.sass +7 -0
  34. data/template/app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot +0 -0
  35. data/template/app/assets/stylesheets/fonts/glyphicons-halflings-regular.svg +228 -0
  36. data/template/app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf +0 -0
  37. data/template/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff +0 -0
  38. data/template/app/assets/stylesheets/home.css.sass +4 -0
  39. data/template/app/controllers/application_controller.rb +3 -0
  40. data/template/app/controllers/home_controller.rb +5 -0
  41. data/template/app/helpers/application_helper.rb +3 -0
  42. data/template/app/helpers/home_helper.rb +3 -0
  43. data/template/app/mailers/.gitkeep +0 -0
  44. data/template/app/models/.gitkeep +0 -0
  45. data/template/app/views/home/index.html.slim +2 -0
  46. data/template/app/views/layouts/application.html.slim +36 -0
  47. data/template/config/application.rb +81 -0
  48. data/template/config/boot.rb +6 -0
  49. data/template/config/environment.rb +5 -0
  50. data/template/config/environments/development.rb +31 -0
  51. data/template/config/environments/production.rb +65 -0
  52. data/template/config/environments/test.rb +35 -0
  53. data/template/config/initializers/backtrace_silencers.rb +8 -0
  54. data/template/config/initializers/inflections.rb +16 -0
  55. data/template/config/initializers/mime_types.rb +6 -0
  56. data/template/config/initializers/secret_token.rb +8 -0
  57. data/template/config/initializers/session_store.rb +9 -0
  58. data/template/config/initializers/wrap_parameters.rb +11 -0
  59. data/template/config/locales/en.yml +5 -0
  60. data/template/config/mongoid.yml +88 -0
  61. data/template/config/routes.rb +59 -0
  62. data/template/config.ru +4 -0
  63. data/template/db/seeds.rb +7 -0
  64. data/template/lib/assets/.gitkeep +0 -0
  65. data/template/lib/tasks/.gitkeep +0 -0
  66. data/template/log/.gitkeep +0 -0
  67. data/template/public/404.html +26 -0
  68. data/template/public/422.html +26 -0
  69. data/template/public/500.html +25 -0
  70. data/template/public/favicon.ico +0 -0
  71. data/template/public/robots.txt +5 -0
  72. data/template/script/rails +6 -0
  73. data/template/spec/controllers/home_controller_spec.rb +12 -0
  74. data/template/spec/helpers/home_helper_spec.rb +15 -0
  75. data/template/spec/spec_helper.rb +38 -0
  76. data/template/spec/views/home/index.html.slim_spec.rb +5 -0
  77. data/template/test/fixtures/.gitkeep +0 -0
  78. data/template/test/functional/.gitkeep +0 -0
  79. data/template/test/integration/.gitkeep +0 -0
  80. data/template/test/performance/browsing_test.rb +12 -0
  81. data/template/test/test_helper.rb +7 -0
  82. data/template/test/unit/.gitkeep +0 -0
  83. data/template/vendor/assets/javascripts/.gitkeep +0 -0
  84. data/template/vendor/assets/stylesheets/.gitkeep +0 -0
  85. data/template/vendor/plugins/.gitkeep +0 -0
  86. metadata +187 -0
@@ -0,0 +1,65 @@
1
+ <%=app_name%>::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ end
65
+
@@ -0,0 +1,35 @@
1
+ <%=app_name%>::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
8
+
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
16
+
@@ -0,0 +1,6 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
6
+
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ <%=app_name%>::Application.config.secret_token = '54383c8238f2a15d8ab767a95943e0ac2a3ba6d4b4bc982041d61eb29d8b5234d0e2d82b6a1800f4f005d361bb4c741fe6de43be53f26874579fa734acefb0a3'
8
+
@@ -0,0 +1,9 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ <%=app_name%>::Application.config.session_store :cookie_store, key: '_datamonster_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Datamonster::Application.config.session_store :active_record_store
9
+
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,88 @@
1
+ production:
2
+
3
+ sessions:
4
+
5
+ default:
6
+ database: <%=db_name%>_production
7
+
8
+ hosts:
9
+ - localhost:27017
10
+ options:
11
+ consistency: :strong
12
+
13
+ options:
14
+ raise_not_found_error: false
15
+ development:
16
+ # Configure available database sessions. (required)
17
+ sessions:
18
+ # Defines the default session. (required)
19
+ default:
20
+ # Defines the name of the default database that Mongoid can connect to.
21
+ # (required).
22
+ database: <%=db_name%>_development
23
+ # Provides the hosts the default session can connect to. Must be an array
24
+ # of host:port pairs. (required)
25
+ hosts:
26
+ - localhost:27017
27
+ options:
28
+ # Change whether the session persists in safe mode by default.
29
+ # (default: false)
30
+ # safe: false
31
+
32
+ # Change the default consistency model to :eventual or :strong.
33
+ # :eventual will send reads to secondaries, :strong sends everything
34
+ # to master. (default: :eventual)
35
+ consistency: :strong
36
+ # Configure Mongoid specific options. (optional)
37
+ options:
38
+ # Configuration for whether or not to allow access to fields that do
39
+ # not have a field definition on the model. (default: true)
40
+ # allow_dynamic_fields: true
41
+
42
+ # Enable the identity map, needed for eager loading. (default: false)
43
+ # identity_map_enabled: false
44
+
45
+ # Includes the root model name in json serialization. (default: false)
46
+ # include_root_in_json: false
47
+
48
+ # Include the _type field in serializaion. (default: false)
49
+ # include_type_for_serialization: false
50
+
51
+ # Preload all models in development, needed when models use
52
+ # inheritance. (default: false)
53
+ # preload_models: false
54
+
55
+ # Protect id and type from mass assignment. (default: true)
56
+ # protect_sensitive_fields: true
57
+
58
+ # Raise an error when performing a #find and the document is not found.
59
+ # (default: true)
60
+ raise_not_found_error: false
61
+
62
+ # Raise an error when defining a scope with the same name as an
63
+ # existing method. (default: false)
64
+ # scope_overwrite_exception: false
65
+
66
+ # Skip the database version check, used when connecting to a db without
67
+ # admin access. (default: false)
68
+ # skip_version_check: false
69
+
70
+ # User Active Support's time zone in conversions. (default: true)
71
+ # use_activesupport_time_zone: true
72
+
73
+ # Ensure all times are UTC in the app side. (default: false)
74
+ # use_utc: false
75
+ test:
76
+
77
+ sessions:
78
+
79
+ default:
80
+ database: <%=db_name%>_test
81
+
82
+ hosts:
83
+ - localhost:27017
84
+
85
+ options:
86
+ consistency: :strong
87
+
88
+
@@ -0,0 +1,59 @@
1
+ <%=app_name%>::Application.routes.draw do
2
+
3
+ # The priority is based upon order of creation:
4
+ # first created -> highest priority.
5
+
6
+ # Sample of regular route:
7
+ # match 'products/:id' => 'catalog#view'
8
+ # Keep in mind you can assign values other than :controller and :action
9
+
10
+ # Sample of named route:
11
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
12
+ # This route can be invoked with purchase_url(:id => product.id)
13
+
14
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Sample resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Sample resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Sample resource route with more complex sub-resources
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', :on => :collection
40
+ # end
41
+ # end
42
+
43
+ # Sample resource route within a namespace:
44
+ # namespace :admin do
45
+ # # Directs /admin/products/* to Admin::ProductsController
46
+ # # (app/controllers/admin/products_controller.rb)
47
+ # resources :products
48
+ # end
49
+
50
+ # You can have the root of your site routed with "root"
51
+ # just remember to delete public/index.html.
52
+ root :to => 'home#index'
53
+
54
+ # See how all your routes lay out with "rake routes"
55
+
56
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
57
+ # Note: This route will make all actions in every controller accessible via GET requests.
58
+ # match ':controller(/:action(/:id))(.:format)'
59
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run <%=app_name%>::Application
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /