rails_admin_import 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7246d47915d0a166fcdb67b2f8a4051aad8b062
4
- data.tar.gz: 9fd8f2d8688550b778525573f44f17090e3af2de
3
+ metadata.gz: 433bf6ef9b6b129fe87eaefcf77c073074c525ee
4
+ data.tar.gz: 6aa3d4adba6761d8dd66fa2546013402484a97fd
5
5
  SHA512:
6
- metadata.gz: 53ae1aff8958f4d071952e3d065620e64a0b5c1e004d1320d901f97d09dbc203e5f214c28b5e00a9c236d30a116e55eda04fe3a043f52920a05824cb21a05108
7
- data.tar.gz: 0597e2e2231b56665fc2ef4aae0663c515fad752669fad15cbc6ca72b6f9e8bd62a2e1df313b2da6810628d7e8ea90877a23263a0b7eeebbbe3cd851c2a644a6
6
+ metadata.gz: 848291b1ee4367e81937750690f228500d3e3f54d3832b4fea4c9e3261b7f80fe3d6c6540eec54c5d422fcb577f1ca2ed225b980403409f336b31c5f6e3ab634
7
+ data.tar.gz: 6967a8a96dcd8a63496341bf958700e862b6e2076ec82fd213bd72813e97051d0a48e44ca4eccd0ed790b5196414790504d00108ca7f1b89621b9b84d94fd812
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ # 1.3.1 / 2016-02-11
4
+
5
+ - Bugfix: Create log/import directory when logging config option is enabled. Thanks @yovasx2!
6
+
3
7
  # 1.3.0 / 2015-11-24
4
8
 
5
9
  - Use `where.first` instead of `find_by` so update works for Mongoid
data/README.md CHANGED
@@ -47,6 +47,7 @@ end
47
47
  * If you are using CanCanCan for authorization, add to ability.rb to specify which models can be imported:
48
48
 
49
49
  ```ruby
50
+ cannot :import, :all
50
51
  can :import, [User, Model1, Model2]
51
52
  ```
52
53
 
@@ -150,6 +151,18 @@ RailsAdmin.config do |config|
150
151
  end
151
152
  ```
152
153
 
154
+ * To overwrite the [default excluded fields](https://github.com/stephskardal/rails_admin_import/blob/master/lib/rails_admin_import/config/sections/import.rb#L13) and allow matching to `:id` on import
155
+
156
+ ```ruby
157
+ RailsAdmin.config do |config|
158
+ config.model 'User' do
159
+ import do
160
+ default_excluded_fields [:created_at, :updated_at]
161
+ end
162
+ end
163
+ end
164
+ ```
165
+
153
166
  ## Import hooks
154
167
 
155
168
 
@@ -37,7 +37,9 @@ module RailsAdminImport
37
37
 
38
38
  def copy_uploaded_file_to_log_dir
39
39
  copy_filename = "#{Time.now.strftime("%Y-%m-%d-%H-%M-%S")}-import.csv"
40
- copy_path = File.join(Rails.root, "log", "import", copy_filename)
40
+ dir_path = File.join(Rails.root, "log", "import")
41
+ FileUtils.mkdir_p(dir_path)
42
+ copy_path = File.join(dir_path, copy_filename)
41
43
  FileUtils.copy(filename, copy_path)
42
44
  end
43
45
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminImport
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steph Skardal
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-24 00:00:00.000000000 Z
12
+ date: 2016-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -140,3 +140,4 @@ signing_key:
140
140
  specification_version: 4
141
141
  summary: Import functionality for Rails Admin
142
142
  test_files: []
143
+ has_rdoc: