projectr 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 04a536736de3a698ce4c208666772f2394af1943
4
+ data.tar.gz: 281929b1b6e4459f7acf8ff4edf42009578c2de1
5
+ SHA512:
6
+ metadata.gz: 7b86fd6827018f55fb9d7d4a964e61cf958a94dbb0ccc08214759e2ed06508b3b3595dd158bc686213520f86aee5f4a527e2cd9e244a85a9599ed5abcfef8d3b
7
+ data.tar.gz: f8db5c5fa909d122217aff53fecba02eae2a0b45ea449f7c2b846f6fa64fc4d5284e7b832d4d388d1367ba174687953e2760ebe78525ad05d189d8202d74474e
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'commander'
4
+
5
+ # Specify your gem's dependencies in projectr.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Josh Glendenning
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Projectr
2
+
3
+ Project templating tool for quickly starting and updating new projects.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'projectr'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install projectr
20
+
21
+ ## Usage
22
+
23
+ Place project folders in `~/.projectr`.
24
+
25
+ ## License
26
+
27
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
28
+
29
+ Project templating tool for quickly starting and updating new projects.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/projectr ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+ # vim: set ft=ruby:
3
+ require 'rubygems'
4
+ require 'commander/import'
5
+ require 'projectr'
6
+ require 'projectr/version'
7
+
8
+ program :name, 'Projectr'
9
+ program :version, Projectr::VERSION
10
+ program :description, 'Project templating tool for quickly starting and updating new projects.'
11
+
12
+ command :list do |c|
13
+ c.syntax = 'list [options]'
14
+ c.action do |args, opts|
15
+ Projectr.list()
16
+ end
17
+ end
18
+
19
+ command :load do |c|
20
+ c.syntax = 'load <name> [options]'
21
+ c.action do |args, opts|
22
+ Projectr.load(args.first)
23
+ end
24
+ end
data/lib/projectr.rb ADDED
@@ -0,0 +1,23 @@
1
+ require 'projectr/version'
2
+ require 'fileutils'
3
+
4
+ module Projectr
5
+ PROJECT_PATH = "#{Dir.home}/.projectr"
6
+ def self.list
7
+ dirs = Dir.glob("#{PROJECT_PATH}/*")
8
+ .select { |f|File.directory? f }
9
+ .map { |p| p.split('/').last }
10
+ dirs.each { |dir| puts dir }
11
+ end
12
+ def self.load(name, dest_path = Dir.pwd)
13
+ src_path = "#{PROJECT_PATH}/#{name}"
14
+ raise "#{name} is not a valid project" if !File.exist?(src_path)
15
+ FileUtils.cp_r(Dir.glob("#{src_path}/*"), dest_path)
16
+ projectrfile_path = "#{dest_path}/Projectrfile"
17
+ if File.exist?(projectrfile_path)
18
+ FileUtils.chmod('+x', projectrfile_path)
19
+ exec "#{projectrfile_path}"
20
+ FileUtils.rm(projectrfile_path)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module Projectr
2
+ VERSION = "0.1.0"
3
+ end
data/projectr.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'projectr/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "projectr"
8
+ spec.version = Projectr::VERSION
9
+ spec.authors = ["Josh Glendenning"]
10
+ spec.email = ["joshglendenning@gmail.com"]
11
+
12
+ spec.summary = %q{Project templating tool for quickly starting and updating new projects.}
13
+ spec.description = %q{Project templating tool for quickly starting and updating new projects.}
14
+ spec.homepage = "https://github.com/joshglendenning/projectr"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "bin"
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.10"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: projectr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Josh Glendenning
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Project templating tool for quickly starting and updating new projects.
42
+ email:
43
+ - joshglendenning@gmail.com
44
+ executables:
45
+ - projectr
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - ".travis.yml"
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - bin/projectr
56
+ - lib/projectr.rb
57
+ - lib/projectr/version.rb
58
+ - projectr.gemspec
59
+ homepage: https://github.com/joshglendenning/projectr
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.4.5
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Project templating tool for quickly starting and updating new projects.
83
+ test_files: []