yaml_db 0.6.0 → 0.7.0

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: 97ea4b448b5e237251d13e2c8b5393a594105e56
4
- data.tar.gz: 98c49ef9d688d45c18bc94cda62a8816969cc2b0
3
+ metadata.gz: bcd06a2a881e3d840e518f5877e3e2f421fe5619
4
+ data.tar.gz: b3be2e7aa54e75030c2dbea760f585ce85980820
5
5
  SHA512:
6
- metadata.gz: ac7599aa51c7a3ee0237d849c008cb48abdb9d63fd3ff83ead8bf811fb06bf7e44ceb576a4beb4ff3635a0ac0b6fb4643f65a58d14cf6de4aff669e8c3a3984b
7
- data.tar.gz: ed53717fa314f06618fd810f880ace40400b3be74a57d6814cfe7b9844d29c2288ee148232d2aca5bc200b329d68efedb1a9aa63963237376d1e94275dfe9e00
6
+ metadata.gz: c223c0c64a9b17902b4dbe6aa687f4f8d47105cf02fa0dacd13397f13cf189d1d7ece3c94c86820cf38bec00e03b6447f930e840fe2525cfbf4a1c78f0aa9ea2
7
+ data.tar.gz: c0d7b642a2eb31caea3662717e27692c2c76e06e63d15fa7b53f6e3a78615bf5568e7032061b63c6677940e5359ebb748636a7052742212f4ba36a8340bdb1b5
data/README.md CHANGED
@@ -6,7 +6,7 @@ This can be used as a replacement for mysqldump or pg_dump, but only for the dat
6
6
 
7
7
  Any database that has an ActiveRecord adapter should work.
8
8
 
9
- This gem supports Rails versions 3.0 through 5.1.
9
+ This gem supports Rails versions 3.0 through 5.2.
10
10
 
11
11
  [![Build Status](https://travis-ci.org/yamldb/yaml_db.svg?branch=master)](https://travis-ci.org/yamldb/yaml_db)
12
12
 
@@ -26,7 +26,7 @@ All rake tasks will then be available to you.
26
26
  Further, there are tasks db:dump and db:load which do the entire database (the equivalent of running db:schema:dump followed by db:data:load). Also, there are other tasks recently added that allow the export of the database contents to/from multiple files (each one named after the table being dumped or loaded).
27
27
 
28
28
  rake db:data:dump_dir -> Dump contents of database to curr_dir_name/tablename.extension (defaults to yaml)
29
- rake db:data:load_dir -> Load contents of db/data_dir into database
29
+ rake db:data:load_dir -> Load contents of db/#{dir} into database (where dir is ENV['dir'] || 'base')
30
30
 
31
31
  In addition, we have plugins whereby you can export your database to/from various formats. We only deal with yaml and csv right now, but you can easily write tools for your own formats (such as Excel or XML). To use another format, just load setting the "class" parameter to the class you are using. This defaults to "YamlDb::Helper" which is a refactoring of the old yaml_db code. We'll shorten this to use class nicknames in a little bit.
32
32
 
@@ -58,7 +58,7 @@ module YamlDb
58
58
 
59
59
  class Load < SerializationHelper::Load
60
60
  def self.load_documents(io, truncate = true)
61
- YAML.load_documents(io) do |ydoc|
61
+ YAML.load_stream(io) do |ydoc|
62
62
  ydoc.keys.each do |table_name|
63
63
  next if ydoc[table_name].nil?
64
64
  load_table(table_name, ydoc[table_name], truncate)
@@ -185,7 +185,6 @@ module YamlDb
185
185
  pages = (total_count.to_f / records_per_page).ceil - 1
186
186
  keys = sort_keys(table)
187
187
  boolean_columns = Utils.boolean_columns(table)
188
- quoted_table_name = Utils.quote_table(table)
189
188
 
190
189
  (0..pages).to_a.each do |page|
191
190
  query = Arel::Table.new(table).order(*keys).skip(records_per_page*page).take(records_per_page).project(Arel.sql('*'))
@@ -1,3 +1,3 @@
1
1
  module YamlDb
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Wiggins
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-21 00:00:00.000000000 Z
12
+ date: 2018-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,9 +18,6 @@ dependencies:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '3.0'
21
- - - "<"
22
- - !ruby/object:Gem::Version
23
- version: '5.2'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,9 +25,6 @@ dependencies:
28
25
  - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '3.0'
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: '5.2'
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: rake
36
30
  requirement: !ruby/object:Gem::Requirement