dumped_railers 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/README.md +16 -3
- data/lib/dumped_railers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a93dbe684079409978553480483dbd5d2727f1f694470a8b62e89e0715fbe8
|
4
|
+
data.tar.gz: 266714eaca3eb9311effa69a5a6a1d4d784c758f04ea50574d24a44fcbe6a210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f858057d3a62e389a01580a42fc926491a6c55e1f351a27a1d631fffba06727ccfecf6109848e1d547897218924398f1dc1176d9733205d8164cb7332987dae3
|
7
|
+
data.tar.gz: 4ee34e3d764eb00f8b244fdacce154f94cae38a6839c71bd7b640907fea235c84d8eaf83b1519fc6872fe305383d031253a55b5f91b79d39b5c96facb821c4f8
|
data/CHANGELOG.md
CHANGED
@@ -22,4 +22,7 @@
|
|
22
22
|
- Cope with relations that has different name with the actual class name
|
23
23
|
(e.g. associations defined using `:class_name` and `:foreign_key` options)
|
24
24
|
|
25
|
-
|
25
|
+
## [0.1.4]
|
26
|
+
### Changed
|
27
|
+
- Update documents not to eagerload DumpedRailers to prevent accidental data breakage / leakage.
|
28
|
+
To activate, it is preferable to require explicitly where necessary.
|
data/README.md
CHANGED
@@ -22,7 +22,10 @@ This feature can particularily help you in the following senarios:
|
|
22
22
|
Add this line to your application's Gemfile:
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem
|
25
|
+
# if you use this gem in production, `require: false` would be recommended
|
26
|
+
# to prevent accidental database leakage/breakage.
|
27
|
+
|
28
|
+
gem 'dumped_railers', require: false
|
26
29
|
```
|
27
30
|
|
28
31
|
And then execute:
|
@@ -37,7 +40,13 @@ Or install it yourself as:
|
|
37
40
|
|
38
41
|
### Getting Started
|
39
42
|
|
40
|
-
*
|
43
|
+
* Require dumped_railers where necessary (e.g. in your rake tasks, or script files)
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
require 'dumped_railers'
|
47
|
+
```
|
48
|
+
|
49
|
+
* if you want to dump records from (let's say) User, Item, and Tag, just run the following.
|
41
50
|
|
42
51
|
```ruby
|
43
52
|
DumpedRailers.dump!(User, Item, Tag, base_dir: 'tmp/fixtures/')
|
@@ -146,9 +155,13 @@ class Egg < ActiveRecord::Base
|
|
146
155
|
end
|
147
156
|
```
|
148
157
|
|
149
|
-
*
|
158
|
+
* For the same reason, self-associated model cannot be imported currently. (might be updated in the future version)
|
159
|
+
|
160
|
+
* When an exception was raised, checking your log might give you a good hint (desperately staring at the backtrace won't give much information)
|
150
161
|
consider displaying `tail -f logs/development.log` while executing your script.
|
151
162
|
|
163
|
+
* DumpedRailers is tested against various association types, as long as target models and underlying tables have 1-on-1 mapping (straightforward ActiveRecord pattern). Currently we haven't test this against STI, CTI, as such. Applying this gem to such models might lead to some unexpected results.
|
164
|
+
|
152
165
|
## Development
|
153
166
|
|
154
167
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumped_railers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koji Onishi
|
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
requirements: []
|
196
|
-
rubygems_version: 3.0
|
196
|
+
rubygems_version: 3.2.0
|
197
197
|
signing_key:
|
198
198
|
specification_version: 4
|
199
199
|
summary: A flexible fixture importer/exporter, that can transport ActiveRecord data
|