librarianp 1.0.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +32 -0
- data/.github/workflows/test.yml +29 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +23 -1
- data/Gemfile +3 -1
- data/HISTORY.md +315 -0
- data/README.md +7 -2
- data/Rakefile +12 -0
- data/VERSION +1 -1
- data/lib/librarian/dsl/receiver.rb +2 -2
- data/lib/librarian/dsl.rb +2 -2
- data/lib/librarian/rspec/support/cli_macro.rb +1 -1
- data/lib/librarian/source/git/repository.rb +12 -6
- data/lib/librarian/ui.rb +4 -0
- data/librarianp.gemspec +1 -1
- data/spec/unit/lockfile/parser_spec.rb +1 -2
- metadata +10 -6
- data/.travis.yml +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03324f329c31fdac36efd22059ab329088982e78574ccbad2b9e94e2b1dbe4bf
|
4
|
+
data.tar.gz: 5cb5ec7c6f01dc7485baa2ea06bc6f153cc266b82b10a9c2ac0d7869d66617b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15ed4fd64d5185b430162dd31ecaeee2e081f370dd73eeedba1af2cfaa8328147ed15d8f39ca5313030b7508251c5d767d0cd16565ba6606c2771cedd1264995
|
7
|
+
data.tar.gz: eca0a95250556946b61bac1428f862cd7dbd5d102ee1d7ee7ae9536aef2d7c3ae33dec8075d9826b7c26b92d7e3e4dd67488c7b228073628136e9bcc2d70e253
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
if: github.repository_owner == 'voxpupuli'
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Install Ruby 3.0
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: '3.0'
|
18
|
+
env:
|
19
|
+
BUNDLE_WITHOUT: release
|
20
|
+
- name: Build gem
|
21
|
+
run: gem build *.gemspec
|
22
|
+
- name: Publish gem to rubygems.org
|
23
|
+
run: gem push *.gem
|
24
|
+
env:
|
25
|
+
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
|
26
|
+
- name: Setup GitHub packages access
|
27
|
+
run: |
|
28
|
+
mkdir -p ~/.gem
|
29
|
+
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
|
30
|
+
chmod 0600 ~/.gem/credentials
|
31
|
+
- name: Publish gem to GitHub packages
|
32
|
+
run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
- pull_request
|
5
|
+
- push
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
fail-fast: false
|
12
|
+
matrix:
|
13
|
+
ruby:
|
14
|
+
- "2.4"
|
15
|
+
- "2.5"
|
16
|
+
- "2.6"
|
17
|
+
- "2.7"
|
18
|
+
- "3.0"
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- name: Install Ruby ${{ matrix.ruby }}
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake spec
|
28
|
+
- name: Verify gem builds
|
29
|
+
run: gem build *.gemspec
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,23 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
## [v1.1.2](https://github.com/voxpupuli/librarian/tree/v1.1.2) (2022-08-02)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/librarian/compare/v1.1.1...v1.1.2)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- Do not suppress Git console output when debugging [\#20](https://github.com/voxpupuli/librarian/pull/20) ([hlaf](https://github.com/hlaf))
|
12
|
+
|
13
|
+
## [v1.1.1](https://github.com/voxpupuli/librarian/tree/v1.1.1) (2021-08-27)
|
14
|
+
|
15
|
+
* Fix one more Ruby 3 compatibility issue
|
16
|
+
* Search for the Rakefile relatively to pwd
|
17
|
+
|
18
|
+
## 1.1.0
|
19
|
+
|
20
|
+
* Support Ruby 3
|
2
21
|
|
3
22
|
## 1.0.0
|
4
23
|
|
@@ -306,3 +325,6 @@ This release focuses on refactoring some of the internals. There are no function
|
|
306
325
|
## 0.0.1
|
307
326
|
|
308
327
|
* Initial release.
|
328
|
+
|
329
|
+
|
330
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile
CHANGED
@@ -3,4 +3,6 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in librarian.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
6
|
+
group :release, optional: true do
|
7
|
+
gem 'github_changelog_generator', '>= 1.16.4', :require => false if RUBY_VERSION >= '2.5.0'
|
8
|
+
end
|
data/HISTORY.md
ADDED
@@ -0,0 +1,315 @@
|
|
1
|
+
## [v1.1.1](https://github.com/voxpupuli/librarian/tree/v1.1.1) (2021-08-27)
|
2
|
+
|
3
|
+
* Fix one more Ruby 3 compatibility issue
|
4
|
+
* Search for the Rakefile relatively to pwd
|
5
|
+
|
6
|
+
## 1.1.0
|
7
|
+
|
8
|
+
* Support Ruby 3
|
9
|
+
|
10
|
+
## 1.0.0
|
11
|
+
|
12
|
+
* Require Ruby 2.4+
|
13
|
+
* Update dependencies to the latest versions
|
14
|
+
* Be specific about exposing git environment variables
|
15
|
+
* Allow more spaces in version range
|
16
|
+
|
17
|
+
## 0.6.4
|
18
|
+
|
19
|
+
* Add support for r10k Puppetfile's opts
|
20
|
+
* Fix deprecation warnings
|
21
|
+
* Fix compatibility with git 2.14.0
|
22
|
+
|
23
|
+
## 0.6.3
|
24
|
+
|
25
|
+
* Prevent losing specfile path when metadata doesn't exist
|
26
|
+
|
27
|
+
## 0.6.2
|
28
|
+
|
29
|
+
* Fix bad variable name
|
30
|
+
|
31
|
+
## 0.6.1
|
32
|
+
|
33
|
+
* Fix dependencies not being fetched
|
34
|
+
|
35
|
+
## 0.6.0
|
36
|
+
|
37
|
+
* Merge duplicated dependencies in spec
|
38
|
+
* Always fetch the commit SHA from rev-parse
|
39
|
+
|
40
|
+
## 0.5.0
|
41
|
+
|
42
|
+
* Allow defining exclusions in spec file
|
43
|
+
* Allow forward slash in lock file
|
44
|
+
|
45
|
+
## 0.4.0
|
46
|
+
|
47
|
+
* Resolve iteratively instead of recursively
|
48
|
+
* Fail if there are duplicated dependencies in spec file
|
49
|
+
* Merge duplicated dependencies and warn the user
|
50
|
+
|
51
|
+
## 0.3.0
|
52
|
+
|
53
|
+
* Allow customizing default specfile and receiver downstream
|
54
|
+
|
55
|
+
## 0.2.0
|
56
|
+
|
57
|
+
* Remove highline gem not actually needed
|
58
|
+
* Handle version ranges and 1.x type strings
|
59
|
+
* Handle prerelease versions and semver
|
60
|
+
* Add a logger warn method
|
61
|
+
* Add a better error message if module doesn't exist while resolving dependencies
|
62
|
+
|
63
|
+
## 0.1.2
|
64
|
+
|
65
|
+
* \#153. Mark the license in the gemspec.
|
66
|
+
|
67
|
+
* \#158, \#160, \#159. Handle cyclic dependencies for adapters which opt in to
|
68
|
+
cyclic dependencies.
|
69
|
+
|
70
|
+
* \#154. Cache git repository sources which are identical but for their :path
|
71
|
+
attributes (where to look inside the repository for the manifest). Thanks
|
72
|
+
@bcatlin.
|
73
|
+
|
74
|
+
* \#161. Fix JRuby exception in posix run! method. Thanks @justenwalker.
|
75
|
+
|
76
|
+
* \#163. Don't fetch git repositories multiple times per run. Thanks @njam.
|
77
|
+
|
78
|
+
## 0.1.1
|
79
|
+
|
80
|
+
* \#147. Handle the case where HOME is not in the environment. Thanks @bradleyd.
|
81
|
+
|
82
|
+
* \#140. Properly handle the failure to clone a git repository. Avoid wiping out
|
83
|
+
the host project's changes.
|
84
|
+
|
85
|
+
* \#127. Support Rubinius and JRuby, including when shelling out to system
|
86
|
+
commands.
|
87
|
+
|
88
|
+
* \#144. Allow running the test suite with a simple `rake`. Thanks @nickhammond.
|
89
|
+
|
90
|
+
## 0.1.0
|
91
|
+
|
92
|
+
* Extract the chef adapter to its own gem.
|
93
|
+
|
94
|
+
## 0.0.26
|
95
|
+
|
96
|
+
* \#112. Prevent the git source being confused in certain cases by colorized
|
97
|
+
output from git. HT: @ericpp.
|
98
|
+
|
99
|
+
* \#115, \#116. Accommodate cookbook archives generated by `git archive`.
|
100
|
+
HT: @taqtiqa-mark.
|
101
|
+
|
102
|
+
* \#119. Support NO_PROXY, a modifier on HTTP_PROXY and friends. HT: @databus23.
|
103
|
+
|
104
|
+
* \#121. A github pseudosource. HT: @alno.
|
105
|
+
|
106
|
+
* \#122. Follow http redirect responses in the chef site source. HT: @Fleurer.
|
107
|
+
|
108
|
+
* Improve the resolver performance by detecting conflicts earlier and
|
109
|
+
backtracking more quickly. This will help avoid certain cases of long
|
110
|
+
resolutions caused by conflicts; the conflicts will still be there, but will
|
111
|
+
be detected more quickly and the resolution terminated more quickly. This
|
112
|
+
changes the resolution algorithm, and new resolutions may differ from older
|
113
|
+
resolutions.
|
114
|
+
|
115
|
+
## 0.0.25
|
116
|
+
|
117
|
+
* \#71. Fix an error, given certain locale settings, with reading cookbook
|
118
|
+
metadata files.
|
119
|
+
|
120
|
+
* \#89. Fix an error when encountering manifests and dependencies with names of
|
121
|
+
a single letter, such as `"R"`.
|
122
|
+
|
123
|
+
* \#92, \#99. HTTP proxy support via the `HTTP_PROXY` environment variable. Also
|
124
|
+
supports `HTTP_PROXY_USER` and `HTTP_PROXY_PASS` environment variables. Thanks
|
125
|
+
@tknerr.
|
126
|
+
|
127
|
+
* \#97. Enforce that the `:ref` option in the `:git` source may only be given a
|
128
|
+
string.
|
129
|
+
|
130
|
+
* \#98. Fix unpacking chef site-sourced packages where the directory in the
|
131
|
+
tarball does not match the cookbook name.
|
132
|
+
|
133
|
+
## 0.0.24
|
134
|
+
|
135
|
+
* \#15. A remembered configuration system.
|
136
|
+
|
137
|
+
* \#16. Configure, and remember configuration for, chef install paths.
|
138
|
+
|
139
|
+
* \#38. Configure, and remember configuration for, stripping out `.git`
|
140
|
+
directories from git-sources chef dependencies.
|
141
|
+
|
142
|
+
* \#76. Support git annotated tags.
|
143
|
+
|
144
|
+
* \#80. Ignore directories in the `PATH` named `git` when looking for the `git`
|
145
|
+
bin. Thanks @avit.
|
146
|
+
|
147
|
+
* \#85. Provide a helpful message when running the `show` command without a
|
148
|
+
lockfile present.
|
149
|
+
|
150
|
+
## 0.0.23
|
151
|
+
|
152
|
+
* \#41. Build gems with a built gemspec.
|
153
|
+
|
154
|
+
* \#67. Cache remote objects at the latest possible moments, and only when they
|
155
|
+
are needed.
|
156
|
+
|
157
|
+
* \#68. Fix unpacking chef site-sourced packages on Windows by pivoting from a
|
158
|
+
Librarian-managed scratch space, rather than pivoting from Windows' temp
|
159
|
+
directory. There were unexplained problems with using the Windows temp
|
160
|
+
directory in certain cases, possibly related to the temp directory and the
|
161
|
+
Librarian cache directory being on different volumes.
|
162
|
+
|
163
|
+
* \#69. Fix invoking Librarian with git-sourced dependencies from git hooks by
|
164
|
+
unsetting `GIT_DIR` around shelling out to git.
|
165
|
+
|
166
|
+
* Print general environment information when running with `--verbose`.
|
167
|
+
|
168
|
+
## 0.0.22
|
169
|
+
|
170
|
+
* Fix the `outdated` CLI command.
|
171
|
+
|
172
|
+
## 0.0.21
|
173
|
+
|
174
|
+
* \#64. Sources now raise when given unrecognized options in the specfile.
|
175
|
+
|
176
|
+
* A new `show` CLI command.
|
177
|
+
|
178
|
+
* Changed the `clean` CLI command no longer to delete the lockfile.
|
179
|
+
|
180
|
+
* Simplify the architecture of `Librarian::Manifest` vis-a-vis sources. It is no
|
181
|
+
longer a base class for adapters to inherit. Now, sources expose a small
|
182
|
+
interface, which `Librarian::Manifest` can call, for delay-loading attributes.
|
183
|
+
|
184
|
+
* The git source now resolves the `git` binary before `chdir`ing.
|
185
|
+
|
186
|
+
* Test on Rubinius.
|
187
|
+
|
188
|
+
## 0.0.20
|
189
|
+
|
190
|
+
* A command to print outdated dependencies.
|
191
|
+
|
192
|
+
## 0.0.19
|
193
|
+
|
194
|
+
* Fix breakage on 1.8.
|
195
|
+
|
196
|
+
## 0.0.18
|
197
|
+
|
198
|
+
* \#57. Include existing manifests' dependencies in resolution.
|
199
|
+
|
200
|
+
* Permit the update action even with a changed specfile.
|
201
|
+
|
202
|
+
## 0.0.17
|
203
|
+
|
204
|
+
* Use a pure-Ruby implementation of tar/gz. Helps with Windows support, since
|
205
|
+
Windows boxes are less likely than *NIX boxes to have the `tar` executable.
|
206
|
+
|
207
|
+
* Fix an issue where the chef site source considers uncached manifests to be
|
208
|
+
cached, and skips caching them, causing the install action to fail.
|
209
|
+
|
210
|
+
* Fail fast if the resolver produces an inconsistent resolution. It is a known
|
211
|
+
issue that the resolver will sometimes (deterministically, not randomly)
|
212
|
+
produce an inconsistent resolution when performing an update action (#57).
|
213
|
+
Start debugging this by failing fast at this point and spitting out gobs of
|
214
|
+
debug-level log details.
|
215
|
+
|
216
|
+
## 0.0.16
|
217
|
+
|
218
|
+
* Recache site-sourced dependency metadata per each run.
|
219
|
+
|
220
|
+
* \#46. Always install.
|
221
|
+
|
222
|
+
* \#53. Abstract versions & requirements from rubygems.
|
223
|
+
|
224
|
+
* Own the install path. Recreate it on each install.
|
225
|
+
WARNING: If you have your own content in the install path, it will be deleted without mercy.
|
226
|
+
|
227
|
+
## 0.0.15
|
228
|
+
|
229
|
+
* Rewrite the README.
|
230
|
+
|
231
|
+
* \#44, \#49. Better updating of cached git sources without using local merges.
|
232
|
+
|
233
|
+
## 0.0.14
|
234
|
+
|
235
|
+
* \#39 Fixes a regression induced by using `git reset --hard SHA`.
|
236
|
+
|
237
|
+
## 0.0.13
|
238
|
+
|
239
|
+
* \#36 Fixes an issue where, if a dependency has a git source (the upstream), and the upstream is updated,
|
240
|
+
then attempting to update that dependency in the local resolution would not update that dependency so
|
241
|
+
long as that git source were cached (@databus23).
|
242
|
+
|
243
|
+
* More immediate detection of, and better error messages for, cases of blank dependency or manifest names
|
244
|
+
or cases of names that are otherwise insensible, such as names that are untrimmed.
|
245
|
+
|
246
|
+
## 0.0.12
|
247
|
+
|
248
|
+
* Fixes an issue where, if a dependency has a git source with a ref, re-resolving may fail.
|
249
|
+
|
250
|
+
## 0.0.11
|
251
|
+
|
252
|
+
* Fix a regression where the cli command "version" failed.
|
253
|
+
|
254
|
+
## 0.0.10
|
255
|
+
|
256
|
+
This release focuses on refactoring some of the internals. There are no functional changes.
|
257
|
+
|
258
|
+
## 0.0.9
|
259
|
+
|
260
|
+
* \#11 Fixes a problem where, if the repo is in a path where a component has a space, attempting to resolve a
|
261
|
+
site-sourced dependency fails.
|
262
|
+
|
263
|
+
## 0.0.8
|
264
|
+
|
265
|
+
* A `version` task.
|
266
|
+
|
267
|
+
* A change log.
|
268
|
+
|
269
|
+
* \#10 Fixes the problem with bouncing the lockfile when updating, when using a git source with the default ref.
|
270
|
+
|
271
|
+
## 0.0.7
|
272
|
+
|
273
|
+
* \#8 Add highline temporarily as a runtime dependency of `librarian` (@fnichol).
|
274
|
+
When the project is split into `librarian` and `librarian-chef`, the `chef` runtime dependency will
|
275
|
+
be moved to `librarian-chef`. If the project is further split into a knife plugin, the dependency
|
276
|
+
will be moved there.
|
277
|
+
|
278
|
+
## 0.0.6
|
279
|
+
|
280
|
+
* \#7 Show a better error message when a cookbook is missing the required metadata file.
|
281
|
+
|
282
|
+
* Miscellaneous bugfixes.
|
283
|
+
|
284
|
+
## 0.0.5
|
285
|
+
|
286
|
+
* \#4 An `init` task for `librarian-chef`.
|
287
|
+
This task creates a nearly-blank `Cheffile` with just the default Opscode Community Site source.
|
288
|
+
|
289
|
+
* Automatically create the `cookbooks` directory, if it's missing, when running the `install` task.
|
290
|
+
|
291
|
+
* \#3 Add `chef` temporarily as a runtime dependency of `librarian` (@fnichol).
|
292
|
+
When the project is split into `librarian` and `librarian-chef`, the `chef` runtime dependency will
|
293
|
+
be moved to `librarian-chef`.
|
294
|
+
|
295
|
+
## 0.0.4
|
296
|
+
|
297
|
+
* A simple knife integration.
|
298
|
+
This integration allows you to specify a `librarian-chef`-managed tempdir as a `cookbook_path`.
|
299
|
+
This is useful to force knife only to upload the exact cookbooks that `librarian-chef` knows
|
300
|
+
about, rather than whatever happens to be found in the `cookbooks` directory.
|
301
|
+
|
302
|
+
## 0.0.3
|
303
|
+
|
304
|
+
* Miscellaneous bugfixes.
|
305
|
+
|
306
|
+
## 0.0.2
|
307
|
+
|
308
|
+
* An optional `:path` attribute for `:git` sources.
|
309
|
+
This allows you to specify exactly where within a git repository a given cookbook is to be found.
|
310
|
+
|
311
|
+
* A full example of a Cheffile and its usage in the readme.
|
312
|
+
|
313
|
+
## 0.0.1
|
314
|
+
|
315
|
+
* Initial release.
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
-
Librarian
|
2
|
-
|
1
|
+
# Librarian
|
2
|
+
|
3
|
+
[![License](https://img.shields.io/github/license/voxpupuli/librarian.svg)](https://github.com/voxpupuli/librarian/blob/master/LICENSE.txt)
|
4
|
+
[![Test](https://github.com/voxpupuli/librarian/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/librarian/actions/workflows/test.yml)
|
5
|
+
[![Release](https://github.com/voxpupuli/librarian/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/librarian/actions/workflows/release.yml)
|
6
|
+
[![RubyGem Version](https://img.shields.io/gem/v/librarian.svg)](https://rubygems.org/gems/librarian)
|
7
|
+
[![RubyGem Downloads](https://img.shields.io/gem/dt/librarian.svg)](https://rubygems.org/gems/librarian)
|
3
8
|
|
4
9
|
This is a forked version published as `librarianp` with improvements in order to support `librarian-puppet`.
|
5
10
|
|
data/Rakefile
CHANGED
@@ -26,3 +26,15 @@ Bundler::GemHelper.install_tasks
|
|
26
26
|
RSpec::Core::RakeTask.new('spec')
|
27
27
|
task :default => :spec
|
28
28
|
|
29
|
+
begin
|
30
|
+
require 'github_changelog_generator/task'
|
31
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
32
|
+
version = File.read(File.expand_path('VERSION', __dir__)).strip
|
33
|
+
config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/
|
34
|
+
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
|
35
|
+
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
|
36
|
+
config.user = 'voxpupuli'
|
37
|
+
config.project = 'librarian'
|
38
|
+
end
|
39
|
+
rescue LoadError
|
40
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.2
|
data/lib/librarian/dsl.rb
CHANGED
@@ -79,14 +79,14 @@ module Librarian
|
|
79
79
|
Receiver.new(target)
|
80
80
|
end
|
81
81
|
|
82
|
-
def run(specfile = nil, sources = [])
|
82
|
+
def run(specfile = nil, sources = [], &block)
|
83
83
|
specfile, sources = nil, specfile if specfile.kind_of?(Array) && sources.empty?
|
84
84
|
|
85
85
|
Target.new(self).tap do |target|
|
86
86
|
target.precache_sources(sources)
|
87
87
|
debug_named_source_cache("Pre-Cached Sources", target)
|
88
88
|
|
89
|
-
specfile ||=
|
89
|
+
specfile ||= block if block_given?
|
90
90
|
|
91
91
|
if specfile.kind_of?(Pathname) and !File.exists?(specfile)
|
92
92
|
debug { "Specfile #{specfile} not found, using defaults" } unless specfile.nil?
|
@@ -51,7 +51,7 @@ module Librarian
|
|
51
51
|
def self.included(base)
|
52
52
|
base.instance_exec do
|
53
53
|
let(:project_path) do
|
54
|
-
project_path = Pathname.
|
54
|
+
project_path = Pathname.pwd.expand_path
|
55
55
|
project_path = project_path.dirname until project_path.join("Rakefile").exist?
|
56
56
|
project_path
|
57
57
|
end
|
@@ -44,24 +44,28 @@ module Librarian
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def clone!(repository_url)
|
47
|
-
command = %W(clone #{repository_url} .
|
47
|
+
command = %W(clone #{repository_url} .)
|
48
|
+
command << '--quiet' unless environment.ui.debug?
|
48
49
|
run!(command, :chdir => true)
|
49
50
|
end
|
50
51
|
|
51
52
|
def checkout!(reference, options ={ })
|
52
|
-
command = %W(checkout #{reference}
|
53
|
+
command = %W(checkout #{reference})
|
54
|
+
command << '--quiet' unless environment.ui.debug?
|
53
55
|
command << "--force" if options[:force]
|
54
56
|
run!(command, :chdir => true)
|
55
57
|
end
|
56
58
|
|
57
59
|
def fetch!(remote, options = { })
|
58
|
-
command = %W(fetch #{remote}
|
60
|
+
command = %W(fetch #{remote})
|
61
|
+
command << '--quiet' unless environment.ui.debug?
|
59
62
|
command << "--tags" if options[:tags]
|
60
63
|
run!(command, :chdir => true)
|
61
64
|
end
|
62
65
|
|
63
66
|
def reset_hard!
|
64
|
-
command = %W(reset --hard
|
67
|
+
command = %W(reset --hard)
|
68
|
+
command << '--quiet' unless environment.ui.debug?
|
65
69
|
run!(command, :chdir => true)
|
66
70
|
end
|
67
71
|
|
@@ -107,12 +111,14 @@ module Librarian
|
|
107
111
|
reference = "#{remote}/#{reference}"
|
108
112
|
end
|
109
113
|
|
110
|
-
command = %W(rev-parse #{reference}^{commit}
|
114
|
+
command = %W(rev-parse #{reference}^{commit})
|
115
|
+
command << '--quiet' unless environment.ui.debug?
|
111
116
|
run!(command, :chdir => true).strip
|
112
117
|
end
|
113
118
|
|
114
119
|
def current_commit_hash
|
115
|
-
command = %W(rev-parse HEAD
|
120
|
+
command = %W(rev-parse HEAD)
|
121
|
+
command << '--quiet' unless environment.ui.debug?
|
116
122
|
run!(command, :chdir => true).strip!
|
117
123
|
end
|
118
124
|
|
data/lib/librarian/ui.rb
CHANGED
data/librarianp.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.required_ruby_version = '
|
20
|
+
gem.required_ruby_version = '>= 2.4', '< 4'
|
21
21
|
|
22
22
|
gem.add_dependency "thor", "~> 1.0"
|
23
23
|
|
@@ -57,8 +57,7 @@ module Librarian
|
|
57
57
|
it "should give a dependency with the expected requirement" do
|
58
58
|
dependency = resolution.dependencies.first
|
59
59
|
|
60
|
-
|
61
|
-
expect(dependency.requirement.to_s).to eq "~> 1.1, != 1.2.6"
|
60
|
+
expect(dependency.requirement).to eq Librarian::Dependency::Requirement.new(["~> 1.1", "!= 1.2.6"])
|
62
61
|
end
|
63
62
|
|
64
63
|
it "should give a dependency wth the expected source" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarianp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Feldblum
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -89,11 +89,13 @@ executables: []
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
|
+
- ".github/workflows/release.yml"
|
93
|
+
- ".github/workflows/test.yml"
|
92
94
|
- ".gitignore"
|
93
95
|
- ".rspec"
|
94
|
-
- ".travis.yml"
|
95
96
|
- CHANGELOG.md
|
96
97
|
- Gemfile
|
98
|
+
- HISTORY.md
|
97
99
|
- LICENSE.txt
|
98
100
|
- README.md
|
99
101
|
- Rakefile
|
@@ -199,17 +201,19 @@ require_paths:
|
|
199
201
|
- lib
|
200
202
|
required_ruby_version: !ruby/object:Gem::Requirement
|
201
203
|
requirements:
|
202
|
-
- - "
|
204
|
+
- - ">="
|
203
205
|
- !ruby/object:Gem::Version
|
204
206
|
version: '2.4'
|
207
|
+
- - "<"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '4'
|
205
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
211
|
requirements:
|
207
212
|
- - ">="
|
208
213
|
- !ruby/object:Gem::Version
|
209
214
|
version: '0'
|
210
215
|
requirements: []
|
211
|
-
|
212
|
-
rubygems_version: 2.7.7
|
216
|
+
rubygems_version: 3.2.33
|
213
217
|
signing_key:
|
214
218
|
specification_version: 4
|
215
219
|
summary: A Framework for Bundlers.
|
data/.travis.yml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- '2.4'
|
4
|
-
- '2.5'
|
5
|
-
- '2.6'
|
6
|
-
deploy:
|
7
|
-
provider: rubygems
|
8
|
-
api_key:
|
9
|
-
secure: "HkdoYaLek2mCT+e7pW0pHMLiIuikUMihfqzspltzmN673HBvMCMZqk4sIm4b3Zi+RMtNTb4dnMxxhehKyyzF88UIRHqV9OUPT3LQLE/BgHThxLD1+CSbVS1SZKY7UfTIcqW3/otORBCI5YAXiycEnRFIe2R/S3n0c/gD9dBcobg="
|
10
|
-
gem: librarianp
|
11
|
-
on:
|
12
|
-
tags: true
|
13
|
-
rvm: '2.6'
|