modulesync 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/lib/modulesync.rb +1 -1
- data/lib/modulesync/cli.rb +2 -0
- data/lib/modulesync/constants.rb +0 -1
- data/lib/modulesync/git.rb +3 -2
- data/lib/modulesync/util.rb +1 -0
- data/modulesync.gemspec +1 -1
- metadata +3 -3
- data/Gemfile.lock +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38b2eb4843e2a132da91b2bde013d8d648e6c007
|
4
|
+
data.tar.gz: 3d54efb0292a807e4f2b556662025884a855c4da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cb07104d0f07b006cde792d4b73d31a23f4a1c88024887bddb6f4e5408b9d99243665f99ba4beae40037c16b63a3f735a78138a8e424f75ad822684f225f527
|
7
|
+
data.tar.gz: 3aabccaa9cd274721fdefdea44b40ccf6a3acda3cb8ad603a16d3dc366df4c5596b45f565e25719c36b6ecfb0c287911e68b44026a81d16e20b6cb7346fc3d48
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/lib/modulesync.rb
CHANGED
@@ -54,7 +54,7 @@ module ModuleSync
|
|
54
54
|
|
55
55
|
managed_modules.each do |puppet_module|
|
56
56
|
puts "Syncing #{puppet_module}"
|
57
|
-
Git.pull(options[:namespace], puppet_module)
|
57
|
+
Git.pull(options[:git_user], options[:git_provider_address], options[:namespace], puppet_module)
|
58
58
|
module_configs = Util.parse_config("#{PROJ_ROOT}/#{puppet_module}/#{MODULE_CONF_FILE}")
|
59
59
|
files_to_manage = module_files | defaults.keys | module_configs.keys
|
60
60
|
files_to_delete = []
|
data/lib/modulesync/cli.rb
CHANGED
data/lib/modulesync/constants.rb
CHANGED
data/lib/modulesync/git.rb
CHANGED
@@ -4,7 +4,7 @@ module ModuleSync
|
|
4
4
|
module Git
|
5
5
|
include Constants
|
6
6
|
|
7
|
-
def self.pull(org, name)
|
7
|
+
def self.pull(git_user, git_provider_address, org, name)
|
8
8
|
if ! Dir.exists?(PROJ_ROOT)
|
9
9
|
Dir.mkdir(PROJ_ROOT)
|
10
10
|
end
|
@@ -12,8 +12,9 @@ module ModuleSync
|
|
12
12
|
# Repo needs to be cloned in the cwd
|
13
13
|
if ! Dir.exists?("#{PROJ_ROOT}/#{name}") || ! Dir.exists?("#{PROJ_ROOT}/#{name}/.git")
|
14
14
|
puts "Cloning repository fresh"
|
15
|
-
remote = "#{
|
15
|
+
remote = "#{git_user}@#{git_provider_address}:#{org}/#{name}.git"
|
16
16
|
local = "#{PROJ_ROOT}/#{name}"
|
17
|
+
puts "Cloning from #{remote}"
|
17
18
|
repo = ::Git.clone(remote, local)
|
18
19
|
|
19
20
|
# Repo already cloned, check out master and override local changes
|
data/lib/modulesync/util.rb
CHANGED
data/modulesync.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'modulesync'
|
7
|
-
spec.version = '0.0
|
7
|
+
spec.version = '0.1.0'
|
8
8
|
spec.authors = ['Colleen Murphy']
|
9
9
|
spec.email = ['colleen@puppetlabs.com']
|
10
10
|
spec.summary = %q{Puppet Module Synchronizer}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulesync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colleen Murphy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -47,8 +47,8 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- .gitignore
|
50
|
+
- CHANGELOG.md
|
50
51
|
- Gemfile
|
51
|
-
- Gemfile.lock
|
52
52
|
- LICENSE
|
53
53
|
- README.md
|
54
54
|
- bin/msync
|