transplant 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,10 @@
1
1
  require 'active_support/all'
2
2
 
3
- require "transplant/version"
4
- require "transplant/configuration"
5
- require "transplant/stats"
6
- require "transplant/planter"
3
+ %w[version configuration stats planter].each do |klass|
4
+ require "transplant/#{klass}"
5
+ end
7
6
 
8
- module Transplant
7
+ Transplant::Configuration.setup do |config|
8
+ config.root_path = Rails.root if defined?(Rails)
9
+ config.output_style = :both
9
10
  end
@@ -24,7 +24,9 @@ module Transplant
24
24
  end
25
25
 
26
26
  def add_to_results(output)
27
- @result_set << output
27
+ style = ::Transplant::Configuration.output_style
28
+ puts output if [:both, :output].include?(style)
29
+ @result_set << output if [:both, :file].include?(style)
28
30
  end
29
31
 
30
32
  def output(header, input = {}, depth = 0, sub_output = false)
@@ -1,3 +1,3 @@
1
1
  module Transplant
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transplant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
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-04-06 00:00:00.000000000 Z
12
+ date: 2012-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: 4185618610501808386
111
+ hash: 1899894027992082273
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 4185618610501808386
120
+ hash: 1899894027992082273
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.21