scalingo_databases_rake_tasks 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/README.md +1 -1
- data/lib/scalingo_databases_rake_tasks/tasks/mongodb.rake +11 -6
- data/lib/scalingo_databases_rake_tasks/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b312ff4b230cc8d8e5bb8a6f3aa4e42d441cb1b
|
|
4
|
+
data.tar.gz: 1466f9d98aff0d0c9c4d675cc1f3d0eef878ddc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bfb9a967a047f94665db0bb3d08b2c846dd574f699d1a6c70c6f326abde9d735caeda66acd4124eaa0aabc3eb73dcbd71820700fed8058d8eb0f6887d9082bd
|
|
7
|
+
data.tar.gz: a2682097137b24f747c39c122733fdac64c8f4f95401c0e9cca4515423c1d36927da1886991b950bef79fe96b4c614adf1942e909b9611378565e331cffeefca
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## 0.1.5 (2016-07-04)
|
|
2
|
+
|
|
3
|
+
Compatibility with Mongoid 5
|
|
4
|
+
|
|
5
|
+
## 0.1.4 (2016-02-02)
|
|
6
|
+
|
|
7
|
+
Features:
|
|
8
|
+
|
|
9
|
+
- Add `PG_DUMP_CMD` and `PG_RESTORE_CMD` vars
|
|
10
|
+
|
|
11
|
+
Bugfixes:
|
|
12
|
+
|
|
13
|
+
- Check app existence before using `scalingo` cli commands
|
|
14
|
+
|
|
15
|
+
## 0.1.3 (2016-01-21)
|
|
16
|
+
|
|
17
|
+
Features:
|
|
18
|
+
|
|
19
|
+
- Add `SSH_IDENTITY` env var
|
|
20
|
+
|
|
21
|
+
Bugfixes:
|
|
22
|
+
|
|
23
|
+
- Improve tunnel closing
|
|
24
|
+
- Improve Postgresql backup and restore
|
|
25
|
+
|
|
26
|
+
## 0.1.2 (2016-01-19)
|
|
27
|
+
|
|
28
|
+
Bugfixes:
|
|
29
|
+
|
|
30
|
+
- Improve error messages
|
|
31
|
+
- Check pg_restore version >= 9.4 for `-if-exists`
|
|
32
|
+
|
|
33
|
+
## 0.1.1 (2016-01-18)
|
|
34
|
+
|
|
35
|
+
Bugfixes:
|
|
36
|
+
|
|
37
|
+
- Postgresql drop db objects only `-if-exists`
|
|
38
|
+
- Abort tunnel when ssh key is encrypted
|
|
39
|
+
- Improve tunnel and create tmp dir
|
|
40
|
+
- Use ActiveRecord to get MySQL and PostgreSQL configs
|
data/README.md
CHANGED
|
@@ -79,5 +79,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
79
79
|
|
|
80
80
|
## Contributing
|
|
81
81
|
|
|
82
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/Scalingo/scalingo_databases_rake_tasks.
|
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Scalingo/scalingo_databases_rake_tasks-gem.
|
|
83
83
|
|
|
@@ -35,12 +35,13 @@ namespace :scalingo do
|
|
|
35
35
|
|
|
36
36
|
def self.local_credentials(filename)
|
|
37
37
|
filename ||= "mongoid"
|
|
38
|
+
key = self.mongoid_configuration_key
|
|
38
39
|
result = File.read "#{Rails.root}/config/#{filename}.yml"
|
|
39
40
|
config_file = YAML::load(ERB.new(result).result)
|
|
40
41
|
|
|
41
|
-
if config_file[Rails.env][
|
|
42
|
+
if config_file[Rails.env][key]['default']['uri']
|
|
42
43
|
require 'uri'
|
|
43
|
-
uri = URI.parse config_file[Rails.env][
|
|
44
|
+
uri = URI.parse config_file[Rails.env][key]['default']['uri']
|
|
44
45
|
|
|
45
46
|
return [
|
|
46
47
|
uri.path[1..-1],
|
|
@@ -50,10 +51,10 @@ namespace :scalingo do
|
|
|
50
51
|
]
|
|
51
52
|
else
|
|
52
53
|
return [
|
|
53
|
-
config_file[Rails.env][
|
|
54
|
-
config_file[Rails.env][
|
|
55
|
-
config_file[Rails.env][
|
|
56
|
-
config_file[Rails.env][
|
|
54
|
+
config_file[Rails.env][key]['default']['database'],
|
|
55
|
+
config_file[Rails.env][key]['default']['username'],
|
|
56
|
+
config_file[Rails.env][key]['default']['password'],
|
|
57
|
+
config_file[Rails.env][key]['default']['hosts'].first || "127.0.0.1"
|
|
57
58
|
]
|
|
58
59
|
end
|
|
59
60
|
end
|
|
@@ -101,6 +102,10 @@ namespace :scalingo do
|
|
|
101
102
|
puts "*** Executing #{output}"
|
|
102
103
|
system(cmd)
|
|
103
104
|
end
|
|
105
|
+
|
|
106
|
+
def self.mongoid_configuration_key
|
|
107
|
+
Mongoid::VERSION.starts_with?("5") ? "clients" : "sessions"
|
|
108
|
+
end
|
|
104
109
|
end
|
|
105
110
|
end
|
|
106
111
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scalingo_databases_rake_tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scalingo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -46,6 +46,7 @@ extensions: []
|
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
48
|
- ".gitignore"
|
|
49
|
+
- CHANGELOG.md
|
|
49
50
|
- Gemfile
|
|
50
51
|
- README.md
|
|
51
52
|
- Rakefile
|
|
@@ -78,8 +79,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
79
|
version: '0'
|
|
79
80
|
requirements: []
|
|
80
81
|
rubyforge_project:
|
|
81
|
-
rubygems_version: 2.
|
|
82
|
+
rubygems_version: 2.5.1
|
|
82
83
|
signing_key:
|
|
83
84
|
specification_version: 4
|
|
84
85
|
summary: Perform database related tasks on Scalingo.
|
|
85
86
|
test_files: []
|
|
87
|
+
has_rdoc:
|