transplant 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ require 'active_support/core_ext/class'
2
+
3
+ module Transplant
4
+ class Configuration
5
+
6
+ cattr_accessor :root_path
7
+ cattr_accessor :output_style
8
+ cattr_accessor :file_output_format
9
+
10
+ class << self
11
+
12
+ def setup
13
+ yield self
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+ end
@@ -16,7 +16,7 @@ module Transplant
16
16
 
17
17
  def output_to_file
18
18
  timestamp = Time.now.utc.to_datetime.to_formatted_s(:number)
19
- Dir.chdir Rails.root
19
+ Dir.chdir(::Transplant::Configuration.root_path)
20
20
  filepath = ".import.#{timestamp}_#{@planter.app_name.downcase}"
21
21
  f = File.open(filepath, "w")
22
22
  @result_set.each { |output| f.puts output }
@@ -1,3 +1,3 @@
1
1
  module Transplant
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/transplant.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'active_support/all'
2
2
 
3
3
  require "transplant/version"
4
+ require "transplant/configuration"
4
5
  require "transplant/stats"
5
6
  require "transplant/planter"
6
7
 
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.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -89,6 +89,7 @@ files:
89
89
  - README.md
90
90
  - Rakefile
91
91
  - lib/transplant.rb
92
+ - lib/transplant/configuration.rb
92
93
  - lib/transplant/planter.rb
93
94
  - lib/transplant/stats.rb
94
95
  - lib/transplant/version.rb
@@ -107,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
108
  version: '0'
108
109
  segments:
109
110
  - 0
110
- hash: 1015560238026182920
111
+ hash: 4185618610501808386
111
112
  required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  none: false
113
114
  requirements:
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  version: '0'
117
118
  segments:
118
119
  - 0
119
- hash: 1015560238026182920
120
+ hash: 4185618610501808386
120
121
  requirements: []
121
122
  rubyforge_project:
122
123
  rubygems_version: 1.8.21