elixir-maru / maru

Elixir RESTful Framework
https://maru.readme.io
BSD 3-Clause "New" or "Revised" License
1.32k stars 84 forks source link

Feature: Add Coverage Checking #84

Open jalcine opened 6 years ago

jalcine commented 6 years ago

I want to help out more with this project but I feel that in order to properly do so without adding code bloat, coverage checking would be helpful.

falood commented 6 years ago

@jalcine Thank you for this pr, but I'm sorry I don't think it's time to merge it now. I have a branch here to refactor the whole project, I plan to make coverage check and docs(#85) in this pr. But I don't have enough time on it, so I still need some time to finish it.

jalcine commented 6 years ago

Ah, okay, that's cool! This doesn't impact master heavily so I think keeping it open until that refactor is done is cool (unless you think closing it is best).

Do you have tasks/features/goals for this refactor? This project is pretty important to me - I'd like to help out.

falood commented 6 years ago
  1. modularize codebase (about 85% finished) with this feature, people can easy to add custom DSL, such as

    custom_dsl do
    end
    get do
       xxxx
    end
  2. context variable (this is a break change) for now, there're two internal variables conn and params. I want to add another one context what people can get maru router related information from. also I don't like hidden variables, maybe use new DSL for endpoints like (haven't decided)

    get :path, fn conn, params, context ->
      xxxx
    end
    
    get :path, &AnotherModule.endpoint_func/3
  3. use config from custom application and custom the supervisor tree for now we have to use config :maru, MY_MODULE to config maru, will add new way like

    defmodule MyAPI do
      use Maru.Router, Application.get_env(:my_app, :my_api)
    end

    and provide MyAPI.child_spec function to help use to make maru application under any supervisor tree.

  4. Code Style complete @spec docs and unit test, move all docs to hexdocs #85 also format code with elixir 1.6 formatter.

jalcine commented 6 years ago

What is 2?

falood commented 6 years ago

@jalcine I'm really glad to hear what you think about maru, Thank you very much! Let's keep this pr open, and merge it after the first task modularize codebase merged.

jalcine commented 6 years ago

Awesome - these sounds like good features for maru's longterm success.

jalcine commented 6 years ago

Sorry, I closed this prematurely. Did you merge that modularize codebase branch? IF so, I can begin working to add more tests and make sure coverage is up.