diffend-monitor 0.2.43 → 0.2.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/CHANGELOG.md +26 -2
  5. data/certs/mensfeld.pem +21 -21
  6. data/config/diffend.yml +1 -0
  7. data/diffend.gemspec +15 -3
  8. data/lib/diffend/config.rb +8 -0
  9. data/lib/diffend/configs/error_messages.rb +11 -0
  10. data/lib/diffend/configs/validator.rb +22 -0
  11. data/lib/diffend/handle_errors/build_exception_payload.rb +1 -0
  12. data/lib/diffend/integration_repository.rb +8 -1
  13. data/lib/diffend/local_context/host.rb +7 -2
  14. data/lib/diffend/local_context/packages.rb +5 -1
  15. data/lib/diffend/plugin.rb +2 -0
  16. data/lib/diffend/version.rb +1 -1
  17. metadata +31 -164
  18. metadata.gz.sig +0 -0
  19. data/.coditsu/ci.yml +0 -3
  20. data/.diffend.yml +0 -3
  21. data/.github/workflows/ci.yml +0 -90
  22. data/.gitignore +0 -58
  23. data/.rspec +0 -1
  24. data/.ruby-version +0 -1
  25. data/Gemfile +0 -12
  26. data/Gemfile.lock +0 -40
  27. data/Rakefile +0 -40
  28. data/bin/bundle +0 -114
  29. data/bin/byebug +0 -29
  30. data/bin/htmldiff +0 -29
  31. data/bin/ldiff +0 -29
  32. data/bin/rake +0 -29
  33. data/bin/rspec +0 -29
  34. data/certs/tomaszpajor.pem +0 -25
  35. data/repositories/.diffend.yml +0 -3
  36. data/repositories/bundler_2_1_4/install_with_gemfile_lock/.diffend.yml +0 -3
  37. data/repositories/bundler_2_1_4/install_with_gemfile_lock/Gemfile +0 -6
  38. data/repositories/bundler_2_1_4/install_with_gemfile_lock/Gemfile.lock +0 -22
  39. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/.diffend.yml +0 -3
  40. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/Gemfile +0 -6
  41. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_added_gem/Gemfile.lock +0 -16
  42. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/.diffend.yml +0 -3
  43. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/Gemfile +0 -6
  44. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +0 -18
  45. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_changed_gem_version/README.md +0 -1
  46. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/.diffend.yml +0 -3
  47. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/Gemfile +0 -6
  48. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +0 -19
  49. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/.diffend.yml +0 -3
  50. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/Gemfile +0 -5
  51. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_removed_gem/Gemfile.lock +0 -43
  52. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/.diffend.yml +0 -3
  53. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/.ruby-version +0 -1
  54. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/Gemfile +0 -10
  55. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/Gemfile.lock +0 -32
  56. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_platforms/gem-with-two-platforms.gemspec +0 -16
  57. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/.diffend.yml +0 -3
  58. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/Gemfile +0 -6
  59. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +0 -17
  60. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/.diffend.yml +0 -3
  61. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/Gemfile +0 -6
  62. data/repositories/bundler_2_1_4/install_with_gemfile_lock_with_two_sources/Gemfile.lock +0 -19
  63. data/repositories/bundler_2_1_4/install_without_gemfile_lock/.diffend.yml +0 -3
  64. data/repositories/bundler_2_1_4/install_without_gemfile_lock/Gemfile +0 -5
  65. data/repositories/bundler_2_1_4/update_with_gemfile_lock/.diffend.yml +0 -3
  66. data/repositories/bundler_2_1_4/update_with_gemfile_lock/Gemfile +0 -5
  67. data/repositories/bundler_2_1_4/update_with_gemfile_lock/Gemfile.lock +0 -16
  68. data/repositories/bundler_2_1_4/update_with_gemfile_lock/README.md +0 -1
  69. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/.diffend.yml +0 -3
  70. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/Gemfile +0 -6
  71. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/Gemfile.lock +0 -16
  72. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_added_gem/README.md +0 -1
  73. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/.diffend.yml +0 -3
  74. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/Gemfile +0 -5
  75. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/Gemfile.lock +0 -43
  76. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_removed_gem/README.md +0 -1
  77. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/.diffend.yml +0 -3
  78. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/Gemfile +0 -6
  79. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +0 -17
  80. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_primary_sources/README.md +0 -1
  81. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/.diffend.yml +0 -3
  82. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/Gemfile +0 -6
  83. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/Gemfile.lock +0 -44
  84. data/repositories/bundler_2_1_4/update_with_gemfile_lock_with_two_sources/README.md +0 -1
  85. data/repositories/bundler_2_1_4/update_without_gemfile_lock/.diffend.yml +0 -3
  86. data/repositories/bundler_2_1_4/update_without_gemfile_lock/Gemfile +0 -5
  87. data/repositories/bundler_2_1_4/update_without_gemfile_lock/README.md +0 -1
  88. data/repositories/bundler_2_2_7/install_with_gemfile_lock/.diffend.yml +0 -3
  89. data/repositories/bundler_2_2_7/install_with_gemfile_lock/Gemfile +0 -6
  90. data/repositories/bundler_2_2_7/install_with_gemfile_lock/Gemfile.lock +0 -21
  91. data/repositories/bundler_2_2_7/install_with_gemfile_lock/README.md +0 -1
  92. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/.diffend.yml +0 -3
  93. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/Gemfile +0 -6
  94. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/Gemfile.lock +0 -16
  95. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_added_gem/README.md +0 -1
  96. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/.diffend.yml +0 -3
  97. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/Gemfile +0 -6
  98. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +0 -18
  99. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_changed_gem_version/README.md +0 -1
  100. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/.diffend.yml +0 -3
  101. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/Gemfile +0 -6
  102. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +0 -18
  103. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_locked_gem_version/README.md +0 -1
  104. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/.diffend.yml +0 -3
  105. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/Gemfile +0 -5
  106. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/Gemfile.lock +0 -41
  107. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_removed_gem/README.md +0 -1
  108. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/.diffend.yml +0 -3
  109. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/Gemfile +0 -10
  110. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/Gemfile.lock +0 -30
  111. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/README.md +0 -1
  112. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_platforms/gem-with-two-platforms.gemspec +0 -16
  113. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/.diffend.yml +0 -3
  114. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/Gemfile +0 -6
  115. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +0 -17
  116. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_primary_sources/README.md +0 -1
  117. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/.diffend.yml +0 -3
  118. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/Gemfile +0 -6
  119. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/Gemfile.lock +0 -19
  120. data/repositories/bundler_2_2_7/install_with_gemfile_lock_with_two_sources/README.md +0 -1
  121. data/repositories/bundler_2_2_7/install_without_gemfile_lock/.diffend.yml +0 -3
  122. data/repositories/bundler_2_2_7/install_without_gemfile_lock/Gemfile +0 -5
  123. data/repositories/bundler_2_2_7/install_without_gemfile_lock/README.md +0 -1
  124. data/repositories/bundler_2_2_7/update_with_gemfile_lock/.diffend.yml +0 -3
  125. data/repositories/bundler_2_2_7/update_with_gemfile_lock/Gemfile +0 -5
  126. data/repositories/bundler_2_2_7/update_with_gemfile_lock/Gemfile.lock +0 -16
  127. data/repositories/bundler_2_2_7/update_with_gemfile_lock/README.md +0 -1
  128. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/.diffend.yml +0 -3
  129. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/Gemfile +0 -6
  130. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/Gemfile.lock +0 -16
  131. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_added_gem/README.md +0 -1
  132. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/Gemfile +0 -6
  133. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/Gemfile.lock +0 -18
  134. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_changed_gem_version/README.md +0 -1
  135. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/Gemfile +0 -6
  136. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/Gemfile.lock +0 -18
  137. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_locked_gem_version/README.md +0 -1
  138. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/.diffend.yml +0 -3
  139. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/Gemfile +0 -5
  140. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_removed_gem/Gemfile.lock +0 -41
  141. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/.diffend.yml +0 -3
  142. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/Gemfile +0 -6
  143. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/Gemfile.lock +0 -17
  144. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_primary_sources/README.md +0 -1
  145. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/.diffend.yml +0 -3
  146. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/Gemfile +0 -6
  147. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/Gemfile.lock +0 -42
  148. data/repositories/bundler_2_2_7/update_with_gemfile_lock_with_two_sources/README.md +0 -1
  149. data/repositories/bundler_2_2_7/update_without_gemfile_lock/.diffend.yml +0 -3
  150. data/repositories/bundler_2_2_7/update_without_gemfile_lock/Gemfile +0 -5
  151. data/repositories/diffend.json +0 -9
  152. data/scripts/generate_payload_for_file.rb +0 -14
metadata.gz.sig CHANGED
Binary file
data/.coditsu/ci.yml DELETED
@@ -1,3 +0,0 @@
1
- repository_id: '376dd725-895a-4221-9de5-de8ede1b30a6'
2
- api_key: <%= ENV['CODITSU_API_KEY'] %>
3
- api_secret: <%= ENV['CODITSU_API_SECRET'] %>
data/.diffend.yml DELETED
@@ -1,3 +0,0 @@
1
- project_id: '78703667-6612-476e-9718-ae573983358e'
2
- shareable_id: '432691a9-92c8-4a40-91a1-b63b09ec4123'
3
- shareable_key: '34a19a31-06c5-4941-a32e-aceb006f3730'
@@ -1,90 +0,0 @@
1
- name: ci
2
-
3
- jobs:
4
- specs:
5
- needs:
6
- - diffend
7
- - coditsu
8
-
9
- runs-on: ubuntu-latest
10
- strategy:
11
- fail-fast: false
12
- matrix:
13
- ruby:
14
- - '3.0'
15
- - '2.7'
16
- - '2.6'
17
- - '2.5'
18
- - 'jruby-9.2.14.0'
19
- bundler:
20
- - '2.1.4'
21
- - '2.2.7'
22
- include:
23
- - ruby: '2.7'
24
- coverage: 'true'
25
-
26
- steps:
27
- - uses: actions/checkout@v2
28
- - uses: actions/cache@v2
29
- with:
30
- path: vendor/bundle
31
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
32
- restore-keys: |
33
- ${{ runner.os }}-gems-
34
- - name: Install package dependencies
35
- run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
36
- - name: Set up Ruby
37
- uses: ruby/setup-ruby@v1
38
- with:
39
- ruby-version: ${{matrix.ruby}}
40
- bundler: ${{matrix.bundler}}
41
- - name: Bundle install
42
- env:
43
- DIFFEND_DEVELOPMENT: true
44
- run: |
45
- bundle _${{matrix.bundler}}_ config path vendor/bundle
46
- bundle _${{matrix.bundler}}_ install --jobs 4 --retry 3
47
- - name: Run all tests
48
- env:
49
- GITHUB_COVERAGE: ${{matrix.coverage}}
50
- run: bundle _${{matrix.bundler}}_ exec rspec
51
- - name: Run integration tests
52
- run: bundle _${{matrix.bundler}}_ exec rake integration_suite
53
-
54
- diffend:
55
- runs-on: ubuntu-latest
56
- strategy:
57
- fail-fast: false
58
- steps:
59
- - uses: actions/checkout@v2
60
- with:
61
- fetch-depth: 0
62
- - name: Set up Ruby
63
- uses: ruby/setup-ruby@v1
64
- with:
65
- ruby-version: 3.0
66
- - name: Install latest bundler
67
- run: gem install bundler --no-document
68
- - name: Install Diffend plugin
69
- run: bundle plugin install diffend
70
- - name: Bundle Secure
71
- run: bundle secure
72
-
73
- coditsu:
74
- runs-on: ubuntu-latest
75
- strategy:
76
- fail-fast: false
77
- steps:
78
- - uses: actions/checkout@v2
79
- with:
80
- fetch-depth: 0
81
- - name: Run Coditsu
82
- env:
83
- CODITSU_API_KEY: ${{ secrets.CODITSU_API_KEY }}
84
- CODITSU_API_SECRET: ${{ secrets.CODITSU_API_SECRET }}
85
- run: \curl -sSL https://api.coditsu.io/run/ci | bash
86
-
87
- on:
88
- push:
89
- schedule:
90
- - cron: '0 1 * * *'
data/.gitignore DELETED
@@ -1,58 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- # Ignore Byebug command history file.
17
- .byebug_history
18
-
19
- ## Specific to RubyMotion:
20
- .dat*
21
- .repl_history
22
- build/
23
- *.bridgesupport
24
- build-iPhoneOS/
25
- build-iPhoneSimulator/
26
-
27
- ## Specific to RubyMotion (use of CocoaPods):
28
- #
29
- # We recommend against adding the Pods directory to your .gitignore. However
30
- # you should judge for yourself, the pros and cons are mentioned at:
31
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
- #
33
- # vendor/Pods/
34
-
35
- ## Documentation cache and generated files:
36
- /.yardoc/
37
- /_yardoc/
38
- /doc/
39
- /rdoc/
40
-
41
- ## Environment normalization:
42
- /.bundle/
43
- /vendor/bundle
44
- /lib/bundler/man/
45
-
46
- # for a library or gem, you might want to ignore these files since the code is
47
- # intended to run in multiple environments; otherwise, check them in:
48
- # Gemfile.lock
49
- # .ruby-version
50
- # .ruby-gemset
51
-
52
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
- .rvmrc
54
-
55
- # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
- # .rubocop-https?--*
57
- .coditsu/local.yml
58
- spec/support/*/vendor/bundle
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --require spec_helper
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.0.0
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- plugin 'diffend'
6
-
7
- gemspec
8
-
9
- group :development, :test do
10
- gem 'byebug', platform: :ruby
11
- gem 'rspec'
12
- end
data/Gemfile.lock DELETED
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- diffend (0.2.43)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- byebug (11.1.3)
10
- diff-lcs (1.4.4)
11
- rake (13.0.3)
12
- rspec (3.10.0)
13
- rspec-core (~> 3.10.0)
14
- rspec-expectations (~> 3.10.0)
15
- rspec-mocks (~> 3.10.0)
16
- rspec-core (3.10.1)
17
- rspec-support (~> 3.10.0)
18
- rspec-expectations (3.10.1)
19
- diff-lcs (>= 1.2.0, < 2.0)
20
- rspec-support (~> 3.10.0)
21
- rspec-mocks (3.10.2)
22
- diff-lcs (>= 1.2.0, < 2.0)
23
- rspec-support (~> 3.10.0)
24
- rspec-support (3.10.2)
25
-
26
- PLATFORMS
27
- java
28
- ruby
29
- universal-java-13
30
- x86_64-darwin-19
31
-
32
- DEPENDENCIES
33
- bundler
34
- byebug
35
- diffend!
36
- rake
37
- rspec
38
-
39
- BUNDLED WITH
40
- 2.2.7
data/Rakefile DELETED
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- %w[
4
- bundler/setup
5
- ].each(&method(:require))
6
-
7
- require 'diffend/errors'
8
- require 'diffend/config'
9
- require 'diffend/shell'
10
- require 'diffend/repository'
11
- require 'diffend/integration_repository'
12
-
13
- task :integration_suite do
14
- Diffend::Repository::SUPPORTED.each do |command, repositories|
15
- repositories.each do |repository_name|
16
- repository = Diffend::IntegrationRepository.new(command, repository_name)
17
- repository.repository.isolate do |path|
18
- start = Time.now.to_f
19
-
20
- repository.config?(path)
21
-
22
- Bundler.with_unbundled_env do
23
- repository.install_plugin(path)
24
-
25
- cmd = Diffend::Shell.call_in_path(path, "bundle #{command}")
26
-
27
- unless cmd[:exit_code].zero?
28
- puts "#{repository.full_name} FAILED"
29
- puts cmd[:stderr]
30
- exit 1
31
- end
32
- end
33
-
34
- took = Time.now.to_f - start
35
-
36
- puts "#{repository.full_name} OK, took #{took.round(1)}s"
37
- end
38
- end
39
- end
40
- end
data/bin/bundle DELETED
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bundle' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("../../Gemfile", __FILE__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_version
64
- @bundler_version ||=
65
- env_var_version || cli_arg_version ||
66
- lockfile_version
67
- end
68
-
69
- def bundler_requirement
70
- return "#{Gem::Requirement.default}.a" unless bundler_version
71
-
72
- bundler_gem_version = Gem::Version.new(bundler_version)
73
-
74
- requirement = bundler_gem_version.approximate_recommendation
75
-
76
- return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
-
78
- requirement += ".a" if bundler_gem_version.prerelease?
79
-
80
- requirement
81
- end
82
-
83
- def load_bundler!
84
- ENV["BUNDLE_GEMFILE"] ||= gemfile
85
-
86
- activate_bundler
87
- end
88
-
89
- def activate_bundler
90
- gem_error = activation_error_handling do
91
- gem "bundler", bundler_requirement
92
- end
93
- return if gem_error.nil?
94
- require_error = activation_error_handling do
95
- require "bundler/version"
96
- end
97
- return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
- warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
- exit 42
100
- end
101
-
102
- def activation_error_handling
103
- yield
104
- nil
105
- rescue StandardError, LoadError => e
106
- e
107
- end
108
- end
109
-
110
- m.load_bundler!
111
-
112
- if m.invoked_as_script?
113
- load Gem.bin_path("bundler", "bundle")
114
- end
data/bin/byebug DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'byebug' 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("byebug", "byebug")
data/bin/htmldiff DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'htmldiff' 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("diff-lcs", "htmldiff")
data/bin/ldiff DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'ldiff' 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("diff-lcs", "ldiff")