plastic_rails 0.1.3 → 0.1.4

This diff has not been reviewed by any users.
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: 35fa2c046e18c260dfae8b7491fabe5054b76d8e5ca7462b74bd65b69c0baadf
4
- data.tar.gz: 44adf2a356d4909266f589b9269c6dfc501cf7586a5799fed2c13d75df64f7be
3
+ metadata.gz: c581b55ac6907359f94c6deb73756c104b8cef1ddbe1659f72ee31426dc741f2
4
+ data.tar.gz: f927014f6905f06708ef40ef48655c2a21cc54d4f834b1fb99573b4fd7a914da
5
5
  SHA512:
6
- metadata.gz: 5c62dcb721cde0c0a25ea51a49b2e3507a79aab62383088bc88243f8f489fda950f13552598ca2813057a48125e7bf184e85c2d01ecb775c625a2a33fc593b27
7
- data.tar.gz: 7c16415929e2890c37c2a4d64a6b788a507522c8431662121ce81ec04afe2ac9bb1cf1604ca737a6c740a06983f8a6d9031b3a3b9e047980f0dadf3972045cb3
6
+ metadata.gz: 7d97c63936feb98b39e88a1f94f102eb68feadc2e95bb4f0fd3f13ec2da58c763c687a3d0503bdf8ef85ed294b3dcadf3390a40e3358822e69150c798dd2c991
7
+ data.tar.gz: 2e31547d3fdda02577aec0ce97f6c320f09b43b505a7ec12e37f8693dc99db908c029e337377a168e95834dce6959094f341eb8c027e3b7fab2f929aaeafb8f2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plastic_rails (0.1.2)
4
+ plastic_rails (0.1.3)
5
5
  thor (~> 1.0)
6
6
 
7
7
  GEM
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
- - コンテナ停止(<APP_NAME>ディレクトリで)
35
- - `docker-compose stop`
36
- - コンテナ削除(<APP_NAME>ディレクトリで)
37
- - `docker-compose down`
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
 
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module PlasticRails
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-24 00:00:00.000000000 Z
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler