plastic_rails 0.1.3 → 0.1.4
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/Gemfile.lock +1 -1
- data/README.md +8 -6
- data/lib/plastic_rails.rb +21 -0
- data/lib/plastic_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c581b55ac6907359f94c6deb73756c104b8cef1ddbe1659f72ee31426dc741f2
|
4
|
+
data.tar.gz: f927014f6905f06708ef40ef48655c2a21cc54d4f834b1fb99573b4fd7a914da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d97c63936feb98b39e88a1f94f102eb68feadc2e95bb4f0fd3f13ec2da58c763c687a3d0503bdf8ef85ed294b3dcadf3390a40e3358822e69150c798dd2c991
|
7
|
+
data.tar.gz: 2e31547d3fdda02577aec0ce97f6c320f09b43b505a7ec12e37f8693dc99db908c029e337377a168e95834dce6959094f341eb8c027e3b7fab2f929aaeafb8f2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -29,12 +29,14 @@ gem install plastic_rails
|
|
29
29
|
- `rails s -b 0.0.0.0`
|
30
30
|
|
31
31
|
## 環境の操作
|
32
|
-
|
33
|
-
|
34
|
-
-
|
35
|
-
- `
|
36
|
-
-
|
37
|
-
- `
|
32
|
+
環境を作成した後は以下のコマンドで環境を操作する。(<APP_NAME>ディレクトリで実行する)
|
33
|
+
|
34
|
+
- コンテナ停止
|
35
|
+
- `plastic_rails stop`
|
36
|
+
- コンテナ削除
|
37
|
+
- `plastic_rails down`
|
38
|
+
- コンテナ起動
|
39
|
+
- `plastic_rails up`
|
38
40
|
- 削除したコンテナを再セットアップ
|
39
41
|
- `./setup.sh`
|
40
42
|
|
data/lib/plastic_rails.rb
CHANGED
@@ -1,12 +1,19 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "plastic_rails/version"
|
3
3
|
require "plastic_rails/fileutils"
|
4
|
+
THOR_SILENCE_DEPRECATION = true
|
4
5
|
|
5
6
|
module PlasticRails
|
6
7
|
class Error < StandardError; end
|
7
8
|
|
8
9
|
class PlaRails < Thor
|
9
10
|
DEFAULT_TEMPLATE_DIR = File.join(File.dirname(__FILE__) , "tmpl")
|
11
|
+
|
12
|
+
def self.exit_on_failure?
|
13
|
+
# コマンドが失敗したときに終了ステータス1を返すようにする設定
|
14
|
+
true
|
15
|
+
end
|
16
|
+
|
10
17
|
desc "new APPNAME", "Create a Rails application skelton with Docker container."
|
11
18
|
option :db_path, :default => "./db/mysql/volumes"
|
12
19
|
option :template, :default => DEFAULT_TEMPLATE_DIR
|
@@ -32,6 +39,20 @@ module PlasticRails
|
|
32
39
|
execute("docker-compose exec web bash")
|
33
40
|
end
|
34
41
|
|
42
|
+
desc "up", "Start up Rails container related to current directory."
|
43
|
+
def up
|
44
|
+
execute("docker-compose up -d")
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "stop", "Stop Rails container related to current directory."
|
48
|
+
def stop
|
49
|
+
execute("docker-compose stop")
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "down", "Stop and remove Rails container related to current directory."
|
53
|
+
def down
|
54
|
+
execute("docker-compose down")
|
55
|
+
end
|
35
56
|
|
36
57
|
desc "copy_template", "Copy the default template to any dir. (To use in `new` command with `--template` option.)"
|
37
58
|
def copy_template(dest_dir)
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koki Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|