projectr 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/projectr +1 -21
- data/lib/projectr.rb +24 -2
- data/lib/projectr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5a9cf389ae4ddf72c0c7e842b9fe5d57353ffde
|
4
|
+
data.tar.gz: e9a2f50fb934b0869aee69a6287d30a2420d7646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c493db2e0ad9fb0ad44ccc644a36b84b85ff73915ad486e1c50b91571dce50660484590e535a3e4784955c6b61201b2b198cdde1c3369f1146a6c7a3d4dfba82
|
7
|
+
data.tar.gz: a6fd2b9028433152dfc202d637769a4f01567383ae831f1bdd02833907633082e338ef0375575dfe4d02ca96fe2b78973413a91f21afe42c38d9f9587d7adcc7
|
data/exe/projectr
CHANGED
@@ -1,25 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# vim: set ft=ruby:
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'commander/import'
|
6
3
|
require 'projectr'
|
7
|
-
require 'projectr/version'
|
8
4
|
|
9
|
-
|
10
|
-
program :version, Projectr::VERSION
|
11
|
-
program :description, 'Project templating tool for quickly starting and updating new projects.'
|
12
|
-
|
13
|
-
command :list do |c|
|
14
|
-
c.syntax = 'list [options]'
|
15
|
-
c.action do |args, opts|
|
16
|
-
Projectr.list()
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
command :load do |c|
|
21
|
-
c.syntax = 'load <name> [options]'
|
22
|
-
c.action do |args, opts|
|
23
|
-
Projectr.load(args.first)
|
24
|
-
end
|
25
|
-
end
|
5
|
+
Projectr.run()
|
data/lib/projectr.rb
CHANGED
@@ -1,14 +1,36 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
3
|
require 'projectr/version'
|
4
|
+
require 'commander'
|
4
5
|
require 'fileutils'
|
5
6
|
|
6
7
|
module Projectr
|
8
|
+
def self.run
|
9
|
+
include Commander::Methods
|
10
|
+
program :name, 'Projectr'
|
11
|
+
program :version, Projectr::VERSION
|
12
|
+
program :description, 'Project templating tool for quickly starting and updating new projects.'
|
13
|
+
|
14
|
+
command :list do |c|
|
15
|
+
c.syntax = 'list [options]'
|
16
|
+
c.action do |args, opts|
|
17
|
+
Projectr.list()
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
command :load do |c|
|
22
|
+
c.syntax = 'load <name> [options]'
|
23
|
+
c.action do |args, opts|
|
24
|
+
Projectr.load(args.first)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
7
29
|
PROJECT_PATH = "#{Dir.home}/.projectr"
|
8
30
|
def self.list
|
9
31
|
dirs = Dir.glob("#{PROJECT_PATH}/*")
|
10
|
-
|
11
|
-
|
32
|
+
.select { |f|File.directory? f }
|
33
|
+
.map { |p| p.split('/').last }
|
12
34
|
dirs.each { |dir| puts dir }
|
13
35
|
end
|
14
36
|
def self.load(name, dest_path = Dir.pwd)
|
data/lib/projectr/version.rb
CHANGED