Giter VIP home page Giter VIP logo

amber's People

Contributors

azul avatar elijh avatar just1602 avatar kradan avatar micah avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

amber's Issues

BigDecimal error on newer ruby

When doing amber rebuild (amber 0.3.12) on my Debian bullseye system (ruby2.7) I am getting the following error:

ERROR: undefined method 'new' for BigDecimal:Class

I think that method was deprecated
https://github.com/ruby/ruby/blob/v2_6_0/NEWS#label-Stdlib+updates+-28outstanding+ones+only-29

https://github.com/ruby/bigdecimal#which-version-should-you-select

It is being used in lib/amber/page_array.rb. The error seems to be triggered by this haml

= child_summaries :include_toc => true, :order_by => [:name, {:direction => :desc, :numeric => true}]

and rather than the summaries the output is "true". This can currently be seen here.

:en is not a valid locale (I18n::InvalidLocale)

Hi,

I'm running amber-0.3.2 in debian testing. I installed it via the suggested way, that is 'gem install amber'.

When running 'amber server' inside my "riseup_help" directory I get this error:

amber server      
/var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)
    from /var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n/config.rb:34:in `default_locale='
    from /var/lib/gems/2.1.0/gems/i18n-0.7.0.beta1/lib/i18n.rb:35:in `default_locale='
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:96:in `cleanup'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:79:in `initialize'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:46:in `new'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site_configuration.rb:46:in `load'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/site.rb:17:in `initialize'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/cli.rb:66:in `new'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/lib/amber/cli.rb:66:in `server'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/bin/amber:79:in `main'
    from /var/lib/gems/2.1.0/gems/amber-0.3.2/bin/amber:82:in `<top (required)>'
    from /usr/local/bin/amber:23:in `load'
    from /usr/local/bin/amber:23:in `<main>'

List what translated pages are up to date with the original English one

Hmm, this might seem familiar to you, but 8 months ago I wrote this.

This program checks if the translations files are up to date with the English ones. It then builds a database and a textile file with this data. People can then see what pages are not up to date and can work on that.

I know it's python and there are a few things that I should work on (using docopt if not nice if you are not running debian jessie), but I think it would be really nice to add this feature to amber. Without it, some pages can be reaaalllly outdated and nobody will know.

If you are still interested to implement this, please let me know. I can work on it a bit more and do mofications to make it easier to "port" to ruby if you want.

atom | rss feed generation

Like suggested in this issue on the leap_se repository, it would be nice to have rss | atom feeds. I really like how easy it is to manage internationalization with amber, but syndication feeds are, in my opinion, more than nice-to-have features. :)

I opened a new issue because I think it's more a generator feature than a single site feature. If I have some time I'll try to implement it myself, but I'm not really experimented in ruby and I don't have a lot of time, so if someone has some free time (lol) and can implement it, it would be nice. :P

Translated link to "about us" in footer links to english version of the page

Hi there, I've found something that looks like a bug that's manifesting on the riseup help pages:

When visiting a page with any translation (e.g. visualising the french, or german page), the link to the "about us" page in the page footer points to the english version of the page. The link in the menu up top is OK and points to the translated page.

for example, from: https://help.riseup.net/fr

in the footer, the link points to: https://help.riseup.net/about-us

whereas the link in the menu in the page header points to: https://help.riseup.net/fr/about-us

so it seems as though links in the footer don't point to translated page.

Make a debian package

I would be really great if this could be packaged for Debian. IMHO, gems are yet another thing not to forget to update (gem, pip, git, etc.) and having a central update vector through apt is great.

NoMethod Error for link_to

Not sure which version of the various gems Amber needs I should test with, but this is my setup:

Ruby version: 2.1.2
Amber version: 0.3.11
HAML version: 4.0.7

When I run amber rebuild on a fresh git clone and amber install, I get this error:

 /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:4:in `block in singleton class': undefined method `link_to' for #<Amber::Render::View:0x007f9a57303038> (NoMethodError)
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-10:in `instance_eval'
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-10:in `singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/_riseup_bar.html.haml:-12:in `__tilt_70150418480120'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/haml.rb:19:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:128:in `render_haml'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:73:in `render_html'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/template.rb:55:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/view.rb:70:in `render'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:15:in `block in singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-9:in `instance_eval'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-9:in `singleton class'
from /Users/huertanix/Source/riseup_help/amber/layouts/home.html.haml:-11:in `__tilt_70150418480120'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/haml.rb:19:in `evaluate'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/layout.rb:46:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/render/view.rb:66:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:131:in `block (2 levels) in render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:129:in `open'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:129:in `block in render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:121:in `each'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:121:in `render_content_files'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/static_page/render.rb:35:in `render_to_file'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:47:in `block in render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:46:in `each'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:46:in `render'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/cli.rb:48:in `block in rebuild'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/site.rb:72:in `with_destination'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/lib/amber/cli.rb:47:in `rebuild'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/bin/amber:81:in `main'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/gems/amber-0.3.11/bin/amber:84:in `<top (required)>'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/amber:22:in `load'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/amber:22:in `<main>'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/huertanix/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Support for Windows

Add support for running amber server on windows. I think no need to support amber rebuild on windows, because windows doesn't have symlinks and so it is fundamentally not really compatible with how amber works. But the server would be nice for letting people edit pages on windows.

Point amber to files path

While trying to run amber with bundle exec amber to keep gem files in a specific directory, I found that:

  • I could not get bundle exec amber to work outside of the amber directory
  • amber refused to server anything since I was not in the directory where the website files were (Could not find amber/config.rb in the directory tree. Run amber from inside an amber website directory)

I think this could be solved if you could run something like amber server --path instead of needing to run amber in the website files working dir.

I ended up symlinking a bunch of stuff to make this work, which is not ideal.

tilt haml warnings

When amber rebuild'ing a site my console is flooded with 15k lines of this:

/var/lib/gems/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb:77: warning: Haml::Engine#precompiled_method_return_value at /usr/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method Haml::Compiler#precompiled_method_return_value

I think this tilt commit (which is in tilt 2.0.10 which is what I am using) is supposed to fix that? But that commit didn't remove the code, it now just checks for Haml >= 5.0.0.beta.2 and if not it's got an else statement with the old way. So maybe the parser is still giving the warning each time it's used?

Super annoying and it drowns out legit output. Can those warnings be surpressed? Or maybe we lobby tilt upstream to drop support for old versions or make it not complain somehow.

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.