o2webappizer 0.1.0 → 0.1.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +4 -9
  4. data/bin/o2webappizer +1 -1
  5. data/lib/o2webappizer.rb +1 -0
  6. data/lib/o2webappizer/app_builder.rb +167 -0
  7. data/lib/o2webappizer/generators/app_generator.rb +29 -0
  8. data/lib/o2webappizer/version.rb +1 -1
  9. data/templates/{dot_gitignore → .gitignore.tt} +4 -5
  10. data/templates/.ruby-version.tt +1 -0
  11. data/templates/Gemfile.tt +101 -0
  12. data/templates/README.md.tt +33 -0
  13. data/templates/app/assets/javascripts/app.js.coffee +7 -0
  14. data/templates/app/assets/javascripts/application.js.coffee +27 -0
  15. data/templates/app/assets/stylesheets/application.sass +20 -0
  16. data/templates/app/controllers/application_controller.rb +9 -0
  17. data/templates/app/controllers/cms/authenticate.rb.tt +38 -0
  18. data/templates/app/helpers/application_helper.rb +2 -0
  19. data/templates/app/helpers/spree/frontend_helper_decorator.rb +12 -0
  20. data/templates/app/mailers/application_mailer.rb +3 -0
  21. data/templates/app/views/layouts/application.html.erb.tt +27 -0
  22. data/templates/app/views/layouts/mailer.html.erb +1 -0
  23. data/templates/app/views/layouts/mailer.text.erb +1 -0
  24. data/templates/app/views/spree/layouts/spree_application.html.erb +37 -0
  25. data/templates/app/views/spree/shared/_head.html.erb +14 -0
  26. data/templates/app/views/spree/shared/_main_nav_bar.html.erb +18 -0
  27. data/templates/config/database.yml.tt +99 -0
  28. data/templates/config/initializers/assets.rb.tt +19 -0
  29. data/templates/config/initializers/devise.rb.tt +1 -0
  30. data/templates/config/initializers/lazyload.rb +3 -0
  31. data/templates/config/initializers/rails_admin.rb +101 -0
  32. data/templates/config/initializers/rails_admin_cms.rb +17 -0
  33. data/templates/config/initializers/rich.rb +142 -0
  34. data/templates/config/initializers/simple_form.rb +165 -0
  35. data/templates/config/initializers/simple_form_bootstrap.rb +149 -0
  36. data/templates/config/initializers/spree.rb +55 -0
  37. data/templates/config/locales/en.yml +7 -0
  38. data/templates/config/locales/routes.en.yml +3 -0
  39. data/templates/config/locales/simple_form.en.yml +31 -0
  40. data/templates/config/routes.rb.tt +68 -0
  41. data/templates/config/secrets.yml.tt +28 -0
  42. data/templates/public/404.html +67 -0
  43. data/templates/public/422.html +67 -0
  44. data/templates/public/500.html +66 -0
  45. data/templates/public/favicon.ico +0 -0
  46. data/templates/public/images/full/missing.png +0 -0
  47. data/templates/public/images/huge/missing.png +0 -0
  48. data/templates/public/images/large/missing.png +0 -0
  49. data/templates/public/images/loading.gif +0 -0
  50. data/templates/public/images/medium/missing.png +0 -0
  51. data/templates/public/images/mini/missing.png +0 -0
  52. data/templates/public/images/original/missing.png +0 -0
  53. data/templates/public/images/rich_thumb/missing.png +0 -0
  54. data/templates/public/images/small/missing.png +0 -0
  55. data/templates/public/images/thumb/missing.png +0 -0
  56. data/templates/public/robots.txt.tt +15 -0
  57. data/templates/vendor/assets/javascripts/jquery.lazyload.js +242 -0
  58. data/templates/vendor/assets/javascripts/modernizr.js +3 -0
  59. data/templates/vendor/assets/javascripts/spree/backend/all.js +11 -0
  60. data/templates/vendor/assets/javascripts/spree/frontend/all.js +13 -0
  61. data/templates/vendor/assets/stylesheets/nprogress-variables.sass +3 -0
  62. data/templates/vendor/assets/stylesheets/spree/backend/all.css +10 -0
  63. data/templates/vendor/assets/stylesheets/spree/frontend/all.css +12 -0
  64. metadata +58 -3
@@ -0,0 +1,55 @@
1
+ # Configure Solidus Preferences
2
+ # See http://docs.solidus.io/Spree/AppConfiguration.html for details
3
+
4
+ Spree.config do |config|
5
+ # Without this preferences are loaded and persisted to the database. This
6
+ # changes them to be stored in memory.
7
+ # This will be the default in a future version.
8
+ config.use_static_preferences!
9
+
10
+ # Core:
11
+
12
+ # Default currency for new sites
13
+ config.currency = "CAD"
14
+
15
+ # from address for transactional emails
16
+ config.mails_from = "store@example.com"
17
+
18
+ # Uncomment to stop tracking inventory levels in the application
19
+ # config.track_inventory_levels = false
20
+
21
+ # When true, product caches are only invalidated when they come in or out of
22
+ # stock. Default is to invalidate cache on any inventory changes.
23
+ # config.binary_inventory_cache = true
24
+
25
+
26
+ # Frontend:
27
+
28
+ # Custom logo for the frontend
29
+ # config.logo = "logo/solidus_logo.png"
30
+
31
+ # Template to use when rendering layout
32
+ # config.layout = "spree/layouts/spree_application"
33
+
34
+
35
+ # Admin:
36
+
37
+ # Custom logo for the admin
38
+ # config.admin_interface_logo = "logo/solidus_logo.png"
39
+
40
+ # Gateway credentials can be configured statically here and referenced from
41
+ # the admin. They can also be fully configured from the admin.
42
+ #
43
+ # config.static_model_preferences.add(
44
+ # Spree::Gateway::StripeGateway,
45
+ # 'stripe_env_credentials',
46
+ # secret_key: ENV['STRIPE_SECRET_KEY'],
47
+ # publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
48
+ # server: Rails.env.production? ? 'production' : 'test',
49
+ # test: !Rails.env.production?
50
+ # )
51
+ end
52
+
53
+ Spree.user_class = "Spree::User" # "Spree::LegacyUser"
54
+ # SpreeI18n::Config.available_locales = I18n.available_locales # displayed on translation forms
55
+ # SpreeGlobalize::Config.supported_locales = I18n.available_locales # displayed on frontend select box
@@ -0,0 +1,7 @@
1
+ en:
2
+ 'yes': "yes"
3
+ 'no': 'no'
4
+ time:
5
+ formats:
6
+ day_and_date: "%A %m/%d/%Y"
7
+ admin_datetime: "%Y-%m-%d %H:%M:%S"
@@ -0,0 +1,3 @@
1
+ en:
2
+ routes:
3
+ page: page
@@ -0,0 +1,31 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+ # include_blanks:
27
+ # defaults:
28
+ # age: 'Rather not say'
29
+ # prompts:
30
+ # defaults:
31
+ # age: 'Select your age'
@@ -0,0 +1,68 @@
1
+ Rails.application.routes.draw do
2
+ mount Rich::Engine => 'rich', as: 'rich'
3
+ mount RailsAdmin::Engine => 'admin/dashboard', as: 'rails_admin'
4
+
5
+ <% if options.solidus? -%>
6
+ # This line mounts Spree's routes at the root of your application.
7
+ # This means, any requests to URLs such as /products, will go to Spree::ProductsController.
8
+ # If you would like to change where this engine is mounted, simply change the :at option to something different.
9
+ #
10
+ # We ask that you don't use the :as option here, as Spree relies on it being the default of "spree"
11
+ mount Spree::Core::Engine, at: '/'
12
+
13
+ <% end -%>
14
+ # The priority is based upon order of creation: first created -> highest priority.
15
+ # See how all your routes lay out with "rake routes".
16
+
17
+ # You can have the root of your site routed with "root"
18
+ # root 'welcome#index'
19
+
20
+ # Example of regular route:
21
+ # get 'products/:id' => 'catalog#view'
22
+
23
+ # Example of named route that can be invoked with purchase_url(id: product.id)
24
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
25
+
26
+ # Example resource route (maps HTTP verbs to controller actions automatically):
27
+ # resources :products
28
+
29
+ # Example resource route with options:
30
+ # resources :products do
31
+ # member do
32
+ # get 'short'
33
+ # post 'toggle'
34
+ # end
35
+ #
36
+ # collection do
37
+ # get 'sold'
38
+ # end
39
+ # end
40
+
41
+ # Example resource route with sub-resources:
42
+ # resources :products do
43
+ # resources :comments, :sales
44
+ # resource :seller
45
+ # end
46
+
47
+ # Example resource route with more complex sub-resources:
48
+ # resources :products do
49
+ # resources :comments
50
+ # resources :sales do
51
+ # get 'recent', on: :collection
52
+ # end
53
+ # end
54
+
55
+ # Example resource route with concerns:
56
+ # concern :toggleable do
57
+ # post 'toggle'
58
+ # end
59
+ # resources :posts, concerns: :toggleable
60
+ # resources :photos, concerns: :toggleable
61
+
62
+ # Example resource route within a namespace:
63
+ # namespace :admin do
64
+ # # Directs /admin/products/* to Admin::ProductsController
65
+ # # (app/controllers/admin/products_controller.rb)
66
+ # resources :products
67
+ # end
68
+ end
@@ -0,0 +1,28 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: <%= app_secret %>
15
+
16
+ test:
17
+ secret_key_base: <%= app_secret %>
18
+
19
+ vagrant:
20
+ secret_key_base: <%= app_secret %>
21
+
22
+ staging:
23
+ secret_key_base: <%= app_secret %>
24
+
25
+ # Do not keep production secrets in the repository,
26
+ # instead read values from the environment.
27
+ production:
28
+ secret_key_base: <%= app_secret %>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
Binary file
@@ -0,0 +1,15 @@
1
+ # See http://www.robotstxt.org/robotstxt.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: /
6
+ <% if options.solidus? -%>
7
+ User-agent: *
8
+ Disallow: /checkout
9
+ Disallow: /cart
10
+ Disallow: /orders
11
+ Disallow: /user
12
+ Disallow: /account
13
+ Disallow: /api
14
+ Disallow: /password
15
+ <% end -%>