schema_plus_views 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/schema_plus/views/middleware.rb +6 -3
- data/lib/schema_plus/views/version.rb +1 -1
- data/spec/dumper_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bd09e6485e8794d0454b7d3b6f9e79107f134d2
|
4
|
+
data.tar.gz: a5ccbf2996d268630f616dded120613df7f9596a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04ad39d4d0c9a6cdc8b2624326ff1fd3aac5e8ee3a95ef0fa3d84e17c0573494e2ffbe7de62f46f90bdac073278f9bbc0fd02b2d10db4bb493370f6e43caa2ed
|
7
|
+
data.tar.gz: dbe18499e3d0108003110873f3738f99c0350870da6e5c7e338935b2a1f509a336554df69328f476348b10771cdd53a114865ca82c9e9d457f32d1da0e50b794
|
data/README.md
CHANGED
@@ -109,6 +109,7 @@ This returns just the body of the definition, i.e. the part after the `CREATE VI
|
|
109
109
|
|
110
110
|
## History
|
111
111
|
|
112
|
+
* 0.2.3 - Remove unnecessary escaping in dump; use single-quote heredoc
|
112
113
|
* 0.2.2 - Prettier dumps: use heredoc for definition string
|
113
114
|
* 0.2.1 - Fix db:rollback
|
114
115
|
* 0.2.0 - Added :allow_replace option (thanks to [@hcarver](https://github.com/hcarver))
|
@@ -19,9 +19,12 @@ module SchemaPlus::Views
|
|
19
19
|
class View < KeyStruct[:name, :definition]
|
20
20
|
def assemble(stream)
|
21
21
|
heredelim = "END_VIEW_#{name.upcase}"
|
22
|
-
stream.puts
|
23
|
-
|
24
|
-
|
22
|
+
stream.puts <<-ENDVIEW
|
23
|
+
create_view "#{name}", <<-'#{heredelim}', :force => true
|
24
|
+
#{definition}
|
25
|
+
#{heredelim}
|
26
|
+
|
27
|
+
ENDVIEW
|
25
28
|
end
|
26
29
|
end
|
27
30
|
end
|
data/spec/dumper_spec.rb
CHANGED
@@ -48,7 +48,7 @@ describe "Dumper" do
|
|
48
48
|
|
49
49
|
def view_re(name, re)
|
50
50
|
heredelim = "END_VIEW_#{name.upcase}"
|
51
|
-
%r{create_view "#{name}",
|
51
|
+
%r{create_view "#{name}", <<-'#{heredelim}', :force => true\n\s*#{re}\s*\n *#{heredelim}$}mi
|
52
52
|
end
|
53
53
|
|
54
54
|
def define_schema_and_data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_views
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|