jt_tools 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 546f1c903d3ee920591bf6c3fd5d622f9a38714762148f05fbf1c221862b34fd
4
- data.tar.gz: d719294b0c1573c574622ee66612650c7d93d270c83ceb1e9565e7a9f7a00945
3
+ metadata.gz: bdb04a85894fdfe373769904f9a777fba74b09603f12f742fc97790be268745d
4
+ data.tar.gz: 3c87268fa42ec2ed6f54cc56ca9a256c4d2e9f11da2a23a61ea5f00625de435c
5
5
  SHA512:
6
- metadata.gz: 0feb0f9ef79b73f11d91c3c043935cc2f68de2a6c992f0c85228d78ee429fabf85347bf6bd3c05b65371a4b3e4eae53036d4643174558e80651cd68f492eae8f
7
- data.tar.gz: 4652b8b1f95a35011ea21085cd34bea3a39bd466ec4974f7292acf3cd16ed2b4f5ad5c1ce8abb2a3c761e56db6ee027e884cc6bb591c9273e638090eb340c314
6
+ metadata.gz: e96e1914b767646c4e1dfa10a32d645f2012ae7902bceefa1b66c70fa1ef8f902ded3f282522e892e34da8be72d9d7c8fb9abca69866efb0b7e3e40117447fb9
7
+ data.tar.gz: 6aba8cac6cf26bd2cc19eeeb317bbf0770cb08c6c244381e3c01096d2fabccd2928c4a1854a1ea60246211936f8b10dc1485c4b926202b39baae0db2cd7c8ad1
@@ -24,6 +24,16 @@ jobs:
24
24
  - rails-v2-{{ arch }}-
25
25
  - rails-v2-
26
26
 
27
+ - ruby/install-deps:
28
+ key: v1-dependencies
29
+ with-cache: false
30
+ path: /home/circleci/project/vendor/bundle
31
+
32
+ - node/install-packages:
33
+ app-dir: .
34
+ pkg-manager: yarn
35
+ cache-version: v1
36
+
27
37
  - run: |
28
38
  [[ $CIRCLE_NODE_INDEX == "0" ]] || bin/ci-test
29
39
  - run: |
@@ -36,10 +46,29 @@ jobs:
36
46
  - /home/circleci/.rubygems
37
47
  - /home/circleci/.cache
38
48
 
49
+ orbs:
50
+ node: circleci/node@4
51
+ ruby: circleci/ruby@1
52
+
39
53
  workflows:
40
- test:
54
+ commit:
41
55
  jobs:
42
- - test
56
+ - hold:
57
+ type: approval
58
+ filters:
59
+ branches:
60
+ ignore:
61
+ - master
62
+ - test:
63
+ requires:
64
+ - hold
65
+ merge:
66
+ jobs:
67
+ - test:
68
+ filters:
69
+ branches:
70
+ only:
71
+ - master
43
72
 
44
73
  daily:
45
74
  triggers:
@@ -50,8 +79,4 @@ workflows:
50
79
  only:
51
80
  - master
52
81
  jobs:
53
- - hold:
54
- type: approval
55
- - test:
56
- requires:
57
- - hold
82
+ - test
@@ -38,7 +38,7 @@ jobs:
38
38
 
39
39
  strategy:
40
40
  matrix:
41
- os-version: [ 'ubuntu-20.04', 'ubuntu-latest' ]
41
+ os-version: [ 'ubuntu-20.04', 'ubuntu-18.04' ]
42
42
  fail-fast: true
43
43
 
44
44
  runs-on: ${{ matrix.os-version }}
@@ -59,6 +59,7 @@ jobs:
59
59
  --health-retries 5
60
60
 
61
61
  steps:
62
+ - run: pwd
62
63
  - name: Checkout code
63
64
  uses: actions/checkout@v2
64
65
 
@@ -76,6 +77,21 @@ jobs:
76
77
  with:
77
78
  node-version: 14
78
79
 
80
+ - name: Get yarn cache directory path
81
+ id: yarn-cache-dir-path
82
+ run: echo "::set-output name=dir::$(yarn cache dir)"
83
+
84
+ - uses: actions/cache@v2
85
+ with:
86
+ path: |
87
+ **/node_modules
88
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
89
+ key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
90
+ restore-keys: |
91
+ ${{ runner.os }}-modules-
92
+
93
+ - run: yarn install
94
+
79
95
  - name: Disable Linuxbrew
80
96
  run: |
81
97
  [[ $(uname -s) == "Linux"* ]] && sudo rm -rf $(which brew)
data/.gitignore CHANGED
@@ -27,7 +27,7 @@ config/master.key
27
27
  ## Environment normalization:
28
28
  */bin/bundle
29
29
  .bundle
30
- */vendor/bundle
30
+ vendor/bundle
31
31
 
32
32
  # Ignore Byebug command history file.
33
33
  .byebug_history
@@ -2,10 +2,8 @@
2
2
  inherit_from: lib/install/.rubocop.yml
3
3
 
4
4
  AllCops:
5
- NewCops: enable
6
- TargetRubyVersion: 3.0
7
-
8
5
  Exclude:
9
6
  - 'bin/**/*'
10
7
  - 'template.rb'
11
8
  - 'vendor/**/*'
9
+ - 'tmp/**/*'
data/Gemfile CHANGED
@@ -7,7 +7,6 @@ ruby '3.0.0'
7
7
  # Specify your gem's dependencies in jt_tools.gemspec
8
8
  gemspec
9
9
 
10
- gem 'bump'
11
10
  gem 'rubocop-minitest', require: false
12
11
  gem 'rubocop-performance', require: false
13
12
  gem 'rubocop-rails', require: false
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![GitHub Actions](https://github.com/jetthoughts/jt_tools/workflows/Test/badge.svg?branch=master)](https://github.com/jetthoughts/jt_tools/actions?query=workflow%3ATest)
1
2
  [![CircleCI](https://circleci.com/gh/jetthoughts/jt_tools.svg?style=svg)](https://circleci.com/gh/jetthoughts/jt_tools)
2
3
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjetthoughts%2Fjt_tools.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjetthoughts%2Fjt_tools?ref=badge_shield)
3
4
  [![Gem Version](https://badge.fury.io/rb/jt_tools.svg)](https://badge.fury.io/rb/jt_tools)
data/bin/lint CHANGED
@@ -7,4 +7,6 @@ yamllint --config-file lib/install/.yamllint.yml --strict ./*.yml
7
7
  yamllint --config-file lib/install/.yamllint.yml --strict lib/**/.*.yml
8
8
  yamllint --config-file lib/install/.yamllint.yml --strict ./**/.*/*.yml
9
9
 
10
- bundle exec rubocop -P
10
+ node_modules/.bin/eslint --config lib/install/.eslintrc.js --quiet --no-color lib/**/.*.js
11
+
12
+ bundle exec rubocop --debug --extra-details --display-style-guide --parallel
data/bin/test CHANGED
@@ -2,13 +2,22 @@
2
2
 
3
3
  set -eo pipefail
4
4
 
5
+ export BUNDLE_PATH="$(pwd)/vendor/bundle"
6
+ mkdir -p "$BUNDLE_PATH"
7
+
8
+ bundle check || bundle install
9
+ yarn check || yarn install
10
+
5
11
  echo ""
6
12
  echo "== Lint: =="
7
13
  bin/lint
8
14
 
9
- mkdir -p tmp/
15
+ target_dir=${1:-$(mktemp -d)}
16
+ template_path="$(pwd)/template.rb"
10
17
 
11
- cd tmp
18
+ mkdir -p "$target_dir"
19
+
20
+ cd "$target_dir"
12
21
  rm -rf test_tmpl
13
22
 
14
23
  # Test installation of missed gems on applying template
@@ -20,10 +29,10 @@ then
20
29
  rails new test_tmpl --quiet --database postgresql
21
30
  cd test_tmpl
22
31
  bin/setup
23
- bin/rails app:template LOCATION="../../template.rb"
32
+ bin/rails app:template LOCATION="${template_path}"
24
33
  else
25
34
  echo "Generate app with template"
26
- rails new test_tmpl --template ../template.rb --quiet --database postgresql
35
+ rails new test_tmpl --template "${template_path}" --quiet --database postgresql
27
36
  cd test_tmpl
28
37
  bin/setup
29
38
  fi
@@ -54,8 +63,6 @@ git commit -m 'Adds sample_for_linters'
54
63
  bin/rubocop --fail-level F sample_for_linters.rb
55
64
  bin/pronto run -c HEAD~1 --no-exit-code
56
65
  BUNDLE_GEMFILE=Gemfile.tools bin/bundle exec rails_best_practices --without-color --silent --test .
57
- # FIXME: https://github.com/Shopify/erb-lint/issues/162
58
- # BUNDLE_GEMFILE=Gemfile.tools bin/bundle exec erblint --config ../../lib/install/.erb-lint.yml --autocorrect .
59
66
 
60
67
  CIRCLECI=false bin/lint-pr -f text
61
68
 
@@ -64,9 +71,6 @@ echo "== Run git hooks verifications =="
64
71
  bin/git-hooks/post-merge
65
72
  CIRCLECI=false bin/git-hooks/pre-push
66
73
 
67
- bin/rubocop --config ../../lib/install/.rubocop.yml --debug --extra-details --display-style-guide --parallel ../../lib
68
- node_modules/.bin/eslint --config ../../lib/install/.eslintrc.js --quiet --no-color ../../lib/**/.*.js
69
-
70
74
  # For local run only
71
75
  if [[ -z "$CIRCLECI" ]]
72
76
  then
@@ -20,6 +20,7 @@
20
20
  spec.metadata['changelog_uri'] = 'https://github.com/jetthoughts/jt-tools/'
21
21
 
22
22
  spec.add_dependency 'railties', '>= 4.2'
23
+ spec.add_development_dependency 'bump'
23
24
 
24
25
  # Specify which files should be added to the gem when it is released.
25
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JtTools
4
- VERSION = '0.0.15'
4
+ VERSION = '0.0.16'
5
5
  end
@@ -0,0 +1,5 @@
1
+ {
2
+ "devDependencies": {
3
+ "eslint": "^7.16.0"
4
+ }
5
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Keen
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bump
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Helpful scripts to run linters locally and on CI
28
42
  email:
29
43
  - pftg@users.noreply.github.com
@@ -42,6 +56,7 @@ files:
42
56
  - ".rubocop.yml"
43
57
  - ".standard.yml"
44
58
  - Gemfile
59
+ - Gemfile.lock
45
60
  - LICENSE
46
61
  - LICENSE.txt
47
62
  - README.md
@@ -84,9 +99,11 @@ files:
84
99
  - lib/jt_tools/railtie.rb
85
100
  - lib/jt_tools/version.rb
86
101
  - lib/tasks/install.rake
102
+ - package.json
87
103
  - rejuvenation.rb
88
104
  - shipit.rubygems.yml
89
105
  - template.rb
106
+ - yarn.lock
90
107
  homepage: https://jtway.co
91
108
  licenses:
92
109
  - MIT