active_admin_import 2.1.2 → 3.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +4 -0
  3. data/.travis.yml +9 -0
  4. data/Gemfile +16 -0
  5. data/README.md +73 -173
  6. data/Rakefile +7 -2
  7. data/active_admin_import.gemspec +5 -3
  8. data/app/views/admin/import.html.erb +1 -1
  9. data/config/locales/en.yml +11 -4
  10. data/config/locales/es.yml +18 -0
  11. data/config/locales/it.yml +3 -1
  12. data/config/locales/zh-CN.yml +24 -0
  13. data/lib/active_admin_import/dsl.rb +39 -31
  14. data/lib/active_admin_import/import_result.rb +39 -0
  15. data/lib/active_admin_import/importer.rb +91 -44
  16. data/lib/active_admin_import/model.rb +80 -29
  17. data/lib/active_admin_import/options.rb +44 -0
  18. data/lib/active_admin_import/version.rb +1 -1
  19. data/lib/active_admin_import.rb +3 -0
  20. data/spec/fixtures/files/author.csv +2 -0
  21. data/spec/fixtures/files/author_broken_header.csv +2 -0
  22. data/spec/fixtures/files/author_invalid.csv +2 -0
  23. data/spec/fixtures/files/authors.csv +3 -0
  24. data/spec/fixtures/files/authors_bom.csv +3 -0
  25. data/spec/fixtures/files/authors_invalid_db.csv +3 -0
  26. data/spec/fixtures/files/authors_invalid_model.csv +3 -0
  27. data/spec/fixtures/files/authors_no_headers.csv +2 -0
  28. data/spec/fixtures/files/authors_win1251_win_endline.csv +3 -0
  29. data/spec/fixtures/files/authors_with_ids.csv +3 -0
  30. data/spec/fixtures/files/authors_with_semicolons.csv +3 -0
  31. data/spec/fixtures/files/empty.csv +0 -0
  32. data/spec/fixtures/files/only_headers.csv +1 -0
  33. data/spec/fixtures/files/posts.csv +4 -0
  34. data/spec/fixtures/files/posts_for_author.csv +3 -0
  35. data/spec/fixtures/files/posts_for_author_no_headers.csv +2 -0
  36. data/spec/import_result_spec.rb +32 -0
  37. data/spec/import_spec.rb +432 -0
  38. data/spec/model_spec.rb +5 -0
  39. data/spec/spec_helper.rb +72 -0
  40. data/spec/support/active_model_lint.rb +14 -0
  41. data/spec/support/admin.rb +20 -0
  42. data/spec/support/rails_template.rb +29 -0
  43. data/tasks/test.rake +6 -0
  44. metadata +80 -19
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 3.0.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Fedoronchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-import
@@ -16,34 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.4'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.4.1
19
+ version: 0.8.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '0.4'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.4.1
26
+ version: 0.8.0
33
27
  - !ruby/object:Gem::Dependency
34
- name: activeadmin
28
+ name: rchardet
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ">="
31
+ - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: 0.6.0
33
+ version: '1.5'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - ">="
38
+ - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: 0.6.0
40
+ version: '1.5'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rubyzip
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -64,6 +58,20 @@ dependencies:
64
58
  - - ">="
65
59
  - !ruby/object:Gem::Version
66
60
  version: 1.0.0
61
+ - !ruby/object:Gem::Dependency
62
+ name: rails
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '4.0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '4.0'
67
75
  description: The most efficient way to import for Active Admin
68
76
  email:
69
77
  - fedoronchuk@gmail.com
@@ -72,6 +80,8 @@ extensions: []
72
80
  extra_rdoc_files: []
73
81
  files:
74
82
  - ".gitignore"
83
+ - ".hound.yml"
84
+ - ".travis.yml"
75
85
  - Gemfile
76
86
  - LICENSE
77
87
  - README.md
@@ -79,14 +89,42 @@ files:
79
89
  - active_admin_import.gemspec
80
90
  - app/views/admin/import.html.erb
81
91
  - config/locales/en.yml
92
+ - config/locales/es.yml
82
93
  - config/locales/it.yml
94
+ - config/locales/zh-CN.yml
83
95
  - lib/active_admin_import.rb
84
96
  - lib/active_admin_import/authorization.rb
85
97
  - lib/active_admin_import/dsl.rb
86
98
  - lib/active_admin_import/engine.rb
99
+ - lib/active_admin_import/import_result.rb
87
100
  - lib/active_admin_import/importer.rb
88
101
  - lib/active_admin_import/model.rb
102
+ - lib/active_admin_import/options.rb
89
103
  - lib/active_admin_import/version.rb
104
+ - spec/fixtures/files/author.csv
105
+ - spec/fixtures/files/author_broken_header.csv
106
+ - spec/fixtures/files/author_invalid.csv
107
+ - spec/fixtures/files/authors.csv
108
+ - spec/fixtures/files/authors_bom.csv
109
+ - spec/fixtures/files/authors_invalid_db.csv
110
+ - spec/fixtures/files/authors_invalid_model.csv
111
+ - spec/fixtures/files/authors_no_headers.csv
112
+ - spec/fixtures/files/authors_win1251_win_endline.csv
113
+ - spec/fixtures/files/authors_with_ids.csv
114
+ - spec/fixtures/files/authors_with_semicolons.csv
115
+ - spec/fixtures/files/empty.csv
116
+ - spec/fixtures/files/only_headers.csv
117
+ - spec/fixtures/files/posts.csv
118
+ - spec/fixtures/files/posts_for_author.csv
119
+ - spec/fixtures/files/posts_for_author_no_headers.csv
120
+ - spec/import_result_spec.rb
121
+ - spec/import_spec.rb
122
+ - spec/model_spec.rb
123
+ - spec/spec_helper.rb
124
+ - spec/support/active_model_lint.rb
125
+ - spec/support/admin.rb
126
+ - spec/support/rails_template.rb
127
+ - tasks/test.rake
90
128
  homepage: http://github.com/Fivell/active_admin_import
91
129
  licenses:
92
130
  - MIT
@@ -102,14 +140,37 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
140
  version: '0'
103
141
  required_rubygems_version: !ruby/object:Gem::Requirement
104
142
  requirements:
105
- - - ">="
143
+ - - ">"
106
144
  - !ruby/object:Gem::Version
107
- version: '0'
145
+ version: 1.3.1
108
146
  requirements: []
109
147
  rubyforge_project:
110
- rubygems_version: 2.2.2
148
+ rubygems_version: 2.4.6
111
149
  signing_key:
112
150
  specification_version: 4
113
151
  summary: ActiveAdmin import based on activerecord-import gem.
114
- test_files: []
152
+ test_files:
153
+ - spec/fixtures/files/author.csv
154
+ - spec/fixtures/files/author_broken_header.csv
155
+ - spec/fixtures/files/author_invalid.csv
156
+ - spec/fixtures/files/authors.csv
157
+ - spec/fixtures/files/authors_bom.csv
158
+ - spec/fixtures/files/authors_invalid_db.csv
159
+ - spec/fixtures/files/authors_invalid_model.csv
160
+ - spec/fixtures/files/authors_no_headers.csv
161
+ - spec/fixtures/files/authors_win1251_win_endline.csv
162
+ - spec/fixtures/files/authors_with_ids.csv
163
+ - spec/fixtures/files/authors_with_semicolons.csv
164
+ - spec/fixtures/files/empty.csv
165
+ - spec/fixtures/files/only_headers.csv
166
+ - spec/fixtures/files/posts.csv
167
+ - spec/fixtures/files/posts_for_author.csv
168
+ - spec/fixtures/files/posts_for_author_no_headers.csv
169
+ - spec/import_result_spec.rb
170
+ - spec/import_spec.rb
171
+ - spec/model_spec.rb
172
+ - spec/spec_helper.rb
173
+ - spec/support/active_model_lint.rb
174
+ - spec/support/admin.rb
175
+ - spec/support/rails_template.rb
115
176
  has_rdoc: