import 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +12 -6
- data/README.rdoc +1 -9
- data/lib/import.rb +3 -0
- data/lib/import/importable.rb +14 -0
- data/lib/import/no_relation.rb +5 -2
- data/lib/import/resource.rb +5 -21
- data/lib/import/version.rb +1 -1
- data/spec/dummy/app/models/music/artist.rb +0 -12
- data/spec/dummy/log/test.log +200 -0
- data/spec/models/no_relation_spec.rb +11 -6
- metadata +26 -27
- data/spec/dummy/app/models/importer/music/artist.rb +0 -2
- data/spec/dummy/config/database.yml +0 -42
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git@github.com:Applicat/activerecord-import.git
|
3
|
+
revision: b4d634d74c9fefa9a7a5fe1c6d3c46ea089bd7be
|
4
|
+
specs:
|
5
|
+
activerecord-import (0.2.9)
|
6
|
+
activerecord (~> 3.0pre)
|
7
|
+
activerecord (~> 3.0pre)
|
8
|
+
|
1
9
|
PATH
|
2
10
|
remote: .
|
3
11
|
specs:
|
4
|
-
import (0.0.
|
12
|
+
import (0.0.3)
|
5
13
|
activerecord-import
|
6
14
|
rails (~> 3.1.0)
|
7
15
|
state_machine
|
@@ -34,9 +42,6 @@ GEM
|
|
34
42
|
activesupport (= 3.1.0)
|
35
43
|
arel (~> 2.2.1)
|
36
44
|
tzinfo (~> 0.3.29)
|
37
|
-
activerecord-import (0.2.8)
|
38
|
-
activerecord (~> 3.0pre)
|
39
|
-
activerecord (~> 3.0pre)
|
40
45
|
activeresource (3.1.0)
|
41
46
|
activemodel (= 3.1.0)
|
42
47
|
activesupport (= 3.1.0)
|
@@ -62,7 +67,7 @@ GEM
|
|
62
67
|
factory_girl (~> 2.1.0)
|
63
68
|
railties (>= 3.0.0)
|
64
69
|
ffi (1.0.9)
|
65
|
-
guard (0.
|
70
|
+
guard (0.8.0)
|
66
71
|
thor (~> 0.14.6)
|
67
72
|
guard-rspec (0.4.5)
|
68
73
|
guard (>= 0.4.0)
|
@@ -133,7 +138,7 @@ GEM
|
|
133
138
|
sprockets (2.0.0)
|
134
139
|
hike (~> 1.2)
|
135
140
|
rack (~> 1.0)
|
136
|
-
tilt (
|
141
|
+
tilt (~> 1.1, != 1.3.0)
|
137
142
|
state_machine (1.0.2)
|
138
143
|
thor (0.14.6)
|
139
144
|
tilt (1.3.3)
|
@@ -150,6 +155,7 @@ PLATFORMS
|
|
150
155
|
ruby
|
151
156
|
|
152
157
|
DEPENDENCIES
|
158
|
+
activerecord-import!
|
153
159
|
capybara
|
154
160
|
factory_girl_rails
|
155
161
|
guard-rspec
|
data/README.rdoc
CHANGED
@@ -4,15 +4,7 @@ Data entity importer for Ruby and asynchronous handling wrapped around activerec
|
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
rails g import:install
|
10
|
-
|
11
|
-
Run the installed migration
|
12
|
-
|
13
|
-
rake db:migrate
|
14
|
-
|
15
|
-
## Changelog
|
7
|
+
https://github.com/Applicat/Import/wiki
|
16
8
|
|
17
9
|
## License
|
18
10
|
|
data/lib/import.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
class ActiveRecord::Base
|
2
|
+
class << self
|
3
|
+
def find_existing_entries(criteria, values)
|
4
|
+
class_eval <<-EOV
|
5
|
+
find_by_sql(
|
6
|
+
[
|
7
|
+
"SELECT #{self.table_name}.id AS id, #{self.table_name}.name AS name FROM #{self.table_name} WHERE #{criteria}",
|
8
|
+
"#{values.join('", "')}"
|
9
|
+
]
|
10
|
+
).map{|a| [a.id, a.name]}
|
11
|
+
EOV
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/import/no_relation.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
module Import
|
2
|
-
class NoRelation < Resource
|
2
|
+
class NoRelation < Resource
|
3
|
+
attr_accessible :logger, :input, :email, :resource_class
|
4
|
+
attr_accessor :resource_class
|
5
|
+
|
3
6
|
protected
|
4
7
|
|
5
8
|
def parse_resource(resource)
|
@@ -7,7 +10,7 @@ module Import
|
|
7
10
|
end
|
8
11
|
|
9
12
|
def append_existing_resources_criteria(resource)
|
10
|
-
@existing_resources_criteria << "(#{table_name}.name = ?)"
|
13
|
+
@existing_resources_criteria << "(#{resource_class.table_name}.name = ?)"
|
11
14
|
@existing_resources_criteria_values << resource
|
12
15
|
end
|
13
16
|
|
data/lib/import/resource.rb
CHANGED
@@ -4,20 +4,7 @@ module Import
|
|
4
4
|
|
5
5
|
belongs_to :author, :class_name => 'User'
|
6
6
|
belongs_to :parent, :polymorphic => true
|
7
|
-
|
8
|
-
TYPES = [
|
9
|
-
[I18n.t('imports.types.user_import'), 'Importer::User'],
|
10
|
-
[I18n.t('imports.types.group_affiliation_import'), 'Importer::GroupAffiliation'],
|
11
|
-
[I18n.t('imports.types.music_group_label_affiliation_import'), 'Importer::Music::GroupLabelAffiliation'],
|
12
|
-
[I18n.t('imports.types.music_group_artist_affiliation_import'), 'Importer::Music::GroupArtistAffiliation'],
|
13
|
-
[I18n.t('imports.types.music_group_release_affiliation_import'), 'Importer::Music::GroupReleaseAffiliation'],
|
14
|
-
[I18n.t('imports.types.music_group_video_affiliation_import'), 'Importer::Music::GroupVideoAffiliation'],
|
15
|
-
[I18n.t('imports.types.music_artist_import'), 'Importer::Music::Artist'],
|
16
|
-
[I18n.t('imports.types.music_release_import'), 'Import::Music::Release']
|
17
|
-
]
|
18
|
-
INDEX_COLUMNS = ['id', 'type', 'author_id', 'parent_type', 'parent_id']
|
19
7
|
|
20
|
-
validates :type, :inclusion => { :in => TYPES.map(&:last) }
|
21
8
|
validates :input, :presence => true
|
22
9
|
validates_format_of :email, :with => /\A[^@]+@([^@\.]+\.)+[^@\.]+\z/, :allow_blank => true
|
23
10
|
|
@@ -70,10 +57,6 @@ module Import
|
|
70
57
|
end
|
71
58
|
|
72
59
|
def collection(force = true)
|
73
|
-
unless resource_class.respond_to?(:find_existing_entries)
|
74
|
-
raise I18n.t('imports.errors.derive_from_resource', :class_name => resource_class.class_name)
|
75
|
-
end
|
76
|
-
|
77
60
|
if force
|
78
61
|
@existing_collection = find_existing_resources
|
79
62
|
else
|
@@ -84,11 +67,11 @@ module Import
|
|
84
67
|
protected
|
85
68
|
|
86
69
|
def parse_resource(resource)
|
87
|
-
raise I18n.t('imports.errors.override_parse_resource', :class_name => self.
|
70
|
+
raise I18n.t('imports.errors.override_parse_resource', :class_name => self.class.name)
|
88
71
|
end
|
89
72
|
|
90
73
|
def append_existing_resources_criteria(resource)
|
91
|
-
raise I18n.t('imports.errors.override_append_existing_resources_criteria', :class_name => self.
|
74
|
+
raise I18n.t('imports.errors.override_append_existing_resources_criteria', :class_name => self.class.name)
|
92
75
|
end
|
93
76
|
|
94
77
|
def all_dependencies_loaded?
|
@@ -99,7 +82,7 @@ module Import
|
|
99
82
|
end
|
100
83
|
|
101
84
|
def import_resources
|
102
|
-
raise I18n.t('imports.errors.override_import_resources', :class_name => self.
|
85
|
+
raise I18n.t('imports.errors.override_import_resources', :class_name => self.class.name)
|
103
86
|
end
|
104
87
|
|
105
88
|
def find_existing_resources
|
@@ -114,7 +97,7 @@ module Import
|
|
114
97
|
end
|
115
98
|
|
116
99
|
def parsed_resources_missing
|
117
|
-
raise I18n.t('imports.errors.override_parsed_resources_missing', :class_name => self.
|
100
|
+
raise I18n.t('imports.errors.override_parsed_resources_missing', :class_name => self.class.name)
|
118
101
|
end
|
119
102
|
|
120
103
|
def resource_class
|
@@ -160,6 +143,7 @@ module Import
|
|
160
143
|
if self.exception.blank?
|
161
144
|
return true
|
162
145
|
elsif self.parent_import_id.blank?
|
146
|
+
raise self.exception
|
163
147
|
self.my_fail!
|
164
148
|
return false
|
165
149
|
else
|
data/lib/import/version.rb
CHANGED
@@ -5,16 +5,4 @@ class Music::Artist < ActiveRecord::Base
|
|
5
5
|
validates_uniqueness_of :name, :case_sensitive => false
|
6
6
|
|
7
7
|
attr_accessible :name, :tag_list, :author_id
|
8
|
-
|
9
|
-
# TODO: Move to Import::NoRelation
|
10
|
-
def self.find_existing_entries(criteria, values)
|
11
|
-
class_eval <<-EOV
|
12
|
-
find_by_sql(
|
13
|
-
[
|
14
|
-
"SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE #{criteria}",
|
15
|
-
"#{values.join('", "')}"
|
16
|
-
]
|
17
|
-
).map{|a| [a.id, a.name]}
|
18
|
-
EOV
|
19
|
-
end
|
20
8
|
end
|
data/spec/dummy/log/test.log
CHANGED
@@ -36,3 +36,203 @@
|
|
36
36
|
[1m[35m (0.7ms)[0m RELEASE SAVEPOINT active_record_1
|
37
37
|
[1m[36mMusic::Artist Load (3.8ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
38
38
|
[1m[35m (8.4ms)[0m ROLLBACK
|
39
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
40
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
41
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 04:29:39', NULL, NULL, 'Paradise Lost', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 04:29:39')[0m
|
42
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
43
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
44
|
+
[1m[35mMusic::Artist Load (0.3ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Paradise Lost')
|
45
|
+
[1m[36m (26.7ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
46
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.3ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Paradise Lost','2011-09-26 04:29:39','2011-09-26 04:29:39') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
47
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
49
|
+
[1m[36m (0.6ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 04:29:39', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 10[0m
|
50
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
51
|
+
[1m[36mMusic::Artist Load (0.6ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
52
|
+
[1m[35m (36.9ms)[0m ROLLBACK
|
53
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
54
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
55
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 04:32:11', NULL, NULL, 'Paradise Lost', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 04:32:11')[0m
|
56
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
57
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
58
|
+
[1m[35mMusic::Artist Load (1.5ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Paradise Lost')
|
59
|
+
[1m[36m (0.5ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
60
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.4ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Paradise Lost','2011-09-26 04:32:11','2011-09-26 04:32:11') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
61
|
+
[1m[36m (1.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
62
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
63
|
+
[1m[36m (0.6ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 04:32:11', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 11[0m
|
64
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
65
|
+
[1m[36mMusic::Artist Load (2.0ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
66
|
+
[1m[35m (29.1ms)[0m ROLLBACK
|
67
|
+
[1m[36m (28.1ms)[0m [1mBEGIN[0m
|
68
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
69
|
+
[1m[36mSQL (87.5ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 05:44:26', NULL, NULL, 'Paradise Lost', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 05:44:26')[0m
|
70
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
71
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
72
|
+
[1m[35mMusic::Artist Load (15.1ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Paradise Lost')
|
73
|
+
[1m[36m (0.4ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
74
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.6ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Paradise Lost','2011-09-26 05:44:26','2011-09-26 05:44:26') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
75
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
76
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
77
|
+
[1m[36m (25.8ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 05:44:26', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 12[0m
|
78
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
79
|
+
[1m[36mMusic::Artist Load (0.6ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
80
|
+
[1m[35m (26.3ms)[0m ROLLBACK
|
81
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
82
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
83
|
+
[1m[36mSQL (49.7ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 05:56:47', NULL, NULL, 'Paradise Lost', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 05:56:47')[0m
|
84
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
85
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
86
|
+
[1m[35mMusic::Artist Load (64.2ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Paradise Lost')
|
87
|
+
[1m[36m (0.5ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
88
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.3ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Paradise Lost','2011-09-26 05:56:47','2011-09-26 05:56:47') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
89
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
90
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
91
|
+
[1m[36m (2.6ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 05:56:47', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 13[0m
|
92
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
93
|
+
[1m[36mMusic::Artist Load (0.7ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
94
|
+
[1m[35m (41.6ms)[0m ROLLBACK
|
95
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
96
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
97
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 05:56:47', NULL, NULL, 'Böhse Onkelz', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 05:56:47')[0m
|
98
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
99
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
100
|
+
[1m[35mMusic::Artist Load (0.4ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')
|
101
|
+
[1m[36m (0.4ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
102
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.2ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Böhse Onkelz','2011-09-26 05:56:47','2011-09-26 05:56:47') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
103
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
104
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
105
|
+
[1m[36m (0.5ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 05:56:47', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 14[0m
|
106
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
107
|
+
[1m[36mMusic::Artist Load (0.7ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
108
|
+
[1m[35m (75.0ms)[0m ROLLBACK
|
109
|
+
[1m[36m (0.8ms)[0m [1mBEGIN[0m
|
110
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
111
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 05:57:54', NULL, NULL, 'Böhse Onkelz', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 05:57:54')[0m
|
112
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
113
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
114
|
+
[1m[35mMusic::Artist Load (0.4ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')
|
115
|
+
[1m[36m (0.4ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
116
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.2ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Böhse Onkelz','2011-09-26 05:57:54','2011-09-26 05:57:54') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
117
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
118
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
119
|
+
[1m[36m (0.5ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 05:57:54', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 15[0m
|
120
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
121
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
122
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
123
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 05:57:54', NULL, NULL, 'Böhse Onkelz', '--- {}\n', NULL, NULL, 'draft', 'Importer::Music::Artist', '2011-09-26 05:57:54')[0m
|
124
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
125
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
126
|
+
[1m[35mMusic::Artist Load (21.3ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')
|
127
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
128
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
129
|
+
[1m[36m (0.8ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 05:57:54', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Importer::Music::Artist') AND `imports`.`id` = 16[0m
|
130
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
131
|
+
[1m[36mMusic::Artist Load (0.9ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
132
|
+
[1m[35m (20.1ms)[0m SELECT COUNT(*) FROM `music_artists`
|
133
|
+
[1m[36m (3.9ms)[0m [1mROLLBACK[0m
|
134
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
135
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
136
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
137
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
138
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')[0m
|
139
|
+
Mysql2::Error: Unknown column 'no_relations.name' in 'where clause': SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')
|
140
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
141
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
142
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
143
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
144
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
145
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
146
|
+
[1m[36m (0.9ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
147
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
148
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')[0m
|
149
|
+
Mysql2::Error: Unknown column 'no_relations.name' in 'where clause': SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')
|
150
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
151
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
152
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
153
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
154
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
155
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
156
|
+
[1m[36mMusic::Artist Load (0.6ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')[0m
|
157
|
+
Mysql2::Error: Unknown column 'no_relations.name' in 'where clause': SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (no_relations.name = 'Böhse Onkelz')
|
158
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
159
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
160
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
161
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
162
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
163
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
164
|
+
[1m[36mMusic::Artist Load (1.8ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')[0m
|
165
|
+
[1m[35m (0.8ms)[0m SHOW VARIABLES like 'max_allowed_packet';
|
166
|
+
[1m[36mClass Create Many Without Validations Or Callbacks (0.3ms)[0m [1mINSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Böhse Onkelz','2011-09-26 06:16:31','2011-09-26 06:16:31') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)[0m
|
167
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
168
|
+
[1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
|
169
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
170
|
+
[1m[36mMusic::Artist Load (0.7ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
171
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
172
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
173
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
174
|
+
[1m[36mMusic::Artist Load (0.4ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')[0m
|
175
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
176
|
+
[1m[36m (1.4ms)[0m [1mSAVEPOINT active_record_1[0m
|
177
|
+
[1m[35m (0.5ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
178
|
+
[1m[36mMusic::Artist Load (0.6ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
179
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM `music_artists`
|
180
|
+
[1m[36m (31.6ms)[0m [1mROLLBACK[0m
|
181
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
182
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
183
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
184
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
185
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
186
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
187
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
188
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
189
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
190
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
191
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
192
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
193
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
194
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
195
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
196
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
197
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')[0m
|
198
|
+
[1m[35m (0.6ms)[0m SHOW VARIABLES like 'max_allowed_packet';
|
199
|
+
[1m[36mClass Create Many Without Validations Or Callbacks (0.3ms)[0m [1mINSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Böhse Onkelz','2011-09-26 06:36:58','2011-09-26 06:36:58') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)[0m
|
200
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
201
|
+
[1m[36m (1.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
202
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
203
|
+
[1m[36mMusic::Artist Load (0.6ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
204
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
205
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
206
|
+
[1m[35m (1.6ms)[0m SAVEPOINT active_record_1
|
207
|
+
[1m[36mMusic::Artist Load (0.4ms)[0m [1mSELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')[0m
|
208
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
209
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
210
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
211
|
+
[1m[36mMusic::Artist Load (0.4ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
212
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM `music_artists`
|
213
|
+
[1m[36m (4.8ms)[0m [1mROLLBACK[0m
|
214
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
215
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
216
|
+
[1m[36mSQL (1.5ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 09:51:42', NULL, NULL, 'Böhse Onkelz', '--- {}\n', NULL, NULL, 'draft', 'Import::NoRelation', '2011-09-26 09:51:42')[0m
|
217
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
218
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
219
|
+
[1m[35mMusic::Artist Load (0.4ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')
|
220
|
+
[1m[36m (0.5ms)[0m [1mSHOW VARIABLES like 'max_allowed_packet';[0m
|
221
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.3ms)[0m INSERT INTO `music_artists` (`name`,`created_at`,`updated_at`) VALUES ('Böhse Onkelz','2011-09-26 09:51:42','2011-09-26 09:51:42') ON DUPLICATE KEY UPDATE `music_artists`.`updated_at`=VALUES(`updated_at`)
|
222
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
223
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
224
|
+
[1m[36m (34.5ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 09:51:42', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Import::NoRelation') AND `imports`.`id` = 17[0m
|
225
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
226
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
227
|
+
[1m[35m (1.2ms)[0m SAVEPOINT active_record_1
|
228
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO `imports` (`author_id`, `created_at`, `email`, `exception`, `input`, `parameters`, `parent_id`, `parent_type`, `state`, `type`, `updated_at`) VALUES (NULL, '2011-09-26 09:51:42', NULL, NULL, 'Böhse Onkelz', '--- {}\n', NULL, NULL, 'draft', 'Import::NoRelation', '2011-09-26 09:51:42')[0m
|
229
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
230
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
231
|
+
[1m[35mMusic::Artist Load (0.4ms)[0m SELECT music_artists.id AS id, music_artists.name AS name FROM music_artists WHERE (music_artists.name = 'Böhse Onkelz')
|
232
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
233
|
+
[1m[35m (1.1ms)[0m SAVEPOINT active_record_1
|
234
|
+
[1m[36m (0.6ms)[0m [1mUPDATE `imports` SET `state` = 'processed', `updated_at` = '2011-09-26 09:51:42', `parameters` = '--- {}\n' WHERE `imports`.`type` IN ('Import::NoRelation') AND `imports`.`id` = 18[0m
|
235
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
236
|
+
[1m[36mMusic::Artist Load (0.5ms)[0m [1mSELECT `music_artists`.* FROM `music_artists` ORDER BY `music_artists`.`id` DESC LIMIT 1[0m
|
237
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM `music_artists`
|
238
|
+
[1m[36m (29.4ms)[0m [1mROLLBACK[0m
|
@@ -1,13 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'spec_helper'
|
2
3
|
|
3
4
|
describe Import::NoRelation do
|
4
5
|
it "should" do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
2.times do
|
7
|
+
import = Import::NoRelation.new(:resource_class => Music::Artist, :input => 'Böhse Onkelz')
|
8
|
+
|
9
|
+
import.save
|
10
|
+
|
11
|
+
import.process
|
12
|
+
|
13
|
+
Music::Artist.last.name.should == 'Böhse Onkelz'
|
14
|
+
end
|
10
15
|
|
11
|
-
Music::Artist.
|
16
|
+
Music::Artist.count == 1
|
12
17
|
end
|
13
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-09-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &86102640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *86102640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: valium
|
27
|
-
requirement: &
|
27
|
+
requirement: &86102240 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *86102240
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: state_machine
|
38
|
-
requirement: &
|
38
|
+
requirement: &86101890 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *86101890
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activerecord-import
|
49
|
-
requirement: &
|
49
|
+
requirement: &86101490 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *86101490
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: mysql2
|
60
|
-
requirement: &
|
60
|
+
requirement: &86100950 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *86100950
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
|
-
requirement: &
|
71
|
+
requirement: &86100320 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 2.6.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *86100320
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec-rails
|
82
|
-
requirement: &
|
82
|
+
requirement: &86099570 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *86099570
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: capybara
|
93
|
-
requirement: &
|
93
|
+
requirement: &86095440 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *86095440
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: factory_girl_rails
|
104
|
-
requirement: &
|
104
|
+
requirement: &86095050 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *86095050
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: guard-rspec
|
115
|
-
requirement: &
|
115
|
+
requirement: &86094480 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *86094480
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: sdoc
|
126
|
-
requirement: &
|
126
|
+
requirement: &86093920 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *86093920
|
135
135
|
description: Data entity importer for Ruby and asynchronous handling wrapped around
|
136
136
|
activerecord-import and featured by valium and state_machine.
|
137
137
|
email:
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- lib/generators/import/install/install_generator.rb
|
153
153
|
- lib/generators/import/install/templates/migrations/1_create_imports.rb
|
154
154
|
- lib/import.rb
|
155
|
+
- lib/import/importable.rb
|
155
156
|
- lib/import/no_relation.rb
|
156
157
|
- lib/import/resource.rb
|
157
158
|
- lib/import/version.rb
|
@@ -166,14 +167,12 @@ files:
|
|
166
167
|
- spec/dummy/app/helpers/application_helper.rb
|
167
168
|
- spec/dummy/app/mailers/.gitkeep
|
168
169
|
- spec/dummy/app/models/.gitkeep
|
169
|
-
- spec/dummy/app/models/importer/music/artist.rb
|
170
170
|
- spec/dummy/app/models/music/artist.rb
|
171
171
|
- spec/dummy/app/views/layouts/application.html.erb
|
172
172
|
- spec/dummy/config.ru
|
173
173
|
- spec/dummy/config/application.rb
|
174
174
|
- spec/dummy/config/boot.rb
|
175
175
|
- spec/dummy/config/database.example.yml
|
176
|
-
- spec/dummy/config/database.yml
|
177
176
|
- spec/dummy/config/environment.rb
|
178
177
|
- spec/dummy/config/environments/development.rb
|
179
178
|
- spec/dummy/config/environments/production.rb
|
@@ -216,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
216
215
|
version: '0'
|
217
216
|
segments:
|
218
217
|
- 0
|
219
|
-
hash: -
|
218
|
+
hash: -444372351
|
220
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
220
|
none: false
|
222
221
|
requirements:
|
@@ -225,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
224
|
version: '0'
|
226
225
|
segments:
|
227
226
|
- 0
|
228
|
-
hash: -
|
227
|
+
hash: -444372351
|
229
228
|
requirements: []
|
230
229
|
rubyforge_project:
|
231
230
|
rubygems_version: 1.8.5
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
-
#
|
3
|
-
# Install the MYSQL driver
|
4
|
-
# gem install mysql2
|
5
|
-
#
|
6
|
-
# Ensure the MySQL gem is defined in your Gemfile
|
7
|
-
# gem 'mysql2'
|
8
|
-
#
|
9
|
-
# And be sure to use new-style password hashing:
|
10
|
-
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
11
|
-
development:
|
12
|
-
adapter: mysql2
|
13
|
-
encoding: utf8
|
14
|
-
reconnect: false
|
15
|
-
database: dummy_import_development
|
16
|
-
pool: 5
|
17
|
-
username: root
|
18
|
-
password: zero2005
|
19
|
-
socket: /var/run/mysqld/mysqld.sock
|
20
|
-
|
21
|
-
# Warning: The database defined as "test" will be erased and
|
22
|
-
# re-generated from your development database when you run "rake".
|
23
|
-
# Do not set this db to the same as development or production.
|
24
|
-
test:
|
25
|
-
adapter: mysql2
|
26
|
-
encoding: utf8
|
27
|
-
reconnect: false
|
28
|
-
database: dummy_import_test
|
29
|
-
pool: 5
|
30
|
-
username: root
|
31
|
-
password: zero2005
|
32
|
-
socket: /var/run/mysqld/mysqld.sock
|
33
|
-
|
34
|
-
production:
|
35
|
-
adapter: mysql2
|
36
|
-
encoding: utf8
|
37
|
-
reconnect: false
|
38
|
-
database: dummy_import_production
|
39
|
-
pool: 5
|
40
|
-
username: root
|
41
|
-
password: zero2005
|
42
|
-
socket: /var/run/mysqld/mysqld.sock
|