Coder Social home page Coder Social logo

rootstrap / arqo Goto Github PK

View Code? Open in Web Editor NEW
50.0 6.0 1.0 48 KB

Easing the query object pattern in Rails applications

Home Page: https://rootstrap.com

License: MIT License

Ruby 96.40% Shell 0.70% HTML 2.90%
activerecord query-objects rails hacktoberfest query-object-pattern

arqo's People

Contributors

afmicc avatar brunvez avatar santib avatar vitogit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

Forkers

megatux

arqo's Issues

Compatibility with Rails 7

Just tried adding arqo to a Rails 7 app but found that arqo 0.2.0 depends on ActiveRecord (< 7.0.0).

Really love this gem so would love to see it become compatible with the latest version of Rails in the future!

% bundle add arqo
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
  In snapshot (Gemfile.lock):
    activerecord (= 7.0.3.1)

  In Gemfile:
    activerecord-postgis-adapter (~> 8.0) was resolved to 8.0.1, which depends on
      activerecord (~> 7.0.0)

    arqo was resolved to 0.2.0, which depends on
      activerecord (< 7, >= 4)

Deleting your Gemfile.lock file and running `bundle install` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Add generator

When running a generator (and/or rails g model) we could also generate the query object and query object specs

Rails query generator not found

Bug report:

  • Expected Behavior:
    rails generate query [e.g. User] should generate a UserQuery object in app/queries.
    rails generate --help should confirm the existence of the query generator

  • Actual Behavior:
    bundle exec rails generate query User => Could not find generator 'query'.
    rails generate --help | grep query shows nothing

  • Steps to Reproduce:

    1. Create or open a Rails 6 application
    2. Install the gem using bundle add arqo or gem install arqo
    3. Run rails generate query [e.g. User]
  • Version of the repo:
    0.2.0

  • Ruby and Rails Version:
    Ruby 2.6.3
    Rails 6.0.0

Create an example app

we could have an example app that is a CLI where people can run query object methods

Add configurations

We could make Query suffix be configurable and we could make configurable if deriving or not the model name

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.