mysql_in_docker 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1ba9bbaa8ff7ce3b3fad8cf631f5b580e36dddcb73508aebb0a3ce9b59c9851
4
- data.tar.gz: 06b87b65d7b7024267e6cfde5a6b6deff34c5e62b28b6824c75046fc619bef40
3
+ metadata.gz: a200afe8fada88ec37ac643a3da2348e01874c3e12cf0282c7a36afba2b9ddbb
4
+ data.tar.gz: ad522ee1ff382b246a4ec58d18ea911d0d33438eec8ab3609769080e96c3102d
5
5
  SHA512:
6
- metadata.gz: 41a463f7c4e3276becd4b49013790630b675af4621cb93e2d02ec91fec4a826751de051a526e5cca44f645c1cd515a2b50feee491968e584858bfd184174bc84
7
- data.tar.gz: f762f38afd420dd8fc8e9aebb8929452c50c867b29f7d58fb6e5658c121042fba08f36374916c32c5d7e6d9d589ced915ad0cf2c306caf5e1797db17699184a6
6
+ metadata.gz: f12bfd6a2b0a5adbe862101b18698d2bf27399d17aca87ca7c56feb7fbe891211a47ba826e7684b4c7a1efe973fcb1421a012b57252593b5703f36b43c0ab472
7
+ data.tar.gz: 18fb8a92f1e97f84adef7fb0180a4421cd4d08ee62598816701e221975ef2bea14c81a5aef104f9a69bb40db706590d82cea44f6076c821f8b494081cec80357
data/.bundle/config CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
2
  BUNDLE_PATH: "vendor/bundle"
3
- BUNDLE_JOBS: "4"
4
3
  BUNDLE_BIN: "vendor/bundle/bin"
4
+ BUNDLE_JOBS: "4"
5
+ BUNDLE_CLEAN: "true"
6
+ BUNDLE_DISABLE_SHARED_GEMS: "true"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mysql_in_docker (0.0.2)
4
+ mysql_in_docker (0.0.3)
5
5
  thor
6
6
 
7
7
  GEM
@@ -39,6 +39,7 @@ GEM
39
39
  unicode-display_width (2.1.0)
40
40
 
41
41
  PLATFORMS
42
+ arm64-darwin-21
42
43
  x86_64-linux
43
44
 
44
45
  DEPENDENCIES
data/lib/commands.rb CHANGED
@@ -61,6 +61,15 @@ module MysqlInDocker
61
61
  "mysql_in_docker_#{id}"
62
62
  end
63
63
 
64
+ def get_image_name(version)
65
+ is_arm = RUBY_PLATFORM.start_with? "arm"
66
+ image = is_arm ? "mysql/mysql-server" : "mysql"
67
+
68
+ return "#{image}:8.0" if is_arm && version == "8"
69
+
70
+ "#{image}:#{version}"
71
+ end
72
+
64
73
  def up_command(id, version, port, mysql_root_password) # rubocop:disable Metrics/MethodLength
65
74
  [
66
75
  "run",
@@ -72,7 +81,7 @@ module MysqlInDocker
72
81
  "--volume",
73
82
  "#{get_container_name(id)}:/var/lib/mysql",
74
83
  "-d",
75
- "mysql:#{version}"
84
+ get_image_name(version)
76
85
  ].join(" ")
77
86
  end
78
87
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MysqlInDocker
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_in_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sijia Wang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-24 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.2.32
75
+ rubygems_version: 3.3.7
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Easly use mysql with docker.