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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d0e590473ec182b441f2f54bb6056f7550d5137
4
- data.tar.gz: 4330c8b9753737acc08ca63c4e8a5f22c904a6b4
3
+ metadata.gz: ad8920a08ce9ab987d5f83b10a365aadc58397e0
4
+ data.tar.gz: d59c7bdcbe8dc71f1e1a94578155a4c125a4a8cb
5
5
  SHA512:
6
- metadata.gz: 693949268b23f4339a653cdf775fc2bd3c023b5b86f6be76fa681b64f1a69a076b4ce990395ab8e5b69d0bfba8b16d2b53b1cdb6887c578d45246cb89d46de88
7
- data.tar.gz: 6bf93ef2d740c3f4ae8cda5217edb5cd2a516b26daa6aff03d8e06646f4503440e4a118cd3ee5861351f52536e9d45ed0256451eb77a04dfc589d5581f126c9b
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/project'
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 'Describe your application here'
16
+ program_desc 'Command Line home ENVironment managER'
16
17
 
17
18
  version Clenver::VERSION
18
19
 
19
- desc 'Describe some switch here'
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
- if File.exist?(path)
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
@@ -62,7 +62,6 @@ class Project
62
62
  elsif
63
63
  s_path = content['object'].get_abs_path + "/" + s
64
64
  end
65
- puts "s_path:#{s_path}"
66
65
  Link.new(s_path,d).create
67
66
  end
68
67
  end
@@ -1,3 +1,3 @@
1
1
  module Clenver
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
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
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-15 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake