pgkingdom 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 14b601f2b536cb9b79140ae57e0e359b2d36e9ba
4
+ data.tar.gz: 93e4c06372a96740ebfcdf2d6af496c894b42d95
5
+ SHA512:
6
+ metadata.gz: 509a03dae64798fe32f624f0a6ca5d83833f311051b55836c1966aaa203b5b3d5d90fd8c6b8d402e4f28aa2236f003af618244ee74e26beef50583ac6d253870
7
+ data.tar.gz: 37e2a58503299b8e620c8345c63173e2702d607836943698ff0ab6f14e75129c85db5192029c07a57445cf9e50646fb293d5afba3ca3118d22fd29528a702bb0
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.swp
11
+ .byebug_history
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.0
5
+ before_install: gem install bundler -v 1.13.7
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --markup-provider=redcarpet
2
+ --markup=markdown
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in postruby.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 indiesoft.ru
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.
data/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # PgKingdom
2
+
3
+ Generally, `PgKingdom` is a set of tools to generate SQL queries for PostgreSQL.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'pgkingdom'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install pgkingdom
20
+
21
+ ## Docs
22
+
23
+ We used `yard` gem to handle code documentation. Just do:
24
+
25
+ $ git clone git://github.com/indiesoft/pgkingdom.git
26
+ $ cd pgkingdom
27
+ $ bundle install
28
+ $ yard docs
29
+
30
+ And then you can view it by opening `path_to_pgkingdom_source/docs/index.html`.
31
+
32
+ ## Usage stories
33
+
34
+ ### Ancient Scrolls
35
+
36
+ Currently this Gem has WIP status. To get all supported datatypes do:
37
+ ```ruby
38
+ PgKingdom.available_data_types
39
+ # => [:uuid, :boolean, :money, ... ]
40
+ ```
41
+
42
+ If you ever need all PostgreSQL data types, sorted and grouped do:
43
+ ```ruby
44
+ PgKingdom.data_types
45
+ # => {
46
+ # "uuid": [ :uuid ],
47
+ # "boolean": [ :boolean ],
48
+ # "numeric": [
49
+ # [ :smallint, :integer, :bigint ],
50
+ # [ :smallserial, :serial, ...],
51
+ # [ ... ],
52
+ # ],
53
+ # ...
54
+ # }
55
+ ```
56
+
57
+ Far far ago in a fairy SQL Kingdom powerful mages written magic scrolls.
58
+ One day Princess found one and started to read...
59
+
60
+ ### Spells - containers (de)materialization
61
+
62
+ `Scroll`: The first spell you will learn is `Table` spell. It used to (de)materialize containers for any type of essence of matter. First, define a table:
63
+ ```ruby
64
+ @frog_cage = PgKingdom::Table.new :abra_cadabra do
65
+ serial :id, :primary_key
66
+ varchar :name, 50, :not_null
67
+ boolean :prince, :default => 'FALSE'
68
+ end
69
+ # => #<PgKingdom::Table:...>
70
+
71
+ @frog_cage.schema # => :public
72
+
73
+ @frog_cage.name # => :abra_cadabra
74
+ ```
75
+
76
+ Princess: But I don't want to create this frog cage at a festive fair!
77
+
78
+ (continued to read):
79
+ ```ruby
80
+ @frog_cage = PgKingdom::Table.new [:abra, :cadabra] do
81
+ # ...
82
+ end
83
+
84
+ # Ensure that cage will be created at your secret depot
85
+ @frog_cage.schema # => :abra
86
+
87
+ @frog_cage.name # => :cadabra
88
+ ```
89
+
90
+ `Princess`: Fine!
91
+
92
+ `Scroll`: ...let's prepare materialization spell for frog cage, do:
93
+ ```ruby
94
+ @frog_cage.create
95
+ ```
96
+
97
+ `Scroll`: It will make fairy pen to write a new scroll with following spell:
98
+ ```SQL
99
+ CREATE TABLE IF NOT EXISTS public.abra_cadabra (
100
+ id SERIAL PRIMARY KEY,
101
+ name VARCHAR(50) NOT NULL,
102
+ prince BOOLEAN DEFAULT FALSE
103
+ );
104
+ ```
105
+
106
+ `Scroll`: If you're sure, that there is no frog cages near you, you can do:
107
+ ```ruby
108
+ @frog_cage.create! # => "CREATE TABLE public.abra_cadabra ( ... );\n"
109
+ ```
110
+
111
+ `Scroll`: In case, when you're not sure that princess from a neighboring fairy kingdom have her own frog cage, you can do:
112
+ ```ruby
113
+ @frog_cage = PgKingdom::Table.new [:neighborhood, :abra_cadabra] do
114
+ # ...
115
+ end
116
+
117
+ @frog_cage.table_exists?
118
+ # => "SELECT to_regclass('neighborhood.abra_cadabra') IS NOT NULL AS table_exists;"
119
+ ```
120
+
121
+ `Scroll`: Remember, if any container will make you tired, just do:
122
+ ```ruby
123
+ @frog_cage.drop # => "DROP TABLE IF EXISTS public.abra_cadabra;\n"
124
+ ```
125
+
126
+ #### TODO: INSERT, DELETE
127
+
128
+ ### After some time of kissing different frogs...
129
+
130
+ `Princess`: I don't want to kiss frogs!....
131
+
132
+ ## Development
133
+
134
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
135
+
136
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
137
+
138
+ ## Contributing
139
+
140
+ Bug reports and pull requests are welcome on GitHub at https://github.com/indiesoft/pgkingdom.
141
+
142
+ ## License
143
+
144
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
145
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pgkingdom"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/pgkingdom.rb ADDED
@@ -0,0 +1,65 @@
1
+ require "pgkingdom/version"
2
+ require "pgkingdom/table"
3
+
4
+ # Provides global namespace and methods.
5
+ module PgKingdom
6
+ class << self
7
+ # Filters :todo, :unsupported, etc from {.data_types} and returns flattened.
8
+ # @return [Array<Symbol>] all supported data types
9
+ def available_data_types
10
+ @_available_data_types ||= data_types.select do |key, val|
11
+ ![:TODO, :DONT_USE_ARRAYS_EXPLICITLY, :NOT_SUPPORTED, []].include? val
12
+ end.map { |key, val| val }.flatten
13
+ end
14
+
15
+ # Returns a Hash of PostgreSQL data types.
16
+ # @return [Hash{String=>(Symbol|Array<Symbol>|Array<Array<Symbol>>)})] contains all available PostgreSQL data types
17
+ # @see https://www.postgresql.org/docs/9.6/static/datatype.html
18
+ def data_types
19
+ @_data_types ||= {
20
+ arrays: [ :DONT_USE_ARRAYS_EXPLICITLY ], # Included as option :array => true into primitive types
21
+ uuid: [ :uuid ], # REQUIRES: CREATE EXTENSION "uuid-ossp";
22
+ binary: [ :bytea ],
23
+ boolean: [ :boolean ],
24
+ monetary: [ :money ],
25
+ bit_string: [ :bit_verying, :bit ],
26
+ network_address: [ :cidr, :inet, :macaddr ],
27
+ numeric: [
28
+ [:smallint, :integer, :bigint], #integer
29
+ [:decimal, :numeric, :real, :double_precision], # floating point
30
+ [:smallserial, :serial, :bigserial] # serials
31
+ ],
32
+ character: [
33
+ [:varchar, :character_varying],
34
+ [:char, :character],
35
+ [:text]
36
+ ],
37
+ datetime: [
38
+ [:timestamp, :timestamp_without_tz, :timestamp_with_tz],
39
+ [:date],
40
+ [:time, :time_without_tz, :time_with_tz],
41
+ [:interval]
42
+ ],
43
+ range: [
44
+ [:int4range, :int8range, :numrange],
45
+ [:tsrange, :tstzrange, :daterange]
46
+ ],
47
+ enumerated: [
48
+ :TODO
49
+ ],
50
+ text_search: [
51
+ :TODO
52
+ ],
53
+ json: [
54
+ :TODO
55
+ ],
56
+ oid: [ :NOT_SUPPORTED ],
57
+ xml: [ :NOT_SUPPORTED ],
58
+ pg_lsn: [ :NOT_SUPPORTED ],
59
+ pseudo: [ :NOT_SUPPORTED ],
60
+ geometric: [ :NOT_SUPPORTED ],
61
+ composite: [ :NOT_SUPPORTED ],
62
+ }
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,36 @@
1
+ require 'pgkingdom/options_helper'
2
+
3
+ module PgKingdom
4
+ # Internally used to extend Arrays of columns in tables.
5
+ module ColumnsHelper
6
+ # Joins columns for a statement.
7
+ # @return [String] columns definition with options.
8
+ def join
9
+ map do |col|
10
+ opt_string = ""
11
+
12
+ # Flags
13
+ options = col[:options]
14
+ options.extend OptionsHelper
15
+
16
+ "#{col[:name]} #{col[:type].upcase}#{options.join}"
17
+ end.join(",\n\s\s")
18
+ end
19
+
20
+ # Checks if provided type is valid PostgreSQL data type.
21
+ def available?(type)
22
+ PgKingdom.available_data_types.include? type
23
+ end
24
+
25
+ # Adds column definition hash to array.
26
+ # @return [Array<Hash{Symbol=>(Numeric|Symbol|String|Hash)}>] Array with Hashes describing table columns.
27
+ def add(name, type, opts)
28
+ self << { :name => name, :type => type, :options => opts }
29
+ end
30
+
31
+ # Checks if column defined in table.
32
+ def defined?(name)
33
+ select { |a| a[:name] == name }.any?
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,35 @@
1
+ module PgKingdom
2
+ # Internally used to extend Arrays of column options in tables.
3
+ module OptionsHelper
4
+ # Joins options for a column.
5
+ # @return [String] column options.
6
+ def join
7
+ options = clone
8
+ numerics = []
9
+ result = options.map do |option|
10
+ case option
11
+ when Numeric
12
+ numerics << option
13
+ nil
14
+ when Hash
15
+ option
16
+ .map { |opt, value| option_to_sql opt, value }
17
+ .join ' '
18
+ else
19
+ option_to_sql option
20
+ end
21
+ end
22
+
23
+ result.reject! { |opt| opt.nil? }
24
+ result = result.join(' ')
25
+ numerics.any? ? "(#{numerics.join(', ')}) #{result.lstrip}" : result
26
+ end
27
+
28
+ private
29
+
30
+ def option_to_sql(option, value=nil)
31
+ str = " #{option}".upcase.split('_').join(' ')
32
+ value.nil? ? str : str.lstrip + " #{value}"
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,109 @@
1
+ require "pgkingdom/columns_helper"
2
+
3
+ module PgKingdom
4
+ # Class, which represents table in database. Contains information
5
+ # about table schema, name, columns (with types and options), constraints,
6
+ # primary and foreign keys. Also provides methods to generate {#create}({#create!}),
7
+ # {#drop}({#drop!}) SQL statements.
8
+ class Table
9
+ # Returns schema name.
10
+ # @return [String|Symbol]
11
+ attr_reader :schema
12
+
13
+ # Returns table name.
14
+ # @return [String|Symbol]
15
+ attr_reader :name
16
+
17
+ # Defines new Table with a given block.
18
+ # @raise [SyntaxError] when block was not given of block is empty.
19
+ # @return [Postruby::Table] table instance.
20
+ def initialize(name, &attr_block)
21
+ if attr_block.nil?
22
+ raise SyntaxError.new "Table columns should be given within a block."
23
+ end
24
+
25
+ if name.is_a? Array
26
+ @schema = name.first
27
+ @name = name.last
28
+ else
29
+ @schema = :public
30
+ @name = name
31
+ end
32
+
33
+ @columns = []
34
+ @columns.extend ColumnsHelper
35
+
36
+ instance_eval &attr_block
37
+
38
+ unless @columns.any?
39
+ raise SyntaxError.new "Given block should not be empty."
40
+ end
41
+ end
42
+
43
+ # Acts as DSL to define table columns.
44
+ # @raise [RuntimeError] when column type is not supported or column was redeclared for current table.
45
+ def method_missing(type, *opts)
46
+ unless @columns.available? type
47
+ raise "Unsupported column datatype #{type} for table #{@name}."
48
+ end
49
+
50
+ col_name = opts.shift
51
+ if @columns.defined? col_name
52
+ raise "Column #{col_name} with type #{type} has been redeclared for table #{@name}."
53
+ end
54
+
55
+ @columns.add col_name, type, opts
56
+ end
57
+
58
+ # Helper, which returns table path <schema>.<table_name>.
59
+ # @return [String] path including schema name and table name.
60
+ def table_path; "#{@schema}.#{@name}" end
61
+
62
+ # Generates SQL to create table in the database.
63
+ # When safe is true and table already exists it allows to
64
+ # skip this action.
65
+ # @return [String] SQL statement.
66
+ def create(safe=true)
67
+ allow_skip = safe ? " IF NOT EXISTS" : ""
68
+ <<~SQL
69
+ CREATE TABLE#{allow_skip} #{table_path} (
70
+ #{@columns.join}
71
+ );
72
+ SQL
73
+ end
74
+
75
+ # Generates SQL to drop table in the database.
76
+ # When safe is true and table doesn't exist it allows to skip this
77
+ # action.
78
+ # @return [String] SQL statement.
79
+ def drop(safe=true)
80
+ <<~SQL
81
+ DROP TABLE#{safe ? " IF EXISTS" : ""} #{table_path};
82
+ SQL
83
+ end
84
+
85
+ # Helper, which calls create with safe=false.
86
+ # @return [String] SQL statement.
87
+ def create!; create(false) end
88
+
89
+ # Helper, which calls drop with safe=false.
90
+ # @return [String] SQL statement.
91
+ def drop!; drop(false) end
92
+
93
+ # Helper, checks if column was defined in Table.
94
+ # @return [Boolean]
95
+ def column_defined?(name) @columns.defined? name end
96
+
97
+ # Generates SQL query to check if column exists in table.
98
+ # @return [String] SQL statement.
99
+ def column_exists?(name, type=nil)
100
+ # TODO: write pgSQL query
101
+ end
102
+
103
+ # Generates SQL to check if table exists in the database.
104
+ # @return [String] SQL statement.
105
+ def table_exists?
106
+ "SELECT to_regclass('#{table_path}') IS NOT NULL AS table_exists;"
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,4 @@
1
+ module PgKingdom
2
+ # Watch this, to have every story update in our SQL Kingdom.
3
+ VERSION = "0.1.0"
4
+ end
data/pgkingdom.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pgkingdom/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pgkingdom"
8
+ spec.version = PgKingdom::VERSION
9
+ spec.authors = ["Nuqz"]
10
+ spec.email = ["nuqz@indiesoft.ru"]
11
+
12
+ spec.summary = %q{SQL statements generator for PostgreSQL >= 9.6 for Ruby >= 2.4.}
13
+ spec.description = %q{A set of classes and micro-DSLs to generate SQL queries special for PostgreSQL backends.}
14
+ spec.homepage = "https://github.com/indiesoft/postruby"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+
21
+ spec.bindir = "bin"
22
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency "yard", "~> 0.9", ">= 0.9.5"
26
+ spec.add_development_dependency "redcarpet", "~> 3.4"
27
+ spec.add_development_dependency "github-markup", "~> 1.4"
28
+ spec.add_development_dependency "simplecov", "~> 0.12"
29
+ spec.add_development_dependency "bundler", "~> 1.13"
30
+ spec.add_development_dependency "rake", "~> 10.0"
31
+ spec.add_development_dependency "rspec", "~> 3.0"
32
+ spec.add_development_dependency "rspec-its", "~> 1.2"
33
+ spec.add_development_dependency "pg", "~> 0.19"
34
+ spec.add_development_dependency "byebug", "9.0"
35
+ end
metadata ADDED
@@ -0,0 +1,209 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pgkingdom
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Nuqz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: yard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.9'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.5
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.9'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.9.5
33
+ - !ruby/object:Gem::Dependency
34
+ name: redcarpet
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.4'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3.4'
47
+ - !ruby/object:Gem::Dependency
48
+ name: github-markup
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.4'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.4'
61
+ - !ruby/object:Gem::Dependency
62
+ name: simplecov
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.12'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.12'
75
+ - !ruby/object:Gem::Dependency
76
+ name: bundler
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.13'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.13'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rake
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '10.0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '10.0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rspec
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '3.0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '3.0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: rspec-its
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '1.2'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '1.2'
131
+ - !ruby/object:Gem::Dependency
132
+ name: pg
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '0.19'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '0.19'
145
+ - !ruby/object:Gem::Dependency
146
+ name: byebug
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - '='
150
+ - !ruby/object:Gem::Version
151
+ version: '9.0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - '='
157
+ - !ruby/object:Gem::Version
158
+ version: '9.0'
159
+ description: A set of classes and micro-DSLs to generate SQL queries special for PostgreSQL
160
+ backends.
161
+ email:
162
+ - nuqz@indiesoft.ru
163
+ executables:
164
+ - console
165
+ - setup
166
+ extensions: []
167
+ extra_rdoc_files: []
168
+ files:
169
+ - ".gitignore"
170
+ - ".rspec"
171
+ - ".travis.yml"
172
+ - ".yardopts"
173
+ - Gemfile
174
+ - LICENSE.txt
175
+ - README.md
176
+ - Rakefile
177
+ - bin/console
178
+ - bin/setup
179
+ - lib/pgkingdom.rb
180
+ - lib/pgkingdom/columns_helper.rb
181
+ - lib/pgkingdom/options_helper.rb
182
+ - lib/pgkingdom/table.rb
183
+ - lib/pgkingdom/version.rb
184
+ - pgkingdom.gemspec
185
+ homepage: https://github.com/indiesoft/postruby
186
+ licenses:
187
+ - MIT
188
+ metadata: {}
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubyforge_project:
205
+ rubygems_version: 2.6.8
206
+ signing_key:
207
+ specification_version: 4
208
+ summary: SQL statements generator for PostgreSQL >= 9.6 for Ruby >= 2.4.
209
+ test_files: []