clenver 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/clenver +12 -35
- data/lib/clenver/project.rb +0 -1
- data/lib/clenver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8920a08ce9ab987d5f83b10a365aadc58397e0
|
4
|
+
data.tar.gz: d59c7bdcbe8dc71f1e1a94578155a4c125a4a8cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 905b244f4b3694a97894253588c2481be66beef20b41267846e73a9b125d80bf1ce3dec813fda9f85b0cef630b75b787572d09ed1307e78c2ba38205e44d0399
|
7
|
+
data.tar.gz: f1a8fab46c20279a1a932615af366c045b2b998655ec404ac92cb9801569c78a87a39ba3614e6e7e53854155e5c410f20b9954bda6af22d949859722496b7dfc
|
data/bin/clenver
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'gli'
|
3
|
+
require 'clenver/logging'
|
3
4
|
begin # XXX: Remove this begin/rescue before distributing your app
|
4
5
|
require 'clenver'
|
5
|
-
require 'clenver/
|
6
|
+
require 'clenver/runner'
|
6
7
|
rescue LoadError
|
7
8
|
STDERR.puts "In development, you need to use `bundle exec bin/clenver` to run your app"
|
8
9
|
STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path"
|
@@ -12,53 +13,29 @@ end
|
|
12
13
|
|
13
14
|
include GLI::App
|
14
15
|
|
15
|
-
program_desc '
|
16
|
+
program_desc 'Command Line home ENVironment managER'
|
16
17
|
|
17
18
|
version Clenver::VERSION
|
18
19
|
|
19
|
-
desc '
|
20
|
-
switch [:s,:switch]
|
21
|
-
|
22
|
-
desc 'Describe some flag here'
|
23
|
-
default_value 'the default'
|
24
|
-
arg_name 'The name of the argument'
|
25
|
-
flag [:f,:flagname]
|
26
|
-
|
27
|
-
desc 'Describe init here'
|
20
|
+
desc 'Initialize workspace environment based on given configuration'
|
28
21
|
arg_name 'Describe arguments to init here'
|
29
22
|
command :init do |c|
|
30
|
-
c.desc 'Describe a switch to init'
|
31
|
-
c.switch :s
|
23
|
+
# c.desc 'Describe a switch to init'
|
24
|
+
# c.switch :s
|
32
25
|
|
33
|
-
c.desc 'Describe a flag to init'
|
34
|
-
c.default_value 'default'
|
35
|
-
c.flag :f
|
26
|
+
# c.desc 'Describe a flag to init'
|
27
|
+
# c.default_value 'default'
|
28
|
+
# c.flag :f
|
36
29
|
c.action do |global_options,options,args|
|
37
30
|
|
38
31
|
# Your command logic here
|
39
32
|
|
40
|
-
puts "args: #{args}"
|
41
|
-
puts "options: #{options}"
|
42
|
-
puts "global_options: #{global_options}"
|
43
33
|
unless args.empty?
|
34
|
+
include Logging
|
35
|
+
logger.debug("args: #{args}")
|
44
36
|
path = args[0]
|
45
37
|
dst_dist = args[1]
|
46
|
-
|
47
|
-
begin
|
48
|
-
yaml = Psych.load_file("#{path}")
|
49
|
-
p = Project.new(File.basename("#{path}", ".yml"), yaml)
|
50
|
-
if dst_dist
|
51
|
-
p.create_repos(dst_dist)
|
52
|
-
else
|
53
|
-
p.create_repos()
|
54
|
-
end
|
55
|
-
p.init_repos
|
56
|
-
rescue Psych::SyntaxError => ex
|
57
|
-
exit_now!("#{path}: syntax error : #{ex.message}", 1)
|
58
|
-
end
|
59
|
-
else
|
60
|
-
exit_now!("#{path} no such file or directory", 2)
|
61
|
-
end
|
38
|
+
Clenver::Runner.new(path, dst_dist).start
|
62
39
|
else
|
63
40
|
exit_now!("pass config file as a clenver init argument", 2)
|
64
41
|
end
|
data/lib/clenver/project.rb
CHANGED
data/lib/clenver/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clenver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Król
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|