Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine/v0.20 #5611

Merged
merged 8 commits into from Jan 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
2.6.5
2.5.3
10 changes: 5 additions & 5 deletions Gemfile.lock
Expand Up @@ -103,7 +103,7 @@ PATH
pg (~> 1.1.4, < 2)
pg_search (~> 2.2)
premailer-rails (~> 1.10)
rack (~> 2.0)
rack (>= 2.0.8)
rack-attack (~> 6.0)
rails (>= 5.2, < 6.0.x)
rails-i18n (~> 5.0)
Expand Down Expand Up @@ -399,7 +399,7 @@ GEM
activesupport (>= 4.1, < 6.0)
railties (>= 4.1, < 6.0)
tzinfo (~> 1.2, >= 1.2.2)
geocoder (1.5.2)
geocoder (1.6.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
graphiql-rails (1.4.11)
Expand Down Expand Up @@ -485,7 +485,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.3)
mini_magick (4.9.5)
mini_magick (4.10.1)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
Expand Down Expand Up @@ -552,7 +552,7 @@ GEM
premailer (~> 1.7, >= 1.7.9)
public_suffix (3.1.0)
puma (3.12.2)
rack (2.0.7)
rack (2.0.8)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
Expand Down Expand Up @@ -781,7 +781,7 @@ DEPENDENCIES
web-console (~> 3.5)

RUBY VERSION
ruby 2.6.5p114
ruby 2.5.3p105

BUNDLED WITH
1.17.3
2 changes: 1 addition & 1 deletion decidim-core/decidim-core.gemspec
Expand Up @@ -53,7 +53,7 @@ Gem::Specification.new do |s|
s.add_dependency "pg", "~> 1.1.4", "< 2"
s.add_dependency "pg_search", "~> 2.2"
s.add_dependency "premailer-rails", "~> 1.10"
s.add_dependency "rack", "~> 2.0"
s.add_dependency "rack", ">= 2.0.8"
s.add_dependency "rack-attack", "~> 6.0"
s.add_dependency "rails", ">= 5.2", "< 6.0.x"
s.add_dependency "rails-i18n", "~> 5.0"
Expand Down
Expand Up @@ -139,7 +139,6 @@ def expected_searchable_resource_attrs(space, locale)
"resource_id" => space.id,
"resource_type" => space.class.name
}.merge(searchable_resource_attrs_mapper.call(space, locale))
h.merge
h
end
end
10 changes: 5 additions & 5 deletions decidim-forms/lib/decidim/forms/test/factories.rb
Expand Up @@ -4,7 +4,7 @@
require "decidim/participatory_processes/test/factories"

FactoryBot.define do
factory :questionnaire, class: Decidim::Forms::Questionnaire do
factory :questionnaire, class: "Decidim::Forms::Questionnaire" do
title { generate_localized_title }
description do
Decidim::Faker::Localized.wrapped("<p>", "</p>") do
Expand All @@ -25,7 +25,7 @@
end
end

factory :questionnaire_question, class: Decidim::Forms::Question do
factory :questionnaire_question, class: "Decidim::Forms::Question" do
transient do
options { [] }
end
Expand Down Expand Up @@ -54,20 +54,20 @@
end
end

factory :answer, class: Decidim::Forms::Answer do
factory :answer, class: "Decidim::Forms::Answer" do
body { "hola" }
questionnaire
question { create(:questionnaire_question, questionnaire: questionnaire) }
user { create(:user, organization: questionnaire.questionnaire_for.organization) }
end

factory :answer_option, class: Decidim::Forms::AnswerOption do
factory :answer_option, class: "Decidim::Forms::AnswerOption" do
question { create(:questionnaire_question) }
body { generate_localized_title }
free_text { false }
end

factory :answer_choice, class: Decidim::Forms::AnswerChoice do
factory :answer_choice, class: "Decidim::Forms::AnswerChoice" do
answer
answer_option { create(:answer_option, question: answer.question) }
end
Expand Down
6 changes: 3 additions & 3 deletions decidim-generators/Gemfile.lock
Expand Up @@ -98,7 +98,7 @@ PATH
pg (~> 1.1.4, < 2)
pg_search (~> 2.2)
premailer-rails (~> 1.10)
rack (~> 2.0)
rack (>= 2.0.8)
rack-attack (~> 6.0)
rails (>= 5.2, < 6.0.x)
rails-i18n (~> 5.0)
Expand Down Expand Up @@ -547,7 +547,7 @@ GEM
premailer (~> 1.7, >= 1.7.9)
public_suffix (3.1.0)
puma (3.12.2)
rack (2.0.7)
rack (2.0.8)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
Expand Down Expand Up @@ -775,7 +775,7 @@ DEPENDENCIES
web-console (~> 3.5)

RUBY VERSION
ruby 2.6.5p114
ruby 2.5.3p105

BUNDLED WITH
1.17.3
12 changes: 6 additions & 6 deletions decidim-initiatives/lib/decidim/initiatives/test/factories.rb
Expand Up @@ -4,7 +4,7 @@
require "decidim/dev"

FactoryBot.define do
factory :initiatives_type, class: Decidim::InitiativesType do
factory :initiatives_type, class: "Decidim::InitiativesType" do
title { generate_localized_title }
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
Expand Down Expand Up @@ -49,7 +49,7 @@
end
end

factory :initiatives_type_scope, class: Decidim::InitiativesTypeScope do
factory :initiatives_type_scope, class: "Decidim::InitiativesTypeScope" do
type { create(:initiatives_type) }
scope { create(:scope, organization: type.organization) }
supports_required { 1000 }
Expand All @@ -59,7 +59,7 @@
end
end

factory :initiative, class: Decidim::Initiative do
factory :initiative, class: "Decidim::Initiative" do
title { generate_localized_title }
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
organization
Expand Down Expand Up @@ -150,12 +150,12 @@
end
end

factory :initiative_user_vote, class: Decidim::InitiativesVote do
factory :initiative_user_vote, class: "Decidim::InitiativesVote" do
initiative { create(:initiative) }
author { create(:user, :confirmed, organization: initiative.organization) }
end

factory :organization_user_vote, class: Decidim::InitiativesVote do
factory :organization_user_vote, class: "Decidim::InitiativesVote" do
initiative { create(:initiative) }
author { create(:user, :confirmed, organization: initiative.organization) }
decidim_user_group_id { create(:user_group).id }
Expand All @@ -164,7 +164,7 @@
end
end

factory :initiatives_committee_member, class: Decidim::InitiativesCommitteeMember do
factory :initiatives_committee_member, class: "Decidim::InitiativesCommitteeMember" do
initiative { create(:initiative) }
user { create(:user, :confirmed, organization: initiative.organization) }
state { "accepted" }
Expand Down
2 changes: 1 addition & 1 deletion decidim-surveys/lib/decidim/surveys/test/factories.rb
Expand Up @@ -11,7 +11,7 @@
participatory_space { create(:participatory_process, :with_steps) }
end

factory :survey, class: Decidim::Surveys::Survey do
factory :survey, class: "Decidim::Surveys::Survey" do
questionnaire { build(:questionnaire) }
component { build(:surveys_component) }
end
Expand Down
6 changes: 3 additions & 3 deletions decidim_app-design/Gemfile.lock
Expand Up @@ -103,7 +103,7 @@ PATH
pg (~> 1.1.4, < 2)
pg_search (~> 2.2)
premailer-rails (~> 1.10)
rack (~> 2.0)
rack (>= 2.0.8)
rack-attack (~> 6.0)
rails (>= 5.2, < 6.0.x)
rails-i18n (~> 5.0)
Expand Down Expand Up @@ -552,7 +552,7 @@ GEM
premailer (~> 1.7, >= 1.7.9)
public_suffix (3.1.0)
puma (3.12.2)
rack (2.0.7)
rack (2.0.8)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
Expand Down Expand Up @@ -781,7 +781,7 @@ DEPENDENCIES
web-console (~> 3.5)

RUBY VERSION
ruby 2.6.5p114
ruby 2.5.3p105

BUNDLED WITH
1.17.3
20 changes: 15 additions & 5 deletions docs/development_guide.md
Expand Up @@ -117,7 +117,7 @@ Refer to the [testing](advanced/testing.md) guide.

In order to release new version you need to be owner of all the gems at RubyGems, ask one of the owners to add you before releasing. (Try `gem owners decidim`).

Releasing new versions is quite easy, it's the same process whether it's a new version or a patch:
Releasing new ***patch versions*** is quite easy, it's the same process whether it's a new version or a patch:

1. Checkout the branch you want to release: `git checkout -b VERSION-stable`
1. Update `.decidim-version` to the new version number.
Expand All @@ -130,15 +130,25 @@ Releasing new versions is quite easy, it's the same process whether it's a new v
1. Once all the gems are published you should create a new release at this repository, just go to the [releases page](https://github.com/decidim/decidim/releases) and create a new one.
1. Finally, you should update our [Docker repository](https://github.com/decidim/docker) so new images are build for the new release. To do it, just update `DECIDIM_VERSION` at [circle.yml](https://github.com/decidim/docker/blob/master/circle.yml).

If this was a major version release:
If this was a **major version** release:

1. Go back to master with `git checkout master`
2. Update `.decidim-version` to the new major development version
1. Update `.decidim-version` to the new major development version
1. Run `bin/rake update_versions`, this will update all references to the new version.
1. Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
1. Run `bin/rake webpack`, this will update the JavaScript bundle.
1. Update `CHANGELOG.MD` with a clean slate, onlye the empty sections and a bottom link to the latest release.
1. Update `SECURITY.md` and change the supported version to the new version.
1. Commit all the changes: `git add . && git commit -m "Bump version" && git push origin master`
1. Run `bin/rake release_all`, this will create all the tags, push the commits and tags and release the gems to RubyGems.
1. Once all the gems are published you should create a new release at this repository, just go to the [releases page](https://github.com/decidim/decidim/releases) and create a new one.
1. Finally, you should update our [Docker repository](https://github.com/decidim/docker) so new images are build for the new release. To do it, just update `DECIDIM_VERSION` at [circle.yml](https://github.com/decidim/docker/blob/master/circle.yml) and create the sibling branch at the Docker repository.
1. Finally, you should update our [Docker repository](https://github.com/decidim/docker) so new images are build for the new release. To do it, just update `DECIDIM_VERSION` at [circle.yml](https://github.com/decidim/docker/blob/master/circle.yml) and create the sibling branch at the Docker repository. NOTE: You should also take into account if the Ruby version has changed, in which case the Dockerfile should also be updated.

To branch the stable version and let master be the new devel branch again:

1. Create and push the stable branch from master: `git checkout master && git checkout -b VERSION-stable && git push origin VERSION-stable`
1. Update the `CHANGELOG.MD`. At the top you should have an `Unreleased` header with the `Added`, `Changed`, `Fixed` and `Removed` empty section. After that, the header with the current version and link.
1. Turn master into the dev branch for the next release:
1. Update `.decidim-version` to the new `dev` development version: x.y.z-dev
1. Run `bin/rake update_versions`, this will update all references to the new version.
1. Run `bin/rake bundle`, this will update all the `Gemfile.lock` files
1. Run `bin/rake webpack`, this will update the JavaScript bundle.