sibu 0.8.1 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/README.md +38 -38
- data/Rakefile +36 -36
- data/app/assets/config/sibu_manifest.js +2 -2
- data/app/assets/fonts/sibu/Sibu.eot +0 -0
- data/app/assets/fonts/sibu/Sibu.svg +13 -13
- data/app/assets/fonts/sibu/Sibu.ttf +0 -0
- data/app/assets/fonts/sibu/Sibu.woff +0 -0
- data/app/assets/javascripts/cropper/cropper.js +3694 -3694
- data/app/assets/javascripts/quill/quill.js +11401 -11401
- data/app/assets/javascripts/sibu/common.js +6 -6
- data/app/assets/javascripts/sibu/sibu.js.erb +156 -155
- data/app/assets/javascripts/tabs/van11y-accessible-tab-panel-aria.js +465 -465
- data/app/assets/stylesheets/cropper/cropper.css +304 -304
- data/app/assets/stylesheets/quill/quill.snow.css +945 -945
- data/app/assets/stylesheets/sibu/defaults.scss +317 -336
- data/app/assets/stylesheets/sibu/icons.scss +40 -40
- data/app/assets/stylesheets/sibu/sibu.css +131 -131
- data/app/controllers/sibu/application_controller.rb +14 -14
- data/app/controllers/sibu/documents_controller.rb +35 -35
- data/app/controllers/sibu/images_controller.rb +78 -78
- data/app/controllers/sibu/pages_controller.rb +197 -197
- data/app/controllers/sibu/sites_controller.rb +81 -81
- data/app/helpers/sibu/application_helper.rb +11 -11
- data/app/helpers/sibu/documents_helper.rb +4 -4
- data/app/helpers/sibu/images_helper.rb +4 -4
- data/app/helpers/sibu/pages_helper.rb +217 -194
- data/app/helpers/sibu/sites_helper.rb +23 -23
- data/app/jobs/sibu/application_job.rb +4 -4
- data/app/mailers/sibu/application_mailer.rb +6 -6
- data/app/models/concerns/sibu/document_uploader.rb +8 -8
- data/app/models/concerns/sibu/image_uploader.rb +31 -31
- data/app/models/concerns/sibu/sections_concern.rb +134 -134
- data/app/models/concerns/sibu/style_uploader.rb +1 -1
- data/app/models/concerns/sibu/user_concern.rb +9 -8
- data/app/models/sibu/application_record.rb +5 -5
- data/app/models/sibu/document.rb +16 -16
- data/app/models/sibu/dynamic_style.rb +76 -76
- data/app/models/sibu/image.rb +10 -19
- data/app/models/sibu/page.rb +66 -66
- data/app/models/sibu/site.rb +97 -97
- data/app/models/sibu/site_template.rb +22 -22
- data/app/views/layouts/sibu/application.html.erb +23 -23
- data/app/views/layouts/sibu/edit_content.html.erb +262 -262
- data/app/views/layouts/sibu/site.html.erb +45 -45
- data/app/views/sibu/documents/_form.html.erb +14 -14
- data/app/views/sibu/documents/index.html.erb +37 -37
- data/app/views/sibu/documents/new.html.erb +12 -12
- data/app/views/sibu/images/_edit_form.html.erb +23 -23
- data/app/views/sibu/images/_form.html.erb +34 -34
- data/app/views/sibu/images/edit.js.erb +2 -2
- data/app/views/sibu/images/index.html.erb +31 -13
- data/app/views/sibu/images/new.html.erb +12 -12
- data/app/views/sibu/images/show.html.erb +2 -2
- data/app/views/sibu/pages/_code_edit_panel.html.erb +17 -17
- data/app/views/sibu/pages/_element_actions.html.erb +4 -4
- data/app/views/sibu/pages/_error_panel.html.erb +4 -4
- data/app/views/sibu/pages/_form.html.erb +62 -62
- data/app/views/sibu/pages/_group_edit_panel.html.erb +3 -3
- data/app/views/sibu/pages/_link_edit_panel.html.erb +50 -50
- data/app/views/sibu/pages/_map_edit_panel.html.erb +27 -27
- data/app/views/sibu/pages/_media_edit_panel.html.erb +63 -46
- data/app/views/sibu/pages/_new_section_panel.html.erb +43 -43
- data/app/views/sibu/pages/_paragraph_edit_panel.html.erb +18 -18
- data/app/views/sibu/pages/_text_edit_panel.html.erb +19 -19
- data/app/views/sibu/pages/child_element.js.erb +6 -6
- data/app/views/sibu/pages/clone_element.js.erb +6 -6
- data/app/views/sibu/pages/create_section.js.erb +6 -6
- data/app/views/sibu/pages/delete_element.js.erb +6 -6
- data/app/views/sibu/pages/delete_section.js.erb +6 -6
- data/app/views/sibu/pages/destroy.html.erb +2 -2
- data/app/views/sibu/pages/edit.html.erb +8 -8
- data/app/views/sibu/pages/edit_content.html.erb +3 -3
- data/app/views/sibu/pages/edit_element.js.erb +105 -100
- data/app/views/sibu/pages/edit_section.js.erb +7 -7
- data/app/views/sibu/pages/index.html.erb +40 -40
- data/app/views/sibu/pages/new.html.erb +8 -8
- data/app/views/sibu/pages/new_section.js.erb +19 -19
- data/app/views/sibu/pages/show.html.erb +3 -3
- data/app/views/sibu/pages/update.html.erb +2 -2
- data/app/views/sibu/pages/update_element.js.erb +5 -5
- data/app/views/sibu/pages/update_section.js.erb +5 -5
- data/app/views/sibu/sites/_form.html.erb +125 -125
- data/app/views/sibu/sites/destroy.html.erb +2 -2
- data/app/views/sibu/sites/edit.html.erb +9 -9
- data/app/views/sibu/sites/edit_styles.html.erb +8 -8
- data/app/views/sibu/sites/index.html.erb +41 -41
- data/app/views/sibu/sites/new.html.erb +18 -18
- data/app/views/sibu/sites/update.html.erb +2 -2
- data/config/initializers/constants.rb +2 -2
- data/config/initializers/shrine.rb +18 -18
- data/config/routes.rb +30 -30
- data/config/tinymce.yml +5 -5
- data/db/migrate/20180124095041_create_sibu_sites.rb +12 -12
- data/db/migrate/20180124095213_create_sibu_pages.rb +15 -15
- data/db/migrate/20180124145030_create_sibu_site_templates.rb +10 -10
- data/db/migrate/20180125231638_add_user_id_to_sites.rb +5 -5
- data/db/migrate/20180126114522_rename_url_to_path_in_pages.rb +5 -5
- data/db/migrate/20180126114628_add_domain_to_sites.rb +5 -5
- data/db/migrate/20180127211533_create_sibu_images.rb +11 -11
- data/db/migrate/20180208082317_rename_images_user_id_to_site_id.rb +5 -5
- data/db/migrate/20180208125024_rename_image_data_column.rb +5 -5
- data/db/migrate/20180210181644_add_defaults_to_site_templates.rb +6 -6
- data/db/migrate/20180214134653_add_fields_to_sites.rb +5 -5
- data/db/migrate/20180227151519_add_default_templates_to_site_templates.rb +5 -5
- data/db/migrate/20180301121902_add_style_data_to_sites.rb +5 -5
- data/db/migrate/20180301152101_add_default_styles_to_templates.rb +5 -5
- data/db/migrate/20180321144021_move_images_to_user_level.rb +7 -7
- data/db/migrate/20180321170310_add_version_to_sibu_sites.rb +7 -7
- data/db/migrate/20180405095448_create_sibu_documents.rb +10 -10
- data/db/migrate/20190110204854_add_custom_data_to_sibu_pages.rb +5 -5
- data/lib/sibu.rb +4 -4
- data/lib/sibu/engine.rb +19 -19
- data/lib/sibu/utils.rb +14 -14
- data/lib/sibu/version.rb +3 -3
- data/lib/tasks/sibu_tasks.rake +4 -4
- metadata +7 -7
data/lib/sibu.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "sibu/engine"
|
2
|
-
|
3
|
-
module Sibu
|
4
|
-
end
|
1
|
+
require "sibu/engine"
|
2
|
+
|
3
|
+
module Sibu
|
4
|
+
end
|
data/lib/sibu/engine.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
require 'jquery-rails'
|
2
|
-
|
3
|
-
module Sibu
|
4
|
-
class Engine < ::Rails::Engine
|
5
|
-
isolate_namespace Sibu
|
6
|
-
config.assets.paths << File.expand_path("../../assets/fonts", __FILE__)
|
7
|
-
config.to_prepare do
|
8
|
-
begin
|
9
|
-
# Load custom helper if defined
|
10
|
-
ApplicationController.helper(SibuCustomHelper)
|
11
|
-
rescue
|
12
|
-
Rails.logger.info("Sibu custom helper is not available - skipping")
|
13
|
-
end
|
14
|
-
Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
|
15
|
-
require_dependency(c)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
1
|
+
require 'jquery-rails'
|
2
|
+
|
3
|
+
module Sibu
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
isolate_namespace Sibu
|
6
|
+
config.assets.paths << File.expand_path("../../assets/fonts", __FILE__)
|
7
|
+
config.to_prepare do
|
8
|
+
begin
|
9
|
+
# Load custom helper if defined
|
10
|
+
ApplicationController.helper(SibuCustomHelper)
|
11
|
+
rescue
|
12
|
+
Rails.logger.info("Sibu custom helper is not available - skipping")
|
13
|
+
end
|
14
|
+
Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
|
15
|
+
require_dependency(c)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/sibu/utils.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
module Sibu
|
2
|
-
class Utils
|
3
|
-
def self.convert_sections
|
4
|
-
Sibu::Site.all.each do |s|
|
5
|
-
sections = s.sections
|
6
|
-
s.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}})
|
7
|
-
end
|
8
|
-
|
9
|
-
Sibu::Page.all.each do |p|
|
10
|
-
sections = p.sections
|
11
|
-
p.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}})
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
1
|
+
module Sibu
|
2
|
+
class Utils
|
3
|
+
def self.convert_sections
|
4
|
+
Sibu::Site.all.each do |s|
|
5
|
+
sections = s.sections
|
6
|
+
s.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}})
|
7
|
+
end
|
8
|
+
|
9
|
+
Sibu::Page.all.each do |p|
|
10
|
+
sections = p.sections
|
11
|
+
p.update(sections: sections.keys.map {|k| {id: k, elements: sections[k]}})
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
15
|
end
|
data/lib/sibu/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Sibu
|
2
|
-
VERSION = '0.
|
3
|
-
end
|
1
|
+
module Sibu
|
2
|
+
VERSION = '0.9.1'
|
3
|
+
end
|
data/lib/tasks/sibu_tasks.rake
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# desc "Explaining what the task does"
|
2
|
-
# task :sibu do
|
3
|
-
# # Task goes here
|
4
|
-
# end
|
1
|
+
# desc "Explaining what the task does"
|
2
|
+
# task :sibu do
|
3
|
+
# # Task goes here
|
4
|
+
# end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: shrine
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.6.
|
257
|
+
rubygems_version: 2.6.13
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: Sibu - A Site Builder for Ruby on Rails
|