plastic_rails 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4ce67e7a8357e3eee0dee4e2d159bb33db0699b3fcb42e8726922bd56cf0f88
4
- data.tar.gz: 1eeffac3e2ee44baf34c3b1c9f9e84885397108fd9c327a7e074b0c3cb2b94be
3
+ metadata.gz: c0dde846f012f071d4da7c3058708c5a696a80a182000da442f0413f53084690
4
+ data.tar.gz: 89fc03b979177ccd887f1ff53ec58ce6eb1238d880a5287054cfcc5fe09e9cff
5
5
  SHA512:
6
- metadata.gz: c1d339303f98ca667ec28ceab50ea5043d6d8be0eed097e954eab1fbcff56df8d40fbbd5b13b99a01da0b42afcb1c8b26bb4fd4282cce6be740cff1a51ad4745
7
- data.tar.gz: bf7cdd44635a1984e3d4332e214e669470b8a0e855611e802a4a16fc26726f7e8e0eea23ca8cfdf0d139da4131fff55df6a3f6346c831b91d707cb2982f2100e
6
+ metadata.gz: 364bbd1a617ab86ed411080e4a3e13cd56349ecef7a52410bfa74974840d2580bdfb7d8ffe6ac1418f65a20fe83c406d93580c14215fbb8a412c949a4efaa4d6
7
+ data.tar.gz: 3e9a144106f1f121fc4c54f49452007e10ae29ee89c9c572715dbd327ebe84fefc009eff0fc2c57039d1e9233db14086d1226c010874084a6fcd3967f998e07e
data/README.md CHANGED
@@ -22,6 +22,10 @@ gem install plastic_rails
22
22
 
23
23
  - rails new済のDockerコンテナを作成する
24
24
  - `plastic_rails new <APP_NAME>`
25
+ - 以下のようなメッセージが出るが、正常なので次に進む。
26
+ ```
27
+ (/apps/<APP_NAME>/db/schema.rb doesn't exist yet. Run `rails db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /apps/<APP_NAME>/config/application.rb to limit the frameworks that will be loaded.)
28
+ ```
25
29
  - コンテナのシェルにログインする
26
30
  - `cd <APP_NAME>; plastic_rails login; `
27
31
  - コンテナ上でRails serverを起動する
@@ -1,3 +1,3 @@
1
1
  module PlasticRails
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/lib/plastic_rails.rb CHANGED
@@ -8,6 +8,7 @@ module PlasticRails
8
8
  class PlaRails < Thor
9
9
  include Thor::Actions
10
10
  DEFAULT_TEMPLATE_DIR = File.join(File.dirname(__FILE__) , "tmpl")
11
+ DOCKER_COMPOSE_CMD = 'docker compose'
11
12
 
12
13
  def self.source_root
13
14
  Dir.pwd
@@ -40,22 +41,22 @@ module PlasticRails
40
41
 
41
42
  desc "login", "Log in Rails container related to current directory."
42
43
  def login
43
- run("docker-compose exec web bash")
44
+ run("#{DOCKER_COMPOSE_CMD} exec web bash")
44
45
  end
45
46
 
46
47
  desc "up", "Start up Rails container related to current directory."
47
48
  def up
48
- run("docker-compose up -d")
49
+ run("#{DOCKER_COMPOSE_CMD} up -d")
49
50
  end
50
51
 
51
52
  desc "stop", "Stop Rails container related to current directory."
52
53
  def stop
53
- run("docker-compose stop")
54
+ run("#{DOCKER_COMPOSE_CMD} stop")
54
55
  end
55
56
 
56
57
  desc "down", "Stop and remove Rails container related to current directory."
57
58
  def down
58
- run("docker-compose down")
59
+ run("#{DOCKER_COMPOSE_CMD} down")
59
60
  end
60
61
 
61
62
  desc "copy_template [DEST_DIR]", "Copy the default template to any dir. (To use in `new` command with `--template` option.)"
data/lib/tmpl/build.sh CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/bin/bash
2
2
  set -eu
3
3
  APPNAME=$1
4
- BUILD_CMD="docker-compose build --no-cache"
5
- RUN_ON_WEB_CMD="docker-compose run --rm web"
4
+ BUILD_CMD="docker compose build --no-cache"
5
+ RUN_ON_WEB_CMD="docker compose run --rm web"
6
6
  OSTYPE=$(uname)
7
7
 
8
8
  case "$OSTYPE" in
data/lib/tmpl/setup.sh CHANGED
@@ -4,14 +4,14 @@ ESC="\e["
4
4
  ESCEND=m
5
5
  COLOR_OFF=$(printf ${ESC}${ESCEND})
6
6
  COLOR_CMD=$(printf "${ESC}36;1;${ESCEND}") # front: cyan;bold
7
- RUN_ON_WEB_CMD="docker-compose exec web"
8
- #RUN_ON_WEB_CMD="docker-compose run --rm web"
7
+ RUN_ON_WEB_CMD="docker compose exec web"
8
+ #RUN_ON_WEB_CMD="docker compose run --rm web"
9
9
  function docker_run {
10
10
  cmd=$1
11
11
  echo ${COLOR_CMD}${cmd}${COLOR_OFF}
12
12
  $RUN_ON_WEB_CMD $cmd
13
13
  }
14
- docker-compose up -d
14
+ docker compose up -d
15
15
  docker_run "bundle install "
16
16
  docker_run "yarn install --check-files"
17
17
  docker_run "yarn upgrade"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plastic_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koki Hashimoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-03 00:00:00.000000000 Z
11
+ date: 2024-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.0.3
104
+ rubygems_version: 3.1.4
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: docker上にRuby on Railsの環境を一発で作るスクリプト