git-multirepo 1.0.0.beta27 → 1.0.0.beta29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +38 -38
  3. data/.rspec +2 -2
  4. data/Gemfile +4 -4
  5. data/Gemfile.lock +38 -38
  6. data/LICENSE +22 -22
  7. data/README.md +141 -141
  8. data/Rakefile +2 -2
  9. data/bin/multi +10 -10
  10. data/git-multirepo.gemspec +29 -29
  11. data/lib/commands.rb +11 -11
  12. data/lib/git-multirepo.rb +1 -3
  13. data/lib/info.rb +4 -4
  14. data/lib/multirepo/commands/add-command.rb +50 -51
  15. data/lib/multirepo/commands/branch-command.rb +59 -59
  16. data/lib/multirepo/commands/checkout-command.rb +139 -119
  17. data/lib/multirepo/commands/clone-command.rb +69 -69
  18. data/lib/multirepo/commands/command.rb +62 -62
  19. data/lib/multirepo/commands/fetch-command.rb +23 -23
  20. data/lib/multirepo/commands/init-command.rb +94 -51
  21. data/lib/multirepo/commands/install-command.rb +104 -87
  22. data/lib/multirepo/commands/open-command.rb +25 -25
  23. data/lib/multirepo/commands/remove-command.rb +48 -48
  24. data/lib/multirepo/commands/uninit-command.rb +19 -19
  25. data/lib/multirepo/commands/update-command.rb +53 -47
  26. data/lib/multirepo/config.rb +15 -15
  27. data/lib/multirepo/files/config-entry.rb +34 -34
  28. data/lib/multirepo/files/config-file.rb +33 -37
  29. data/lib/multirepo/files/lock-entry.rb +25 -25
  30. data/lib/multirepo/files/lock-file.rb +44 -39
  31. data/lib/multirepo/git/branch.rb +27 -27
  32. data/lib/multirepo/git/change.rb +10 -10
  33. data/lib/multirepo/git/commit.rb +18 -0
  34. data/lib/multirepo/git/git.rb +42 -42
  35. data/lib/multirepo/git/remote.rb +15 -15
  36. data/lib/multirepo/git/repo.rb +71 -66
  37. data/lib/multirepo/hooks/pre-commit-hook.rb +29 -25
  38. data/lib/multirepo/multirepo-exception.rb +5 -5
  39. data/lib/multirepo/utility/console.rb +51 -51
  40. data/lib/multirepo/utility/runner.rb +32 -32
  41. data/lib/multirepo/utility/utils.rb +66 -54
  42. data/resources/.gitconfig +3 -0
  43. data/resources/pre-commit +5 -5
  44. data/spec/integration/init_spec.rb +18 -22
  45. data/spec/spec_helper.rb +89 -89
  46. metadata +5 -7
  47. data/lib/multirepo/hooks/post-merge-hook.rb +0 -20
  48. data/lib/multirepo/hooks/prepare-commit-msg-hook.rb +0 -28
  49. data/resources/post-merge +0 -6
  50. data/resources/prepare-commit-msg +0 -6
@@ -0,0 +1,3 @@
1
+ [merge "ours"]
2
+ name = "Always keep ours"
3
+ driver = true
data/resources/pre-commit CHANGED
@@ -1,6 +1,6 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "rubygems"
4
- require "git-multirepo"
5
-
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems"
4
+ require "git-multirepo"
5
+
6
6
  MultiRepo::PreCommitHook.run
@@ -1,23 +1,19 @@
1
- require "multirepo/commands/init"
2
-
3
- RSpec.describe("Init") do
4
- it "creates the config file" do
5
- pending
6
- end
7
-
8
- it "adds only specified repos to the config file" do
9
- pending
10
- end
11
-
12
- it "stages the config file" do
13
- pending
14
- end
15
-
16
- it "installs the hooks" do
17
- pending
18
- end
19
-
20
- it "fails when there are uncommitted changes in dependencies" do
21
- pending
22
- end
1
+ require "multirepo/commands/init"
2
+
3
+ RSpec.describe("Init") do
4
+ it "creates the config file" do
5
+ pending
6
+ end
7
+
8
+ it "adds only specified repos to the config file" do
9
+ pending
10
+ end
11
+
12
+ it "installs the hooks" do
13
+ pending
14
+ end
15
+
16
+ it "fails when there are uncommitted changes in dependencies" do
17
+ pending
18
+ end
23
19
  end
data/spec/spec_helper.rb CHANGED
@@ -1,89 +1,89 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
5
- #
6
- # Given that it is always loaded, you are encouraged to keep this file as
7
- # light-weight as possible. Requiring heavyweight dependencies from this file
8
- # will add to the boot time of your test suite on EVERY test run, even for an
9
- # individual file that may not need all of that loaded. Instead, consider making
10
- # a separate helper file that requires the additional dependencies and performs
11
- # the additional setup, and require it from the spec files that actually need it.
12
- #
13
- # The `.rspec` file also contains a few flags that are not defaults but that
14
- # users commonly want.
15
- #
16
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
- RSpec.configure do |config|
18
- # rspec-expectations config goes here. You can use an alternate
19
- # assertion/expectation library such as wrong or the stdlib/minitest
20
- # assertions if you prefer.
21
- config.expect_with :rspec do |expectations|
22
- # This option will default to `true` in RSpec 4. It makes the `description`
23
- # and `failure_message` of custom matchers include text for helper methods
24
- # defined using `chain`, e.g.:
25
- # be_bigger_than(2).and_smaller_than(4).description
26
- # # => "be bigger than 2 and smaller than 4"
27
- # ...rather than:
28
- # # => "be bigger than 2"
29
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
- end
31
-
32
- # rspec-mocks config goes here. You can use an alternate test double
33
- # library (such as bogus or mocha) by changing the `mock_with` option here.
34
- config.mock_with :rspec do |mocks|
35
- # Prevents you from mocking or stubbing a method that does not exist on
36
- # a real object. This is generally recommended, and will default to
37
- # `true` in RSpec 4.
38
- mocks.verify_partial_doubles = true
39
- end
40
-
41
- # The settings below are suggested to provide a good initial experience
42
- # with RSpec, but feel free to customize to your heart's content.
43
- =begin
44
- # These two settings work together to allow you to limit a spec run
45
- # to individual examples or groups you care about by tagging them with
46
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
47
- # get run.
48
- config.filter_run :focus
49
- config.run_all_when_everything_filtered = true
50
-
51
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
- # For more details, see:
53
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
56
- config.disable_monkey_patching!
57
-
58
- # This setting enables warnings. It's recommended, but in some cases may
59
- # be too noisy due to issues in dependencies.
60
- config.warnings = true
61
-
62
- # Many RSpec users commonly either run the entire suite or an individual
63
- # file, and it's useful to allow more verbose output when running an
64
- # individual spec file.
65
- if config.files_to_run.one?
66
- # Use the documentation formatter for detailed output,
67
- # unless a formatter has already been configured
68
- # (e.g. via a command-line flag).
69
- config.default_formatter = 'doc'
70
- end
71
-
72
- # Print the 10 slowest examples and example groups at the
73
- # end of the spec run, to help surface which specs are running
74
- # particularly slow.
75
- config.profile_examples = 10
76
-
77
- # Run specs in random order to surface order dependencies. If you find an
78
- # order dependency and want to debug it, you can fix the order by providing
79
- # the seed, which is printed after each run.
80
- # --seed 1234
81
- config.order = :random
82
-
83
- # Seed global randomization in this process using the `--seed` CLI option.
84
- # Setting this allows you to use `--seed` to deterministically reproduce
85
- # test failures related to randomization by passing the same `--seed` value
86
- # as the one that triggered the failure.
87
- Kernel.srand config.seed
88
- =end
89
- end
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # rspec-expectations config goes here. You can use an alternate
19
+ # assertion/expectation library such as wrong or the stdlib/minitest
20
+ # assertions if you prefer.
21
+ config.expect_with :rspec do |expectations|
22
+ # This option will default to `true` in RSpec 4. It makes the `description`
23
+ # and `failure_message` of custom matchers include text for helper methods
24
+ # defined using `chain`, e.g.:
25
+ # be_bigger_than(2).and_smaller_than(4).description
26
+ # # => "be bigger than 2 and smaller than 4"
27
+ # ...rather than:
28
+ # # => "be bigger than 2"
29
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
+ end
31
+
32
+ # rspec-mocks config goes here. You can use an alternate test double
33
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
34
+ config.mock_with :rspec do |mocks|
35
+ # Prevents you from mocking or stubbing a method that does not exist on
36
+ # a real object. This is generally recommended, and will default to
37
+ # `true` in RSpec 4.
38
+ mocks.verify_partial_doubles = true
39
+ end
40
+
41
+ # The settings below are suggested to provide a good initial experience
42
+ # with RSpec, but feel free to customize to your heart's content.
43
+ =begin
44
+ # These two settings work together to allow you to limit a spec run
45
+ # to individual examples or groups you care about by tagging them with
46
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
47
+ # get run.
48
+ config.filter_run :focus
49
+ config.run_all_when_everything_filtered = true
50
+
51
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
+ # For more details, see:
53
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
56
+ config.disable_monkey_patching!
57
+
58
+ # This setting enables warnings. It's recommended, but in some cases may
59
+ # be too noisy due to issues in dependencies.
60
+ config.warnings = true
61
+
62
+ # Many RSpec users commonly either run the entire suite or an individual
63
+ # file, and it's useful to allow more verbose output when running an
64
+ # individual spec file.
65
+ if config.files_to_run.one?
66
+ # Use the documentation formatter for detailed output,
67
+ # unless a formatter has already been configured
68
+ # (e.g. via a command-line flag).
69
+ config.default_formatter = 'doc'
70
+ end
71
+
72
+ # Print the 10 slowest examples and example groups at the
73
+ # end of the spec run, to help surface which specs are running
74
+ # particularly slow.
75
+ config.profile_examples = 10
76
+
77
+ # Run specs in random order to surface order dependencies. If you find an
78
+ # order dependency and want to debug it, you can fix the order by providing
79
+ # the seed, which is printed after each run.
80
+ # --seed 1234
81
+ config.order = :random
82
+
83
+ # Seed global randomization in this process using the `--seed` CLI option.
84
+ # Setting this allows you to use `--seed` to deterministically reproduce
85
+ # test failures related to randomization by passing the same `--seed` value
86
+ # as the one that triggered the failure.
87
+ Kernel.srand config.seed
88
+ =end
89
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-multirepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta27
4
+ version: 1.0.0.beta29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Fortin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,19 +142,17 @@ files:
142
142
  - lib/multirepo/files/lock-file.rb
143
143
  - lib/multirepo/git/branch.rb
144
144
  - lib/multirepo/git/change.rb
145
+ - lib/multirepo/git/commit.rb
145
146
  - lib/multirepo/git/git.rb
146
147
  - lib/multirepo/git/remote.rb
147
148
  - lib/multirepo/git/repo.rb
148
- - lib/multirepo/hooks/post-merge-hook.rb
149
149
  - lib/multirepo/hooks/pre-commit-hook.rb
150
- - lib/multirepo/hooks/prepare-commit-msg-hook.rb
151
150
  - lib/multirepo/multirepo-exception.rb
152
151
  - lib/multirepo/utility/console.rb
153
152
  - lib/multirepo/utility/runner.rb
154
153
  - lib/multirepo/utility/utils.rb
155
- - resources/post-merge
154
+ - resources/.gitconfig
156
155
  - resources/pre-commit
157
- - resources/prepare-commit-msg
158
156
  - spec/integration/init_spec.rb
159
157
  - spec/spec_helper.rb
160
158
  homepage: https://github.com/fortinmike/git-multirepo
@@ -177,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
175
  version: 1.3.1
178
176
  requirements: []
179
177
  rubyforge_project:
180
- rubygems_version: 2.0.14
178
+ rubygems_version: 2.4.5
181
179
  signing_key:
182
180
  specification_version: 4
183
181
  summary: Track multiple Git repositories side-by-side
@@ -1,20 +0,0 @@
1
- require "multirepo/files/lock-file"
2
- require "multirepo/utility/console"
3
-
4
- module MultiRepo
5
- class PostMergeHook
6
- def self.run
7
- Config.instance.running_git_hook = true
8
-
9
- Console.log_step("Performing post-merge operations...")
10
-
11
- LockFile.update
12
- Console.log_info("Updated the lock file with current HEAD revisions for all dependencies")
13
-
14
- LockFile.commit("Automatic post-merge multirepo lock file update")
15
- Console.log_info("Committed the updated lock file")
16
-
17
- exit 0 # Success!
18
- end
19
- end
20
- end
@@ -1,28 +0,0 @@
1
- require "multirepo/files/config-file"
2
- require "multirepo/files/lock-file"
3
- require "multirepo/utility/utils"
4
- require "multirepo/utility/console"
5
-
6
- module MultiRepo
7
- class PrepareCommitMsgHook
8
- def self.run(argv)
9
- Config.instance.running_git_hook = true
10
-
11
- pre_merge if argv[1] == "merge"
12
-
13
- exit 0 # Success!
14
- end
15
-
16
- def self.pre_merge
17
- Console.log_step("Performing pre-merge operations...")
18
- ensure_dependencies_clean
19
- end
20
-
21
- def self.ensure_dependencies_clean
22
- unless Utils.ensure_dependencies_clean(ConfigFile.load)
23
- Console.log_error("You must commit changes to your dependencies before you can commit this repo")
24
- exit 1
25
- end
26
- end
27
- end
28
- end
data/resources/post-merge DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "rubygems"
4
- require "git-multirepo"
5
-
6
- MultiRepo::PostMergeHook.run
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "rubygems"
4
- require "git-multirepo"
5
-
6
- MultiRepo::PrepareCommitMsgHook.run(ARGV)