clenver 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 46b63dbac893e049aca81fde9d768c44e803d8ba
4
+ data.tar.gz: 98b9fed82eb0993698c82174a6467e29001f4619
5
+ SHA512:
6
+ metadata.gz: 7a6328b27e19a611e89712f4b3af391daa9f978990bdb6e47ac0a64e8fe8eb9c552c462504d477588fd2e57820ea6ca189ecbe6465c3e36bbc585bdb754aef17
7
+ data.tar.gz: ea3f054bf879642b54d8176c5139ed0ade02400c94e4ce77041aeb8a4c54a117e137a5fb850d685a344f095eb99a5fb818cd233e89a3a123995624abd8bfa8d3
@@ -0,0 +1,6 @@
1
+ = clenver
2
+
3
+ Describe your project here
4
+
5
+ :include:clenver.rdoc
6
+
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env ruby
2
+ require 'gli'
3
+ begin # XXX: Remove this begin/rescue before distributing your app
4
+ require 'clenver'
5
+ require 'clenver/project'
6
+ rescue LoadError
7
+ STDERR.puts "In development, you need to use `bundle exec bin/clenver` to run your app"
8
+ STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path"
9
+ STDERR.puts "Feel free to remove this message from bin/clenver now"
10
+ exit 64
11
+ end
12
+
13
+ include GLI::App
14
+
15
+ program_desc 'Describe your application here'
16
+
17
+ version Clenver::VERSION
18
+
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'
28
+ arg_name 'Describe arguments to init here'
29
+ command :init do |c|
30
+ c.desc 'Describe a switch to init'
31
+ c.switch :s
32
+
33
+ c.desc 'Describe a flag to init'
34
+ c.default_value 'default'
35
+ c.flag :f
36
+ c.action do |global_options,options,args|
37
+
38
+ # Your command logic here
39
+
40
+ puts "args: #{args}"
41
+ puts "options: #{options}"
42
+ puts "global_options: #{global_options}"
43
+ unless args.empty?
44
+ path = args[0]
45
+ 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
62
+ else
63
+ exit_now!("pass config file as a clenver init argument", 2)
64
+ end
65
+ # If you have any errors, just raise them
66
+ # raise "that command made no sense"
67
+ end
68
+ end
69
+
70
+ pre do |global,command,options,args|
71
+ # Pre logic here
72
+ # Return true to proceed; false to abort and not call the
73
+ # chosen command
74
+ # Use skips_pre before a command to skip this block
75
+ # on that command only
76
+ true
77
+ end
78
+
79
+ post do |global,command,options,args|
80
+ # Post logic here
81
+ # Use skips_post before a command to skip this
82
+ # block on that command only
83
+ end
84
+
85
+ on_error do |exception|
86
+ # Error logic here
87
+ # return false to skip default error handling
88
+ true
89
+ end
90
+
91
+ exit run(ARGV)
@@ -0,0 +1,5 @@
1
+ = clenver
2
+
3
+ Generate this with
4
+ clenver rdoc
5
+ After you have described your command line interface
@@ -0,0 +1,4 @@
1
+ require 'clenver/version.rb'
2
+
3
+ # Add requires for other files you add to your project here, so
4
+ # you just need to require this one file in your bin file
@@ -0,0 +1,3 @@
1
+ module Clenver
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: clenver
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Piotr Król
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: aruba
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-expectations
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: gli
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 2.8.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 2.8.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: git
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 1.2.6
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 1.2.6
97
+ description: clenver aims to shorten time of configuring your brand new *NIX account
98
+ to fully featured development envionment of your choice
99
+ email: pietrushnic@gmail.com
100
+ executables:
101
+ - clenver
102
+ extensions: []
103
+ extra_rdoc_files:
104
+ - README.rdoc
105
+ - clenver.rdoc
106
+ files:
107
+ - bin/clenver
108
+ - lib/clenver/version.rb
109
+ - lib/clenver.rb
110
+ - README.rdoc
111
+ - clenver.rdoc
112
+ homepage: https://github.com/pietrushnic/clenver
113
+ licenses:
114
+ - GPLv2
115
+ metadata: {}
116
+ post_install_message:
117
+ rdoc_options:
118
+ - --title
119
+ - clenver
120
+ - --main
121
+ - README.rdoc
122
+ - -ri
123
+ require_paths:
124
+ - lib
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 2.1.5
139
+ signing_key:
140
+ specification_version: 4
141
+ summary: Command line home directory manager
142
+ test_files: []