act_as_importable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ActAsImportable
2
2
 
3
- Help you easily import models from a CSV file.
3
+ Helps you easily import records from a CSV file.
4
4
 
5
5
  ## Installation
6
6
 
data/Rakefile CHANGED
@@ -1,6 +1,16 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'act_as_importable/version'
3
+ require 'rspec/core'
2
4
  require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new :spec
5
7
 
6
- task :default => :spec
8
+ task :default => :spec
9
+
10
+ require 'rdoc/task'
11
+ Rake::RDocTask.new do |rdoc|
12
+ rdoc.rdoc_dir = 'rdoc'
13
+ rdoc.title = "ActAsImportable #{ActAsImportable::VERSION}"
14
+ rdoc.rdoc_files.include('README*')
15
+ rdoc.rdoc_files.include('lib/**/*.rb')
16
+ end
Binary file
@@ -1,10 +1,8 @@
1
+ require 'active_support'
1
2
  require 'act_as_importable/base'
2
3
  require 'act_as_importable/config'
3
- require 'csv'
4
4
 
5
5
  module ActAsImportable
6
- include ActAsImportable::Base
7
6
  end
8
7
 
9
- require 'act_as_importable/railtie.rb' if defined?(Rails)
10
- ActiveRecord::Base.send :include, ActAsImportable::Config
8
+ require 'act_as_importable/railtie.rb' if defined?(Rails)
@@ -1,4 +1,5 @@
1
1
  require 'active_support'
2
+ require 'csv'
2
3
 
3
4
  module ActAsImportable::Base
4
5
  extend ActiveSupport::Concern
@@ -84,5 +85,4 @@ module ActAsImportable::Base
84
85
  end
85
86
 
86
87
  end
87
-
88
88
  end
@@ -1,4 +1,5 @@
1
1
  require 'active_support'
2
+ require 'act_as_importable'
2
3
 
3
4
  module ActAsImportable::Config
4
5
  extend ActiveSupport::Concern
@@ -1,4 +1,4 @@
1
- require 'act_as_importable'
1
+ require 'act_as_importable/config'
2
2
  require 'rails'
3
3
 
4
4
  module ActAsImportable
@@ -1,3 +1,3 @@
1
1
  module ActAsImportable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -18,6 +18,9 @@ ActiveRecord::Base.connection.create_table(:items) do |t|
18
18
  end
19
19
 
20
20
  class Item < ActiveRecord::Base
21
+ # This line isn't needed in a real Rails app.
22
+ include ActAsImportable::Config
23
+
21
24
  act_as_importable :uid => 'name'
22
25
 
23
26
  belongs_to :category
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,7 @@ require 'active_record'
9
9
  require 'active_support'
10
10
  require 'act_as_importable'
11
11
  require 'rspec'
12
+ require 'rspec/autorun'
12
13
 
13
14
  root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
14
15
  ActiveRecord::Base.establish_connection(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act_as_importable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: