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 +4 -4
- data/README.md +4 -0
- data/lib/plastic_rails/version.rb +1 -1
- data/lib/plastic_rails.rb +5 -4
- data/lib/tmpl/build.sh +2 -2
- data/lib/tmpl/setup.sh +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0dde846f012f071d4da7c3058708c5a696a80a182000da442f0413f53084690
|
4
|
+
data.tar.gz: 89fc03b979177ccd887f1ff53ec58ce6eb1238d880a5287054cfcc5fe09e9cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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を起動する
|
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("
|
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("
|
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("
|
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("
|
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
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
|
8
|
-
#RUN_ON_WEB_CMD="docker
|
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
|
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.
|
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:
|
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.
|
104
|
+
rubygems_version: 3.1.4
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: docker上にRuby on Railsの環境を一発で作るスクリプト
|