Git Product home page Git Product logo

kaminari-sinatra's Issues

kaminari-sinatra defines `Rails` constant, causing other gems to think Rails is being used

This is due to loading ActionView which requires Rails.

ActionView claims to not require Rails, but it uses the underlying rails-html-sanitizer gem, which says:

Rails HTML Sanitizer is only intended to be used with Rails applications. If you need similar functionality but aren't using Rails, consider using the underlying sanitization library Loofah directly.

This causes issues loading gems like for instance Papertrail as this line:

if defined?(Rails)
  require "paper_trail/frameworks/rails"

thinks Rails is available and then blows up.

The ideal world is to prevent the Rails constant from being loaded somehow, but at a minimum some documentation around this gem still requiring Rails would probably help clarify the dependency, esp since the name "kaminari-sinatra" kind of implies I can use Sinatra and not need Rails.

Test Sinatra 2.0

Have you tried running these tests on 2.0?

I can send a patch to add another gemfile if that would help!

pagination helper raises ArgumentError

 ArgumentError - wrong number of arguments (given 0, expected 3) (ArgumentError):
	.rvm/gems/ruby-3.2.1/gems/actionview-7.1.3/lib/action_view/base.rb:228:in `initialize'
	.rvm/gems/ruby-3.2.1/gems/kaminari-sinatra-1.0.1/lib/kaminari/helpers/sinatra_helpers.rb:30:in `initialize'
	.rvm/gems/ruby-3.2.1/gems/kaminari-sinatra-1.0.1/lib/kaminari/helpers/sinatra_helpers.rb:94:in `new'
	.rvm/gems/ruby-3.2.1/gems/kaminari-sinatra-1.0.1/lib/kaminari/helpers/sinatra_helpers.rb:94:in `paginate'
	views/index.erb:13:in `__tilt_1140'

I see no commits in 3 years. Is this project even still alive?

Including kaminari-sinatra attempts to read translation files from padrino gem

I am not using padrino in my new Sinatra app. But including kaminari-sinatra attempts somehow to read translation files from padrino.

Is the padrino-helpers depencency necesary?

This is when I run my previously passing specs after adding kaminari-sinatra into my gemfile.

3) Admin voucher management vouchers listing authenticated admin visits it paginates vouchers navigate to the next page behaves like lists n vouchers lists 5 vouchers
    Failure/Error: name { Faker::Name.name }                                                           
                                                                                                                                                                                                                                              
     I18n::InvalidLocaleData:                                                                        
       can not load translations from /usr/lib/ruby/gems/2.5.0/gems/padrino-core-0.9.21/lib/padrino-core/locale/cz.yml: #<Psych::SyntaxError: (/usr/lib/ruby/gems/2.5.0/gems/padrino-core-0.9.21/lib/padrino-core/locale/cz.yml): did not find 
expected node content while parsing a flow node at line 15 column 13>                                        
     Shared Example Group: "lists n vouchers" called from ./spec/features/admin/voucher_management_spec.rb:39

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.