baldwin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
2
+ require 'bundler/gem_tasks'
data/baldwin.gemspec CHANGED
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Baldwin::VERSION
17
17
 
18
18
  gem.add_dependency 'appraisal', '>= 0.4.1'
19
+ gem.add_dependency 'thor', '>= 0.15.2'
19
20
  end
@@ -0,0 +1,57 @@
1
+ require 'thor/group'
2
+
3
+ module Baldwin
4
+ class Installer < Thor::Group
5
+ include Thor::Actions
6
+
7
+ def ignore_dummy_rails_apps
8
+ append_file '.gitignore', <<-EOS
9
+ #{byline}
10
+ spec/support/rails-*
11
+ EOS
12
+ end
13
+
14
+ def create_appraisals_file
15
+ create_file 'Appraisals', <<-EOS
16
+ #{byline}
17
+ # add your rails configurations to test against here, like:
18
+ #
19
+ # appraise 'rails-3.1.0' do
20
+ # gem 'rails', '3.1.0'
21
+ # end
22
+ # appraise 'rails-3.2.0' do
23
+ # gem 'rails', '3.2.0'
24
+ # end
25
+ #
26
+ # see https://github.com/thoughtbot/appraisal for more info
27
+ EOS
28
+ end
29
+
30
+ def add_appraisal_rake_task
31
+ comment_lines 'Rakefile', /RSpec::Core::RakeTask/
32
+
33
+ append_file 'Rakefile', <<-EOS
34
+ #{byline}
35
+ RSpec::Core::RakeTask.new :spec => [ :'baldwin:env', :'baldwin:rails' ]
36
+
37
+ desc "Run specs for all supported rails versions"
38
+ task :all do
39
+ exec 'rake appraisal spec'
40
+ end
41
+
42
+ desc "Default: Clean, install dependencies, and run specs"
43
+ task :default => [ :'baldwin:clean', :'appraisal:install', :all ]
44
+ EOS
45
+ end
46
+
47
+ def baz
48
+ say "Did baz", :blue
49
+ end
50
+
51
+ protected
52
+
53
+ def byline
54
+ "# added by baldwin #{Baldwin::VERSION}"
55
+ end
56
+ end
57
+ end
data/lib/baldwin/tasks.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'appraisal'
2
+ require 'baldwin'
2
3
 
3
4
  include Rake::DSL
4
5
 
@@ -26,4 +27,9 @@ namespace :baldwin do
26
27
  sh "bundle exec rails new #{ENV[ 'BALDWIN_RAILS_PATH' ]} -m spec/support/rails_template.rb"
27
28
  end
28
29
  end
30
+
31
+ desc "Install testing awesomeness"
32
+ task :install do
33
+ Baldwin::Installer.start
34
+ end
29
35
  end
@@ -1,3 +1,3 @@
1
1
  module Baldwin
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/baldwin.rb CHANGED
@@ -1,5 +1,5 @@
1
- require "baldwin/version"
1
+ require 'baldwin/version'
2
2
 
3
3
  module Baldwin
4
- # Your code goes here...
4
+ autoload :Installer, 'baldwin/installer'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baldwin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-22 00:00:00.000000000 Z
12
+ date: 2012-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appraisal
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.4.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: thor
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.15.2
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.15.2
30
46
  description: Bootstrap testing your rails 3 engine
31
47
  email:
32
48
  - jeremy.ruppel@gmail.com
@@ -41,6 +57,7 @@ files:
41
57
  - Rakefile
42
58
  - baldwin.gemspec
43
59
  - lib/baldwin.rb
60
+ - lib/baldwin/installer.rb
44
61
  - lib/baldwin/setup.rb
45
62
  - lib/baldwin/tasks.rb
46
63
  - lib/baldwin/version.rb