Skip to content

Commit

Permalink
Merge pull request #51 from webhippie/updates
Browse files Browse the repository at this point in the history
Better workflows, codacy, renovate and settings
  • Loading branch information
tboerger committed Dec 9, 2021
2 parents 9f3d967 + a25fdac commit 0d26988
Show file tree
Hide file tree
Showing 27 changed files with 309 additions and 191 deletions.
11 changes: 11 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": [
"config:base",
":semanticCommits",
":semanticCommitType(deps)",
":automergePatch"
],
"labels": [
"renovate"
]
}
66 changes: 66 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
repository:
name: gettext_i18n_rails_js
description: Extends gettext_i18n_rails making your .PO files available to client side javascript as JSON
homepage: https://github.com/webhippie/gettext_i18n_rails_js
topics: ruby, rubygem, gettext, i18n, rails

private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false

default_branch: master

allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true

labels:
- name: bug
color: d73a4a
description: Something isn't working
- name: documentation
color: 0075ca
description: Improvements or additions to documentation
- name: duplicate
color: cfd3d7
description: This issue or pull request already exists
- name: enhancement
color: a2eeef
description: New feature or request
- name: good first issue
color: 7057ff
description: Good for newcomers
- name: help wanted
color: 008672
description: Extra attention is needed
- name: invalid
color: e4e669
description: This doesn't seem right
- name: question
color: d876e3
description: Further information is requested
- name: wontfix
color: ffffff
description: This will not be worked on
- name: hacktoberfest-accepted
color: cccccc
description: Accepted as a Hacktoberfest submission
- name: renovate
color: e99695
description: Automated action from Renovate

branches:
- name: master
protection:
required_status_checks:
strict: true
contexts: []
enforce_admins: false
restrictions:
users: []
teams: []

...
52 changes: 0 additions & 52 deletions .github/workflows/CI.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: release

"on":
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-20.04

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Release gem
uses: dawidd6/action-publish-gem@v1
with:
api_key: ${{ secrets.RUBYGEMS_API_KEY }}

...
73 changes: 73 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
name: testing

"on":
pull_request:
push:
branches:
- master

jobs:
rubocop:
runs-on: ubuntu-20.04

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.1
bundler: 1.17
bundler-cache: true

- name: Run rubocop
run: bundle exec rubocop

spec:
runs-on: ubuntu-20.04
needs: rubocop

strategy:
fail-fast: false

matrix:
ruby:
- 2.1
- 2.5
- 2.7
rails:
- 3.2
- 4.2
- 5.2
- 6.1
exclude:
# excludes new rails on old ruby
- rails: 5.2
ruby: 2.1
- rails: 6.1
ruby: 2.1
# excludes old rails on new ruby
- rails: 3.2
ruby: 2.7
- rails: 4.2
ruby: 2.7

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 1.17
bundler-cache: true
env:
RAILS_VERSION: ${{ matrix.rails }}

- name: Run rspec
run: bundle exec rspec

...
29 changes: 22 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
inherit_from: .rubocop_todo.yml
---
Gemspec/RequiredRubyVersion:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: false

Layout/ElseAlignment:
Enabled: false
Expand Down Expand Up @@ -30,19 +35,29 @@ Style/Next:
Style/RegexpLiteral:
Enabled: false

Style/SymbolArray:
EnforcedStyle: brackets

Metrics/MethodLength:
CountComments: false
Max: 30

Style/SymbolArray:
EnforcedStyle: brackets

Metrics/ClassLength:
Max: 300

Metrics/AbcSize:
Max: 25

Metrics/PerceivedComplexity:
Max: 10

Metrics/BlockLength:
Max: 35
Exclude:
- "gettext_i18n_rails_js.gemspec"
- "**/*_spec.rb"
ExcludedMethods:
- namespace

Metrics/LineLength:
Exclude:
- "**/*_spec.rb"

...
30 changes: 0 additions & 30 deletions .rubocop_todo.yml

This file was deleted.

40 changes: 23 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
# Changelog

## [1.3.1](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.4.0) - 2021-12-08

* Fixed multiline translation strings (@delxen)
* Switched to Codacy for coverage reports (@tboerger)
* Switched to GitHub actions for CI (@ezr-ondrej)

## [1.3.0](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.3.0) - 2017-03-16

* Fixed Handlebars translations with options (@mikezaby)
* Fixed latest Rubocop offenses (@mikezaby)
* Dropped failing coveralls, fixed codeclimate (@tboerger)
* Fixed Handlebars translations with options (@mikezaby)
* Fixed latest Rubocop offenses (@mikezaby)
* Dropped failing coveralls, fixed codeclimate (@tboerger)

## [1.2.0](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.2.0) - 2016-06-02

* Support for JSX files (@artemv)
* Fixed test suite, reduced test matrix (@tboerger)
* Support for JSX files (@artemv)
* Fixed test suite, reduced test matrix (@tboerger)

## [1.1.0](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.1.0) - 2016-06-02

* Replace hyphens with underscores in locale var from DOM (@filib)
* Replace hyphens with underscores in locale var from DOM (@filib)

## [1.0.4](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.4) - 2016-05-31

* Support ES2015 template strings (@bradbarrow)
* Support ES2015 template strings (@bradbarrow)

## [1.0.3](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.3) - 2015-11-03

* Stop using bundler within the core lib (@domcleal)
* Stop using bundler within the core lib (@domcleal)

## [1.0.2](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.2) - 2015-03-30

* Fixes exception when parsing empty js/coffee files (@tboerger)
* Avoid methods defined in rake task exposing globally (@tboerger)
* Added better configuration options (@tboerger)
* Fixes exception when parsing empty js/coffee files (@tboerger)
* Avoid methods defined in rake task exposing globally (@tboerger)
* Added better configuration options (@tboerger)

## [1.0.1](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.1) - 2015-02-24

* Added missing javascripts to the gemspec (@tboerger)
* Added missing javascripts to the gemspec (@tboerger)

## [1.0.0](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.0) - 2015-02-24

* Transfer from github.com/nubis/gettext_i18n_rails_js (@tboerger)
* Added TravisCI, Rubocop and Coveralls (@tboerger)
* Updated structure to my opinionated gem style (@tboerger)
* Changed default handlebars function to ```__``` (@tboerger)
* Added extended ```gettext_i18n_rails_js.yml``` (@tboerger)
* Transfer from github.com/nubis/gettext_i18n_rails_js (@tboerger)
* Added TravisCI, Rubocop and Coveralls (@tboerger)
* Updated structure to my opinionated gem style (@tboerger)
* Changed default handlebars function to ```__``` (@tboerger)
* Added extended ```gettext_i18n_rails_js.yml``` (@tboerger)
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: UTF-8 -*-
# frozen_string_literal: true

#
# Copyright (c) 2012-2015 Dropmysite.com <https://dropmyemail.com>
# Copyright (c) 2015 Webhippie <http://www.webhippie.de>
Expand Down

0 comments on commit 0d26988

Please sign in to comment.