handsome_fencer-circle_c_i 0.1.39 → 0.1.40

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: df83db91e5bd2dc538032cb8dde3f4b58631133401a6406a893e0e6d1e3d8b0f
4
- data.tar.gz: 96bde906b6e2654a5df99b22876ed6e09657d6c4c92dce03f2eaf652e2735ecb
3
+ metadata.gz: 6c2d157627c52291111579687d10bc3278cd9ba89e64c9eda1e119fda18a6dd2
4
+ data.tar.gz: ebbf1880c8d04be0bcdc471d79b0792c5ec79e76d5cf64bd09bd29670cf7d248
5
5
  SHA512:
6
- metadata.gz: e35e3dde3d7e2720546d90e6d69854041bd388557f35f365b6b2264bf434081f1b2981f9d3cd4a16084c9289f0b0a68ed9e1c7ee1440e85219b03d2264d28687
7
- data.tar.gz: e1f9df99333c30829973700e843d110a57a5d54959708ac426c7f4f2632a0ca20f0cf2a4e083dfe2c47349e1d70fea32cf5b3541a4fe1409e63e1a3c3e404561
6
+ metadata.gz: d354527aec03f7925a0ebbdf7780519e951e1165b632f5fbddcdafe9648472acca525c9faafe4b5112920ee9d0de499303519dcaadd21b040c5b40f7d1fb9d69
7
+ data.tar.gz: 9f17cf1473d3063db1758046ae390eac41c4a8e1cec8712648ab7e112b24df4eb476278b9986ef5c8984adc3b4246aad57dd80fc71c1f0edca5624474681cb9d
data/README.md CHANGED
@@ -57,10 +57,12 @@ $ cd sooperdooperapp
57
57
  $ handsome_fencer-circle_c_i dockerize
58
58
  ```
59
59
 
60
- 3) Ask Docker to use Rails to generate our dockerized Rails app in our current directory:
60
+ You will be prompted to over-write a number of files. Please do so.
61
+
62
+ 3) Ask Docker to use Rails to generate our dockerized Rails app in our current directory. Do NOT write over the :
61
63
 
62
64
  ```bash
63
- $ docker-compose run app rails new .
65
+ $ docker-compose run app rails new . --skip
64
66
  ```
65
67
 
66
68
  3a) If you're on a linux machine, you may need to chown the newly created files:
@@ -69,18 +71,18 @@ $ docker-compose run app rails new .
69
71
  $ sudo chown <username><user group> -R .
70
72
  ```
71
73
 
72
- 3b) If that doesn't work, Docker's [documentation](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) should get you pointed in the right direction.
74
+ If that doesn't work, Docker's [documentation](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) should get you pointed in the right direction.
73
75
 
74
76
  4) Ask Docker to build the necessary images for our app and spool up containers using them:
75
77
 
76
78
  ```bash
77
- $ docker-compose up --build
79
+ $ docker-compose build
78
80
  ```
79
81
 
80
- 4) Ask Docker to set up our database bye executing the following commands within the container for our Rails app:
82
+ 4) Now we need to ask Docker to execute a command on the container started in the previous step. Issue the following command in a new terminal:
81
83
 
82
84
  ```bash
83
- $ docker-compose exec app bin/rails db:create db:migrate
85
+ $ docker-compose run app bin/rails db:create db:migrate
84
86
  ```
85
87
 
86
88
  You should now be able to see the Rails welcome screen upon clicking [http://localhost:3000/](http://localhost:3000/).
@@ -20,6 +20,15 @@ module HandsomeFencer
20
20
  append_to_file ".gitignore", "\ndocker/**/*.env"
21
21
  append_to_file ".gitignore", "\ndocker/**/*.key"
22
22
 
23
+ default_values = {
24
+ "APP_NAME" => "greenfield",
25
+ "SERVER_HOST" => "ip-address-of-your-server",
26
+ "DOCKERHUB_EMAIL" => "your-docker-hub-emaill",
27
+ "DOCKERHUB_USER" => "your-docker-hub-user-name",
28
+ "POSTGRES_USER" => "your-postgres-username",
29
+ "POSTGRES_PASSWORD" => "your-postgres-password",
30
+ "DOCKERHUB_PASS" => "your-docker-hub-password"
31
+ }
23
32
  prompts = {
24
33
  "APP_NAME" => "the name of your app",
25
34
  "SERVER_HOST" => "the ip address of your server",
@@ -31,15 +40,17 @@ module HandsomeFencer
31
40
  }
32
41
 
33
42
  prompts.map do |key, prompt|
34
- prompts[key] = ask("Please provide #{prompt}:")
43
+ prompts[key] = ask("Please provide #{prompt}:") || default_values[key]
35
44
  end
36
45
 
37
46
  account_type = ask("Will you be pushing images to Docker Hub under your user name or under your organization name instead?", :limited_to => %w[org user])
38
- if account_type == "org"
47
+ case account_type
48
+ when "org"
39
49
  prompts['DOCKERHUB_ORG_NAME']= ask("Organization name:")
40
- else
50
+ when "user"
51
+ prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
52
+ when nil
41
53
  prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
42
- end
43
54
 
44
55
  prompts.map do |key, value|
45
56
  append_to_file 'docker/env_files/circleci.env', "\nexport #{key}=#{value}"
@@ -1,3 +1 @@
1
- POSTGRES_USER=postgres
2
- POSTGRES_PASSWORD=some-long-secure-password
3
- POSTGRES_DB=handsomefencer_development
1
+
@@ -1,5 +0,0 @@
1
- POSTGRES_USER=postgres
2
- POSTGRES_PASSWORD=some-long-secure-password
3
- POSTGRES_DB=bacchanal_production
4
-
5
- POSTGRES_DB=handsomefencer_production
@@ -1,5 +1,5 @@
1
1
  module HandsomeFencer
2
2
  module CircleCI
3
- VERSION = '0.1.39'
3
+ VERSION = '0.1.40'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handsome_fencer-circle_c_i
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.39
4
+ version: 0.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - schadenfred