fx-adapters-mysql 0.1.0 → 0.2.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/LICENSE +21 -0
- data/README.md +2 -2
- data/lib/fx/adapters/mysql/version.rb +1 -1
- data/lib/fx/adapters/mysql.rb +5 -5
- metadata +47 -14
- data/Gemfile +0 -10
- data/Rakefile +0 -12
- data/bin/console +0 -15
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d4db12305baa47256fa8af9772025392671de9ca5045ad2b477b363bee47d31
|
4
|
+
data.tar.gz: a78503b18a2f9d76d5d9b6ef29df50f5860171a6cc688463b9fc145d27f779be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf3826c9f18b79dbf4ee32f1f62a6b241998aa4f41019d007aeb7137c4bd54b2efc3fd94c57466e130fea367ea61ff1d1c262eeebaa7b68e1a3bbd4680ef5db5
|
7
|
+
data.tar.gz: deafb0dc1f2a0a9a29f60887ba49d7f6c61c7e4a0b7a1af9d2afb9e1a3999d9b0093c373a8af2ca730fd992100b203c5c3315eddf5027e5fcd63a1ead3e97df7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.2.0](https://www.github.com/f-mer/fx-adapters-mysql/compare/v0.1.0...v0.2.0) (2022-10-14)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* Update to the latest fx dep version 0.7.0 ([82cb532](https://www.github.com/f-mer/fx-adapters-mysql/commit/82cb532ff75c6e76f59c773d9e85269cd1d090a7))
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Use drop_trigger MySQL compatible syntax(https://dev.mysql.com/doc/refman/8.0/en/drop-trigger.html), added specs ([326710b](https://www.github.com/f-mer/fx-adapters-mysql/commit/326710b891a216c7431cf6900e2a6b3a3ab7d3c4))
|
14
|
+
|
3
15
|
## 0.1.0 (2022-02-03)
|
4
16
|
|
5
17
|
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 Fabian Mersch
|
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 all
|
13
|
+
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 THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -24,13 +24,13 @@ Or install it yourself as:
|
|
24
24
|
# config/initializers/fx.rb
|
25
25
|
|
26
26
|
Fx.configure do |config|
|
27
|
-
config.
|
27
|
+
config.database = Fx::Adapters::MySQL.new
|
28
28
|
end
|
29
29
|
```
|
30
30
|
|
31
31
|
## Development
|
32
32
|
|
33
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake
|
33
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rake` to call the default task that creates test db, run specs and `standard:fix` linter task. For custom database connection configuration use `DATABASE_URL` environment variable `export DATABASE_URL="$(ruby -e 'require "cgi"; puts "mysql2://db_username:#{CGI.escape("password,with special characters.")}@hostname/dummy_test"')"` and run commands (`bin/rspec`, `bin/setup`, etc). You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
34
34
|
|
35
35
|
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
36
36
|
|
data/lib/fx/adapters/mysql.rb
CHANGED
@@ -15,7 +15,7 @@ module Fx
|
|
15
15
|
#
|
16
16
|
# @example
|
17
17
|
# Fx.configure do |config|
|
18
|
-
# config.
|
18
|
+
# config.database = Fx::Adapters::MySQL.new
|
19
19
|
# end
|
20
20
|
class MySQL
|
21
21
|
# Creates an instance of the F(x) MySQL adapter.
|
@@ -29,7 +29,7 @@ module Fx
|
|
29
29
|
#
|
30
30
|
# @example
|
31
31
|
# Fx.configure do |config|
|
32
|
-
# config.
|
32
|
+
# config.database = Fx::Adapters::MySQL.new
|
33
33
|
# end
|
34
34
|
def initialize(connectable = ActiveRecord::Base)
|
35
35
|
@connectable = connectable
|
@@ -129,11 +129,11 @@ module Fx
|
|
129
129
|
# {Fx::Statements::Trigger#drop_trigger}.
|
130
130
|
#
|
131
131
|
# @param name The name of the trigger to drop
|
132
|
-
# @param on
|
132
|
+
# @param on Unused in the MySQL adapter. Defaults to `nil` to support method signature.
|
133
133
|
#
|
134
134
|
# @return [void]
|
135
|
-
def drop_trigger(name, on:)
|
136
|
-
execute "DROP TRIGGER #{name}
|
135
|
+
def drop_trigger(name, on: nil)
|
136
|
+
execute "DROP TRIGGER #{name};"
|
137
137
|
end
|
138
138
|
|
139
139
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fx-adapters-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabian Mersch
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: standard
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,34 +72,39 @@ dependencies:
|
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
75
|
+
version: 0.7.0
|
48
76
|
type: :runtime
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
82
|
+
version: 0.7.0
|
55
83
|
description:
|
56
84
|
email:
|
57
85
|
- fabianmersch@gmail.com
|
58
86
|
executables: []
|
59
87
|
extensions: []
|
60
|
-
extra_rdoc_files:
|
88
|
+
extra_rdoc_files:
|
89
|
+
- README.md
|
90
|
+
- CHANGELOG.md
|
91
|
+
- LICENSE
|
61
92
|
files:
|
62
93
|
- CHANGELOG.md
|
63
|
-
-
|
94
|
+
- LICENSE
|
64
95
|
- README.md
|
65
|
-
- Rakefile
|
66
|
-
- bin/console
|
67
|
-
- bin/setup
|
68
96
|
- lib/fx/adapters/mysql.rb
|
69
97
|
- lib/fx/adapters/mysql/functions.rb
|
70
98
|
- lib/fx/adapters/mysql/triggers.rb
|
71
99
|
- lib/fx/adapters/mysql/version.rb
|
72
100
|
homepage: https://github.com/f-mer/fx-adapters-mysql
|
73
|
-
licenses:
|
74
|
-
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
metadata:
|
104
|
+
bug_tracker_uri: https://github.com/f-mer/fx-adapters-mysql/issues
|
105
|
+
changelog_uri: https://github.com/f-mer/fx-adapters-mysql/blob/v0.2.0/CHANGELOG.md
|
106
|
+
source_code_uri: https://github.com/f-mer/fx-adapters-mysql/tree/v0.2.0
|
107
|
+
rubygems_mfa_required: 'true'
|
75
108
|
post_install_message:
|
76
109
|
rdoc_options: []
|
77
110
|
require_paths:
|
@@ -80,14 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
113
|
requirements:
|
81
114
|
- - ">="
|
82
115
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
116
|
+
version: '2.1'
|
84
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
118
|
requirements:
|
86
119
|
- - ">="
|
87
120
|
- !ruby/object:Gem::Version
|
88
121
|
version: '0'
|
89
122
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.3.18
|
91
124
|
signing_key:
|
92
125
|
specification_version: 4
|
93
126
|
summary: MySQL adapter for fx
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
4
|
-
load("rails/tasks/engine.rake")
|
5
|
-
|
6
|
-
require "bundler/gem_tasks"
|
7
|
-
require "rspec/core/rake_task"
|
8
|
-
require "standard/rake"
|
9
|
-
|
10
|
-
RSpec::Core::RakeTask.new(:spec)
|
11
|
-
|
12
|
-
task default: ["db:create", "spec", "standard"]
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "fx/adapters/mysql"
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start(__FILE__)
|