imapcli 1.0.7 → 2.0.0

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: 751085164222eaf57bb834881ed2750aef4e1bdb78b0f80721f813e88c3dcd2d
4
- data.tar.gz: eb278a49bad1c247dfab3d17346361a681f9fde8c74f87aea288615d2cc52fd2
3
+ metadata.gz: 251ac4bd70a607d8891eb4035bf69ba10017995436d2af15138e8647ac042530
4
+ data.tar.gz: 57072fa35d2eb0e53a85e27464638844fedb83807c8e4f98ad59c502cbd07be3
5
5
  SHA512:
6
- metadata.gz: 015155ed2a70636f3d072d889408fb26d9bc6267125e432337e4050170a4839a509ab6d822c1abdce011a02c6486541e48137f3435cd70079a715ac18356ffe7
7
- data.tar.gz: d99cfb0b39d772ab64bd3826fa72f89ff1c5230e4481b9a47a341cfa84db2039b1f6b7977261dcadab77c9589efe5fd65389ae52361a5a0685a5ff5d6d4f209f
6
+ metadata.gz: 5cfc0a536bb6ae0b71e4262cf9ae03d7213c093c10b6c47597a02ee2bac101357423ec0df5a66038d2e6673fcf03973cef1d564015dc56dd3c665bcb31521da4
7
+ data.tar.gz: b2f986bd44dfe6e3374b272bf50fd238ebff681665a32ddad07c2930e8842f5132c27df861dd31f13486b167179649b94ea2e788679721f952662a6620170102
@@ -0,0 +1,22 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bullseye"
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+
14
+ // Use 'postCreateCommand' to run commands after the container is created.
15
+ // "postCreateCommand": "ruby --version",
16
+
17
+ // Configure tool-specific properties.
18
+ // "customizations": {},
19
+
20
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21
+ // "remoteUser": "root"
22
+ }
@@ -0,0 +1,12 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for more information:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+ # https://containers.dev/guide/dependabot
6
+
7
+ version: 2
8
+ updates:
9
+ - package-ecosystem: "devcontainers"
10
+ directory: "/"
11
+ schedule:
12
+ interval: weekly
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ push:
6
+ branches:
7
+ - '**'
8
+ pull_request:
9
+ branches:
10
+ - '**'
11
+ schedule:
12
+ - cron: '0 4 1 * *'
13
+
14
+ jobs:
15
+ rubocop:
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: '3.3'
26
+
27
+ - name: Bundler
28
+ run: bundle install
29
+
30
+ - name: Rubocop
31
+ run: bin/rubocop
32
+
33
+ rspec:
34
+ runs-on: ubuntu-latest
35
+
36
+ strategy:
37
+ fail-fast: false
38
+ matrix:
39
+ ruby:
40
+ - '3.3'
41
+ - '3.2'
42
+ - '3.1'
43
+ # - 'head'
44
+ - 'truffleruby'
45
+
46
+ steps:
47
+ - name: Checkout
48
+ uses: actions/checkout@v4
49
+
50
+ - name: Setup Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: ${{ matrix.ruby }}
54
+ bundler-cache: true
55
+
56
+ - name: RSpec
57
+ run: bin/rspec
data/.gitignore CHANGED
@@ -5,3 +5,6 @@ html/
5
5
  .yardoc/
6
6
  vendor/bundle/
7
7
  .bundle/
8
+ imapcli-*.gem
9
+ .DS_Store
10
+ coverage/
data/.rubocop.yml ADDED
@@ -0,0 +1,53 @@
1
+ ---
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-rake
5
+ - rubocop-rspec
6
+
7
+ AllCops:
8
+ NewCops: enable
9
+ TargetRubyVersion: 3.1
10
+ Exclude:
11
+ - bin/*
12
+
13
+ Gemspec/RequireMFA:
14
+ Enabled: false
15
+
16
+ #########
17
+ # STYLE #
18
+ #########
19
+
20
+ Style/TrailingCommaInArrayLiteral:
21
+ EnforcedStyleForMultiline: consistent_comma
22
+
23
+ Style/TrailingCommaInHashLiteral:
24
+ EnforcedStyleForMultiline: consistent_comma
25
+
26
+ ##########
27
+ # LAYOUT #
28
+ ##########
29
+
30
+ Layout/EmptyLines:
31
+ Enabled: false
32
+
33
+ Layout/EmptyLineBetweenDefs:
34
+ Enabled: false
35
+
36
+ Layout/EmptyLinesAroundClassBody:
37
+ Enabled: false
38
+
39
+ Layout/EmptyLinesAroundBlockBody:
40
+ Enabled: false
41
+
42
+ Layout/EmptyLinesAroundModuleBody:
43
+ Enabled: false
44
+
45
+ #########
46
+ # RSPEC #
47
+ #########
48
+
49
+ RSpec/NotToNot:
50
+ EnforcedStyle: to_not
51
+
52
+ RSpec/MultipleExpectations:
53
+ Max: 4
@@ -0,0 +1,59 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "ruby_lsp",
9
+ "request": "launch",
10
+ "name": "Run imapcli with arguments",
11
+ "program": "ruby ${workspaceFolder}/exe/imapcli -s ${input:server} -u ${input:user} -p ${input:pass} ${input:command}"
12
+ },
13
+ {
14
+ "type": "ruby_lsp",
15
+ "request": "launch",
16
+ "name": "Run rspec",
17
+ "program": "rspec"
18
+ },
19
+ {
20
+ "type": "ruby_lsp",
21
+ "name": "Debug script",
22
+ "request": "launch",
23
+ "program": "ruby ${file}"
24
+ },
25
+ {
26
+ "type": "ruby_lsp",
27
+ "name": "Debug test",
28
+ "request": "launch",
29
+ "program": "ruby -Itest ${relativeFile}"
30
+ },
31
+ {
32
+ "type": "ruby_lsp",
33
+ "name": "Attach debugger",
34
+ "request": "attach"
35
+ }
36
+ ],
37
+ "inputs": [
38
+ {
39
+ "id": "server",
40
+ "type": "promptString",
41
+ "description": "FQDN of the mail server to connect to"
42
+ },
43
+ {
44
+ "id": "user",
45
+ "type": "promptString",
46
+ "description": "IMAP user"
47
+ },
48
+ {
49
+ "id": "pass",
50
+ "type": "promptString",
51
+ "description": "Password of the IMAP user (BE AWARE THAT THIS IS NOT ENCRYPTED IN THE DEBUG ENVIRONMENT)"
52
+ },
53
+ {
54
+ "id": "command",
55
+ "type": "promptString",
56
+ "description": "Command with optional arguments"
57
+ },
58
+ ]
59
+ }
data/CHANGELOG.md CHANGED
@@ -1,22 +1,71 @@
1
1
  # Changelog
2
2
 
3
- ## v1.0.7 (2022-03-02)
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Version 2.0.0 (2025-03-10)][v2.0.0]
9
+
10
+ ### Added
11
+
12
+ - `stats` command: Added new option switch `-H`/`--human`.
13
+ - `stats` command: Added new option switch `--reverse` to reverse the sort
14
+ order.
15
+
16
+ ### Changed
17
+
18
+ - **BREAKING:** Message sizes are now output in bytes by default. This also
19
+ applies to CSV output. Use the new `-H`/`--human` switch to convert byte
20
+ counts to SI-prefixed numbers.
21
+ - **BREAKING:** The sort properties `q1` and `q3` have been renamed to `q1_size`
22
+ and `q3_size`.
23
+ - Output: Draw table borders in blue for better visual separation.
24
+ - Output: Draw a separator line above the 'total' row.
25
+ - Updated dependencies.
26
+
27
+ ### Fixed
28
+
29
+ - `stats` command: Sort did not work at all.
30
+ - Do not crash when collecting stats for mailboxes with a very large number of
31
+ messages. Closes Github issue #8.
32
+
33
+ ### Removed
34
+
35
+ - **BREAKING:** Removed the `-O` switch to reverse the sort order as it did not
36
+ work as intended
37
+
38
+ ## [Version 1.0.7 (2022-03-02)][v1.0.7]
39
+
40
+ ### Changed
4
41
 
5
42
  - Update dependencies.
6
43
 
7
- ## v1.0.6
44
+ ## Version 1.0.6
45
+
46
+ ### Fixed
8
47
 
9
48
  - Fix Docker build.
10
49
 
11
- ## v1.0.5
50
+ ## [Version 1.0.5][v1.0.5]
51
+
52
+ ### Fixed
12
53
 
13
54
  - Update bundle to address CVE-2018-1000201.
14
55
 
15
- ## v1.0.4
56
+ ## Version 1.0.4
57
+
58
+ ### Fixed
16
59
 
17
60
  - Update rake to address CVE-2020-8130.
18
61
 
19
- ## Previous changes
62
+ ## Previous versions
63
+
64
+ ### Fixed
20
65
 
21
66
  - Fix: Docker image.
22
67
  - Fix: Options error message.
68
+
69
+ [v2.0.0]: https://github.com/bovender/imapcli/releases/tag/v2.0.0
70
+ [v1.0.7]: https://github.com/bovender/imapcli/releases/tag/v1.0.7
71
+ [v1.0.5]: https://github.com/bovender/imapcli/releases/tag/v1.0.5
data/Dockerfile CHANGED
@@ -1,15 +1,17 @@
1
1
  FROM ruby:alpine
2
- LABEL maintainer=bovender@bovender.de
3
- LABEL description="Command-line tool to query IMAP servers."
2
+ LABEL maintainer="bovender@bovender.de"
3
+ LABEL description="Command-line tool to query IMAP servers, collect stats etc."
4
4
 
5
5
  WORKDIR /
6
+ ADD . /imapcli
6
7
  RUN apk add --no-cache git build-base && \
7
- git clone --depth 1 https://github.com/bovender/imapcli && \
8
+ gem update --system && \
8
9
  cd imapcli && \
9
- bundle update --bundler && \
10
- bundle && \
10
+ # bundle config set --local without development test && \
11
+ bundle install && \
11
12
  apk del build-base && \
12
13
  rm -rf /var/cache/apk/*
13
14
 
14
15
  WORKDIR /imapcli
15
- ENTRYPOINT ["bundle", "exec", "imapcli"]
16
+ ENTRYPOINT ["exe/imapcli"]
17
+
data/Gemfile CHANGED
@@ -1,10 +1,19 @@
1
1
  # frozen_string_literal: true
2
- source "https://rubygems.org"
2
+
3
+ source 'https://rubygems.org'
3
4
 
4
5
  gemspec
5
6
 
6
- group :test do
7
- gem 'rspec'
8
- gem 'pry'
7
+ group :development, :test do
8
+ gem 'debug'
9
9
  gem 'guard-rspec'
10
+ gem 'pry'
11
+ gem 'rake'
12
+ gem 'rdoc'
13
+ gem 'rspec'
14
+ gem 'rubocop'
15
+ gem 'rubocop-performance'
16
+ gem 'rubocop-rake'
17
+ gem 'rubocop-rspec'
18
+ gem 'simplecov'
10
19
  end
data/Gemfile.lock CHANGED
@@ -1,32 +1,73 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imapcli (1.0.6)
4
+ imapcli (1.0.7)
5
+ activesupport (~> 8.0)
6
+ csv
5
7
  descriptive_statistics (~> 2.5)
6
- dotenv (~> 2.2)
7
- filesize (~> 0.1)
8
- gli (~> 2.17)
9
- tty-progressbar (~> 0.13)
10
- tty-prompt (~> 0.13)
11
- tty-table (~> 0.9)
8
+ dotenv (~> 3.1)
9
+ gli (~> 2.22)
10
+ net-imap
11
+ tty-progressbar (~> 0.18)
12
+ tty-prompt (~> 0.23)
13
+ tty-table (~> 0.12)
14
+ zeitwerk (~> 2.7.0)
12
15
 
13
16
  GEM
14
17
  remote: https://rubygems.org/
15
18
  specs:
19
+ activesupport (8.0.1)
20
+ base64
21
+ benchmark (>= 0.3)
22
+ bigdecimal
23
+ concurrent-ruby (~> 1.0, >= 1.3.1)
24
+ connection_pool (>= 2.2.5)
25
+ drb
26
+ i18n (>= 1.6, < 2)
27
+ logger (>= 1.4.2)
28
+ minitest (>= 5.1)
29
+ securerandom (>= 0.3)
30
+ tzinfo (~> 2.0, >= 2.0.5)
31
+ uri (>= 0.13.1)
32
+ ast (2.4.2)
33
+ base64 (0.2.0)
34
+ benchmark (0.4.0)
35
+ bigdecimal (3.1.9)
16
36
  coderay (1.1.3)
37
+ concurrent-ruby (1.3.5)
38
+ connection_pool (2.5.0)
39
+ csv (3.3.2)
40
+ date (3.4.1)
41
+ debug (1.10.0)
42
+ irb (~> 1.10)
43
+ reline (>= 0.3.8)
17
44
  descriptive_statistics (2.5.1)
18
- diff-lcs (1.5.0)
19
- dotenv (2.7.6)
20
- ffi (1.15.5)
21
- filesize (0.2.0)
45
+ diff-lcs (1.6.0)
46
+ docile (1.4.1)
47
+ dotenv (3.1.7)
48
+ drb (2.2.1)
49
+ ffi (1.17.1)
50
+ ffi (1.17.1-aarch64-linux-gnu)
51
+ ffi (1.17.1-aarch64-linux-musl)
52
+ ffi (1.17.1-arm-linux-gnu)
53
+ ffi (1.17.1-arm-linux-musl)
54
+ ffi (1.17.1-arm64-darwin)
55
+ ffi (1.17.1-x86-linux-gnu)
56
+ ffi (1.17.1-x86-linux-musl)
57
+ ffi (1.17.1-x86_64-darwin)
58
+ ffi (1.17.1-x86_64-linux-gnu)
59
+ ffi (1.17.1-x86_64-linux-musl)
22
60
  formatador (1.1.0)
23
- gli (2.21.0)
24
- guard (2.18.0)
61
+ gli (2.22.2)
62
+ ostruct
63
+ guard (2.19.1)
25
64
  formatador (>= 0.2.4)
26
65
  listen (>= 2.7, < 4.0)
66
+ logger (~> 1.6)
27
67
  lumberjack (>= 1.0.12, < 2.0)
28
68
  nenv (~> 0.1)
29
69
  notiffany (~> 0.0)
70
+ ostruct (~> 0.6)
30
71
  pry (>= 0.13.0)
31
72
  shellany (~> 0.0)
32
73
  thor (>= 0.18.1)
@@ -35,52 +76,115 @@ GEM
35
76
  guard (~> 2.1)
36
77
  guard-compat (~> 1.1)
37
78
  rspec (>= 2.99.0, < 4.0)
38
- listen (3.7.1)
79
+ i18n (1.14.7)
80
+ concurrent-ruby (~> 1.0)
81
+ io-console (0.8.0)
82
+ irb (1.15.1)
83
+ pp (>= 0.6.0)
84
+ rdoc (>= 4.0.0)
85
+ reline (>= 0.4.2)
86
+ json (2.10.1)
87
+ language_server-protocol (3.17.0.4)
88
+ lint_roller (1.1.0)
89
+ listen (3.9.0)
39
90
  rb-fsevent (~> 0.10, >= 0.10.3)
40
91
  rb-inotify (~> 0.9, >= 0.9.10)
41
- lumberjack (1.2.8)
42
- method_source (1.0.0)
92
+ logger (1.6.6)
93
+ lumberjack (1.2.10)
94
+ method_source (1.1.0)
95
+ minitest (5.25.4)
43
96
  nenv (0.3.0)
97
+ net-imap (0.5.6)
98
+ date
99
+ net-protocol
100
+ net-protocol (0.2.2)
101
+ timeout
44
102
  notiffany (0.1.3)
45
103
  nenv (~> 0.1)
46
104
  shellany (~> 0.0)
105
+ ostruct (0.6.1)
106
+ parallel (1.26.3)
107
+ parser (3.3.7.1)
108
+ ast (~> 2.4.1)
109
+ racc
47
110
  pastel (0.8.0)
48
111
  tty-color (~> 0.5)
49
- pry (0.14.1)
112
+ pp (0.6.2)
113
+ prettyprint
114
+ prettyprint (0.2.0)
115
+ pry (0.15.2)
50
116
  coderay (~> 1.1)
51
117
  method_source (~> 1.0)
52
- psych (4.0.3)
118
+ psych (5.2.3)
119
+ date
53
120
  stringio
54
- rake (12.3.3)
55
- rb-fsevent (0.11.1)
56
- rb-inotify (0.10.1)
121
+ racc (1.8.1)
122
+ rainbow (3.1.1)
123
+ rake (13.2.1)
124
+ rb-fsevent (0.11.2)
125
+ rb-inotify (0.11.1)
57
126
  ffi (~> 1.0)
58
- rdoc (6.4.0)
127
+ rdoc (6.12.0)
59
128
  psych (>= 4.0.0)
60
- rspec (3.11.0)
61
- rspec-core (~> 3.11.0)
62
- rspec-expectations (~> 3.11.0)
63
- rspec-mocks (~> 3.11.0)
64
- rspec-core (3.11.0)
65
- rspec-support (~> 3.11.0)
66
- rspec-expectations (3.11.0)
129
+ regexp_parser (2.10.0)
130
+ reline (0.6.0)
131
+ io-console (~> 0.5)
132
+ rspec (3.13.0)
133
+ rspec-core (~> 3.13.0)
134
+ rspec-expectations (~> 3.13.0)
135
+ rspec-mocks (~> 3.13.0)
136
+ rspec-core (3.13.3)
137
+ rspec-support (~> 3.13.0)
138
+ rspec-expectations (3.13.3)
67
139
  diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.11.0)
69
- rspec-mocks (3.11.0)
140
+ rspec-support (~> 3.13.0)
141
+ rspec-mocks (3.13.2)
70
142
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.11.0)
72
- rspec-support (3.11.0)
143
+ rspec-support (~> 3.13.0)
144
+ rspec-support (3.13.2)
145
+ rubocop (1.73.2)
146
+ json (~> 2.3)
147
+ language_server-protocol (~> 3.17.0.2)
148
+ lint_roller (~> 1.1.0)
149
+ parallel (~> 1.10)
150
+ parser (>= 3.3.0.2)
151
+ rainbow (>= 2.2.2, < 4.0)
152
+ regexp_parser (>= 2.9.3, < 3.0)
153
+ rubocop-ast (>= 1.38.0, < 2.0)
154
+ ruby-progressbar (~> 1.7)
155
+ unicode-display_width (>= 2.4.0, < 4.0)
156
+ rubocop-ast (1.38.1)
157
+ parser (>= 3.3.1.0)
158
+ rubocop-performance (1.24.0)
159
+ lint_roller (~> 1.1)
160
+ rubocop (>= 1.72.1, < 2.0)
161
+ rubocop-ast (>= 1.38.0, < 2.0)
162
+ rubocop-rake (0.7.1)
163
+ lint_roller (~> 1.1)
164
+ rubocop (>= 1.72.1)
165
+ rubocop-rspec (3.5.0)
166
+ lint_roller (~> 1.1)
167
+ rubocop (~> 1.72, >= 1.72.1)
168
+ ruby-progressbar (1.13.0)
169
+ securerandom (0.4.1)
73
170
  shellany (0.0.1)
74
- stringio (3.0.1)
171
+ simplecov (0.22.0)
172
+ docile (~> 1.1)
173
+ simplecov-html (~> 0.11)
174
+ simplecov_json_formatter (~> 0.1)
175
+ simplecov-html (0.13.1)
176
+ simplecov_json_formatter (0.1.4)
177
+ stringio (3.1.5)
75
178
  strings (0.2.1)
76
179
  strings-ansi (~> 0.2)
77
180
  unicode-display_width (>= 1.5, < 3.0)
78
181
  unicode_utils (~> 1.4)
79
182
  strings-ansi (0.2.0)
80
- thor (1.2.1)
183
+ thor (1.3.2)
184
+ timeout (0.4.3)
81
185
  tty-color (0.6.0)
82
186
  tty-cursor (0.7.1)
83
- tty-progressbar (0.18.2)
187
+ tty-progressbar (0.18.3)
84
188
  strings-ansi (~> 0.2)
85
189
  tty-cursor (~> 0.7)
86
190
  tty-screen (~> 0.8)
@@ -92,25 +196,45 @@ GEM
92
196
  tty-cursor (~> 0.7)
93
197
  tty-screen (~> 0.8)
94
198
  wisper (~> 2.0)
95
- tty-screen (0.8.1)
199
+ tty-screen (0.8.2)
96
200
  tty-table (0.12.0)
97
201
  pastel (~> 0.8)
98
202
  strings (~> 0.2.0)
99
203
  tty-screen (~> 0.8)
100
- unicode-display_width (2.1.0)
204
+ tzinfo (2.0.6)
205
+ concurrent-ruby (~> 1.0)
206
+ unicode-display_width (2.6.0)
101
207
  unicode_utils (1.4.0)
208
+ uri (1.0.3)
102
209
  wisper (2.0.1)
210
+ zeitwerk (2.7.2)
103
211
 
104
212
  PLATFORMS
213
+ aarch64-linux-gnu
214
+ aarch64-linux-musl
215
+ arm-linux-gnu
216
+ arm-linux-musl
217
+ arm64-darwin
105
218
  ruby
219
+ x86-linux-gnu
220
+ x86-linux-musl
221
+ x86_64-darwin
222
+ x86_64-linux-gnu
223
+ x86_64-linux-musl
106
224
 
107
225
  DEPENDENCIES
226
+ debug
108
227
  guard-rspec
109
228
  imapcli!
110
229
  pry
111
- rake (~> 12.3.3)
112
- rdoc (~> 6.3)
230
+ rake
231
+ rdoc
113
232
  rspec
233
+ rubocop
234
+ rubocop-performance
235
+ rubocop-rake
236
+ rubocop-rspec
237
+ simplecov
114
238
 
115
239
  BUNDLED WITH
116
- 2.2.17
240
+ 2.5.22
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
@@ -15,7 +17,7 @@
15
17
  #
16
18
  # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
19
 
18
- # Note: The cmd option is now required due to the increasing number of ways
20
+ # NOTE: The cmd option is now required due to the increasing number of ways
19
21
  # rspec may be run, below are examples of the most common uses.
20
22
  # * bundler: 'bundle exec rspec'
21
23
  # * bundler binstubs: 'bin/rspec'
@@ -24,8 +26,8 @@
24
26
  # * zeus: 'zeus rspec' (requires the server to be started separately)
25
27
  # * 'just' rspec: 'rspec'
26
28
 
27
- guard :rspec, cmd: "bundle exec rspec" do
28
- require "guard/rspec/dsl"
29
+ guard :rspec, cmd: 'bundle exec rspec' do
30
+ require 'guard/rspec/dsl'
29
31
  dsl = Guard::RSpec::Dsl.new(self)
30
32
 
31
33
  # Feel free to open issues for suggestions and improvements
@@ -41,7 +43,7 @@ guard :rspec, cmd: "bundle exec rspec" do
41
43
  dsl.watch_spec_files_for(ruby.lib_files)
42
44
 
43
45
  # Rails files
44
- rails = dsl.rails(view_extensions: %w(erb haml slim))
46
+ rails = dsl.rails(view_extensions: %w[erb haml slim])
45
47
  dsl.watch_spec_files_for(rails.app_files)
46
48
  dsl.watch_spec_files_for(rails.views)
47
49
 
@@ -49,7 +51,7 @@ guard :rspec, cmd: "bundle exec rspec" do
49
51
  [
50
52
  rspec.spec.call("routing/#{m[1]}_routing"),
51
53
  rspec.spec.call("controllers/#{m[1]}_controller"),
52
- rspec.spec.call("acceptance/#{m[1]}")
54
+ rspec.spec.call("acceptance/#{m[1]}"),
53
55
  ]
54
56
  end
55
57
 
@@ -60,6 +62,6 @@ guard :rspec, cmd: "bundle exec rspec" do
60
62
  # Turnip features and steps
61
63
  watch(%r{^spec/acceptance/(.+)\.feature$})
62
64
  watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
63
- Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
65
+ Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance'
64
66
  end
65
67
  end