git-superproject 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75cae9609ec54fe4995a92b362a638e116449cc1
4
- data.tar.gz: 4fb1400df0a73442693593c51816af85b9c68c7a
3
+ metadata.gz: a09b0b6841e89f8a79c70c9725cbe8c27d378430
4
+ data.tar.gz: 6ce5c12bb293926a99aff78ad5f30ab6e75b461e
5
5
  SHA512:
6
- metadata.gz: 36777c3684f35cc9dc5b055122396ebfdf65ac62de58e22c6dcdfb8c3722dc907c1be5aff7d1238f1bd24abf2f4d40c8f3a9b72304fb7ec15d105de4f35f18a0
7
- data.tar.gz: '08e03c351a822a72fb316af0700d8a96419685e3d863f78210e429892b5ebe3946bce199c26e17c41f9dbe9524822169bf1c07cb0e613031c595f626380f6a44'
6
+ metadata.gz: 4b75807381c1a981f5682f53c90452341898ec9cd89548de931df35f227bd0d73e9ca568d0fe6f6925852e33a9bf4b458d5e17b099f8f39177e6daeb4737491d
7
+ data.tar.gz: b1568599d2a18a884df07099ca2b7d3c124fe86fe21dd56fc580a9c716aadcc0fc4bbc5ea4cd8ce6fea7611f4d2770f923611c7dde929128e7c4840f6190ec01
data/.pryrc ADDED
@@ -0,0 +1,4 @@
1
+ # this loads all of "git-superproject"
2
+ lib = File.expand_path('lib', __dir__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'git/superproject'
data/exe/git-superproject CHANGED
@@ -34,7 +34,7 @@ when /\A--/
34
34
  "Unknown 'git superproject' command: #{command}\n\n" \
35
35
  '(use --help/-h to list all available commands)'
36
36
  end
37
- config.write_to(Git::SUPERPROJECTS_CONFIG)
37
+ config.save(Git::SUPERPROJECTS_CONFIG)
38
38
  end
39
39
  end
40
40
  when nil, '', '-h'
@@ -1,6 +1,6 @@
1
1
  module Git
2
2
  module Superproject
3
3
  NAME = 'git-superproject'.freeze
4
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.2.1'.freeze
5
5
  end
6
6
  end
@@ -54,15 +54,12 @@ module Git
54
54
  list(name)
55
55
  end
56
56
 
57
- def write_to(file)
57
+ def save(file)
58
58
  # create backup of original file
59
59
  FileUtils.mv(file, "#{file}~") if File.exist? file
60
60
 
61
61
  @superprojects.keys.each do |name|
62
- key = "superproject.#{name}.repo"
63
- list(name).each do |repo|
64
- `git config --file #{file} --add #{key} #{repo}`
65
- end
62
+ write_to(file, name)
66
63
  end
67
64
 
68
65
  # copy across all the comments from the original file
@@ -93,6 +90,13 @@ module Git
93
90
  @superprojects[name].delete(repo)
94
91
  end
95
92
 
93
+ def write_to(file, name)
94
+ key = "superproject.#{name}.repo"
95
+ list(name).each do |repo|
96
+ `git config --file #{file} --add #{key} #{repo}`
97
+ end
98
+ end
99
+
96
100
  end
97
101
 
98
102
  module Commands
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-superproject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - ".pryrc"
78
79
  - ".rubocop.yml"
79
80
  - ".ruby-version"
80
81
  - ".travis.yml"