yesql 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +2 -10
- data/lib/yesql.rb +2 -5
- data/lib/yesql/config/configuration.rb +33 -0
- data/lib/yesql/version.rb +1 -1
- data/yesql.gemspec +0 -1
- metadata +4 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e080f284342f3ef4585f3763e069a7d716deb8c5ffbb0b3e3e06a15d2dcdafa3
|
4
|
+
data.tar.gz: a39131cd73c4df0e109071de38a87a284e688978ab8f8078611958677ccb7412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d4800c0d99e16ca0302deff9a9ace0b453d1503b9ae9a9937936da56cc4084c3ce4194e98974384d53f9cac3f3866b41324661db49edd6ed777fc3f379bc1a5
|
7
|
+
data.tar.gz: 3c5cc66fb4fcbb8ab188f1c7057a2243e3df7d8ac84359327af44ae9d0ef812ab4c7a52b8c70f791a05bffe90efb7ebe5caaa8bae68cb038bd4b9bf1f7576044
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
spec/minimalpg/log/test.log
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
yesql (0.1.
|
5
|
-
dry-configurable (~> 0.11.6)
|
4
|
+
yesql (0.1.3)
|
6
5
|
rails (>= 5.0)
|
7
6
|
|
8
7
|
GEM
|
@@ -68,13 +67,6 @@ GEM
|
|
68
67
|
concurrent-ruby (1.1.7)
|
69
68
|
crass (1.0.6)
|
70
69
|
diff-lcs (1.4.4)
|
71
|
-
dry-configurable (0.11.6)
|
72
|
-
concurrent-ruby (~> 1.0)
|
73
|
-
dry-core (~> 0.4, >= 0.4.7)
|
74
|
-
dry-equalizer (~> 0.2)
|
75
|
-
dry-core (0.4.9)
|
76
|
-
concurrent-ruby (~> 1.0)
|
77
|
-
dry-equalizer (0.3.0)
|
78
70
|
erubi (1.9.0)
|
79
71
|
globalid (0.4.2)
|
80
72
|
activesupport (>= 4.2.0)
|
@@ -92,7 +84,7 @@ GEM
|
|
92
84
|
mini_mime (1.0.2)
|
93
85
|
mini_portile2 (2.4.0)
|
94
86
|
minitest (5.14.2)
|
95
|
-
nio4r (2.5.
|
87
|
+
nio4r (2.5.4)
|
96
88
|
nokogiri (1.10.10)
|
97
89
|
mini_portile2 (~> 2.4.0)
|
98
90
|
pg (1.2.3)
|
data/lib/yesql.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'dry-configurable'
|
4
3
|
require 'pry'
|
5
4
|
require 'yesql/version'
|
5
|
+
require 'yesql/config/configuration'
|
6
6
|
require 'yesql/query/performer'
|
7
7
|
require 'yesql/errors/cache_expiration_error'
|
8
8
|
require 'yesql/errors/file_path_does_not_exist_error'
|
@@ -11,15 +11,12 @@ require 'yesql/errors/output_argument_error'
|
|
11
11
|
require 'yesql/bindings/binder'
|
12
12
|
|
13
13
|
module YeSQL
|
14
|
-
|
15
|
-
|
14
|
+
include ::YeSQL::Config
|
16
15
|
include ::YeSQL::Errors::CacheExpirationError
|
17
16
|
include ::YeSQL::Errors::FilePathDoesNotExistError
|
18
17
|
include ::YeSQL::Errors::NoBindingsProvidedError
|
19
18
|
include ::YeSQL::Errors::OutputArgumentError
|
20
19
|
|
21
|
-
setting :path, 'app/yesql'
|
22
|
-
|
23
20
|
BIND_REGEX = /(?<!:):(\w+)(?=\b)/.freeze
|
24
21
|
|
25
22
|
# rubocop:disable Naming/MethodName
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ::YeSQL
|
4
|
+
module Config
|
5
|
+
class Configuration
|
6
|
+
attr_accessor :path
|
7
|
+
|
8
|
+
DEFAULT_PATH = 'app/yesql'
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@path = DEFAULT_PATH
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class << self
|
17
|
+
def config
|
18
|
+
@config ||= ::YeSQL::Configuration.new
|
19
|
+
end
|
20
|
+
|
21
|
+
def configure
|
22
|
+
yield config if block_given?
|
23
|
+
end
|
24
|
+
|
25
|
+
def reset_config
|
26
|
+
tap do |conf|
|
27
|
+
conf.configure do |configuration|
|
28
|
+
configuration.path = ::YeSQL::Configuration::DEFAULT_PATH
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/yesql/version.rb
CHANGED
data/yesql.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.bindir = 'exe'
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
|
-
spec.add_dependency 'dry-configurable', '~> 0.11.6'
|
24
23
|
spec.add_dependency 'rails', '>= 5.0'
|
25
24
|
spec.add_development_dependency 'pg', '>= 0.18'
|
26
25
|
spec.add_development_dependency 'pry', '~> 0.13.1'
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yesql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastián Palma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: dry-configurable
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.11.6
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.11.6
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rails
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,6 +73,7 @@ executables: []
|
|
87
73
|
extensions: []
|
88
74
|
extra_rdoc_files: []
|
89
75
|
files:
|
76
|
+
- ".gitignore"
|
90
77
|
- Gemfile
|
91
78
|
- Gemfile.lock
|
92
79
|
- LICENSE.txt
|
@@ -99,6 +86,7 @@ files:
|
|
99
86
|
- lib/yesql/bindings/extract.rb
|
100
87
|
- lib/yesql/bindings/extractor.rb
|
101
88
|
- lib/yesql/bindings/utils.rb
|
89
|
+
- lib/yesql/config/configuration.rb
|
102
90
|
- lib/yesql/errors/cache_expiration_error.rb
|
103
91
|
- lib/yesql/errors/file_path_does_not_exist_error.rb
|
104
92
|
- lib/yesql/errors/no_bindings_provided_error.rb
|