Skip to content

Commit 04ff2e2

Browse files
committed
Fix more rubocop offences.
1 parent 2599620 commit 04ff2e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+487
-196
lines changed

.rubocop.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
require:
2+
- rubocop-rake
3+
# - rubocop-rspec
4+
15
AllCops:
26
NewCops: enable
37

48
Layout/LineLength:
59
Max: 80
6-
Exclude:
7-
- spec/**/*.rb
8-
- ./*.gemspec
910

1011
Metrics/ModuleLength:
1112
Exclude:
@@ -16,6 +17,7 @@ Metrics/BlockLength:
1617
- describe
1718
- context
1819
- shared_examples
20+
- it
1921

2022
Naming/FileName:
2123
Exclude:
@@ -24,5 +26,5 @@ Naming/FileName:
2426
Style/Documentation:
2527
Enabled: false
2628

27-
Style/FrozenStringLiteralComment:
28-
Enabled: false
29+
#RSpec/ExampleLength:
30+
# Max: 40

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
# Specify your gem's dependencies in ruby_terraform.gemspec

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ GEM
126126
unicode-display_width (>= 1.4.0, < 3.0)
127127
rubocop-ast (1.4.1)
128128
parser (>= 2.7.1.5)
129+
rubocop-rake (0.5.1)
130+
rubocop
129131
rubocop-rspec (2.2.0)
130132
rubocop (~> 1.0)
131133
rubocop-ast (>= 1.1.0)
@@ -166,6 +168,7 @@ DEPENDENCIES
166168
rake_ssh (~> 0.4)
167169
rspec (~> 3.9)
168170
rubocop (~> 1.12)
171+
rubocop-rake (~> 0.5)
169172
rubocop-rspec (~> 2.2)
170173
ruby-terraform!
171174
simplecov (~> 0.21)

Guardfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
guard 'rspec', cmd: 'bundle exec rspec' do
24
watch('spec/spec_helper.rb') { 'spec' }
35
watch(%r{^spec/.+_spec\.rb$})

Rakefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'yaml'
24
require 'rake_circle_ci'
35
require 'rake_github'
@@ -7,13 +9,14 @@ require 'securerandom'
79
require 'rspec/core/rake_task'
810
require 'rubocop/rake_task'
911

10-
task default: [
11-
#:'library:fix',
12-
:'test:unit'
12+
task default: %i[
13+
library:fix
14+
test:unit
1315
]
1416

1517
namespace :encryption do
1618
namespace :passphrase do
19+
desc 'Generate encryption passphrase for CI GPG key'
1720
task :generate do
1821
File.open('config/secrets/ci/encryption.passphrase', 'w') do |f|
1922
f.write(SecureRandom.base64(36))
@@ -94,6 +97,7 @@ RakeGithub.define_repository_tasks(
9497
end
9598

9699
namespace :pipeline do
100+
desc 'Prepare CircleCI Pipeline'
97101
task prepare: %i[
98102
circle_ci:project:follow
99103
circle_ci:env_vars:ensure

bin/console

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

34
require 'bundler/setup'
45
require 'ruby_terraform'

lib/ruby-terraform.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Enable `require 'ruby-terraform'`, to match the gem name
24

35
require_relative 'ruby_terraform'

lib/ruby_terraform.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'ruby_terraform/version'
24
require 'ruby_terraform/errors'
35
require 'ruby_terraform/options'

lib/ruby_terraform/commands.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require_relative 'commands/clean'
24
require_relative 'commands/init'
35
require_relative 'commands/get'

lib/ruby_terraform/commands/apply.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require_relative 'base'
24

35
module RubyTerraform

0 commit comments

Comments
 (0)