batch_insert 0.3 → 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/{MIT-LICENSE → LICENSE} +4 -2
- data/Rakefile +2 -43
- data/batch_insert.gemspec +18 -0
- data/lib/batch_insert.rb +3 -2
- data/lib/batch_insert/version.rb +3 -0
- metadata +14 -9
data/.gitignore
ADDED
data/Gemfile
ADDED
data/{MIT-LICENSE → LICENSE}
RENAMED
@@ -1,4 +1,6 @@
|
|
1
|
-
Copyright (c) 2010 Shaun Mangelsdorf
|
1
|
+
Copyright (c) 2010-2012 Shaun Mangelsdorf
|
2
|
+
|
3
|
+
MIT License
|
2
4
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
6
|
a copy of this software and associated documentation files (the
|
@@ -17,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,43 +1,2 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
require 'rdoc/task'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
|
6
|
-
desc 'Default: run unit tests.'
|
7
|
-
task :default => :test
|
8
|
-
|
9
|
-
desc 'Generate documentation for the batch_insert plugin.'
|
10
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
11
|
-
rdoc.rdoc_dir = 'rdoc'
|
12
|
-
rdoc.title = 'BatchInsert'
|
13
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
14
|
-
rdoc.rdoc_files.include('README')
|
15
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
16
|
-
end
|
17
|
-
|
18
|
-
RSpec::Core::RakeTask.new do |t|
|
19
|
-
t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"]
|
20
|
-
t.pattern = 'spec/*_spec.rb'
|
21
|
-
end
|
22
|
-
|
23
|
-
begin
|
24
|
-
require 'jeweler'
|
25
|
-
Jeweler::Tasks.new do |gem|
|
26
|
-
gem.name = 'batch_insert'
|
27
|
-
gem.summary = 'Extends ActiveRecord to provide batch insertion capabilities'
|
28
|
-
gem.description = 'Adds batch insertion capabilities to ActiveRecord model classes.'
|
29
|
-
gem.files = Dir[
|
30
|
-
'[a-zA-Z]*',
|
31
|
-
'generators/**/*',
|
32
|
-
'lib/**/*',
|
33
|
-
'rails/**/*',
|
34
|
-
'spec/**/*'
|
35
|
-
]
|
36
|
-
gem.extra_rdoc_files = ['README.md']
|
37
|
-
gem.authors = ['Shaun Mangelsdorf']
|
38
|
-
gem.homepage = 'http://smangelsdorf.github.com'
|
39
|
-
gem.version = '0.3'
|
40
|
-
end
|
41
|
-
rescue LoadError
|
42
|
-
puts "Jeweler could not be sourced"
|
43
|
-
end
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/batch_insert/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Shaun Mangelsdorf"]
|
6
|
+
gem.email = ["s.mangelsdorf@gmail.com"]
|
7
|
+
gem.description = %q{Adds batch insertion capabilities to ActiveRecord model classes.}
|
8
|
+
gem.summary = %q{Extends ActiveRecord to provide batch insertion capabilities}
|
9
|
+
|
10
|
+
gem.homepage = "http://github.com/smangelsdorf/batch_insert"
|
11
|
+
|
12
|
+
gem.files = `git ls-files`.split($\)
|
13
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
|
+
gem.name = "batch_insert"
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.version = BatchInsert::VERSION
|
18
|
+
end
|
data/lib/batch_insert.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Released under the MIT license. See the MIT-LICENSE file for details
|
2
|
+
|
2
3
|
module BatchInsert
|
3
4
|
module ActiveRecordExtension
|
4
5
|
module ClassMethods
|
@@ -51,8 +52,8 @@ module BatchInsert
|
|
51
52
|
initializer 'batch_insert.install_active_record_mixins' do
|
52
53
|
ActiveRecord::Base.instance_eval do
|
53
54
|
send :extend, ::BatchInsert::ActiveRecordExtension::ClassMethods
|
54
|
-
|
55
|
-
|
55
|
+
class_attribute :batched_inserts
|
56
|
+
class_attribute :batched_insert_opts
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batch_insert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: "0.3"
|
9
|
+
version: "1.0"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Shaun Mangelsdorf
|
@@ -14,26 +14,31 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2013-01-16 00:00:00 Z
|
18
18
|
dependencies: []
|
19
19
|
|
20
20
|
description: Adds batch insertion capabilities to ActiveRecord model classes.
|
21
21
|
email:
|
22
|
+
- s.mangelsdorf@gmail.com
|
22
23
|
executables: []
|
23
24
|
|
24
25
|
extensions: []
|
25
26
|
|
26
|
-
extra_rdoc_files:
|
27
|
-
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
28
29
|
files:
|
29
|
-
-
|
30
|
+
- .gitignore
|
31
|
+
- Gemfile
|
32
|
+
- LICENSE
|
30
33
|
- README.md
|
31
34
|
- Rakefile
|
35
|
+
- batch_insert.gemspec
|
32
36
|
- init.rb
|
33
37
|
- install.rb
|
34
38
|
- lib/batch_insert.rb
|
39
|
+
- lib/batch_insert/version.rb
|
35
40
|
- uninstall.rb
|
36
|
-
homepage: http://
|
41
|
+
homepage: http://github.com/smangelsdorf/batch_insert
|
37
42
|
licenses: []
|
38
43
|
|
39
44
|
post_install_message:
|
@@ -62,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
67
|
requirements: []
|
63
68
|
|
64
69
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
70
|
+
rubygems_version: 1.8.24
|
66
71
|
signing_key:
|
67
72
|
specification_version: 3
|
68
73
|
summary: Extends ActiveRecord to provide batch insertion capabilities
|