Skip to content

Commit

Permalink
Merge pull request #78 from nimblehq/release/2.3.0
Browse files Browse the repository at this point in the history
Release - 2.3.0
  • Loading branch information
hoangmirs authored Dec 1, 2022
2 parents 6d1b998 + 5961beb commit d2a2b1c
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "Bug Report"
about: "You found something that is not working. Report it so that it can be fixed. 👷‍"
title: "Fix: "
labels: "type : bug"
---

## Issue

Describe the issue you are facing. Show us the implementation: screenshots, GIF, etc.

## Expected

Describe what should be the correct behavior.

## Steps to reproduce

1.
2.
3.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/chore_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Chore"
about: "Open a chore issue for a minor update."
title: "Update "
labels: "type : chore"
---

## Why

Describe the details of the update and why it's needed.

## Who Benefits?

Describe who will be the beneficiaries e.g. everyone, specific chapters, clients...
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Feature"
about: "Open a feature issue to add new functionalities."
title: "Add "
labels: "type : feature"
---

## Why

Describe the big picture of the feature and why it's needed.

## Who Benefits?

Describe who will be the beneficiaries e.g. everyone, specific chapters, clients...
20 changes: 11 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## What happened
Describe the big picture of your changes here to communicate to the team why we should accept this pull request.
Resolves https://github.com/nimblehq/nimble-survey-web/issues/??


## Insight
Describe in details how to test the changes. Referenced documentation are welcome as well.

## What happened 👀

## Proof Of Work
Show us the implementation: screenshots, gif, etc.

Provide a description of the **changes** this pull request brings to the codebase. Additionally, when the pull request is still being worked on, a checklist of the planned changes is welcome to track progress.

## Insight 📝

Describe in detail why this solution is the most appropriate, which solution you tried but did not go with, and how to test the changes. References to relevant documentation are welcome as well.

## Proof Of Work 📹

Show us the implementation: screenshots, GIFs, etc.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
https://github.com/nimblehq/react-templates/milestone/{ID}?closed=1

## Features

Provide the Pull Request IDs in the section for each type (feature, chore, and bug), e.g.

- #1234

## Chores

- Same structure as in ## Feature

## Bugs

- Same structure as in ## Feature
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.0
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 14.17.0
ruby 2.7.1
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
## Project Setup

### Prerequisites

[![ruby-version-image](https://img.shields.io/badge/ruby-2.7.1-brightgreen.svg)](https://www.ruby-lang.org/en/news/2020/03/31/ruby-2-7-1-released/)
[![node-version-image](https://img.shields.io/badge/node-14.17.0-brightgreen.svg)](https://nodejs.org/download/release/v14.17.0/)

### Docker

* Install [Docker for Mac](https://docs.docker.com/docker-for-mac/install/)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/surveys_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SurveysController < ApplicationController
def index
pagy, surveys = pagy_array(Survey.all, pagination_params)

render json: SurveySerializer.new(surveys, meta: meta_from_pagy(pagy))
render json: SurveySimpleSerializer.new(surveys, meta: meta_from_pagy(pagy))
rescue Pagy::OverflowError
render status: :not_found
end
Expand Down
14 changes: 1 addition & 13 deletions app/serializers/survey_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# frozen_string_literal: true

class SurveySerializer < ApplicationSerializer
attributes :title,
:description,
:thank_email_above_threshold,
:thank_email_below_threshold,
:is_active,
:cover_image_url,
:created_at,
:active_at,
:inactive_at

attribute :survey_type, &:type

class SurveySerializer < SurveySimpleSerializer
has_many :questions
end
15 changes: 15 additions & 0 deletions app/serializers/survey_simple_serializer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

class SurveySimpleSerializer < ApplicationSerializer
attributes :title,
:description,
:thank_email_above_threshold,
:thank_email_below_threshold,
:is_active,
:cover_image_url,
:created_at,
:active_at,
:inactive_at

attribute :survey_type, &:type
end
3 changes: 1 addition & 2 deletions spec/support/api/schemas/v1/surveys/index/valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
"required": [
"id",
"type",
"attributes",
"relationships"
"attributes"
]
}
},
Expand Down

0 comments on commit d2a2b1c

Please sign in to comment.