GithubHelp home page GithubHelp logo

smart-village-solutions / goldencobra Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 15.0 31.93 MB

CMS based on modules as Rails 4 engines

License: Other

Ruby 24.21% JavaScript 54.62% CSS 4.85% HTML 13.92% Gherkin 0.95% SCSS 1.45%
content-management-system ruby rails rails-engine javascript cms golden-cobra

goldencobra's People

Contributors

5minpause avatar donni106 avatar marcometz avatar naturtrunken avatar niklas avatar ninabreznik avatar pwilimzig avatar ronachera avatar spaudanjo avatar yuxisteem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goldencobra's Issues

Clean up translations

  • e.g. Goldencobra::Metatag
  • other hints e.g. Chosen Golden Cobra/Parent-Article as URL

Install-Generator doesn't work.

  • its outdated
  • the steps should accept return as a yes
  • it messes up your Gemfile if you don't use Goldencobra as an engine but solo

Extend fields to copy on "copy widget"

Widgets have the functionality to be duplicated for faster creation of similar contents.
The connection to articles will not be duplicated when using this.
It would be nice to extend the duplication with the connected articles of a widget.
As a result, the user does not need to select the same articles afterwards.

Css classes for `Goldencobra::Menue` need to support dashes

Right now: If you create a menu item and give it a class "my-awesome-name", the Golden Cobra helper will render it as "my awesome name" => three separate classes.

To have one class name, you currently need to write it with underscores like this "my_awesome_name".

This should be changed.

Upgrade Gems: paper_trail and active_model_serializers

paper_trail is used in version 4.1.0
The current version is 5.0.0. There might be breaking changes. There are deprecation warnings, e.g.:

DEPRECATION WARNING: PaperTrail.track_associations has not been set. As of PaperTrail 5, it defaults to false. Tracking associations is an experimental feature so we recommend setting PaperTrail.config.track_associations = false in your config/initializers/paper_trail.rb . (called from block (3 levels) in <top (required)> at /Users/holger/projects/ikusei/goldencobra/basis-modul/test/dummy/spec/controllers/articles_controller_spec.rb:27

I asked for a CHANGELOG here: paper-trail-gem/paper_trail#814
edit: The changelog is here: https://github.com/airblade/paper_trail/blob/master/CHANGELOG.md#500-2016-05-02

active_model_serializers is used in version 0.9.5
The newest version as of writing is 0.10.0
This version has a breaking change: app/serializers/goldencobra/article_serializer.rb:3:inclass:ArticleSerializer': undefined method root' for Goldencobra::ArticleSerializer:Class (NoMethodError)

Both gems should be upgraded, but only with testing and documenting the changes.

Widgets API

In Golden Cobra 2.0 an API for widgets is missing.
Like articles it is needed to ask for widgets and get their contents.

Update meta tags logic for articles

Es soll sicher gestellt sein, dass alle Seiten immer die folgenden Meta-Tags enthalten. In () sind die Quellen in absteigender Reihenfolge angeben:

  • Title-Tag (Meta "Title Tag" des Artikels oder "Breadcrumb title" oder leer) - immer in Kombination mit Setting "default_title_tag" (bitte keine Trennzeichen ergänzen, sind bereits in der Setting enthalten!)
  • Meta-Description (Meta Description des Artikels oder die ersten Teaser oder leer)
  • OpenGraph-Title (Meta "OpenGraph Title" des Artikels oder Meta "Title Tag" des Artikels oder "Breadcrumb title" oder "Headline" oder leer)
  • OpenGraph-Description (Meta "OpenGraph Description" des Artikels oder Meta Description des Artikels oder Teaser oder leer)
  • OpenGraph-Image (Meta "OpenGraph Image" des Artikels oder erstes Bild des Artikels (in möglichst hoher Auflösung) oder aus Setting "opengraph_default_image")
  • OpenGraph-Type (statisch auf "website")
  • OpenGraph-URL ("OpenGraph URL" des Artikels oder absolute URL des Artikels ohne Parameter)
  • Canonical-URL ("Url for search engines" des Artikels oder absolute URL des Artikels ohne Parameter)
  • OpenGraph-Sitename: (aus noch zu erstellender Setting oder leer)
  • Facebook-App-ID (aus Setting "goldencobra.facebook.appid" oder leer)

Der Redakteuer sollte in der Lage sein, alle Meta-Felder leer zu lassen und dennoch sinnvolle Metatags auf der Seite zu haben. Daher sollten die Meta-Tags auch NICHT beim Erzeugen des Artikels generiert werden (da sie sich sonst nicht verändern, wenn sich der Artikel ändert). Nur, wenn der Redakteur wirklich Einfluss nehmen will, sind die Meta-Felder relevant. Dieses Verhalten kann in Golden Cobra realisiert werden, da es universell gilt.

Enhance URL redirector

There are new (corner) cases for dealing with redirections:

  • if an article (Goldencobra::Article) is not a descendant of the "startpage", the startpage is redirected but not the article itself. A possible fix would be the check for the root element.
  • redirects for urls with or without "/" at the end.

Can't install Goldencobra

no ssh access

bundle install
Fetching ssh://[email protected]:7999/GC/basis-modul.git
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Git error: command `git clone 'ssh://[email protected]:7999/GC/basis-modul.git' "~/.rvm/gems/ruby-1.9.3-p392@gcobra/cache/bundler/git/basis-modul-913d62e86df3450da41800763eac4ae920474437"
--bare --no-hardlinks` in directory ~/ruby/gcobra has failed.

Update react-js version

We still use 0.13.1 in this project. This should be updated. The current version is v15.4.2

Admin menue: show column for parent element

There is an idea to show the parent element (also) in the index view of the menues table.
The tree view shows the hierarchy of menues, but regarding the table view it is confusing when there are entries with same names.
So knowing the parent element makes it clear without struggling.

Geocode errors should not prevent articles from being saved/updated

Golden Cobra has the ability to add geocoding features to Goldencobra::Articles with belongs_to :location, class_name: Goldencobra::Location.

Golden Cobra uses:
http://www.rubygeocoder.com
https://github.com/alexreisner/geocoder

There is a bug when Goldencobra::Articles are saved or updated that an internal server error occurs, i.e. Geocoder::OverQueryLimitError

If a Goldencobra::Location produces errors, the Goldencobra::Article has to be saved or updated anyway.

rake db:migration error

SQLite3::ConstraintException: constraint failed: INSERT INTO "goldencobra_roles_users" ("user_id", "role_id") VALUES (1, 1)

Silence and remove notices for creating article types

When loading the Rails environment you always get notices like:

Default Articletype created for Consultant Index
Default Articletype created for Consultant Show
Default Articletype created for Contribution Index
Default Articletype created for Contribution Show
Default Articletype created for Default Index
Default Articletype created for Default Show
Default Articletype created for Event Index
Default Articletype created for Event Show
Default Articletype created for Experience Index
Default Articletype created for Experience Show
Default Articletype created for LegalText Index
Default Articletype created for LegalText Show

I don't find these very helpful or necessary. I would like to remove them. What do you think?

Update README

The README is written for people who want to include Goldencobra as a gem inside their project. If you download it from Github and use it on it's own the README doesn't work for you. There are wrong steps:

  • don't copy migrations
  • don't use the install generator

Cache key too long

Errno::ENAMETOOLONG - File name too long @ rb_file_s_stat - /Users/holger/projects/ikusei/metropolis/tmp/cache/DA2/34C/articles%2F31%2F203%2F357%2F264%2F263%2F503%2F459%2F542%2F223%2F330%2F382%2F456%2F516%2F536%2F226%2F266%2F492%2F291%2F530%2F411%2F439%2F302%2F215%2F276%2F303%2F262%2F267%2F454%2F312%2F197%2F487%2F453%2F512%2F624%2F448%2F505%2F63/6%2F462%2F404%2F498%2F355%2F494%2F596%2F270%2F242%2F629%2F239%2F489%2F280%2F452%2F525%2F193%2F586%2F395%2F238%2F598%2F470%2F528%2F449%2F529%2F639%2F219%2F627%2F209%2F608%2F592%2F405%2F588%2F195%2F403%2F220%2F576%2F207%2F269%2F14/1%2F259%2F511%2F282%2F325%2F301%2F584%2F460%2F634%2F444%2F218%2F469%2F204%2F406%2F192%2F371%2F257%2F632%2F490%2F407%2F268%2F575%2F285%2F619%2F358%2F224%2F451%2F292%2F551%2F256%2F392%2F217%2F502%2F300%2F360%2F299%2F298%2F640%2F25/5%2F630%2F305%2F633%2F481%2F243%2F214%2F496%2F531%2F396%2F356%2F626%2F537%2F345%2F286%2F225%2F441%2F461%2F414%2F497%2F201%2F504%2F457%2F606%2F486%2F198%2F366%2F455%2F527%2F540%2F631%2F544%2F458%2F491%2F513%2F196%2F522%2F287%2F24/5%2F205%2F279%2F194%2F450%2F402%2F297%2F252%2F208%2F541%2F2017-01-23+16%3A11%3A09+%2B0100

This error is generated in https://github.com/ikuseiGmbH/Goldencobra/blob/master/admin/articles.rb#L388.
I don't yet know why it's so long as it's supposed to only contain numbers (ids and updated_at). We have to investigate.

Thise are the lines in question:

objects_for_cache_key = Goldencobra::Article.where(id: params[:root_id]).first.descendants.reorder(:url_name)
cache_key ||= ["articles", params[:root_id], objects_for_cache_key.map(&:id), objects_for_cache_key.maximum(:updated_at)]
[1] > Goldencobra::Article.where(id: 31).first.descendants.count
=> 159

Show url_name instead of title in articles select lists

For simpler choice of articles in select lists the use of articles :url_name instead of :title would be purposeful. Selecting a parents article can be difficult on :title because titles can exist multiple times.
The :url_name also is not unique. But with its ancestry the complete url path is unique. So depending on the url path the articles tree structure is more clear and easy to choose.

There are several places where it should be changed:

  • parent article select of an article
  • index pages articles select
  • articles parent filter on articles index view
  • article select for widgets
  • settings parents list also need the path optimization

Better Order of Article Fields

The order of Article Fields for the default Article Type or new Article Typs should be as follows:

Position Sort-ID Name Klappbar Status Feld
1. Block 0 Configuration Ja Geschlossen state
1. Block 0 Configuration Ja Geschlossen active
1. Block 0 Configuration Ja Geschlossen creator
1. Block 0 Configuration Ja Geschlossen breadcrumb
1. Block 0 Configuration Ja Geschlossen url_name
1. Block 0 Configuration Ja Geschlossen parent_id
1. Block 0 Configuration Ja Geschlossen global_sorting_id
1. Block 0 Configuration Ja Geschlossen active_since
1. Block 0 Configuration Ja Geschlossen tag_list
1. Block 10 Content Ja Offen title
1. Block 10 Content Ja Offen content
1. Block 10 Content Ja Offen teaser
1. Block 10 Conten Ja Offen weitere Felder je nach Artikeltyp
1. Block 20 List-Options Ja Geschlossen index__display.index_articles
1. Block 20 List-Options Ja Geschlossen index__arcticle_for_index_id
1. Block 20 List-Options Ja Geschlossen index__arcticle_descendants_depth
1. Block 20 List-Options Ja Geschlossen index__display_index_types
1. Block 20 List-Options Ja Geschlossen index__display_index_articletypes
1. Block 20 List-Options Ja Geschlossen index__index_of_articles_tagged_with
1. Block 20 List-Options Ja Geschlossen index__not_tagged_with
1. Block 20 List-Options Ja Geschlossen index__sorter_limit
1. Block 20 List-Options Ja Geschlossen index__sort_order
1. Block 20 List-Options Ja Geschlossen index__reverse_order
Letzter Block 100 Media Ja Geschlossen article_images
Letzter Block 110 Widgets Ja Geschlossen widgets
Letzter Block 120 Metadescriptons Ja Geschlossen robots_no_index
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_title_tag
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_meta_description
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_open_graph_title
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_open_graph_description
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_open_graph_image
Letzter Block 120 Metadescriptons Ja Geschlossen metatag_open_graph_url
Letzter Block 120 Metadescriptons Ja Geschlossen canonical_url

Reduce dependencies

Right now we require 54 runtime dependencies for Goldencobra.
I am positive that this could be reduced by a lot.

  s.add_dependency 'rails', '~> 4.2.5'
  s.add_dependency 'jquery-rails'
  s.add_dependency 'devise'
  s.add_dependency 'devise-token_authenticatable'
  s.add_dependency 'cancancan'
  s.add_dependency 'activeadmin', '~> 1.0.0.pre1'
  s.add_dependency 'remove_accents'
  s.add_dependency 'sprockets'#, "2.12.4"
  s.add_dependency "sprockets-rails"#, "2.3.3"
  s.add_dependency "tilt"#, "1.4.1"
  s.add_dependency 'compass-rails'#, "2.0.5"
  s.add_dependency 'sass'
  s.add_dependency 'sass-rails'
  s.add_dependency 'compass'
  s.add_dependency 'sidekiq'
  s.add_dependency 'sinatra'
  s.add_dependency 'omniauth'
  s.add_dependency 'omniauth-openid'
  s.add_dependency 'oa-oauth'
  s.add_dependency 'oa-openid'
  s.add_dependency 'cancan'
  s.add_dependency 'ancestry'
  s.add_dependency 'acts-as-taggable-on'
  s.add_dependency 'meta-tags'
  s.add_dependency 'paperclip'
  s.add_dependency 'uglifier'
  s.add_dependency 'exception_notification'
  s.add_dependency 'liquid'
  s.add_dependency 'rubyzip'
  s.add_dependency 'geocoder'
  s.add_dependency 'paper_trail'
  s.add_dependency 'whenever'
  s.add_dependency 'inherited_resources'
  s.add_dependency 'geokit'
  s.add_dependency 'json'
  s.add_dependency 'i18n'
  s.add_dependency 'i18n-active_record'
  s.add_dependency 'pdfkit'
  s.add_dependency 'wkhtmltopdf-binary'
  s.add_dependency 'wicked_pdf'
  s.add_dependency 'rmagick'
  s.add_dependency 'iconv'
  s.add_dependency 'rack-utf8_sanitizer' # handles invalid url encodings
  s.add_dependency 'simple_enum'
  s.add_dependency 'addressable'
  s.add_dependency 'protected_attributes'
  s.add_dependency 'active_model_serializers'
  s.add_dependency 'actionpack-action_caching'
  s.add_dependency 'react-rails', '~> 1.0'
  s.add_dependency 'oj' # faster json rendering
  s.add_dependency 'bootstrap-sass', '~> 3.3' # frontend template framework
  s.add_dependency 'font-awesome-sass'
  s.add_dependency 'autoprefixer-rails' # to provide easy automatic css prefixing
  s.add_dependency 'responders', '~> 2.0'

Hat tip to Mike Perham for inspiration: http://www.mikeperham.com/2016/02/09/kill-your-dependencies/

New feature with article_urls has bugs

The feature with the PR #56 has bugs.
There is often missing the entry for created articles in the article_urls table.
The startpage does not render, if there is no / at the end in the article_urls table.
More tests needed.

Copy also position when copying widgets

Golden Cobra has the ability to copy widgets (Goldencobra::Widget) for faster creation. The content is duplicated and the widget gets an extended title.
The widget position is sidebar after copying.

The widget position should be copied also and not being resetted to sidebar.


The duplication feature is called here: https://github.com/ikuseiGmbH/Goldencobra/blob/master/admin/widgets.rb#L140

…and implemented here: https://github.com/ikuseiGmbH/Goldencobra/blob/master/app/models/goldencobra/widget.rb#L185

Refactor usage of Devise helpers to remove deprecations

DEPRECATION WARNING:
[Devise] sign_in(:user, resource) on controller tests is deprecated and will be removed from Devise.
Please use sign_in(resource, scope: :user) instead.
(called from block (4 levels) in <top (required)> at /test/dummy/spec/controllers/articles_controller_spec.rb:55)

Goldencobra::Redirector is undefined/not-working for certain edge cases

This test:
https://github.com/ikuseiGmbH/Goldencobra/blob/69a1ab26b789282abc0a71a47675c233618d994c/test/dummy/spec/models/redirector_spec.rb#L193-L200

does not work. This is why:

https://github.com/ikuseiGmbH/Goldencobra/blob/69a1ab26b789282abc0a71a47675c233618d994c/app/models/goldencobra/redirector.rb#L70-L104

In line 79, we try to match the request with existing redirector records, but only match with the given request-path, ignoring any url params. The existing redirector record does have a parameter at the end, though. So it cannot match.

Our current idea is, to expand the Goldencobra::Redirector model with new url-parameter attributes. The matching would then again be done by the param-free url path, and additionally taking any given url-params into consideration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.