bundler-audit 0.8.0.rc1 → 0.9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +3 -0
  3. data/.github/ISSUE_TEMPLATE/bug-report.md +44 -0
  4. data/.github/workflows/ruby.yml +16 -2
  5. data/.rubocop.yml +83 -0
  6. data/COPYING.txt +4 -4
  7. data/ChangeLog.md +45 -11
  8. data/Gemfile +7 -3
  9. data/README.md +20 -15
  10. data/Rakefile +7 -3
  11. data/bundler-audit.gemspec +3 -4
  12. data/gemspec.yml +2 -2
  13. data/lib/bundler/audit/advisory.rb +24 -3
  14. data/lib/bundler/audit/cli/formats/json.rb +17 -3
  15. data/lib/bundler/audit/cli/formats/junit.rb +127 -0
  16. data/lib/bundler/audit/cli/formats/text.rb +19 -13
  17. data/lib/bundler/audit/cli/formats.rb +8 -4
  18. data/lib/bundler/audit/cli/thor_ext/shell/basic/say_error.rb +33 -0
  19. data/lib/bundler/audit/cli.rb +41 -29
  20. data/lib/bundler/audit/configuration.rb +12 -5
  21. data/lib/bundler/audit/database.rb +21 -5
  22. data/lib/bundler/audit/results/insecure_source.rb +5 -2
  23. data/lib/bundler/audit/results/unpatched_gem.rb +7 -3
  24. data/lib/bundler/audit/results.rb +2 -2
  25. data/lib/bundler/audit/scanner.rb +9 -3
  26. data/lib/bundler/audit/task.rb +20 -5
  27. data/lib/bundler/audit/version.rb +3 -3
  28. data/lib/bundler/audit.rb +2 -2
  29. data/spec/advisory_spec.rb +9 -1
  30. data/spec/bundle/insecure_sources/Gemfile.lock +73 -71
  31. data/spec/bundle/secure/Gemfile.lock +55 -53
  32. data/spec/cli/formats/json_spec.rb +1 -0
  33. data/spec/cli/formats/junit_spec.rb +284 -0
  34. data/spec/cli/formats/text_spec.rb +113 -19
  35. data/spec/cli_spec.rb +61 -21
  36. data/spec/configuration_spec.rb +8 -0
  37. data/spec/database_spec.rb +25 -1
  38. data/spec/fixtures/advisory/CVE-2020-1234.yml +2 -0
  39. data/spec/fixtures/config/bad/empty.yml +0 -0
  40. data/spec/fixtures/lib/bundler/audit/cli/formats/bad.rb +0 -2
  41. data/spec/fixtures/lib/bundler/audit/cli/formats/good.rb +0 -2
  42. data/spec/integration_spec.rb +17 -103
  43. data/spec/results/unpatched_gem_spec.rb +2 -2
  44. data/spec/scanner_spec.rb +25 -1
  45. data/spec/spec_helper.rb +5 -1
  46. metadata +18 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94290135207c14256ac6d7251be3f0641619ec1273c562bb9c14a1b8ee8e28d5
4
- data.tar.gz: 83d1b6b88e88d5c850d7daadde5d3235389c9620ab35414d78f1be13cd54387d
3
+ metadata.gz: 83898613996d764bcb4e3ed517da59a95132049e29e7e8afa25698d4a03f6276
4
+ data.tar.gz: e931b427480a4bbdaeaa4bf381141780e04d26cbd2a98c60e60f3a0431c3b4d6
5
5
  SHA512:
6
- metadata.gz: 28a461def90014d7d1dea437c17637d342bb8a46a08d1874091effa135a9303b621428ecf57d497867db2a9bda4d76bea032197e447edf8730432558ee1208cd
7
- data.tar.gz: 400fb39383074b315b5d2d7e9339da907f24554c99a00358bd309ca7d6101443229997bb49cb54d8d473e4d6acf3793b294c795349dcc3d0615683e283fbd17a
6
+ metadata.gz: fcd29c11e7cee080390e9dc3b6356fc74817835a8b9f8621d230d27ea497b81ba63abcf880799f948de6eb4768747a01dc46a0aa29841c1bd76d92cd990c2659
7
+ data.tar.gz: f41ece9bf750bddcf632be46f240f079074ce26c7cb69e24184002929f041ed326e1b383a3649ec680bb3d42e03c25a167b65eb93219511065c05622bee1bef3
@@ -0,0 +1,3 @@
1
+ github:
2
+ - postmodern
3
+ - reedloden
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+ <!--
10
+ **Double Check**
11
+
12
+ - Did you update to the latest bundler-audit? (ex: `bundle update bundler-audit` or `gem update bundler-audit`)
13
+ - Did you update the ruby-advisory-db? (ex: `bundler-audit update`)
14
+ -->
15
+
16
+ ## Description
17
+
18
+ <!-- A clear and concise description of what the bug is. -->
19
+
20
+ ## Steps To Reproduce
21
+
22
+ Steps to reproduce the bug:
23
+ 1. `$ bundle-audit ...`
24
+ 2. ???
25
+
26
+ ## Expected Behavior
27
+
28
+ <!-- What should happen. -->
29
+
30
+ ## Actual Behavior
31
+
32
+ <!-- The error message or backtrace. -->
33
+ ```
34
+ ```
35
+
36
+ ## Environment
37
+
38
+ $ bundler-audit --version
39
+ ...
40
+ $ bundle --version
41
+ ...
42
+ $ ruby --version
43
+ ...
44
+
@@ -9,12 +9,12 @@ jobs:
9
9
  fail-fast: false
10
10
  matrix:
11
11
  ruby:
12
- - 2.4
13
12
  - 2.5
14
13
  - 2.6
15
14
  - 2.7
15
+ - 3.0
16
16
  - jruby
17
- - truffleruby
17
+ - truffleruby-head
18
18
  name: Ruby ${{ matrix.ruby }}
19
19
  steps:
20
20
  - uses: actions/checkout@v2
@@ -26,3 +26,17 @@ jobs:
26
26
  run: bundle install --jobs 4 --retry 3
27
27
  - name: Run tests
28
28
  run: bundle exec rake test
29
+
30
+ # rubocop linting
31
+ rubocop:
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v2
35
+ - name: Set up Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: 2.7
39
+ - name: Install dependencies
40
+ run: bundle install --jobs 4 --retry 3
41
+ - name: Run rubocop
42
+ run: bundle exec rubocop --parallel
data/.rubocop.yml ADDED
@@ -0,0 +1,83 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 2.7
5
+ Exclude:
6
+ - 'spec/bundle/**/*'
7
+ - 'spec/fixtures/database/**/*'
8
+ - 'vendor/**/*'
9
+
10
+ #
11
+ # Style
12
+ #
13
+ Layout/FirstArrayElementIndentation: { EnforcedStyle: consistent }
14
+ Layout/FirstHashElementIndentation: { EnforcedStyle: consistent }
15
+ Layout/SpaceAroundEqualsInParameterDefault: { EnforcedStyle: no_space }
16
+ Style/SymbolArray: { EnforcedStyle: brackets }
17
+ Style/PercentLiteralDelimiters:
18
+ Enabled: true
19
+ PreferredDelimiters:
20
+ default: '{}'
21
+ '%i': '[]'
22
+ '%I': '[]'
23
+ '%w': '[]'
24
+ '%W': '[]'
25
+
26
+ #
27
+ # Rules that conflict with my style.
28
+ #
29
+ Metrics: { Enabled: false }
30
+ Layout/BeginEndAlignment: { Enabled: false } # Offense count: 1
31
+ Layout/BlockAlignment: { Enabled: false } # Offense count: 1
32
+ Layout/EmptyLinesAroundClassBody: { Enabled: false } # Offense count: 15
33
+ Layout/ExtraSpacing: { Enabled: false } # Offense count: 9
34
+ Layout/HashAlignment: { Enabled: false } # Offense count: 3
35
+ Layout/SpaceAfterComma: { Enabled: false } # Offense count: 122
36
+ Layout/SpaceInsideHashLiteralBraces: { Enabled: false } # Offense count: 8
37
+ Lint/MissingSuper: { Enabled: false } # Offense count: 3
38
+ Lint/ShadowingOuterLocalVariable: { Enabled: false }
39
+ Lint/ConstantDefinitionInBlock: { Exclude: ['spec/cli/formats_spec.rb'] }
40
+ Lint/SuppressedException: { Exclude: ['spec/cli_spec.rb'] }
41
+ Lint/UnusedBlockArgument: { Enabled: false } # Offense count: 4
42
+ Lint/UnusedMethodArgument: { Enabled: false } # Offense count: 6
43
+ Naming/RescuedExceptionsVariableName: { Enabled: false } # Offense count: 2
44
+ Style/BlockDelimiters: { Enabled: false } # Offense count: 20
45
+ Style/CaseEquality: { Exclude: ['lib/bundler/audit/advisory.rb'] }
46
+ Style/ClassCheck: { Enabled: false } # Offense count: 4
47
+ Style/Documentation: { Enabled: false } # Offense count: 12
48
+ Style/GuardClause: { Enabled: false } # Offense count: 1
49
+ Style/HashSyntax:
50
+ Exclude:
51
+ - 'Rakefile'
52
+ - 'lib/bundler/audit/task.rb'
53
+ Style/IfUnlessModifier: { Enabled: false } # Offense count: 14
54
+ Style/MethodCallWithoutArgsParentheses: { Enabled: false } # Offense count: 1
55
+ Style/MultilineBlockChain: { Exclude: ['spec/**/*'] } # Offense count: 6
56
+ Style/MutableConstant: { Enabled: false } # Offense count: 4
57
+ Style/ParenthesesAroundCondition: { Enabled: false } # Offense count: 1
58
+ Style/RedundantBegin: { Exclude: ['spec/cli_spec.rb'] } # Offense count: 1
59
+ Style/RedundantReturn: { Enabled: false } # Offense count: 6
60
+ Style/SpecialGlobalVars: { Enabled: false } # Offense count: 5
61
+ Style/StringLiterals: { Enabled: false } # Offense count: 333
62
+ Style/StructInheritance: { Enabled: false } # Offense count: 1
63
+ Style/UnlessElse: { Enabled: false } # Offense count: 1
64
+ Style/WordArray: { Enabled: false } # Offense count: 1
65
+ Style/Lambda: { Enabled: false } # Offense count: 2
66
+ Style/SafeNavigation: { Enabled: false } # Offense count: 2
67
+ Lint/IneffectiveAccessModifier: { Enabled: false } # Offense count: 1
68
+
69
+ #
70
+ # Rules that may be disabled in the future.
71
+ #
72
+ # Layout/SpaceInsideParens: { Enabled: false }
73
+ # Layout/TrailingWhitespace: { Enabled: false }
74
+
75
+ #
76
+ # Rules that I want to fully enabled in the future.
77
+ #
78
+ Style/DoubleNegation: { Exclude: ['spec/spec_helper.rb'] } # Offense count: 1
79
+ Style/EmptyMethod: { Exclude: ['spec/cli/formats_spec.rb'] } # Offense count: 2
80
+ Style/ExpandPathArguments: { Enabled: false } # Offense count: 5
81
+ Style/FrozenStringLiteralComment: { Enabled: false } # Offense count: 42
82
+ Style/MixinUsage: { Exclude: ['spec/spec_helper.rb'] } # Offense count: 1
83
+ Layout/LineLength: { Enabled: false }
data/COPYING.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  GNU GENERAL PUBLIC LICENSE
2
2
  Version 3, 29 June 2007
3
3
 
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
5
  Everyone is permitted to copy and distribute verbatim copies
6
6
  of this license document, but changing it is not allowed.
7
7
 
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
645
645
  GNU General Public License for more details.
646
646
 
647
647
  You should have received a copy of the GNU General Public License
648
- along with this program. If not, see <http://www.gnu.org/licenses/>.
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
649
 
650
650
  Also add information on how to contact you by electronic and paper mail.
651
651
 
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664
664
  You should also get your employer (if you work as a programmer) or school,
665
665
  if any, to sign a "copyright disclaimer" for the program, if necessary.
666
666
  For more information on this, and how to apply and follow the GNU GPL, see
667
- <http://www.gnu.org/licenses/>.
667
+ <https://www.gnu.org/licenses/>.
668
668
 
669
669
  The GNU General Public License does not permit incorporating your program
670
670
  into proprietary programs. If your program is a subroutine library, you
671
671
  may consider it more useful to permit linking proprietary applications with
672
672
  the library. If this is what you want to do, use the GNU Lesser General
673
673
  Public License instead of this License. But first, please read
674
- <http://www.gnu.org/philosophy/why-not-lgpl.html>.
674
+ <https://www.gnu.org/philosophy/why-not-lgpl.html>.
data/ChangeLog.md CHANGED
@@ -1,4 +1,34 @@
1
- ### 0.8.0 / 2020-12-XX
1
+ ### 0.9.0.1 / 2021-08-31
2
+
3
+ * Add a workaround for Psych < 3.1.0 to support running on Ruby < 2.6.
4
+ (issue #319)
5
+
6
+ ### 0.9.0 / 2021-08-31
7
+
8
+ * Load advisory metadata using `YAML.safe_load`. (issue #302)
9
+ * Explicitly permit the `Date` class for Psych >= 4.0.0 and Ruby >= 3.1.0.
10
+ * Added {Bundler::Audit::Advisory#to_h}. (pull #310)
11
+ * Added {Bundler::Audit::Database#commit_id}.
12
+
13
+ #### CLI
14
+
15
+ * Added the `--config` option. (pull #306)
16
+ * Added the `junit` output format (ex: `--format junit`). (pull #314)
17
+ * Add missing output for CVSSv3 criticality information. (pull #302)
18
+ * Include criticality information in the JSON output as well. (pull #310)
19
+ * `bundle-audit stats` now prints the commit ID of the ruby-advisory-db.
20
+ * Fixed a deprecation warning from Thor. (issue #317)
21
+
22
+ #### Rake Task
23
+
24
+ * Add the `bundle:audit:update` task for updating the [ruby-advisory-db].
25
+ (pull #296)
26
+ * Aliased `bundle:audit` to `bundle:audit:check`.
27
+ * Aliased `bundler:audit:*` to `bundle:audit:*`.
28
+ * Rake tasks now execute `bundle-audit` command as a subprocess to ensure
29
+ isolation.
30
+
31
+ ### 0.8.0 / 2021-03-10
2
32
 
3
33
  * No longer vendor [ruby-advisory-db].
4
34
  * Added {Bundler::Audit::Configuration}.
@@ -37,14 +67,15 @@
37
67
 
38
68
  #### CLI
39
69
 
40
- * Added `bundle-audit stats`.
41
- * Added `bundle-audit download`.
42
- * `bundle-audit check`:
70
+ * Require [thor] ~> 1.0.
71
+ * Added `bundler-audit stats`.
72
+ * Added `bundler-audit download`.
73
+ * `bundler-audit check`:
43
74
  * Now accepts a optional `DIR` argument for the project directory.
44
- * `bundle-audit check` will now print an explicit error message and exit,
75
+ * `bundler-audit check` will now print an explicit error message and exit,
45
76
  if the given `DIR` does not exist.
46
- * Will now auto-download/auto-update [ruby-advisory-db] to
47
- ensure the latest advisory information.
77
+ * Will now auto-download [ruby-advisory-db] to ensure the latest advisory
78
+ information is used on first run.
48
79
  * Now supports a `--database` option for specifying a path
49
80
  to an alternative [ruby-advisory-db] copy.
50
81
  * Now supports a `--gemfile-lock` option for specifying a
@@ -53,6 +84,9 @@
53
84
  desired format. `text` and `json` are supported, but other custom formats
54
85
  can be loaded. See {Bundler::Audit::CLI::Formats}.
55
86
  * Now supports a `--output` option for writing the report output to a file.
87
+ * Prints both CVE and GHSA IDs.
88
+ * Print all error messages to stderr.
89
+ * No longer print number of advisories in `bundler-audit version`.
56
90
 
57
91
  ### 0.7.0.1 / 2020-06-12
58
92
 
@@ -91,9 +125,9 @@
91
125
 
92
126
  #### CLI
93
127
 
94
- * Added the `--update` option to `bundle-audit check`.
95
- * `bundle-audit update` now returns a non-zero exit status on error.
96
- * `bundle-audit update` only updates `~/.local/share/ruby-advisory-db`, if it is a git
128
+ * Added the `--update` option to `bundler-audit check`.
129
+ * `bundler-audit update` now returns a non-zero exit status on error.
130
+ * `bundler-audit update` only updates `~/.local/share/ruby-advisory-db`, if it is a git
97
131
  repository.
98
132
 
99
133
  ### 0.4.0 / 2015-06-30
@@ -131,7 +165,7 @@
131
165
 
132
166
  #### CLI
133
167
 
134
- * Added the `bundle-audit update` sub-command.
168
+ * Added the `bundler-audit update` sub-command.
135
169
 
136
170
  ### 0.2.0 / 2013-03-05
137
171
 
data/Gemfile CHANGED
@@ -4,10 +4,14 @@ gemspec
4
4
 
5
5
  group :development do
6
6
  gem 'rake'
7
- gem 'kramdown', '~> 2.0'
8
-
9
7
  gem 'rubygems-tasks', '~> 0.2'
8
+
9
+ gem 'rubocop', '~> 1.18'
10
+
10
11
  gem 'rspec', '~> 3.0'
12
+ gem 'simplecov', '~> 0.7', require: false
13
+
14
+ gem 'kramdown', '~> 2.0'
11
15
  gem 'yard', '~> 0.9'
12
- gem 'simplecov', '~> 0.7', :require => false
16
+ gem 'yard-spellcheck', require: false
13
17
  end
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # bundler-audit
2
- [![Build Status](https://travis-ci.org/rubysec/bundler-audit.svg?branch=master)](https://travis-ci.org/rubysec/bundler-audit)
2
+
3
+ [![CI](https://github.com/rubysec/bundler-audit/actions/workflows/ruby.yml/badge.svg)](https://github.com/rubysec/bundler-audit/actions/workflows/ruby.yml)
3
4
  [![Code Climate](https://codeclimate.com/github/rubysec/bundler-audit.svg)](https://codeclimate.com/github/rubysec/bundler-audit)
5
+ [![Gem Version](https://badge.fury.io/rb/bundler-audit.svg)](https://badge.fury.io/rb/bundler-audit)
4
6
 
5
7
  * [Homepage](https://github.com/rubysec/bundler-audit#readme)
6
8
  * [Issues](https://github.com/rubysec/bundler-audit/issues)
7
9
  * [Documentation](http://rubydoc.info/gems/bundler-audit/frames)
8
- * [Email](mailto:postmodern.mod3 at gmail.com)
9
10
 
10
11
  ## Description
11
12
 
@@ -14,7 +15,7 @@ Patch-level verification for [bundler].
14
15
  ## Features
15
16
 
16
17
  * Checks for vulnerable versions of gems in `Gemfile.lock`.
17
- * Checks for insecure gem sources (`http://`).
18
+ * Checks for insecure gem sources (`http://` and `git://`).
18
19
  * Allows ignoring certain advisories that have been manually worked around.
19
20
  * Prints advisory information.
20
21
  * Does not require a network connection.
@@ -132,13 +133,14 @@ Output the audit's results in JSON, to a file:
132
133
 
133
134
  $ bundle-audit check --format json --output bundle-audit.json
134
135
 
135
- Rake task:
136
+ ## Rake Tasks
136
137
 
137
- ```ruby
138
- require 'bundler/audit/task'
139
- Bundler::Audit::Task.new
138
+ Bundler-audit provides Rake tasks for checking the code and for updating
139
+ its vulnerability database:
140
140
 
141
- task default: 'bundle:audit'
141
+ ```bash
142
+ rake bundle:audit
143
+ rake bundle:audit:update
142
144
  ```
143
145
 
144
146
  ## Configuration File
@@ -154,12 +156,16 @@ bundler-audit also supports a per-project configuration file:
154
156
 
155
157
  * `ignore:` \[Array\<String\>\] - A list of advisory IDs to ignore.
156
158
 
159
+ You can provide a path to a config file using the `--config` flag:
160
+
161
+ $ bundle-audit check --config bundler-audit.custom.yaml
162
+
157
163
  ## Requirements
158
164
 
159
165
  * [git]
160
- * [ruby] >= 1.9.3
166
+ * [ruby] >= 2.0.0
161
167
  * [rubygems] >= 1.8
162
- * [thor] >= 0.18, < 2
168
+ * [thor] ~> 1.0
163
169
  * [bundler] >= 1.2.0, < 3
164
170
 
165
171
  ## Install
@@ -189,7 +195,7 @@ bundler-audit also supports a per-project configuration file:
189
195
  1. https://github.com/rubysec/bundler-audit/fork
190
196
  2. `git clone YOUR_FORK_URI`
191
197
  3. `cd bundler-audit/`
192
- 4. `budle install`
198
+ 4. `bundle install`
193
199
  5. `bundle exec rake spec`
194
200
  6. `git checkout -b YOUR_FEATURE`
195
201
  7. Make your changes
@@ -199,7 +205,7 @@ bundler-audit also supports a per-project configuration file:
199
205
 
200
206
  ## License
201
207
 
202
- Copyright (c) 2013-2020 Hal Brodigan (postmodern.mod3 at gmail.com)
208
+ Copyright (c) 2013-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
203
209
 
204
210
  bundler-audit is free software: you can redistribute it and/or modify
205
211
  it under the terms of the GNU General Public License as published by
@@ -212,14 +218,13 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
212
218
  GNU General Public License for more details.
213
219
 
214
220
  You should have received a copy of the GNU General Public License
215
- along with bundler-audit. If not, see <http://www.gnu.org/licenses/>.
221
+ along with bundler-audit. If not, see <https://www.gnu.org/licenses/>.
216
222
 
217
223
  [git]: https://git-scm.com
218
224
  [ruby]: https://ruby-lang.org
219
225
  [rubygems]: https://rubygems.org
220
226
  [thor]: http://whatisthor.com/
221
- [bundler]: https://github.com/carlhuda/bundler#readme
222
- [git]: https://github.com/git/git
227
+ [bundler]: https://bundler.io
223
228
 
224
229
  [OSVDB]: http://osvdb.org/
225
230
  [ruby-advisory-db]: https://github.com/rubysec/ruby-advisory-db
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'rubygems'
4
2
 
5
3
  begin
@@ -36,5 +34,11 @@ task :test => :spec
36
34
  task :default => :spec
37
35
 
38
36
  require 'yard'
39
- YARD::Rake::YardocTask.new
37
+ YARD::Rake::YardocTask.new
40
38
  task :doc => :yard
39
+
40
+ require 'bundler/audit/task'
41
+ Bundler::Audit::Task.new
42
+
43
+ require 'rubocop/rake_task'
44
+ RuboCop::RakeTask.new
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'yaml'
4
2
 
5
3
  Gem::Specification.new do |gem|
@@ -23,8 +21,9 @@ Gem::Specification.new do |gem|
23
21
 
24
22
  glob = lambda { |patterns| gem.files & Dir[*patterns] }
25
23
 
26
- gem.files = `git ls-files`.split($/)
27
- gem.files = glob[gemspec['files']] if gemspec['files']
24
+ gem.files = if gemspec['files'] then glob[gemspec['files']]
25
+ else `git ls-files`.split($/)
26
+ end
28
27
 
29
28
  gem.executables = gemspec.fetch('executables') do
30
29
  glob['bin/*'].map { |path| File.basename(path) }