quadro 0.5.8 → 0.6.0

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 (83) hide show
  1. checksums.yaml +5 -13
  2. data/MIT-LICENSE +1 -1
  3. data/Rakefile +8 -10
  4. data/app/assets/javascripts/quadro/widget.js.coffee +12 -9
  5. data/app/controllers/quadro/application_controller.rb +22 -4
  6. data/app/controllers/quadro/assets_controller.rb +1 -1
  7. data/app/controllers/quadro/pages_controller.rb +1 -1
  8. data/app/controllers/quadro/{tools_controller.rb → sitemaps_controller.rb} +2 -2
  9. data/app/controllers/quadro/users_controller.rb +1 -1
  10. data/app/controllers/quadro/widgets_controller.rb +1 -1
  11. data/app/models/quadro/asset.rb +1 -1
  12. data/app/models/quadro/asset/cover.rb +2 -2
  13. data/app/models/quadro/asset/image.rb +2 -2
  14. data/app/models/quadro/asset/slide.rb +2 -2
  15. data/app/models/quadro/interaction.rb +1 -2
  16. data/app/models/quadro/page.rb +2 -3
  17. data/app/models/quadro/user.rb +2 -2
  18. data/app/models/quadro/widget.rb +0 -3
  19. data/app/models/quadro/widget/gallery.rb +0 -1
  20. data/app/models/quadro/widget/html.rb +0 -1
  21. data/app/models/quadro/widget/slider.rb +0 -1
  22. data/app/views/quadro/assets/image/_image.html.haml +1 -1
  23. data/app/views/quadro/assets/slide/_slide.html.haml +1 -1
  24. data/app/views/quadro/shared/_navigation.html.haml +2 -2
  25. data/app/views/quadro/shared/_toolbar.html.haml +2 -2
  26. data/app/views/quadro/shared/templates/_demo.html.haml +2 -0
  27. data/app/views/quadro/sitemaps/index.xml.builder +18 -0
  28. data/app/views/quadro/{tools/sitemap_notifier.js.erb → sitemaps/ping.js.erb} +0 -0
  29. data/config/initializers/simple_form.rb +46 -23
  30. data/config/initializers/simple_form_bootstrap.rb +124 -54
  31. data/config/locales/en.yml +1 -0
  32. data/config/locales/simple_form.en.yml +31 -0
  33. data/config/routes.rb +5 -5
  34. data/lib/generators/quadro/install/templates/app/views/quadro/shared/_navigation.html.haml +1 -1
  35. data/lib/generators/quadro/install/templates/app/views/quadro/shared/templates/_demo.html.haml +2 -0
  36. data/lib/quadro/loader.rb +1 -3
  37. data/lib/quadro/version.rb +1 -1
  38. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  39. data/test/dummy/README.rdoc +15 -248
  40. data/test/dummy/Rakefile +1 -2
  41. data/test/dummy/app/assets/javascripts/application.js +4 -6
  42. data/test/dummy/app/assets/stylesheets/application.css +6 -4
  43. data/test/dummy/app/controllers/application_controller.rb +3 -1
  44. data/test/dummy/app/views/layouts/application.html.erb +2 -2
  45. data/test/dummy/app/views/quadro/shared/_navigation.html.haml +2 -2
  46. data/test/dummy/app/views/quadro/shared/templates/_demo.html.haml +2 -0
  47. data/test/dummy/bin/bundle +3 -0
  48. data/test/dummy/bin/rails +4 -0
  49. data/test/dummy/bin/rake +4 -0
  50. data/test/dummy/bin/setup +29 -0
  51. data/test/dummy/config.ru +2 -2
  52. data/test/dummy/config/application.rb +3 -35
  53. data/test/dummy/config/boot.rb +4 -9
  54. data/test/dummy/config/database.yml +8 -8
  55. data/test/dummy/config/environment.rb +3 -3
  56. data/test/dummy/config/environments/development.rb +22 -18
  57. data/test/dummy/config/environments/production.rb +46 -34
  58. data/test/dummy/config/environments/test.rb +19 -14
  59. data/test/dummy/config/initializers/assets.rb +11 -0
  60. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  61. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/test/dummy/config/initializers/inflections.rb +6 -5
  63. data/test/dummy/config/initializers/mime_types.rb +0 -1
  64. data/test/dummy/config/initializers/session_store.rb +1 -6
  65. data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
  66. data/test/dummy/config/locales/en.yml +20 -2
  67. data/test/dummy/config/secrets.yml +22 -0
  68. data/test/dummy/db/migrate/{20160615055717_create_quadro_widgets.quadro.rb → 20160701222828_create_quadro_widgets.quadro.rb} +0 -0
  69. data/test/dummy/db/migrate/{20160615055718_create_quadro_pages.quadro.rb → 20160701222829_create_quadro_pages.quadro.rb} +0 -0
  70. data/test/dummy/db/migrate/{20160615055719_create_quadro_assets.quadro.rb → 20160701222830_create_quadro_assets.quadro.rb} +0 -0
  71. data/test/dummy/db/migrate/{20160615055720_devise_create_quadro_users.quadro.rb → 20160701222831_devise_create_quadro_users.quadro.rb} +0 -0
  72. data/test/dummy/db/migrate/{20160615055721_create_quadro_interactions.quadro.rb → 20160701222832_create_quadro_interactions.quadro.rb} +0 -0
  73. data/test/dummy/db/migrate/{20160619183944_add_published_at_field_on_quadro_pages.quadro.rb → 20160701222833_add_published_at_field_on_quadro_pages.quadro.rb} +0 -0
  74. data/test/dummy/db/schema.rb +36 -36
  75. data/test/integration/navigation_test.rb +0 -2
  76. data/test/test_helper.rb +9 -6
  77. metadata +201 -232
  78. data/README.md +0 -221
  79. data/app/assets/stylesheets/bootstrap/_mixins.scss +0 -40
  80. data/config/initializers/sitemap.rb +0 -9
  81. data/test/dummy/config/initializers/secret_token.rb +0 -7
  82. data/test/dummy/log/test.log +0 -0
  83. data/test/dummy/script/rails +0 -6
data/README.md DELETED
@@ -1,221 +0,0 @@
1
- # Quadro
2
-
3
- This project rocks and uses MIT-LICENSE.
4
-
5
- ---
6
-
7
- **Quadro** is a CMS written for Rails developers. It works as an engine and provides the standard functionality to start a website or a blog from the scratch.
8
-
9
- With **Quadro** you have the following features:
10
-
11
- - Create pages.
12
- - Draft and published pages status.
13
- - Create your own templates.
14
- - Make any area on your template editable.
15
- - Auto-generated sitemap.xml.
16
- - Manual sitemap.xml ping to search engines (production only).
17
- - Upload images for each page.
18
- - Use summernote as inline content editor.
19
- - Slider with slick carousel.
20
- - Gallery with lightbox2.
21
- - Integrate any Bootstrap 3 template.
22
- - Google Maps integration with gmaps.
23
- - Customized forms.
24
- - Maintenance mode.
25
- - SEO friendly urls and meta tags.
26
- - Feeds auto generation (rss and atom).
27
- - Auto-generated robots.txt.
28
- - Customized HTML static status pages.
29
- - Basic Open Graph and Twitter Cards support.
30
- - Youtube and Vimeo video and playlist embed support.
31
-
32
- ## Current stable version
33
-
34
- Current stable version.
35
-
36
- [![Gem Version](https://badge.fury.io/rb/quadro.png)](https://badge.fury.io/rb/quadro)
37
-
38
- ## Code Climate, Hakiri and Travis CI status
39
-
40
- [![Code Climate](https://codeclimate.com/github/hugogilmar/quadro/badges/gpa.svg)](https://codeclimate.com/github/hugogilmar/quadro)
41
- [![Test Coverage](https://codeclimate.com/github/hugogilmar/quadro/badges/coverage.svg)](https://codeclimate.com/github/hugogilmar/quadro/coverage)
42
- [![Security](https://hakiri.io/github/hugogilmar/quadro/develop.svg)](https://hakiri.io/github/hugogilmar/quadro/develop)
43
- [![Build Status](https://travis-ci.org/hugogilmar/quadro.svg?branch=master)](https://travis-ci.org/hugogilmar/quadro)
44
-
45
- ## Installation
46
-
47
- In order to start using it, you need to add the gem entry on your `Gemfile`.
48
-
49
- ```ruby
50
- gem "quadro"
51
- ```
52
-
53
- Then you need to run your bundler.
54
-
55
- ```bash
56
- bundle install
57
- ```
58
-
59
- Now the last step is to run the installer.
60
-
61
- ```bash
62
- rails g quadro:install
63
- ```
64
-
65
- ## Configuration
66
-
67
- It will add a mountable route on your project `config/routes.rb`.
68
-
69
- The default user is `quadro@example.com` and password `quadro123`.
70
-
71
- ## Using the widget
72
-
73
- By default, all templates are written with HAML. In order to use the widget, you need to do it as the following example:
74
-
75
- ```ruby
76
- = widget_for :content
77
- ```
78
-
79
- It also works with a default HTML block.
80
-
81
- ```ruby
82
- = widget_for :content do
83
- %p Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
84
- ```
85
-
86
- The `widget_for` helper receives a second parameter which is `type`.
87
-
88
- ```ruby
89
- = widget_for :content, type: :html
90
- ```
91
-
92
- In this release, the possible options are:
93
-
94
- - html (default)
95
- - slider
96
- - gallery
97
- - map
98
- - form
99
- - video
100
-
101
- ### Map widget
102
-
103
- Map widget options are:
104
-
105
- - latitude (required)
106
- - longitude (required)
107
- - title (optional)
108
- - static (optional)
109
-
110
- *Note: `static` option displays a JPEG graphic map instead of traditional. Default value is false.*
111
-
112
- Content block will be used for location's pin info window if provided.
113
-
114
- ```ruby
115
- = widget_for :address, type: :map, latitude: 13.701291, longitude: -89.224423 do
116
- %p Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
117
- ```
118
-
119
- You also need to set `google_maps_api_key` in `config/initializers/quadro.rb`.
120
-
121
- *Note: to get an API key, please refer to Google Maps official documentaion [here](https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key).*
122
-
123
- ### Form widget
124
-
125
- Form widget uses `simple_form` as form builder. You can specify a form block to define your own fields.
126
-
127
- ```ruby
128
- = widget_for :contact, type: :form do |form|
129
- = form.input :name
130
- = form.input :email
131
- = form.input :message, as: :text, input_html: { rows: 3 }
132
- = form.button :submit
133
- ```
134
-
135
- *Note: all form submits are saved to database. When logged in you can review each interaction below the form widget.*
136
-
137
- ### Video widget
138
-
139
- Video widget uses `video_info` gem as video info fetch client.
140
-
141
- ```ruby
142
- = widget_for :video, type: :video, src: "https://www.youtube.com/watch?v=YE7VzlLtp-4"
143
- ```
144
-
145
- You can also set a playlist:
146
-
147
- ```ruby
148
- = widget_for :video, type: :video, src: "https://www.youtube.com/watch?v=YE7VzlLtp-4&list=PLcsq2jjTfJ_pEUj2Cl4MlXnpgpSQMTO-f"
149
- ```
150
-
151
- *Note: works the same with Vimeo's videos and playlists.*
152
-
153
- ## Working with page templates
154
-
155
- Every page has a template associated to it, it sets the layout that will be displayed on the browser. There is a default list of available templates by default.
156
-
157
- - blank (full width content)
158
- - jumbotron (full width content with cover header)
159
- - sidebar (content with sidebar navigation)
160
- - demo (an example layout with an example of all available widgets)
161
-
162
- You can create your own templates, just add the template files as partials in the following path:
163
-
164
- ```bash
165
- app/views/quadro/shared/templates
166
- ```
167
-
168
- ## Initializer options
169
-
170
- Quadro initializer options are defined at `config/initializers/quadro.rb`. Here a description for each of them:
171
-
172
- - host (site domain)
173
- - email (site email)
174
- - site (site name)
175
- - layout (sub page list layout, use `list` or `thumbnail`)
176
- - template (page template default)
177
- - frequency (sitemap.xml default)
178
- - priority (sitemap.xml default)
179
- - google_maps_api_key
180
- - facebook_id (app_id)
181
- - twitter_username (without @)
182
-
183
- *Note: as page templates, sub page list layout can be added at:*
184
-
185
- ```bash
186
- app/views/quadro/shared/templates/page
187
- ```
188
-
189
- ## Maintenance mode
190
-
191
- **Quadro** uses `turnout` gem for maintenance mode functionality.
192
-
193
- To start maintenance mode, run the command bellow:
194
-
195
- ```bash
196
- rake maintenance:start
197
- ```
198
-
199
- To finish maintenance mode, run the command bellow:
200
-
201
- ```bash
202
- rake maintenance:end
203
- ```
204
-
205
- You can customize the HTML for the maintenance status page at this path:
206
-
207
- ```bash
208
- public/maintenance.html
209
- ```
210
-
211
- ## Translations
212
-
213
- For internationalization files you should add `quadro-i18n` gem.
214
-
215
- *Note: please refer to gem's official project page [here](https://github.com/hugogilmar/quadro-i18n) for further information**
216
-
217
- ## Use it and enjoy it
218
-
219
- Now when you log in into **Quadro** you will find a toolbar fixed at the bottom, to manage your new website or blog.
220
-
221
- Now you are ready to get started with **Quadro**.
@@ -1,40 +0,0 @@
1
- // Mixins
2
- // --------------------------------------------------
3
-
4
- // Utilities
5
- @import "bootstrap/mixins/hide-text";
6
- @import "bootstrap/mixins/opacity";
7
- @import "bootstrap/mixins/image";
8
- @import "bootstrap/mixins/labels";
9
- @import "bootstrap/mixins/reset-filter";
10
- @import "bootstrap/mixins/resize";
11
- @import "bootstrap/mixins/responsive-visibility";
12
- @import "bootstrap/mixins/size";
13
- @import "bootstrap/mixins/tab-focus";
14
- //@import "bootstrap/mixins/reset-text";
15
- @import "bootstrap/mixins/text-emphasis";
16
- @import "bootstrap/mixins/text-overflow";
17
- @import "bootstrap/mixins/vendor-prefixes";
18
-
19
- // Components
20
- @import "bootstrap/mixins/alerts";
21
- @import "bootstrap/mixins/buttons";
22
- @import "bootstrap/mixins/panels";
23
- @import "bootstrap/mixins/pagination";
24
- @import "bootstrap/mixins/list-group";
25
- @import "bootstrap/mixins/nav-divider";
26
- @import "bootstrap/mixins/forms";
27
- @import "bootstrap/mixins/progress-bar";
28
- @import "bootstrap/mixins/table-row";
29
-
30
- // Skins
31
- @import "bootstrap/mixins/background-variant";
32
- @import "bootstrap/mixins/border-radius";
33
- @import "bootstrap/mixins/gradients";
34
-
35
- // Layout
36
- @import "bootstrap/mixins/clearfix";
37
- @import "bootstrap/mixins/center-block";
38
- @import "bootstrap/mixins/nav-vertical-align";
39
- @import "bootstrap/mixins/grid-framework";
40
- @import "bootstrap/mixins/grid";
@@ -1,9 +0,0 @@
1
- DynamicSitemaps::Sitemap.draw do
2
- root = Quadro::Page.roots.first
3
-
4
- url Quadro.railtie_routes_url_helpers.root_url, last_mod: root.updated_at, change_freq: root.frequency, priority: root.priority
5
-
6
- root.children.find_each do |page|
7
- url Quadro.railtie_routes_url_helpers.page_url(page), last_mod: page.updated_at, change_freq: page.frequency, priority: page.priority
8
- end
9
- end
@@ -1,7 +0,0 @@
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
- Dummy::Application.config.secret_token = '7e7e54cec462a59d1b068ff78c55995373c2b1e52e77298b90ab0f28d2cdacba024cf9aaf9af589cf0ea6295eedd256dac0607b16af83d8577ea0a57e4fa3a29'
File without changes
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'