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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad213c76c9cd22cff0d263030ba62557f38ba536
4
- data.tar.gz: 22002739c9f76b874cfe3a6bc92ed59e0da25bba
3
+ metadata.gz: a5a9cf389ae4ddf72c0c7e842b9fe5d57353ffde
4
+ data.tar.gz: e9a2f50fb934b0869aee69a6287d30a2420d7646
5
5
  SHA512:
6
- metadata.gz: c22dbad265eac769e781e270e96effa029bdaa6d429d0bd6fbbfa40ffaac71e6bc7956c44b72e4bfb107b7ddbcc62f0dcb38224c223d5ffc9d186ab6bf8247f2
7
- data.tar.gz: 898d8848470b0e6e16eecbe2c40be33e4e8f61ce0e58dfdaa3c94446f1ec9433735f9d01b7c6a48904b4be627126e65e9ef905631014c7e3188633a46caf4821
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
- program :name, 'Projectr'
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
- .select { |f|File.directory? f }
11
- .map { |p| p.split('/').last }
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)
@@ -1,3 +1,3 @@
1
1
  module Projectr
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: projectr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Glendenning