bard 0.15.5 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +0 -66
  2. data/VERSION +1 -1
  3. data/lib/bard.rb +27 -0
  4. metadata +5 -5
data/Rakefile CHANGED
@@ -1,68 +1,2 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
-
4
- require 'spec/rake/spectask'
5
- Spec::Rake::SpecTask.new(:spec) do |spec|
6
- spec.libs << 'lib' << 'spec'
7
- spec.spec_files = FileList['spec/**/*_spec.rb']
8
- end
9
-
10
- Spec::Rake::SpecTask.new(:rcov) do |spec|
11
- spec.libs << 'lib' << 'spec'
12
- spec.pattern = 'spec/**/*_spec.rb'
13
- spec.rcov = true
14
- end
15
-
16
- task :spec => :check_dependencies
17
-
18
- begin
19
- require 'cucumber/rake/task'
20
- Cucumber::Rake::Task.new(:features)
21
-
22
- task :features => :check_dependencies
23
- rescue LoadError
24
- task :features do
25
- abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
26
- end
27
- end
28
-
29
- begin
30
- require 'reek/rake_task'
31
- Reek::RakeTask.new do |t|
32
- t.fail_on_error = true
33
- t.verbose = false
34
- t.source_files = 'lib/**/*.rb'
35
- end
36
- rescue LoadError
37
- task :reek do
38
- abort "Reek is not available. In order to run reek, you must: sudo gem install reek"
39
- end
40
- end
41
-
42
- begin
43
- require 'roodi'
44
- require 'roodi_task'
45
- RoodiTask.new do |t|
46
- t.verbose = false
47
- end
48
- rescue LoadError
49
- task :roodi do
50
- abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi"
51
- end
52
- end
53
-
54
- task :default => :spec
55
-
56
- require 'rake/rdoctask'
57
- Rake::RDocTask.new do |rdoc|
58
- if File.exist?('VERSION')
59
- version = File.read('VERSION')
60
- else
61
- version = ""
62
- end
63
-
64
- rdoc.rdoc_dir = 'rdoc'
65
- rdoc.title = "bard #{version}"
66
- rdoc.rdoc_files.include('README*')
67
- rdoc.rdoc_files.include('lib/**/*.rb')
68
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.5
1
+ 0.16.0
data/lib/bard.rb CHANGED
@@ -20,6 +20,33 @@ class Bard < Thor
20
20
 
21
21
  VERSION = File.read(File.expand_path(File.dirname(__FILE__) + "../../VERSION")).chomp
22
22
 
23
+ desc "install [PROJECT NAME]", "install and bootstrap existing project"
24
+ def install(project_name)
25
+ auto_update!
26
+ check_dependencies
27
+ command = <<-BASH
28
+ git clone git@git.botandrose.com:#{project_name}.git
29
+
30
+ cd #{project_name}
31
+ rvm . do bundle
32
+ rvm . do bundle exec rake bootstrap
33
+
34
+ sudo -s <#{"<EOF"}
35
+ echo "<VirtualHost *:80>
36
+ ServerName #{project_name}.local
37
+ DocumentRoot `pwd`/public
38
+ </VirtualHost>" > /etc/apache2/sites-available/#{project_name}
39
+ a2ensite #{project_name}
40
+ apache2ctl restart
41
+
42
+ if ! grep "#{project_name}.local" /etc/hosts; then
43
+ echo 127.0.0.1 #{project_name}.local >> /etc/hosts
44
+ fi
45
+ EOF
46
+ BASH
47
+ exec command
48
+ end
49
+
23
50
  desc "create [PROJECT_NAME]", "create new project"
24
51
  def create(project_name)
25
52
  auto_update!
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 95
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 15
9
- - 5
10
- version: 0.15.5
8
+ - 16
9
+ - 0
10
+ version: 0.16.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Micah Geisel
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-05-11 00:00:00 Z
19
+ date: 2013-01-14 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: thor