handsome_fencer-circle_c_i 0.1.42 → 0.1.43

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: d3d807797d37bb6c31b3ae1871caaa1f1d993acebc5be72a2dfc8c5292c2fc51
4
- data.tar.gz: e527d3d976744702cd7f295d8a6531323ba11f06d7267e4df9c70abdc725ff22
3
+ metadata.gz: b18dee52b2f957362a3ecd283c67945d8468f9c9d5ca98c2497d60a3c3a90dc5
4
+ data.tar.gz: ea22ffa16ab6472a6d112f48a5f886f42e324f64cd1c606468db4df864ff075d
5
5
  SHA512:
6
- metadata.gz: bc8b437b8daabf1766e50d715a02348004585fffffea75b0ddcbea3d1a0d1b88cd97025256bc7112aebc6be0f9ea11fdde145b9e9a94be6ca805b97a316177bb
7
- data.tar.gz: 9be8a2c5e12f907e480ef407669cb0ffb2e4d365e8ddc5eb0d9e726e961fe44f6f381aefe1cf3c90fab0857b5471286831d760455de383d439ae41edb28b96bb
6
+ metadata.gz: 0024e6219058607c9bebf03f3129c2787033b0bddf491f0fa323a341145afb3c05915f87c4d9f0866ea5f715b80fe76c96243e1fd3eef747044b15e8e3c13c8e
7
+ data.tar.gz: 764c6ffb1fd91ed41466c1c3b14ec20c23247aa611a31ec23ce178e174f0bad9826bc6550f9635819a0825d395c01e078bf780a0d755475f85591fc130b0e96c
data/README.md CHANGED
@@ -46,8 +46,8 @@ docker-compose version 1.21.0, build 5920eb0
46
46
  1) Create a directory named after your new, greenfield app and change into that directory:
47
47
 
48
48
  ```bash
49
- $ mkdir -p sooperdooperapp
50
- $ cd sooperdooperapp
49
+ $ mkdir -p sooperdooper
50
+ $ cd sooperdooper
51
51
 
52
52
  ```
53
53
 
@@ -57,12 +57,12 @@ $ cd sooperdooperapp
57
57
  $ handsome_fencer-circle_c_i dockerize
58
58
  ```
59
59
 
60
- You will be prompted to over-write a number of files. Please do so.
60
+ You will be prompted with a number of questions. For demonstration purposes and to accept the defaults, hit enter at each prompt without answering, and again hit enter when asked if you'd like to over-write files.
61
61
 
62
- 3) Ask Docker to use Rails to generate our dockerized Rails app in our current directory. Do NOT write over the :
62
+ 3) Ask Docker to 'run' the 'rails new' command inside our 'app' container to generate a rails app in '.' (our current directory), with a flag specifying our 'database' as 'postgresql' and another flag so it will 'skip' over-writing our previously generated files:
63
63
 
64
64
  ```bash
65
- $ docker-compose run app rails new . --skip
65
+ $ docker-compose run app rails new . --database=postgresql --skip
66
66
  ```
67
67
 
68
68
  3a) If you're on a linux machine, you may need to chown the newly created files:
@@ -79,7 +79,7 @@ If that doesn't work, Docker's [documentation](https://docs.docker.com/install/l
79
79
  $ docker-compose build
80
80
  ```
81
81
 
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:
82
+ 4) Now we need to ask Docker to execute a command on the container we asked Docker to run in the previous step. Issue the following command in a new terminal:
83
83
 
84
84
  ```bash
85
85
  $ docker-compose run app bin/rails db:create db:migrate
@@ -92,7 +92,7 @@ You should now be able to see the Rails welcome screen upon clicking [http://loc
92
92
  1) Execute the install command:
93
93
 
94
94
  ```bash
95
- $ handsome_fencer-circle_c_i install
95
+ $ handsome_fencer-circle_c_i dockerize
96
96
  ```
97
97
 
98
98
  2) You'll be asked which files to write over. Keep your Gemfile and let it write over everything else, including your .gitignore, any existing docker-compose.yml, .circleci/config.yml, and Gemfile.lock files.
@@ -25,33 +25,40 @@ module HandsomeFencer
25
25
  "SERVER_HOST" => "ip-address-of-your-server",
26
26
  "DOCKERHUB_EMAIL" => "your-docker-hub-emaill",
27
27
  "DOCKERHUB_USER" => "your-docker-hub-user-name",
28
+ "DOCKERHUB_ORG" => "your-docker-hub-org-name",
29
+ "DOCKERHUB_PASS" => "your-docker-hub-password",
28
30
  "POSTGRES_USER" => "your-postgres-username",
29
- "POSTGRES_PASSWORD" => "your-postgres-password",
30
- "DOCKERHUB_PASS" => "your-docker-hub-password"
31
+ "POSTGRES_PASSWORD" => "your-postgres-password"
31
32
  }
33
+
32
34
  prompts = {
33
35
  "APP_NAME" => "the name of your app",
34
36
  "SERVER_HOST" => "the ip address of your server",
35
37
  "DOCKERHUB_EMAIL" => "your Docker Hub email",
36
38
  "DOCKERHUB_USER" => "your Docker Hub username",
39
+ "DOCKERHUB_ORG" => "your Docker Hub organization name",
40
+ "DOCKERHUB_PASS" => "your Docker Hub password",
37
41
  "POSTGRES_USER" => "your Postgres username",
38
- "POSTGRES_PASSWORD" => "your Postgres password",
39
- "DOCKERHUB_PASS" => "your Docker Hub password"
42
+ "POSTGRES_PASSWORD" => "your Postgres password"
40
43
  }
41
44
 
42
45
  prompts.map do |key, prompt|
43
- prompts[key] = ask("Please provide #{prompt}:") || default_values[key]
46
+ prompts[key] = ask("Please provide #{prompt}:")
47
+ if prompts[key].size == 0
48
+ prompts[key] = default_values[key]
49
+ end
44
50
  end
45
51
 
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])
47
- case account_type
48
- when "org"
49
- prompts['DOCKERHUB_ORG_NAME']= ask("Organization name:")
50
- when "user"
51
- prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
52
- when nil
53
- prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
54
- end
52
+ # account_type = ask("Will you be pushing images to Docker Hub under your user name or under your organization name instead?", :limited_to => ["org", "user", "skip"])
53
+ # case account_type
54
+ #
55
+ # when "o"
56
+ # prompts['DOCKERHUB_ORG_NAME']= ask("Organization name:")
57
+ # when "u"
58
+ # prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
59
+ # when "s"
60
+ # prompts['DOCKERHUB_ORG_NAME']= "${DOCKERHUB_USER}"
61
+ # end
55
62
  prompts.map do |key, value|
56
63
  append_to_file 'docker/env_files/circleci.env', "\nexport #{key}=#{value}"
57
64
  end
@@ -1,5 +1,5 @@
1
1
  module HandsomeFencer
2
2
  module CircleCI
3
- VERSION = '0.1.42'
3
+ VERSION = '0.1.43'
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.42
4
+ version: 0.1.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - schadenfred