tao 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/bin/tao +70 -0
- data/lib/tao/version.rb +3 -0
- data/lib/tao.rb +69 -0
- data/tao.gemspec +22 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjczNjE2MmFkNmY4MGRhNTA1MmQxYWJmZWVjZjEwMGUzNThmOTZmMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZDgyMWM3MzQzMjkzOWNhZTA4NWFjYjlhYzc4NDZiNDkwNjIwNTRjMA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjQ5MGNhMjU5MmUxOTk2YmMwMTMxNjQ5OGVkZmE4ZGI2ZDNjYThjMzU4ZDQx
|
10
|
+
NjJhYjc1MWEzMmFiNzYzZTY4MzIwMjgwYjY3OGQzMjI5Mjk4ZmI1MTFmYjA3
|
11
|
+
MTc0OTJjMGE4NTU4MTliOTE5NWUzOGU4OGI0OTE3MDM4NDM4NGY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTk1NmMzMGJlZGFjOTdlZjA2ZmIzYmU3Y2UwZjhkMzllMDg4NjFmOGNmODk3
|
14
|
+
Mjc1MjZhMDFiOTI2NjFmMjVjYWU5ODdmY2UyNjk4NTk0NGMxOWNkZmU1Zjk5
|
15
|
+
MTMyYWZhYzY4MjdiMGIzNDI1MTA1YWI5ZDRjYmRiZjc3MzI4ODQ=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Mihail Zdravkov
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Tao
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'tao'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install tao
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/tao
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/usr/bin/env pry
|
2
|
+
require "tao/version"
|
3
|
+
|
4
|
+
module Tao
|
5
|
+
argv = ARGV
|
6
|
+
argv.shift
|
7
|
+
|
8
|
+
argv << '' if argv.count.odd?
|
9
|
+
options = Hash[*argv]
|
10
|
+
|
11
|
+
def Tao.create_directory name
|
12
|
+
dir = File.join(Dir.pwd, name)
|
13
|
+
unless File.directory? dir
|
14
|
+
Dir.mkdir(dir)
|
15
|
+
else
|
16
|
+
raise "Error: #{dir} already exists."
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def Tao.create_project name
|
21
|
+
create_directory name
|
22
|
+
Dir.chdir name
|
23
|
+
create_guardfile
|
24
|
+
create_gemfile
|
25
|
+
%w[src spec].map {|dir| create_directory dir}
|
26
|
+
%w[src/core.rb spec/core_spec.rb].map {|name| File.open(name, 'w') {|f| f.write('# Code here.')}}
|
27
|
+
end
|
28
|
+
|
29
|
+
def Tao.create_guardfile
|
30
|
+
File.open("Guardfile", 'w') {|file| file.write('
|
31
|
+
guard "rspec" do
|
32
|
+
watch(%r{^src/(.+)\.rb$}) {|f| "spec/#{f[1]}_spec.rb"}
|
33
|
+
watch(%r{^spec/.+_spec\.rb$})
|
34
|
+
end')}
|
35
|
+
end
|
36
|
+
|
37
|
+
def Tao.create_gemfile
|
38
|
+
File.open("Gemfile", 'w') {|file| file.write("
|
39
|
+
source 'https://rubygems.org'
|
40
|
+
gem 'rb-inotify', :require => false
|
41
|
+
gem 'rb-fsevent', :require => false
|
42
|
+
gem 'rb-fchange', :require => false
|
43
|
+
gem 'libnotify'
|
44
|
+
gem 'guard-rspec'")}
|
45
|
+
end
|
46
|
+
|
47
|
+
def Tao.dev_project name
|
48
|
+
Dir.chdir name
|
49
|
+
system 'gnome-terminal --maximize --tab -e "vim src/core.rb" --tab -e "vim spec/core_spec.rb" --tab'
|
50
|
+
end
|
51
|
+
|
52
|
+
def Tao.help name
|
53
|
+
case name
|
54
|
+
when '' then puts "\n\nRuby Garden is simple tool for easy test driven development in Ruby. With it, you can easly create projects and everytime you save your file, your specs are executed automaticaly and notify bubble shows up, to tell you the result. It's super effective!\n\nAvaible options:\n\ngarden new project_name\ngarden dev project_name\ngarden help option\n\nFor info about option run 'garden help option'\n\n"
|
55
|
+
when 'new' then puts "'garden new project_name' : creates project with the name given."
|
56
|
+
when 'dev' then puts "'garden dev project_name' : opens 3 tabs of terminal. The frist is Vim with 'src/core.rb' opened. The second is Vim with 'spec/core_spec.rb' opened. And the third is with 'guard' opened. You should be at the parent folder of the project you're trying to open for development."
|
57
|
+
when 'help' then puts "Shows list of avaible options to garden."
|
58
|
+
else puts "Error: Unknown argument passed. #{name} is not recognized. Type 'help' to see list of avaible commands."
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
options.each do |key, value|
|
63
|
+
case key
|
64
|
+
when 'new' then create_project value
|
65
|
+
when 'dev' then dev_project value
|
66
|
+
when 'help' then help value
|
67
|
+
else puts "Unknown argument passed. Type type 'help' to see help."
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/tao/version.rb
ADDED
data/lib/tao.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require "tao/version"
|
2
|
+
|
3
|
+
module Tao
|
4
|
+
argv = ARGV
|
5
|
+
argv.shift
|
6
|
+
|
7
|
+
argv << '' if argv.count.odd?
|
8
|
+
options = Hash[*argv]
|
9
|
+
|
10
|
+
def Tao.create_directory name
|
11
|
+
dir = File.join(Dir.pwd, name)
|
12
|
+
unless File.directory? dir
|
13
|
+
Dir.mkdir(dir)
|
14
|
+
else
|
15
|
+
raise "Error: #{dir} already exists."
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def Tao.create_project name
|
20
|
+
create_directory name
|
21
|
+
Dir.chdir name
|
22
|
+
create_guardfile
|
23
|
+
create_gemfile
|
24
|
+
%w[src spec].map {|dir| create_directory dir}
|
25
|
+
%w[src/core.rb spec/core_spec.rb].map {|name| File.open(name, 'w') {|f| f.write('# Code here.')}}
|
26
|
+
end
|
27
|
+
|
28
|
+
def Tao.create_guardfile
|
29
|
+
File.open("Guardfile", 'w') {|file| file.write('
|
30
|
+
guard "rspec" do
|
31
|
+
watch(%r{^src/(.+)\.rb$}) {|f| "spec/#{f[1]}_spec.rb"}
|
32
|
+
watch(%r{^spec/.+_spec\.rb$})
|
33
|
+
end')}
|
34
|
+
end
|
35
|
+
|
36
|
+
def Tao.create_gemfile
|
37
|
+
File.open("Gemfile", 'w') {|file| file.write("
|
38
|
+
source 'https://rubygems.org'
|
39
|
+
gem 'rb-inotify', :require => false
|
40
|
+
gem 'rb-fsevent', :require => false
|
41
|
+
gem 'rb-fchange', :require => false
|
42
|
+
gem 'libnotify'
|
43
|
+
gem 'guard-rspec'")}
|
44
|
+
end
|
45
|
+
|
46
|
+
def Tao.dev_project name
|
47
|
+
Dir.chdir name
|
48
|
+
system 'gnome-terminal --maximize --tab -e "vim src/core.rb" --tab -e "vim spec/core_spec.rb" --tab'
|
49
|
+
end
|
50
|
+
|
51
|
+
def Tao.help name
|
52
|
+
case name
|
53
|
+
when '' then puts "\n\nRuby Garden is simple tool for easy test driven development in Ruby. With it, you can easly create projects and everytime you save your file, your specs are executed automaticaly and notify bubble shows up, to tell you the result. It's super effective!\n\nAvaible options:\n\ngarden new project_name\ngarden dev project_name\ngarden help option\n\nFor info about option run 'garden help option'\n\n"
|
54
|
+
when 'new' then puts "'garden new project_name' : creates project with the name given."
|
55
|
+
when 'dev' then puts "'garden dev project_name' : opens 3 tabs of terminal. The frist is Vim with 'src/core.rb' opened. The second is Vim with 'spec/core_spec.rb' opened. And the third is with 'guard' opened. You should be at the parent folder of the project you're trying to open for development."
|
56
|
+
when 'help' then puts "Shows list of avaible options to garden."
|
57
|
+
else puts "Error: Unknown argument passed. #{name} is not recognized. Type 'help' to see list of avaible commands."
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
options.each do |key, value|
|
62
|
+
case key
|
63
|
+
when 'new' then create_project value
|
64
|
+
when 'dev' then dev_project value
|
65
|
+
when 'help' then help value
|
66
|
+
else puts "Unknown argument passed. Type type 'help' to see help."
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/tao.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'tao/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "tao"
|
8
|
+
gem.version = Tao::VERSION
|
9
|
+
gem.authors = ["Mihail Zdravkov"]
|
10
|
+
gem.email = ["mihail0zdravkov@gmail.com"]
|
11
|
+
gem.description = %q{Tool for simple Test Driven Development in Ruby.}
|
12
|
+
gem.summary = %q{Simple tool for Test Driven Development}
|
13
|
+
gem.homepage = "http://rubygems.org/gems/tao"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.bindir = 'bin'
|
17
|
+
gem.executables = %w(tao) #gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_dependency 'pry'
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tao
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mihail Zdravkov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-04-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: Tool for simple Test Driven Development in Ruby.
|
28
|
+
email:
|
29
|
+
- mihail0zdravkov@gmail.com
|
30
|
+
executables:
|
31
|
+
- tao
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- .gitignore
|
36
|
+
- Gemfile
|
37
|
+
- LICENSE.txt
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- lib/tao.rb
|
41
|
+
- lib/tao/version.rb
|
42
|
+
- tao.gemspec
|
43
|
+
- bin/tao
|
44
|
+
homepage: http://rubygems.org/gems/tao
|
45
|
+
licenses: []
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.0.3
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Simple tool for Test Driven Development
|
67
|
+
test_files: []
|