braid 1.1.4 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/exe/braid +11 -0
  3. data/lib/braid/check_gem.rb +58 -0
  4. data/lib/braid/command.rb +13 -0
  5. data/lib/braid/commands/diff.rb +1 -1
  6. data/lib/braid/config.rb +28 -4
  7. data/{bin/braid → lib/braid/main.rb} +1 -16
  8. data/lib/braid/mirror.rb +110 -23
  9. data/lib/braid/operations.rb +9 -6
  10. data/lib/braid/operations_lite.rb +19 -1
  11. data/lib/braid/sorbet/fake_runtime.rb +68 -0
  12. data/lib/braid/sorbet/setup.rb +18 -0
  13. data/lib/braid/version.rb +1 -1
  14. data/lib/braid.rb +21 -0
  15. metadata +12 -75
  16. data/.gitignore +0 -16
  17. data/.travis.yml +0 -15
  18. data/CONTRIBUTING.md +0 -24
  19. data/Gemfile +0 -3
  20. data/README.md +0 -234
  21. data/Rakefile +0 -12
  22. data/_config.yml +0 -1
  23. data/braid.gemspec +0 -35
  24. data/braids-json.schema.json +0 -91
  25. data/config_versions.md +0 -58
  26. data/spec/config_spec.rb +0 -59
  27. data/spec/fixtures/shiny/README +0 -3
  28. data/spec/fixtures/shiny/other-skit/layout.liquid +0 -219
  29. data/spec/fixtures/shiny/skit-layout.liquid.test +0 -2
  30. data/spec/fixtures/shiny/skit1.test +0 -2
  31. data/spec/fixtures/shiny-conf-1.0.9-lock/.braids.json +0 -10
  32. data/spec/fixtures/shiny-conf-1.0.9-lock/expected.braids.json +0 -9
  33. data/spec/fixtures/shiny-conf-1.0.9-lock/skit1/layouts/layout.liquid +0 -219
  34. data/spec/fixtures/shiny-conf-1.0.9-lock/skit1/preview.png +0 -0
  35. data/spec/fixtures/shiny-conf-breaking-changes/.braids +0 -14
  36. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/README.md +0 -9
  37. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/index.html +0 -20
  38. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/styles.css +0 -17
  39. data/spec/fixtures/shiny-conf-breaking-changes/expected.braids.json +0 -10
  40. data/spec/fixtures/shiny-conf-breaking-changes/skit1/layouts/layout.liquid +0 -219
  41. data/spec/fixtures/shiny-conf-breaking-changes/skit1/preview.png +0 -0
  42. data/spec/fixtures/shiny-conf-future/.braids.json +0 -10
  43. data/spec/fixtures/shiny-conf-future/skit1/layouts/layout.liquid +0 -219
  44. data/spec/fixtures/shiny-conf-future/skit1/preview.png +0 -0
  45. data/spec/fixtures/shiny-conf-json-old-name/.braids +0 -9
  46. data/spec/fixtures/shiny-conf-json-old-name/expected.braids.json +0 -10
  47. data/spec/fixtures/shiny-conf-json-old-name/skit1/layouts/layout.liquid +0 -219
  48. data/spec/fixtures/shiny-conf-json-old-name/skit1/preview.png +0 -0
  49. data/spec/fixtures/shiny-conf-yaml/.braids +0 -8
  50. data/spec/fixtures/shiny-conf-yaml/expected.braids.json +0 -10
  51. data/spec/fixtures/shiny-conf-yaml/skit1/layouts/layout.liquid +0 -219
  52. data/spec/fixtures/shiny-conf-yaml/skit1/preview.png +0 -0
  53. data/spec/fixtures/shiny_skit1.2_merged/layouts/layout.liquid +0 -223
  54. data/spec/fixtures/shiny_skit1.2_merged/preview.png +0 -0
  55. data/spec/fixtures/shiny_skit1_conflicting/layouts/layout.liquid +0 -221
  56. data/spec/fixtures/shiny_skit1_conflicting/preview.png +0 -0
  57. data/spec/fixtures/shiny_skit1_mergeable/layouts/layout.liquid +0 -221
  58. data/spec/fixtures/shiny_skit1_mergeable/preview.png +0 -0
  59. data/spec/fixtures/skit1/layouts/layout.liquid +0 -219
  60. data/spec/fixtures/skit1/preview.png +0 -0
  61. data/spec/fixtures/skit1.1/layouts/layout.liquid +0 -219
  62. data/spec/fixtures/skit1.1_with_filter/.gitattributes +0 -1
  63. data/spec/fixtures/skit1.1_with_filter/layouts/layout.liquid +0 -219
  64. data/spec/fixtures/skit1.1_with_filter/preview.png +0 -0
  65. data/spec/fixtures/skit1.1x/layouts/layout.liquid +0 -219
  66. data/spec/fixtures/skit1.2/layouts/layout.liquid +0 -221
  67. data/spec/fixtures/skit1.3/layouts/README.md +0 -1
  68. data/spec/fixtures/skit1.3/layouts/layout.liquid +0 -221
  69. data/spec/fixtures/skit1_with_filter/.gitattributes +0 -1
  70. data/spec/fixtures/skit1_with_filter/layouts/layout.liquid +0 -219
  71. data/spec/fixtures/skit1_with_filter/preview.png +0 -0
  72. data/spec/integration/adding_spec.rb +0 -230
  73. data/spec/integration/config_versioning_spec.rb +0 -222
  74. data/spec/integration/diff_spec.rb +0 -597
  75. data/spec/integration/integration_helper.rb +0 -126
  76. data/spec/integration/push_spec.rb +0 -402
  77. data/spec/integration/remove_spec.rb +0 -81
  78. data/spec/integration/status_spec.rb +0 -165
  79. data/spec/integration/updating_spec.rb +0 -487
  80. data/spec/mirror_spec.rb +0 -119
  81. data/spec/operations_spec.rb +0 -66
  82. data/spec/test_helper.rb +0 -19
@@ -0,0 +1,68 @@
1
+ # typed: ignore
2
+
3
+ # This file contains a fake implementation of the subset of `sorbet-runtime`
4
+ # used by Braid that performs no runtime checks. See the "Type checking"
5
+ # section of development.md for background.
6
+
7
+ require 'singleton'
8
+
9
+ # Create our fake module at `Braid::T` so that if someone loads Braid into the
10
+ # same Ruby interpreter as other code that needs the real sorbet-runtime, we
11
+ # don't break the other code. (We don't officially support loading Braid as a
12
+ # library, but we may as well go ahead and put this infrastructure in place.)
13
+ # Code in the `Braid` module still uses normal references to `T`, so the Sorbet
14
+ # static analyzer (which doesn't read this file) doesn't see anything out of the
15
+ # ordinary, but those references resolve to `Braid::T` at runtime according to
16
+ # Ruby's constant lookup rules.
17
+ module Braid
18
+ module T
19
+
20
+ module Sig
21
+ def sig; end
22
+ end
23
+ def self.let(value, type)
24
+ value
25
+ end
26
+
27
+ # NOTICE: Like everything else in the fake Sorbet runtime (e.g., `sig`),
28
+ # these do not actually perform runtime checks. Currently, if you want a
29
+ # runtime check, you have to implement it yourself. We considered defining
30
+ # wrapper functions with different names to make this clearer, but then we'd
31
+ # lose the extra static checks that Sorbet performs on direct calls to
32
+ # `T.cast` and `T.must`.
33
+ def self.cast(value, type)
34
+ value
35
+ end
36
+ def self.must(value)
37
+ value
38
+ end
39
+
40
+ class FakeType
41
+ include Singleton
42
+ end
43
+ FAKE_TYPE = FakeType.instance
44
+
45
+ def self.type_alias
46
+ FAKE_TYPE
47
+ end
48
+
49
+ def self.nilable(type)
50
+ FAKE_TYPE
51
+ end
52
+ def self.untyped
53
+ FAKE_TYPE
54
+ end
55
+ Boolean = FAKE_TYPE
56
+ module Array
57
+ def self.[](type)
58
+ FAKE_TYPE
59
+ end
60
+ end
61
+ module Hash
62
+ def self.[](key_type, value_type)
63
+ FAKE_TYPE
64
+ end
65
+ end
66
+
67
+ end
68
+ end
@@ -0,0 +1,18 @@
1
+ # typed: strict
2
+
3
+ # Code to set up the Sorbet runtime and Sorbet-related utilities used throughout
4
+ # the Braid code. Called by `lib/braid.rb` and `lib/braid/operations_lite.rb`
5
+ # before any other Braid code is loaded.
6
+
7
+ env_use_sorbet_runtime = ENV['BRAID_USE_SORBET_RUNTIME']
8
+ if env_use_sorbet_runtime == '1'
9
+ require 'sorbet-runtime'
10
+ elsif [nil, '0'].include?(env_use_sorbet_runtime)
11
+ require 'braid/sorbet/fake_runtime'
12
+ else
13
+ puts <<-MSG
14
+ Braid: Error: BRAID_USE_SORBET_RUNTIME environment variable has invalid
15
+ value #{env_use_sorbet_runtime.inspect}; it must be "1", "0", or unset.
16
+ MSG
17
+ exit(1)
18
+ end
data/lib/braid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Braid
2
- VERSION = '1.1.4'.freeze
2
+ VERSION = '1.1.7'.freeze
3
3
  end
data/lib/braid.rb CHANGED
@@ -1,6 +1,11 @@
1
+ # typed: strict
2
+
3
+ require 'braid/sorbet/setup'
1
4
  require 'braid/version'
2
5
 
3
6
  module Braid
7
+ extend T::Sig
8
+
4
9
  OLD_CONFIG_FILE = '.braids'
5
10
  CONFIG_FILE = '.braids.json'
6
11
 
@@ -16,31 +21,46 @@ module Braid
16
21
  # distributions.
17
22
  REQUIRED_GIT_VERSION = '2.3.0'
18
23
 
24
+ @verbose = T.let(false, T::Boolean)
25
+
26
+ sig {returns(T::Boolean)}
19
27
  def self.verbose
20
28
  !!@verbose
21
29
  end
22
30
 
31
+ # TODO (typing): One would think `new_value` shouldn't be nilable, but
32
+ # apparently `lib/braid/main.rb` passes nil sometimes. Is that easy to fix?
33
+ # (Ditto with `self.force=` below.)
34
+ sig {params(new_value: T.nilable(T::Boolean)).void}
23
35
  def self.verbose=(new_value)
24
36
  @verbose = !!new_value
25
37
  end
26
38
 
39
+ @force = T.let(false, T::Boolean)
40
+
41
+ sig {returns(T::Boolean)}
27
42
  def self.force
28
43
  !!@force
29
44
  end
30
45
 
46
+ sig {params(new_value: T.nilable(T::Boolean)).void}
31
47
  def self.force=(new_value)
32
48
  @force = !!new_value
33
49
  end
34
50
 
51
+ sig {returns(T::Boolean)}
35
52
  def self.use_local_cache
36
53
  [nil, 'true', '1'].include?(ENV['BRAID_USE_LOCAL_CACHE'])
37
54
  end
38
55
 
56
+ sig {returns(String)}
39
57
  def self.local_cache_dir
40
58
  File.expand_path(ENV['BRAID_LOCAL_CACHE_DIR'] || "#{ENV['HOME']}/.braid/cache")
41
59
  end
42
60
 
43
61
  class BraidError < StandardError
62
+ extend T::Sig
63
+ sig {returns(String)}
44
64
  def message
45
65
  value = super
46
66
  value if value != self.class.name
@@ -48,6 +68,7 @@ module Braid
48
68
  end
49
69
 
50
70
  class InternalError < BraidError
71
+ sig {returns(String)}
51
72
  def message
52
73
  "internal error: #{super}"
53
74
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristi Balan
8
8
  - Norbert Crombach
9
9
  - Peter Donald
10
10
  - Matt McCutchen
11
- autorequire:
12
- bindir: bin
11
+ autorequire:
12
+ bindir: exe
13
13
  cert_chain: []
14
- date: 2022-01-24 00:00:00.000000000 Z
14
+ date: 2022-06-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: main
@@ -104,19 +104,10 @@ executables:
104
104
  extensions: []
105
105
  extra_rdoc_files: []
106
106
  files:
107
- - ".gitignore"
108
- - ".travis.yml"
109
- - CONTRIBUTING.md
110
- - Gemfile
111
107
  - LICENSE
112
- - README.md
113
- - Rakefile
114
- - _config.yml
115
- - bin/braid
116
- - braid.gemspec
117
- - braids-json.schema.json
118
- - config_versions.md
108
+ - exe/braid
119
109
  - lib/braid.rb
110
+ - lib/braid/check_gem.rb
120
111
  - lib/braid/command.rb
121
112
  - lib/braid/commands/add.rb
122
113
  - lib/braid/commands/diff.rb
@@ -127,71 +118,17 @@ files:
127
118
  - lib/braid/commands/update.rb
128
119
  - lib/braid/commands/upgrade_config.rb
129
120
  - lib/braid/config.rb
121
+ - lib/braid/main.rb
130
122
  - lib/braid/mirror.rb
131
123
  - lib/braid/operations.rb
132
124
  - lib/braid/operations_lite.rb
125
+ - lib/braid/sorbet/fake_runtime.rb
126
+ - lib/braid/sorbet/setup.rb
133
127
  - lib/braid/version.rb
134
- - spec/config_spec.rb
135
- - spec/fixtures/shiny-conf-1.0.9-lock/.braids.json
136
- - spec/fixtures/shiny-conf-1.0.9-lock/expected.braids.json
137
- - spec/fixtures/shiny-conf-1.0.9-lock/skit1/layouts/layout.liquid
138
- - spec/fixtures/shiny-conf-1.0.9-lock/skit1/preview.png
139
- - spec/fixtures/shiny-conf-breaking-changes/.braids
140
- - spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/README.md
141
- - spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/index.html
142
- - spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/styles.css
143
- - spec/fixtures/shiny-conf-breaking-changes/expected.braids.json
144
- - spec/fixtures/shiny-conf-breaking-changes/skit1/layouts/layout.liquid
145
- - spec/fixtures/shiny-conf-breaking-changes/skit1/preview.png
146
- - spec/fixtures/shiny-conf-future/.braids.json
147
- - spec/fixtures/shiny-conf-future/skit1/layouts/layout.liquid
148
- - spec/fixtures/shiny-conf-future/skit1/preview.png
149
- - spec/fixtures/shiny-conf-json-old-name/.braids
150
- - spec/fixtures/shiny-conf-json-old-name/expected.braids.json
151
- - spec/fixtures/shiny-conf-json-old-name/skit1/layouts/layout.liquid
152
- - spec/fixtures/shiny-conf-json-old-name/skit1/preview.png
153
- - spec/fixtures/shiny-conf-yaml/.braids
154
- - spec/fixtures/shiny-conf-yaml/expected.braids.json
155
- - spec/fixtures/shiny-conf-yaml/skit1/layouts/layout.liquid
156
- - spec/fixtures/shiny-conf-yaml/skit1/preview.png
157
- - spec/fixtures/shiny/README
158
- - spec/fixtures/shiny/other-skit/layout.liquid
159
- - spec/fixtures/shiny/skit-layout.liquid.test
160
- - spec/fixtures/shiny/skit1.test
161
- - spec/fixtures/shiny_skit1.2_merged/layouts/layout.liquid
162
- - spec/fixtures/shiny_skit1.2_merged/preview.png
163
- - spec/fixtures/shiny_skit1_conflicting/layouts/layout.liquid
164
- - spec/fixtures/shiny_skit1_conflicting/preview.png
165
- - spec/fixtures/shiny_skit1_mergeable/layouts/layout.liquid
166
- - spec/fixtures/shiny_skit1_mergeable/preview.png
167
- - spec/fixtures/skit1.1/layouts/layout.liquid
168
- - spec/fixtures/skit1.1_with_filter/.gitattributes
169
- - spec/fixtures/skit1.1_with_filter/layouts/layout.liquid
170
- - spec/fixtures/skit1.1_with_filter/preview.png
171
- - spec/fixtures/skit1.1x/layouts/layout.liquid
172
- - spec/fixtures/skit1.2/layouts/layout.liquid
173
- - spec/fixtures/skit1.3/layouts/README.md
174
- - spec/fixtures/skit1.3/layouts/layout.liquid
175
- - spec/fixtures/skit1/layouts/layout.liquid
176
- - spec/fixtures/skit1/preview.png
177
- - spec/fixtures/skit1_with_filter/.gitattributes
178
- - spec/fixtures/skit1_with_filter/layouts/layout.liquid
179
- - spec/fixtures/skit1_with_filter/preview.png
180
- - spec/integration/adding_spec.rb
181
- - spec/integration/config_versioning_spec.rb
182
- - spec/integration/diff_spec.rb
183
- - spec/integration/integration_helper.rb
184
- - spec/integration/push_spec.rb
185
- - spec/integration/remove_spec.rb
186
- - spec/integration/status_spec.rb
187
- - spec/integration/updating_spec.rb
188
- - spec/mirror_spec.rb
189
- - spec/operations_spec.rb
190
- - spec/test_helper.rb
191
128
  homepage: https://github.com/cristibalan/braid
192
129
  licenses: []
193
130
  metadata: {}
194
- post_install_message:
131
+ post_install_message:
195
132
  rdoc_options:
196
133
  - "--line-numbers"
197
134
  - "--inline-source"
@@ -211,8 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
148
  - !ruby/object:Gem::Version
212
149
  version: '0'
213
150
  requirements: []
214
- rubygems_version: 3.1.4
215
- signing_key:
151
+ rubygems_version: 3.2.33
152
+ signing_key:
216
153
  specification_version: 4
217
154
  summary: A simple tool for tracking vendor branches in git.
218
155
  test_files: []
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- *.gem
2
- *.rbc
3
- *.sw?
4
- .DS_Store
5
- .bundle
6
- .idea
7
- coverage
8
- nbproject
9
- pkg
10
- pkg/*
11
- rdoc
12
- /*.iml
13
- /*.ipr
14
- /*.iws
15
- /.rakeTasks
16
- /Gemfile.lock
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.8
4
- - 2.4.6
5
- - 2.5.5
6
- - 2.6.2
7
- - jruby-9.2.6.0
8
- addons:
9
- apt:
10
- sources:
11
- - git-core
12
- packages:
13
- - git
14
- git:
15
- depth: 10
data/CONTRIBUTING.md DELETED
@@ -1,24 +0,0 @@
1
- # How to Contribute
2
-
3
- Pull requests are greatly appreciated and are what makes opensource great. Here's a quick guide:
4
-
5
- * Fork it
6
- * Create your feature branch (`git checkout -b my-new-feature`)
7
- * Commit your changes (`git commit -am 'Add some feature'`)
8
- * Push to the branch (`git push origin my-new-feature`)
9
- * Create new Pull Request
10
-
11
- Pester us if we don't get your Pull Requests merged in a timely fashion. :)
12
-
13
- ## How to speed the merging of pull requests
14
-
15
- * Make commits of logical units.
16
- * Ensure your commit messages help others understand what you are doing and why.
17
- * Check for unnecessary whitespace with `git diff --check` before committing.
18
- * Maintain the same code style.
19
- * Maintain the same level of test coverage or improve it.
20
-
21
- ## Additional Resources
22
-
23
- * [General GitHub documentation](http://help.github.com/)
24
- * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/README.md DELETED
@@ -1,234 +0,0 @@
1
- # Braid
2
-
3
- [![Build Status](https://secure.travis-ci.org/cristibalan/braid.svg?branch=master)](http://travis-ci.org/cristibalan/braid)
4
- [![Gem](https://img.shields.io/gem/v/braid.svg?maxAge=2592000)](https://rubygems.org/gems/braid)
5
-
6
- Braid is a simple tool to help track vendor branches in a
7
- [Git](http://git-scm.com/) repository.
8
-
9
- ## Motivation
10
-
11
- Vendoring allows you take the source code of an external library and ensure it's
12
- version controlled along with the main project. This is in contrast to including
13
- a reference to a packaged version of an external library that is available in a
14
- binary artifact repository such as Maven Central, RubyGems or NPM.
15
-
16
- Vendoring is useful when you need to patch or customize the external libraries
17
- or the external library is expected to co-evolve with the main project. The
18
- developer can make changes to the main project and patch the library in a single
19
- commit.
20
-
21
- The problem arises when the external library makes changes that you want to
22
- integrate into your local vendored version or the developer makes changes to the
23
- local version that they want integrated into the external library.
24
-
25
- A typical "implementation" of vendoring is to simply download or checkout the
26
- source for the external library, remove the `.git` or `.svn` directories and
27
- commit it to the main source tree. However this approach makes it very difficult
28
- to update the library. When you want to update the library do you re-apply your
29
- local changes onto a new copy of the vendored library or do you re-apply the
30
- changes from the external library to local version? Both cases involve manual
31
- generation and application of patch files to source trees.
32
-
33
- This is where Braid comes into play. Braid makes it easy to vendor in remote git
34
- repositories and use an automated mechanism for updating the external library
35
- and generating patches to upgrade the external library.
36
-
37
- Braid creates a file `.braids.json` in the root of your repository that contains
38
- references to external libraries or mirrors. The configuration allows you to control
39
- aspects of the mirroring process such as;
40
-
41
- * whether the mirror is locked to a particular version of the external library.
42
- * whether the mirror is tracking a tag or a branch.
43
- * whether the mirror includes the entire external library or just a subdirectory.
44
-
45
- ## Installation
46
-
47
- gem install braid
48
-
49
- ## Quick usage - ruby project
50
-
51
- Let's assume we're writing the project `myproject` that needs grit in lib/grit. Initialize the repo (nothing braid related here):
52
-
53
- git init myproject
54
- cd myproject
55
- touch README
56
- git add README
57
- git commit -m "initial commit"
58
-
59
- Now let's vendor grit:
60
-
61
- braid add git://github.com/mojombo/grit.git lib/grit
62
-
63
- And you're done! Braid vendored grit into lib/grit. Feel free to inspect the changes with git log or git show.
64
-
65
- If further down the line, you want to bring new changes from grit into your repository, just update the mirror:
66
-
67
- braid update lib/grit
68
-
69
- If you make changes to the grit library and want to generate a patch file so that you can submit the patch file
70
- to the grit project:
71
-
72
- braid diff lib/grit > grit.patch
73
-
74
- Alternatively you can push changes back to the source directory directly using the following command. The command
75
- will push the changes to the branch `myproject_customizations` that has been branched off the source branch (`master`
76
- in this example). Omit the `--branch` argument to push directly to the source branch.
77
-
78
- braid push lib/grit --branch myproject_customizations
79
-
80
- Once those changes have been applied to grit you probably want to update your local version of grit again.
81
-
82
- braid update lib/grit
83
-
84
- ## More usage
85
-
86
- Use the built in help system to find out about all commands and options:
87
-
88
- braid help
89
- braid help add # or braid add --help
90
-
91
- ### Examples
92
-
93
- #### Adding a mirror
94
-
95
- braid add git://github.com/rails/rails.git vendor/rails
96
-
97
- #### Adding a subdirectory from a mirror
98
-
99
- This is useful if you want to add a subdirectory from a mirror into your own project.
100
-
101
- braid add --path dist https://github.com/twbs/bootstrap.git vendor/assets/bootstrap
102
-
103
- #### Adding a mirror based on a branch
104
-
105
- braid add --branch 5-0-stable https://github.com/rails/rails.git vendor/rails
106
-
107
- #### Adding a mirror based on a tag
108
-
109
- braid add --tag v1.0 https://github.com/realityforge/backpack.git vendor/tools/backpack
110
-
111
- #### Adding mirror locked to a revision
112
-
113
- braid add --revision bf1b1e0 git://github.com/rails/rails.git vendor/rails
114
-
115
- #### Updating mirrors
116
-
117
- # Update a specific mirror
118
- braid update vendor/plugins/cache_fu
119
- # Update all mirrors
120
- braid update
121
-
122
- #### Updating mirrors with conflicts
123
-
124
- If a braid update creates a conflict, braid will stop execution and leave the partially committed
125
- files in your working copy, just like a normal git merge conflict would.
126
-
127
- You will then have to resolve all conflicts and manually run `git commit`. The commit message is
128
- already prepared.
129
-
130
- If you want to cancel the braid update and the merge, you'll have to reset your working copy and
131
- index with `git reset --hard`.
132
-
133
- #### Locking and unlocking mirrors
134
-
135
- Lock to a particular version in the mirror.
136
-
137
- braid update --revision 6c1c16b vendor/rails
138
-
139
- Go back to tracking a particular branch.
140
-
141
- braid update --branch master vendor/rails
142
-
143
- #### Showing local changes made to mirrors
144
-
145
- braid diff vendor/rails
146
-
147
- ## Supported environments
148
-
149
- As of this writing (2022-01-20), we try to keep Braid working at least on Linux,
150
- OSX and Windows with recent versions of its dependencies (Git, Ruby, gems, etc.).
151
- Your mileage on other operating systems or with other versions of dependencies
152
- may vary. We don't have a procedure in place to systematically test Braid in
153
- multiple environments; typically, Braid developers just run the test suite on
154
- their own systems with whatever is installed. So breakages may sometimes occur.
155
- If you run into an environment-related problem, please report it and we'll fix
156
- it if feasible. Contributions to improve testing of Braid would be welcome.
157
-
158
- ## Braid version compatibility
159
-
160
- Since Braid has been regularly changing the configuration format and adding new
161
- features that some projects may choose to rely on, and somewhat less often
162
- making breaking changes in how the configuration is handled, problems can arise
163
- if different developers work on the same project using different versions of
164
- Braid. Since version 1.1.0, Braid refuses to operate if it detects potentially
165
- problematic version skew. If this happens, Braid will tell you what you can do.
166
- If you'd like an overview of what to expect, read on.
167
-
168
- Roughly speaking, the `.braids.json` configuration file contains a configuration
169
- version number that corresponds to a range of compatible Braid minor versions
170
- (`x.y`). "Patch" upgrades to Braid (i.e., `x.y.z` -> `x.y.(z+1)`) will never
171
- (intentionally!) have configuration compatibility implications and are always
172
- recommended as they may fix critical bugs.
173
-
174
- If you use a Braid version too old for your configuration file, Braid will
175
- direct you to the [configuration version history page](config_versions.md) with
176
- instructions to upgrade Braid. If you use a Braid version too new, Braid will
177
- tell you how you can upgrade your configuration file or find a compatible older
178
- Braid version to use. (As an exception, a newer version of Braid can run
179
- read-only commands on an older configuration file without upgrading it if there
180
- are no breaking changes.) If you upgrade your configuration file, then other
181
- developers on the project may need to upgrade Braid. Braid does not support
182
- downgrading a configuration file, though you can revert the commit that upgraded
183
- it if you haven't made any subsequent changes to the configuration.
184
-
185
- If you work on multiple projects, you may need to install multiple versions of
186
- Braid and manually run the correct version for each project. Fortunately, the
187
- RubyGems system makes this reasonably straightforward.
188
-
189
- Another approach is to standardize the Braid version for a project by listing
190
- Braid in a `Gemfile` (either checking in `Gemfile.lock` or using a version
191
- constraint in the `Gemfile`) and run the project's version of Braid via
192
- [Bundler](http://bundler.io/) with `bundle exec braid`. Even non-Ruby projects
193
- can do this if it's acceptable to have a `Gemfile` and `Gemfile.lock`. Ruby
194
- projects that don't want Braid to interact with their other gems can potentially
195
- put the `Gemfile` in a subdirectory and provide a wrapper script for `bundle`
196
- that sets the `BUNDLE_GEMFILE` environment variable. We do not yet have enough
197
- experience with this approach to make a firm recommendation for or against it.
198
-
199
- This is the best design we could find to prevent surprises and adequately
200
- support normal development processes while minimizing the additional maintenance
201
- cost of the version compatibility mechanism. We want to have a scheme in place
202
- that is robust enough to make it reasonable to encourage serious adoption of
203
- Braid, yet we don't want to spend extra work adding conveniences until there's
204
- evidence of sufficient demand for them.
205
-
206
- ## Contributing
207
-
208
- We appreciate any patches, error reports and usage ideas you may have. Please
209
- submit an issue or pull request on GitHub.
210
-
211
- ### Subversion
212
-
213
- While preparing to release Braid v1.0 the support for subversion repositories was removed as
214
- there was no active maintainers and inadequate test coverage. If there is anyone motivated to
215
- re-add and maintain the Subversion support, please contact the authors.
216
-
217
- # Authors
218
-
219
- * Cristi Balan
220
- * Norbert Crombach
221
- * Peter Donald
222
- * Matt McCutchen
223
-
224
- ## Contributors (alphabetically)
225
-
226
- * Alan Harper
227
- * Brad Durrow
228
- * Christoph Sturm
229
- * Dennis Muhlestein
230
- * Ferdinand Svehla
231
- * Michael Klishin
232
- * Roman Heinrich
233
- * Travis Tilley
234
- * Tyler Rick
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
-
4
- require 'rake'
5
- require 'rspec/core/rake_task'
6
- desc 'Run all specs'
7
- RSpec::Core::RakeTask.new :spec do |task|
8
- task.rspec_opts = %w{--backtrace}
9
- end
10
-
11
- desc 'Test and package the gem'
12
- task :default => [:spec, :build]
data/_config.yml DELETED
@@ -1 +0,0 @@
1
- theme: jekyll-theme-tactile
data/braid.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
3
- require 'braid/version'
4
-
5
- Gem::Specification.new do |s|
6
- s.name = %q{braid}
7
- s.version = Braid::VERSION
8
- s.platform = Gem::Platform::RUBY
9
-
10
- s.authors = ['Cristi Balan', 'Norbert Crombach', 'Peter Donald', 'Matt McCutchen']
11
- s.email = %q{evil@che.lu norbert.crombach@primetheory.org peter@realityforge.org matt@mattmccutchen.net}
12
-
13
- s.homepage = %q{https://github.com/cristibalan/braid}
14
- s.summary = %q{A simple tool for tracking vendor branches in git.}
15
- s.description = %q{A simple tool for tracking vendor branches in git.}
16
-
17
- s.rubyforge_project = %q{braid}
18
-
19
- s.files = `git ls-files`.split("\n")
20
- s.test_files = `git ls-files -- {spec}/*`.split("\n")
21
- s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
22
- s.require_paths = %w(lib)
23
-
24
- s.rdoc_options = %w(--line-numbers --inline-source --title braid --main)
25
-
26
- s.required_ruby_version = '>= 2.2.0'
27
- s.add_dependency(%q<main>, ['>= 4.7.3'])
28
- # XXX: Minimum version?
29
- s.add_dependency(%q<json>)
30
-
31
- s.add_development_dependency(%q<rspec>, ['>= 3.4.4'])
32
- s.add_development_dependency(%q<mocha>, ['>= 0.9.11'])
33
- s.add_development_dependency(%q<rake>)
34
- s.add_development_dependency(%q<bundler>)
35
- end