neon_postgres 0.0.1

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
+ SHA256:
3
+ metadata.gz: 19cb8f89bec9249fa25eb7d90c9050d8a31b10682742782b2aac1e609bd35eb4
4
+ data.tar.gz: e65ea4e35f4f24ef679a3097bf587cd0975ebc64b055a6c4be69d34c7109c80b
5
+ SHA512:
6
+ metadata.gz: 683a99ffe0a33f88e3eddc0bc3b89545d6370a3e30effb00ae114488523396356700332e01982c016f34d4d498fb05e9b0060a0c4b5e38f9e0052b00e0905e1d
7
+ data.tar.gz: 904809eb087e1aee239eb4871d98f633646193b3f09c2a8db48f8704b67cc0a32397950af5f34414c63e143dc0af4e37a824294fd3d6795964a81fb376c3ea93
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in neon_postgres.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
8
+ gem "standard"
9
+
10
+ gem "sequel", "~> 5.43"
11
+ gem "fixture_dependencies", "~> 1.10"
12
+ gem "pg", "~> 1.2"
13
+
14
+ gem "pry", "~> 0.14.1"
data/Gemfile.lock ADDED
@@ -0,0 +1,73 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ neon_postgres (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ coderay (1.1.3)
11
+ diff-lcs (1.4.4)
12
+ fixture_dependencies (1.10.0)
13
+ method_source (1.0.0)
14
+ parallel (1.20.1)
15
+ parser (3.0.1.0)
16
+ ast (~> 2.4.1)
17
+ pg (1.2.3)
18
+ pry (0.14.1)
19
+ coderay (~> 1.1)
20
+ method_source (~> 1.0)
21
+ rainbow (3.0.0)
22
+ rake (12.3.3)
23
+ regexp_parser (2.1.1)
24
+ rexml (3.2.5)
25
+ rspec (3.10.0)
26
+ rspec-core (~> 3.10.0)
27
+ rspec-expectations (~> 3.10.0)
28
+ rspec-mocks (~> 3.10.0)
29
+ rspec-core (3.10.1)
30
+ rspec-support (~> 3.10.0)
31
+ rspec-expectations (3.10.1)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.10.0)
34
+ rspec-mocks (3.10.2)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.10.0)
37
+ rspec-support (3.10.2)
38
+ rubocop (1.12.1)
39
+ parallel (~> 1.10)
40
+ parser (>= 3.0.0.0)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ regexp_parser (>= 1.8, < 3.0)
43
+ rexml
44
+ rubocop-ast (>= 1.2.0, < 2.0)
45
+ ruby-progressbar (~> 1.7)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.4.1)
48
+ parser (>= 2.7.1.5)
49
+ rubocop-performance (1.10.1)
50
+ rubocop (>= 0.90.0, < 2.0)
51
+ rubocop-ast (>= 0.4.0)
52
+ ruby-progressbar (1.11.0)
53
+ sequel (5.43.0)
54
+ standard (1.0.5)
55
+ rubocop (= 1.12.1)
56
+ rubocop-performance (= 1.10.1)
57
+ unicode-display_width (2.0.0)
58
+
59
+ PLATFORMS
60
+ ruby
61
+
62
+ DEPENDENCIES
63
+ fixture_dependencies (~> 1.10)
64
+ neon_postgres!
65
+ pg (~> 1.2)
66
+ pry (~> 0.14.1)
67
+ rake (~> 12.0)
68
+ rspec (~> 3.0)
69
+ sequel (~> 5.43)
70
+ standard
71
+
72
+ BUNDLED WITH
73
+ 2.1.4
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # NeonPostgres
2
+
3
+ This gem is mainly used to test the Neon Law database which is created and
4
+ maintained by Graphile. It is also consumed by other background-job ruby gems
5
+ that handle non-web-request related processing.
6
+
7
+ ## Contributing
8
+
9
+ Bug reports and pull requests are welcome on GitHub at
10
+ https://github.com/neonlaw/codebase.
11
+
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
@@ -0,0 +1,27 @@
1
+ require "neon_postgres/version"
2
+ require "sequel"
3
+
4
+ module NeonPostgres
5
+ class Error < StandardError; end
6
+
7
+ class Database
8
+ def self.connection
9
+ @_connection ||= Sequel.connect(
10
+ ENV.fetch("DATABASE_URL") {
11
+ "postgres://postgres:password@localhost:5432/neon_law"
12
+ }
13
+ )
14
+ end
15
+
16
+ def self.anonymous_connection
17
+ @_anonymous_connection ||= Sequel.connect(
18
+ ENV.fetch("DATABASE_URL") {
19
+ "postgres://postgres:password@localhost:5432/neon_law"
20
+ },
21
+ connect_sqls: [
22
+ "SET role = 'anonymous';"
23
+ ]
24
+ )
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module NeonPostgres
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ require_relative "lib/neon_postgres/version"
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "neon_postgres"
5
+ spec.version = NeonPostgres::VERSION
6
+ spec.authors = ["Neon Law"]
7
+ spec.email = ["support@neonlaw.com"]
8
+
9
+ spec.summary = "A gem to test the Neon Law Postgres database."
10
+ spec.description = 'This gem contains tests and sequel setup to speak to
11
+ the Neon Law database'
12
+ spec.homepage = "https://github.com/neonlaw/codebase"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = spec.homepage
17
+ spec.metadata["changelog_uri"] = spec.homepage
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ end
24
+ spec.require_paths = ["lib"]
25
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neon_postgres
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Neon Law
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-04-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |-
14
+ This gem contains tests and sequel setup to speak to
15
+ the Neon Law database
16
+ email:
17
+ - support@neonlaw.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ".gitignore"
23
+ - ".rspec"
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - README.md
27
+ - Rakefile
28
+ - lib/neon_postgres.rb
29
+ - lib/neon_postgres/version.rb
30
+ - neon_postgres.gemspec
31
+ homepage: https://github.com/neonlaw/codebase
32
+ licenses: []
33
+ metadata:
34
+ homepage_uri: https://github.com/neonlaw/codebase
35
+ source_code_uri: https://github.com/neonlaw/codebase
36
+ changelog_uri: https://github.com/neonlaw/codebase
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 2.3.0
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubygems_version: 3.2.15
53
+ signing_key:
54
+ specification_version: 4
55
+ summary: A gem to test the Neon Law Postgres database.
56
+ test_files: []