jetel 0.0.15 → 0.0.16

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +34 -0
  3. data/README.md +14 -7
  4. data/Rakefile +11 -0
  5. data/bin/jetel +20 -0
  6. data/lib/jetel.rb +20 -0
  7. data/lib/jetel/cli/app.rb +20 -0
  8. data/lib/jetel/cli/cli.rb +20 -0
  9. data/lib/jetel/cli/cmd/config_cmd.rb +20 -0
  10. data/lib/jetel/cli/cmd/downloaders_cmd.rb +20 -0
  11. data/lib/jetel/cli/cmd/loaders_cmd.rb +20 -0
  12. data/lib/jetel/cli/cmd/modules_cmd.rb +31 -0
  13. data/lib/jetel/cli/cmd/version_cmd.rb +20 -0
  14. data/lib/jetel/cli/shared.rb +20 -0
  15. data/lib/jetel/config/config.rb +20 -0
  16. data/lib/jetel/downloaders/base_downloader.rb +20 -0
  17. data/lib/jetel/downloaders/downloader.rb +20 -0
  18. data/lib/jetel/downloaders/downloaders.rb +22 -0
  19. data/lib/jetel/helpers/general_helper.rb +20 -0
  20. data/lib/jetel/helpers/helpers.rb +19 -3
  21. data/lib/jetel/helpers/os_helper.rb +22 -0
  22. data/lib/jetel/lib.rb +20 -0
  23. data/lib/jetel/loaders/couchbase/couchbase.rb +42 -4
  24. data/lib/jetel/loaders/elasticsearch/elasticsearch.rb +22 -0
  25. data/lib/jetel/loaders/loader.rb +22 -0
  26. data/lib/jetel/loaders/loaders.rb +22 -0
  27. data/lib/jetel/loaders/pg/pg.rb +22 -0
  28. data/lib/jetel/loaders/pg/sql/copy.sql.erb +20 -0
  29. data/lib/jetel/loaders/pg/sql/create_table.sql.erb +20 -0
  30. data/lib/jetel/loaders/pg/sql/drop_table.sql.erb +20 -0
  31. data/lib/jetel/loaders/pg/sql/header.sql.erb +20 -0
  32. data/lib/jetel/loaders/pg/sql/schema.sql.erb +20 -0
  33. data/lib/jetel/loaders/pg/sql/truncate_table.sql.erb +20 -0
  34. data/lib/jetel/modules/alexa/alexa.rb +19 -0
  35. data/lib/jetel/modules/gadm/gadm.rb +5 -1
  36. data/lib/jetel/modules/geolite/geolite.rb +19 -0
  37. data/lib/jetel/modules/ip/ip.rb +20 -0
  38. data/lib/jetel/modules/iso3166/iso3166.rb +20 -0
  39. data/lib/jetel/modules/module.rb +46 -4
  40. data/lib/jetel/modules/modules.rb +22 -0
  41. data/lib/jetel/modules/nga/nga.rb +20 -0
  42. data/lib/jetel/modules/sfpd/sfpd.rb +20 -0
  43. data/lib/jetel/modules/tiger/tiger.rb +113 -0
  44. data/lib/jetel/modules/wifileaks/wifileaks.rb +21 -1
  45. data/lib/jetel/version.rb +21 -1
  46. data/spec/helpers/general_helper_spec.rb +16 -0
  47. data/spec/modules/alexa_spec.rb +0 -0
  48. data/{test → spec}/spec_helper.rb +0 -0
  49. metadata +10 -5
  50. data/Gemfile.lock +0 -156
@@ -1,5 +1,25 @@
1
1
  # encoding: utf-8
2
2
 
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
3
23
  module Jetel
4
24
  class Downloader
5
25
  attr_reader :downloader
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  require 'active_support/inflector'
2
24
  require_relative 'downloaders'
3
25
 
@@ -1,5 +1,25 @@
1
1
  # encoding: utf-8
2
2
 
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
3
23
  require_relative '../config/config'
4
24
 
5
25
  require_relative '../helpers/helpers'
@@ -1,8 +1,24 @@
1
1
  # encoding: UTF-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
2
14
  #
3
- # Copyright (c) 2010-2015 GoodData Corporation. All rights reserved.
4
- # This source code is licensed under the BSD-style license found in the
5
- # LICENSE file in the root directory of this source tree.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
6
22
 
7
23
  require 'pathname'
8
24
 
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  module Jetel
2
24
  module Helper
3
25
  class << self
@@ -1,5 +1,25 @@
1
1
  # encoding: utf-8
2
2
 
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
3
23
  require_relative 'version'
4
24
 
5
25
  require_relative 'extensions/extensions'
@@ -1,9 +1,31 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  require_relative '../loader'
2
24
 
3
25
  require_relative '../../helpers/helpers'
4
26
 
5
27
  require 'couchbase'
6
-
28
+ require 'multi_json'
7
29
  require 'securerandom'
8
30
 
9
31
  module Jetel
@@ -40,9 +62,7 @@ module Jetel
40
62
  @client = ::Couchbase.connect(opts)
41
63
  end
42
64
 
43
- def load(modul, source, file, opts)
44
- super
45
-
65
+ def load_csv(modul, source, file, opts)
46
66
  cache = {}
47
67
  CSV.open(file, 'rt', :headers => true, :converters => :all) do |csv|
48
68
  csv.each do |row|
@@ -60,6 +80,24 @@ module Jetel
60
80
  end
61
81
  end
62
82
  end
83
+
84
+ def load_json(modul, source, file, opts)
85
+ uuid = SecureRandom.uuid
86
+ doc = {
87
+ uuid => MultiJson.load(File.read(file))
88
+ }
89
+ client.add(doc)
90
+ end
91
+
92
+ def load(modul, source, file, opts)
93
+ super
94
+
95
+ if file =~ /\.csv/
96
+ load_csv(modul, source, file, opts)
97
+ elsif file =~ /\.json/
98
+ load_json(modul, source, file, opts)
99
+ end
100
+ end
63
101
  end
64
102
  end
65
103
  end
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  require_relative '../loader'
2
24
 
3
25
  require_relative '../../helpers/helpers'
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  module Jetel
2
24
  module Loaders
3
25
  class Loader
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  require 'active_support/inflector'
2
24
  require_relative '../extensions/extensions'
3
25
 
@@ -1,3 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
1
23
  require_relative '../loader'
2
24
 
3
25
  require_relative '../../helpers/helpers'
@@ -1,3 +1,23 @@
1
+ -- Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
2
+
3
+ -- Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ -- of this software and associated documentation files (the "Software"), to deal
5
+ -- in the Software without restriction, including without limitation the rights
6
+ -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ -- copies of the Software, and to permit persons to whom the Software is
8
+ -- furnished to do so, subject to the following conditions:
9
+ --
10
+ -- The above copyright notice and this permission notice shall be included in
11
+ -- all copies or substantial portions of the Software.
12
+ --
13
+ -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ -- THE SOFTWARE.
20
+
1
21
  COPY "<%= ctx[:table] %>"
2
22
  FROM STDIN
3
23
  <% if ctx[:delimiter] || ctx[:row_sep] %>
@@ -1,3 +1,23 @@
1
+ -- Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
2
+
3
+ -- Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ -- of this software and associated documentation files (the "Software"), to deal
5
+ -- in the Software without restriction, including without limitation the rights
6
+ -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ -- copies of the Software, and to permit persons to whom the Software is
8
+ -- furnished to do so, subject to the following conditions:
9
+ --
10
+ -- The above copyright notice and this permission notice shall be included in
11
+ -- all copies or substantial portions of the Software.
12
+ --
13
+ -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ -- THE SOFTWARE.
20
+
1
21
  DROP TABLE IF EXISTS "<%= ctx[:table] %>";
2
22
 
3
23
  CREATE TABLE "<%= ctx[:table] %>"
@@ -1,2 +1,22 @@
1
+ -- Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
2
+
3
+ -- Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ -- of this software and associated documentation files (the "Software"), to deal
5
+ -- in the Software without restriction, including without limitation the rights
6
+ -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ -- copies of the Software, and to permit persons to whom the Software is
8
+ -- furnished to do so, subject to the following conditions:
9
+ --
10
+ -- The above copyright notice and this permission notice shall be included in
11
+ -- all copies or substantial portions of the Software.
12
+ --
13
+ -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ -- THE SOFTWARE.
20
+
1
21
  DROP TABLE IF EXISTS "<%= ctx[:table] %>";
2
22
 
@@ -1,2 +1,22 @@
1
+ -- Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
2
+
3
+ -- Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ -- of this software and associated documentation files (the "Software"), to deal
5
+ -- in the Software without restriction, including without limitation the rights
6
+ -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ -- copies of the Software, and to permit persons to whom the Software is
8
+ -- furnished to do so, subject to the following conditions:
9
+ --
10
+ -- The above copyright notice and this permission notice shall be included in
11
+ -- all copies or substantial portions of the Software.
12
+ --
13
+ -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ -- THE SOFTWARE.
20
+
1
21
  -- Table: "<%= ctx[:table] + "\n" %>"
2
22
 
@@ -1,3 +1,23 @@
1
+ -- Copyright (c) 2015, Tomas Korcak <korczis@gmail.com>
2
+
3
+ -- Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ -- of this software and associated documentation files (the "Software"), to deal
5
+ -- in the Software without restriction, including without limitation the rights
6
+ -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ -- copies of the Software, and to permit persons to whom the Software is
8
+ -- furnished to do so, subject to the following conditions:
9
+ --
10
+ -- The above copyright notice and this permission notice shall be included in
11
+ -- all copies or substantial portions of the Software.
12
+ --
13
+ -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ -- THE SOFTWARE.
20
+
1
21
  DROP TABLE IF EXISTS "<%= ctx[:table] %>";
2
22
 
3
23
  CREATE TABLE "<%= ctx[:table] %>"