yaml_db 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +4 -0
- data/README.markdown +2 -0
- data/VERSION +1 -1
- data/lib/serialization_helper.rb +2 -4
- data/yaml_db.gemspec +9 -12
- metadata +32 -32
data/.travis.yml
ADDED
data/README.markdown
CHANGED
@@ -6,6 +6,8 @@ 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. This gem is now Rails 3 only. For Rails 2, clone and checkout the Rails2 branch.
|
8
8
|
|
9
|
+
[](http://travis-ci.org/ludicast/yaml_db)
|
10
|
+
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
Simply add to your Gemfile:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/serialization_helper.rb
CHANGED
@@ -181,10 +181,8 @@ module SerializationHelper
|
|
181
181
|
quoted_table_name = SerializationHelper::Utils.quote_table(table)
|
182
182
|
|
183
183
|
(0..pages).to_a.each do |page|
|
184
|
-
|
185
|
-
|
186
|
-
)
|
187
|
-
records = ActiveRecord::Base.connection.select_all(sql)
|
184
|
+
query = Arel::Table.new(table).order(id).skip(records_per_page*page).take(records_per_page).project(Arel.sql('*'))
|
185
|
+
records = ActiveRecord::Base.connection.select_all(query)
|
188
186
|
records = SerializationHelper::Utils.convert_booleans(records, boolean_columns)
|
189
187
|
yield records
|
190
188
|
end
|
data/yaml_db.gemspec
CHANGED
@@ -4,22 +4,19 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.2.
|
7
|
+
s.name = "yaml_db"
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Adam Wiggins", "Orion Henry"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
|
15
|
-
This can be used as a replacement for mysqldump or pg_dump, but only for the databases typically used by Rails apps. Users, permissions, schemas, triggers, and other advanced database features are not supported - by design.
|
16
|
-
Any database that has an ActiveRecord adapter should work
|
17
|
-
}
|
18
|
-
s.email = %q{nate@ludicast.com}
|
12
|
+
s.date = "2012-04-30"
|
13
|
+
s.description = "\nYamlDb is a database-independent format for dumping and restoring data. It complements the the database-independent schema format found in db/schema.rb. The data is saved into db/data.yml.\nThis can be used as a replacement for mysqldump or pg_dump, but only for the databases typically used by Rails apps. Users, permissions, schemas, triggers, and other advanced database features are not supported - by design.\nAny database that has an ActiveRecord adapter should work\n"
|
14
|
+
s.email = "nate@ludicast.com"
|
19
15
|
s.extra_rdoc_files = [
|
20
16
|
"README.markdown"
|
21
17
|
]
|
22
18
|
s.files = [
|
19
|
+
".travis.yml",
|
23
20
|
"README.markdown",
|
24
21
|
"Rakefile",
|
25
22
|
"VERSION",
|
@@ -39,10 +36,10 @@ Any database that has an ActiveRecord adapter should work
|
|
39
36
|
"spec/yaml_utils_spec.rb",
|
40
37
|
"yaml_db.gemspec"
|
41
38
|
]
|
42
|
-
s.homepage =
|
39
|
+
s.homepage = "http://github.com/ludicast/yaml_db"
|
43
40
|
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version =
|
45
|
-
s.summary =
|
41
|
+
s.rubygems_version = "1.8.17"
|
42
|
+
s.summary = "yaml_db allows export/import of database into/from yaml files"
|
46
43
|
|
47
44
|
if s.respond_to? :specification_version then
|
48
45
|
s.specification_version = 3
|
metadata
CHANGED
@@ -1,32 +1,37 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_db
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Adam Wiggins
|
9
9
|
- Orion Henry
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
date: 2011-10-12 00:00:00 -04:00
|
15
|
-
default_executable:
|
13
|
+
date: 2012-04-30 00:00:00.000000000 Z
|
16
14
|
dependencies: []
|
15
|
+
description: ! '
|
16
|
+
|
17
|
+
YamlDb is a database-independent format for dumping and restoring data. It complements
|
18
|
+
the the database-independent schema format found in db/schema.rb. The data is saved
|
19
|
+
into db/data.yml.
|
20
|
+
|
21
|
+
This can be used as a replacement for mysqldump or pg_dump, but only for the databases
|
22
|
+
typically used by Rails apps. Users, permissions, schemas, triggers, and other
|
23
|
+
advanced database features are not supported - by design.
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Any database that has an ActiveRecord adapter should work\n"
|
25
|
+
Any database that has an ActiveRecord adapter should work
|
26
|
+
|
27
|
+
'
|
22
28
|
email: nate@ludicast.com
|
23
29
|
executables: []
|
24
|
-
|
25
30
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
31
|
+
extra_rdoc_files:
|
28
32
|
- README.markdown
|
29
|
-
files:
|
33
|
+
files:
|
34
|
+
- .travis.yml
|
30
35
|
- README.markdown
|
31
36
|
- Rakefile
|
32
37
|
- VERSION
|
@@ -45,33 +50,28 @@ files:
|
|
45
50
|
- spec/yaml_load_spec.rb
|
46
51
|
- spec/yaml_utils_spec.rb
|
47
52
|
- yaml_db.gemspec
|
48
|
-
has_rdoc: true
|
49
53
|
homepage: http://github.com/ludicast/yaml_db
|
50
54
|
licenses: []
|
51
|
-
|
52
55
|
post_install_message:
|
53
56
|
rdoc_options: []
|
54
|
-
|
55
|
-
require_paths:
|
57
|
+
require_paths:
|
56
58
|
- lib
|
57
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
60
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version:
|
63
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
66
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version:
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
69
71
|
requirements: []
|
70
|
-
|
71
72
|
rubyforge_project:
|
72
|
-
rubygems_version: 1.
|
73
|
+
rubygems_version: 1.8.17
|
73
74
|
signing_key:
|
74
75
|
specification_version: 3
|
75
76
|
summary: yaml_db allows export/import of database into/from yaml files
|
76
77
|
test_files: []
|
77
|
-
|