jt_tools 0.0.7 → 0.0.12

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: 110820f3c765883cb41d8be9ab041d2378e7bb02d2f0932274f0ea60130e616d
4
- data.tar.gz: c2507a76f727d277f1e58457ed3f3d47732f48fdc42dc66529c3c65b5311d709
3
+ metadata.gz: 404bb837c242626d8d1659431f454d945ab20c9aaed4726de35342502b092b3f
4
+ data.tar.gz: 5c53a281dce0de17f5a49cf88f21b149a13dc12f0cfbd3ea6e9b3b5ba2657d70
5
5
  SHA512:
6
- metadata.gz: 0031d018dd400ecb1762a59e2a3a7907cada91ded4059b166bcd56fc6ab9995ab12caad80822750a269361c617abab31cb80612604bccd9771d112bc186ab445
7
- data.tar.gz: 8edd821baf1efc31ce37f31930daf29b3cb997cb9ce48db4937060cc77a142e9bea44b8a077ed80d51a52b17993e38fe4b13be717903d58b9653853fc2b81905
6
+ metadata.gz: 3b4e7ff9003cd54e395130ff3170cac28dbba205c8abf63234cc82a9cbbb1c737ff38ab0e40ebe43f6fa150298540888a44248670008d2194bc64ced20999d74
7
+ data.tar.gz: 76e8ba0920a9e29fa088736fd13aca62b994a349f580f14c45322dafff1a39de03c70e8d22cd11f29fe92e0e06d618a036114e8a24cba0863f14710be2150ac3
data/.gitignore CHANGED
@@ -39,3 +39,4 @@ pkg
39
39
 
40
40
  # Temp files
41
41
  /tmp/
42
+ .rubocop-*
data/Gemfile CHANGED
@@ -4,3 +4,4 @@ source "https://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem "standard"
7
+ gem "bump"
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![CircleCI](https://circleci.com/gh/jetthoughts/jt_tools.svg?style=svg)](https://circleci.com/gh/jetthoughts/jt_tools)
2
2
  [![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
+ [![Gem Version](https://badge.fury.io/rb/jt_tools.svg)](https://badge.fury.io/rb/jt_tools)
3
4
 
4
5
  # JetThoughts Tools
5
6
 
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'standardrb' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("standard", "standardrb")
data/bin/test CHANGED
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- set -xeo pipefail
3
+ set -eo pipefail
4
4
 
5
- echo "=> Yamllint:"
5
+ echo ""
6
+ echo "== Yamllint: =="
6
7
  yamllint --config-file lib/install/.yamllint.yml --strict .*/*.yml
7
8
  yamllint --config-file lib/install/.yamllint.yml --strict *.yml
8
9
  yamllint --config-file lib/install/.yamllint.yml --strict lib/**/.*.yml
@@ -20,21 +21,25 @@ if [[ "$TEST_APP_TEMPLATE" == "true" ]]
20
21
  then
21
22
  rails new test_tmpl --quiet --database postgresql
22
23
  cd test_tmpl
23
- rails app:template LOCATION=../../template.rb
24
+ bin/setup
25
+ bin/rails app:template LOCATION="../../template.rb"
24
26
  else
25
27
  rails new test_tmpl --template ../template.rb --quiet --database postgresql
26
28
  cd test_tmpl
27
- DISABLE_SPRING=1 bin/setup
29
+ bin/setup
28
30
  fi
29
31
 
30
- echo " => Verify CircleCI config:"
32
+ echo ""
33
+ echo "== Verify CircleCI config =="
31
34
  circleci config validate
32
35
 
33
- echo " => Verify installation scripts:"
36
+ echo ""
37
+ echo "== Verify installation scripts =="
34
38
  bin/tools-setup
35
39
  bin/tools-upgrade
36
40
 
37
- echo " => Verify linters setup:"
41
+ echo ""
42
+ echo "== Verify linters setup =="
38
43
 
39
44
  git add .
40
45
  git commit -m 'Initial Commit'
@@ -55,7 +60,8 @@ BUNDLE_GEMFILE=Gemfile.tools bin/bundle exec rails_best_practices --without-colo
55
60
 
56
61
  CIRCLECI=false bin/lint-pr -f text
57
62
 
58
- echo " => Run git hooks verifications"
63
+ echo ""
64
+ echo "== Run git hooks verifications =="
59
65
  bin/git-hooks/post-merge
60
66
  CIRCLECI=false bin/git-hooks/pre-push
61
67
 
@@ -7,8 +7,8 @@
7
7
  version: 2.1
8
8
 
9
9
  orbs:
10
- ruby: circleci/ruby@1.0.0
11
- node: circleci/node@2.1.1
10
+ ruby: circleci/ruby@1.0.5
11
+ node: circleci/node@3.0.1
12
12
 
13
13
  workflows:
14
14
  version: 2
@@ -61,15 +61,28 @@ jobs:
61
61
 
62
62
  steps:
63
63
  - checkout
64
+
65
+ - restore_cache:
66
+ name: Restore Bundler Cache between Branches
67
+ keys:
68
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
69
+ - v1-dependencies-
70
+
64
71
  - ruby/install-deps:
65
72
  bundler-version: '`cat Gemfile.lock | tail -1 | tr -d " "`'
66
73
  key: v1-dependencies
67
- - node/install:
68
- node-version: latest
74
+ with-cache: false
75
+ path: './vendor/bundle'
76
+
77
+ - save_cache:
78
+ name: Save Bundler Cache between Branches
79
+ paths:
80
+ - ./vendor/bundle
81
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
82
+
69
83
  - node/install-packages:
70
84
  app-dir: .
71
85
  pkg-manager: yarn
72
- cache-key: yarn.lock
73
86
  cache-version: v1
74
87
 
75
88
  - restore_cache:
@@ -77,7 +90,7 @@ jobs:
77
90
  - asset-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ .Environment.CIRCLE_SHA1 }}
78
91
  - asset-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-
79
92
  - asset-cache-v1-{{ arch }}-{{ .Branch }}-
80
- - asset-cache-v1-
93
+ - asset-cache-v1-{{ arch }}-master-
81
94
 
82
95
  - run:
83
96
  name: Precompile Assets
@@ -143,9 +156,9 @@ jobs:
143
156
 
144
157
  - run:
145
158
  name: Install cmake for building pronto dependencies
146
- command: sudo apt-get update -qq &&
147
- sudo apt-get install -yq --no-install-recommends
148
- cmake yamllint python3-setuptools python3-pkg-resources pkg-config
159
+ command: sudo apt-get update -qq
160
+ && sudo apt-get install -yq --no-install-recommends
161
+ cmake yamllint python3-setuptools python3-pkg-resources pkg-config
149
162
 
150
163
  - run:
151
164
  name: Install Bundle Dependencies
@@ -182,9 +195,11 @@ jobs:
182
195
  source $BASH_ENV
183
196
  gem install bundler:$BUNDLER_VERSION
184
197
 
185
- - run: sudo apt-get update && sudo apt-get install cmake yamllint python3-setuptools python3-pkg-resources
198
+ - run:
199
+ name: Install System Dependencies
200
+ command: sudo apt-get update
201
+ && sudo apt-get install cmake yamllint python3-setuptools python3-pkg-resources pkg-config
186
202
 
187
203
  - run:
188
204
  name: Run Gemfile tools update in separate branch
189
- command: |
190
- ./bin/circleci-auto_upgrade_tools
205
+ command: ./bin/circleci-auto_upgrade_tools
@@ -0,0 +1,2 @@
1
+ speedups:
2
+ fetch_with_argument_vs_block: false
@@ -0,0 +1,21 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: bundler
5
+ directory: "/"
6
+ schedule:
7
+ interval: weekly
8
+ time: "10:00"
9
+ open-pull-requests-limit: 3
10
+ versioning-strategy: lockfile-only
11
+ allow:
12
+ - dependency-type: all
13
+ - package-ecosystem: npm
14
+ directory: "/"
15
+ schedule:
16
+ interval: weekly
17
+ time: "10:00"
18
+ open-pull-requests-limit: 3
19
+ versioning-strategy: lockfile-only
20
+ allow:
21
+ - dependency-type: all
@@ -1,63 +1,39 @@
1
1
  ---
2
2
  require:
3
- - rubocop-performance
3
+ - standard
4
4
  - rubocop-rails
5
5
 
6
+ inherit_gem:
7
+ standard: config/base.yml
8
+
6
9
  AllCops:
7
10
  TargetRubyVersion: 2.7
11
+
8
12
  Exclude:
9
13
  - 'db/migrate/**/*'
10
14
  - 'db/schema.rb'
15
+ - 'vendor/**/*'
11
16
 
12
- Layout/DotPosition:
17
+ Bundler/InsecureProtocolSource:
13
18
  Enabled: true
14
- EnforcedStyle: leading
19
+ Include:
20
+ - '**/*.gemfile'
21
+ - '**/Gemfile'
22
+ - '**/Gemfile.tools'
23
+ - '**/gems.rb'
15
24
 
16
25
  Layout/EmptyLinesAroundAttributeAccessor:
17
26
  Enabled: true
18
27
 
19
- Layout/EmptyLinesAroundBlockBody:
20
- Exclude:
21
- - 'db/schema.rb'
22
-
23
- Layout/FirstHashElementIndentation:
24
- EnforcedStyle: consistent
25
-
26
- Layout/HashAlignment:
27
- EnforcedHashRocketStyle: table
28
- EnforcedColonStyle: table
29
- EnforcedLastArgumentHashStyle: always_inspect
30
-
31
28
  Layout/LineLength:
32
29
  Max: 113
33
30
 
34
31
  Layout/MultilineMethodArgumentLineBreaks:
35
32
  Enabled: true
36
33
 
37
- Layout/MultilineMethodCallBraceLayout:
38
- EnforcedStyle: symmetrical
39
-
40
- Layout/MultilineMethodCallIndentation:
41
- EnforcedStyle: indented
42
-
43
- Layout/MultilineOperationIndentation:
44
- EnforcedStyle: indented
45
-
46
- Layout/ParameterAlignment:
47
- EnforcedStyle: with_fixed_indentation
48
-
49
- Layout/SpaceAroundMethodCallOperator:
50
- Enabled: true
51
-
52
34
  Layout/SpaceInLambdaLiteral:
53
35
  EnforcedStyle: require_space
54
36
 
55
- Lint/DeprecatedOpenSSLConstant:
56
- Enabled: true
57
-
58
- Lint/RaiseException:
59
- Enabled: true
60
-
61
37
  Lint/StructNewOverride:
62
38
  Enabled: true
63
39
 
@@ -109,24 +85,9 @@ Style/HashTransformKeys:
109
85
  Style/HashTransformValues:
110
86
  Enabled: true
111
87
 
112
- Style/SafeNavigation:
113
- Enabled: false
114
-
115
88
  Style/SlicingWithRange:
116
89
  Enabled: true
117
90
 
118
- Style/StabbyLambdaParentheses:
119
- EnforcedStyle: require_no_parentheses
120
-
121
- Style/StringLiterals:
122
- Enabled: true
123
- EnforcedStyle: double_quotes
124
- Exclude:
125
- - 'db/schema.rb'
126
-
127
- Style/TrailingCommaInHashLiteral:
128
- EnforcedStyleForMultiline: consistent_comma
129
-
130
91
  # Rails
131
92
 
132
93
  Rails:
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- tap "caskroom/cask"
4
- cask_args appdir: "/Applications"
5
-
6
3
  tap "heroku/brew"
7
4
 
8
5
  brew "circleci"
@@ -18,10 +18,11 @@ group :tools do
18
18
  gem 'pronto-rails_best_practices', require: false
19
19
  gem 'pronto-reek', require: false
20
20
  gem 'pronto-rubocop', require: false
21
+ # gem 'pronto-standardrb', require: false
21
22
  gem 'pronto-yamllint', require: false
22
23
 
23
24
  # gem 'rubocop-minitest', require: false
24
- gem 'rubocop-performance', require: false
25
25
  gem 'rubocop-rails', require: false
26
26
  # gem 'rubocop-rspec', require: false
27
+ gem 'standard', '>= 0.4.7', require: false
27
28
  end
@@ -1,5 +1,4 @@
1
1
  {
2
- "name": "APP NAME",
3
2
  "scripts": {
4
3
  "postdeploy": "bin/heroku-postdeploy"
5
4
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  set -eo pipefail
4
4
 
5
- bin/lint-pr
5
+ bin/lint-pr --no-staged
6
6
 
7
7
  # bin/rspec --tag critical
8
8
  # bin/rails test
@@ -4,7 +4,7 @@ set -eo pipefail
4
4
 
5
5
  reporters_opt=""
6
6
 
7
- if [[ "$CIRCLECI" == "true" ]]
7
+ if [[ -n "$PRONTO_GITHUB_ACCESS_TOKEN" && "$CIRCLECI" == "true" ]]
8
8
  then
9
9
  git fetch origin master
10
10
  reporters_opt="-f github_status github_pr_review"
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- set -e
3
+ set -eo pipefail
4
+
5
+ ([[ (-x "$(command -v brew)") ]] && brew bundle check || brew bundle --no-lock) \
6
+ || (echo "*** Please install manually system dependencies: ***" && cat Brewfile)
4
7
 
5
8
  export BUNDLE_GEMFILE=Gemfile.tools
6
9
 
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- set -e
3
+ set -eo pipefail
4
+
5
+ ([[ (-x "$(command -v brew)") ]] && brew bundle check || brew bundle --no-lock) \
6
+ || (echo "*** Please upgrade manually system dependencies: ***" && cat Brewfile)
4
7
 
5
8
  export BUNDLE_GEMFILE=Gemfile.tools
6
9
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JtTools
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.12"
5
5
  end
@@ -0,0 +1 @@
1
+ # use defaults
@@ -102,7 +102,7 @@ else
102
102
  "parallelize(workers: :number_of_processors) unless ENV['COVERAGE']"
103
103
  end
104
104
 
105
- directory "lib/install/.dependabot", ".dependabot"
105
+ directory "lib/install/.github", ".github"
106
106
 
107
107
  say "=> Copying heroku configuration"
108
108
  copy_file "lib/install/app.json", "app.json"
@@ -122,6 +122,7 @@ Bundler.with_original_env do
122
122
  say "=> Generate binstubs for linters"
123
123
  run "BUNDLE_GEMFILE=Gemfile.tools bundle binstub --force pronto"
124
124
  run "BUNDLE_GEMFILE=Gemfile.tools bundle binstub --force rubocop"
125
+ run "BUNDLE_GEMFILE=Gemfile.tools bundle binstub --force standard"
125
126
  end
126
127
 
127
128
  say "=> Set git hooks"
@@ -130,7 +131,7 @@ say "=> Install all new dependencies"
130
131
 
131
132
  run <<~BREW_INSTALL
132
133
  hash brew 2> /dev/null \
133
- && (brew bundle check || brew bundle install) \
134
+ && (brew bundle check || brew bundle install --no-lock) \
134
135
  || echo "Please install Homebrew: https://brew.sh/"
135
136
  BREW_INSTALL
136
137
 
@@ -181,6 +182,14 @@ Bundler.with_original_env do
181
182
  run "bundle"
182
183
  end
183
184
 
185
+ uncomment_lines "bin/setup", /system\(.*?\\byarn\b/
186
+
187
+ insert_into_file(
188
+ "bin/setup",
189
+ "system!('bin/tools-setup')\n",
190
+ after: "system('bundle check') || system!('bundle install')\n"
191
+ )
192
+
184
193
  say "**************************************************************************"
185
194
  say "**************************************************************************"
186
195
  say ""
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Keen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-26 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -44,14 +44,16 @@ files:
44
44
  - README.md
45
45
  - Rakefile
46
46
  - _config.yml
47
+ - bin/standardrb
47
48
  - bin/test
48
49
  - jt_tools.gemspec
49
50
  - lib/install/.better-html.yml
50
51
  - lib/install/.circleci/config.yml
51
- - lib/install/.dependabot/config.yml
52
52
  - lib/install/.editorconfig
53
53
  - lib/install/.erb-lint.yml
54
54
  - lib/install/.eslintrc.js
55
+ - lib/install/.fasterer.yml
56
+ - lib/install/.github/config.yml
55
57
  - lib/install/.pronto.yml
56
58
  - lib/install/.pronto_eslint_npm.yml
57
59
  - lib/install/.reek.yml
@@ -77,6 +79,7 @@ files:
77
79
  - lib/jt_tools/version.rb
78
80
  - lib/tasks/install.rake
79
81
  - rejuvenation.rb
82
+ - shipit.rubygems.yml
80
83
  - template.rb
81
84
  homepage: https://jtway.co
82
85
  licenses:
@@ -85,7 +88,7 @@ metadata:
85
88
  homepage_uri: https://jtway.co
86
89
  source_code_uri: https://github.com/jetthoughts/jt-tools/
87
90
  changelog_uri: https://github.com/jetthoughts/jt-tools/
88
- post_install_message:
91
+ post_install_message:
89
92
  rdoc_options: []
90
93
  require_paths:
91
94
  - lib
@@ -100,8 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
103
  - !ruby/object:Gem::Version
101
104
  version: '0'
102
105
  requirements: []
103
- rubygems_version: 3.1.3
104
- signing_key:
106
+ rubygems_version: 3.1.4
107
+ signing_key:
105
108
  specification_version: 4
106
109
  summary: Setup development scripts to manage code base effectively
107
110
  test_files: []
@@ -1,32 +0,0 @@
1
- ---
2
- version: 1
3
- update_configs:
4
- # Keep package.json (& lockfiles) up to date as soon as
5
- # new versions are published to the npm registry
6
- - package_manager: javascript
7
- directory: /
8
- update_schedule: weekly
9
- allowed_updates:
10
- - match:
11
- dependency_type: development
12
- update_type: all
13
- - match:
14
- dependency_type: production
15
- update_type: security
16
- version_requirement_updates: 'off'
17
- - package_manager: ruby:bundler
18
- directory: /
19
- update_schedule: weekly
20
- allowed_updates:
21
- - match:
22
- dependency_type: all
23
- update_type: all
24
- automerged_updates:
25
- - match:
26
- dependency_name: puma
27
- update_type: semver:minor
28
- - match:
29
- dependency_name: rspec*
30
- - match:
31
- dependency_name: capybara*
32
- version_requirement_updates: 'off'