Skip to content

Commit 9844787

Browse files
Merge pull request #158 from fga-gpp-mds/issue157_linkar_github
problema com o link to github em ambientes de dev e prod
2 parents 74107d7 + 9fa9a17 commit 9844787

File tree

6 files changed

+16
-3
lines changed

6 files changed

+16
-3
lines changed

app/controllers/users_controller.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ def create
3232

3333
def request_github_token
3434
code_token = params[:code]
35+
puts ENV["CLIENT_ID"]
3536
result = RestClient.post(
3637
"https://github.com/login/oauth/access_token",
37-
client_id: "cbd5f91719282354f09b",
38-
client_secret: "634dd13c943b8196d4345334031c43d6d5a75fc8",
38+
client_id: ENV["CLIENT_ID"],
39+
client_secret: ENV["CLIENT_SECRET"],
3940
code: code_token,
4041
accept: :json
4142
)

docker-compose.dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ services:
1717
container_name: falko-server
1818
image: alaxalves/api:1.5
1919
command: /bin/bash -l -c "bundle install && bundle exec rails s -p 3000 -b '0.0.0.0' -P /Falko-2017.2-BackEnd/tmp/pids/server.pid"
20+
environment:
21+
- CLIENT_ID=1254ef5e2765397c4fb4
22+
- CLIENT_SECRET=c566f60e74a49bd8e664033e2978a31d3b39748d
2023
volumes:
2124
- .:/Falko-2017.2-BackEnd
2225
ports:

docker-compose.homolog.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ services:
1616
build:
1717
context: .
1818
dockerfile: Dockerfile.homolog
19-
environment:
19+
environment:
2020
- RAILS_ENV=production
21+
- CLIENT_ID=cbd5f91719282354f09b
22+
- CLIENT_SECRET=634dd13c943b8196d4345334031c43d6d5a75fc8
2123
volumes:
2224
- .:/Falko-2017.2-BackEnd
2325
- bundle-cache:/bundle-cache

docker-compose.prod.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
dockerfile: Dockerfile.prod
1919
environment:
2020
- RAILS_ENV=production
21+
- CLIENT_ID=cbd5f91719282354f09b
22+
- CLIENT_SECRET=634dd13c943b8196d4345334031c43d6d5a75fc8
2123
volumes:
2224
- .:/Falko-2017.2-BackEnd
2325
- bundle-cache:/bundle-cache

docker-compose.test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ services:
88
command: bash -c "sleep infinity"
99
environment:
1010
- RAILS_ENV=test
11+
- CLIENT_ID=1254ef5e2765397c4fb4
12+
- CLIENT_SECRET=c566f60e74a49bd8e664033e2978a31d3b39748d
1113
ports:
1214
- 3000
1315
depends_on:

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ services:
1717
container_name: falko-server
1818
image: alaxalves/api:1.5
1919
command: /bin/bash -l -c "bundle install && bundle exec rails s -p 3000 -b '0.0.0.0' -P /Falko-2017.2-BackEnd/tmp/pids/server.pid"
20+
environment:
21+
- CLIENT_ID=1254ef5e2765397c4fb4
22+
- CLIENT_SECRET=c566f60e74a49bd8e664033e2978a31d3b39748d
2023
volumes:
2124
- .:/Falko-2017.2-BackEnd
2225
ports:

0 commit comments

Comments
 (0)