hanami / contributors

All hanami contributors in one place
http://contributors.hanamirb.org
MIT License
14 stars 9 forks source link

Add new project from admin #52

Open Bounga opened 6 years ago

Bounga commented 6 years ago

Add form for adding a new project and spawn a sidekiq worker to import all new contributors and commits for the given project.

Bounga commented 6 years ago

It is related to https://github.com/hanami/contributors/issues/39 /cc @davydovanton

Bounga commented 6 years ago

I think we can refactor internals of service methods

davydovanton commented 6 years ago

oh, sorry, I missed this PR. Will check it ASAP. Sorry again 😞

Bounga commented 6 years ago

@davydovanton no problem. Check it when you can.

Bounga commented 6 years ago

You don’t have to apologize. Really.

davydovanton commented 6 years ago

also, could you fix sidekiq specs? Just use Sidekiq::Testing.fake! for this and check how much jobs was spawned https://github.com/mperham/sidekiq/wiki/Testing

Bounga commented 6 years ago

@davydovanton Do you understand the Ruby version related error? I don't experience this locally. Other than that I have one error left:

 1) Admin::Views::ApplicationLayout contains application name
     Failure/Error: let(:rendered) { layout.render }

     NoMethodError:
       undefined method `view' for #<Hanami::View::Template:0x00007fae1dff26e8>
     # ./vendor/bundle/gems/hanami-view-1.1.0/lib/hanami/view/rendering/layout_scope.rb:119:in `view'
     # ./vendor/bundle/gems/hanami-view-1.1.0/lib/hanami/view/rendering/layout_scope.rb:248:in `renderer'
     # ./vendor/bundle/gems/hanami-view-1.1.0/lib/hanami/view/rendering/layout_scope.rb:101:in `render'
     # ./apps/admin/templates/application.html.slim:10:in `block in singleton class'
     # ./apps/admin/templates/application.html.slim:-2:in `instance_eval'
     # ./apps/admin/templates/application.html.slim:-2:in `singleton class'
     # ./apps/admin/templates/application.html.slim:-5:in `__tilt_70192868882380'
     # ./vendor/bundle/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `call'
     # ./vendor/bundle/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `evaluate'
     # ./vendor/bundle/gems/tilt-2.0.8/lib/tilt/template.rb:109:in `render'
     # ./vendor/bundle/gems/hanami-view-1.1.0/lib/hanami/view/template.rb:41:in `render'
     # ./vendor/bundle/gems/hanami-view-1.1.0/lib/hanami/layout.rb:139:in `render'
     # ./spec/admin/views/application_layout_spec.rb:5:in `block (2 levels) in <top (required)>'
     # ./spec/admin/views/application_layout_spec.rb:9:in `block (2 levels) in <top (required)>'

and I can't understand why either.

davydovanton commented 6 years ago

hey, sorry for the long delay. I think the issue in this line:

= render partial: 'shared/navbar'

Also, you can try to remove (or comment this spec: https://github.com/hanami/contributors/blob/master/spec/admin/views/application_layout_spec.rb#L9)

Bounga commented 6 years ago

Wow what the xitkeyword visible here https://github.com/hanami/contributors/blob/master/spec/admin/views/application_layout_spec.rb#L8 ?

Don't have this locally, it's itas it should be…

Bounga commented 6 years ago

Seems like it was introduced later

Bounga commented 6 years ago

@davydovanton Here we are. Everything seems fine now.