Commit cee113c3fca295e0960035719c3f9a79efe1d7a2

Authored by vinicim
Committed by Rafael Manzo
1 parent 3287c5d1

configuration combobox of new repository is working

.gitignore
... ... @@ -18,4 +18,6 @@
18 18 coverage
19 19  
20 20 database.yml
  21 +database.yml~
  22 +database.yml.sample
21 23 kalibro_cucumber_helpers.yml
22 24 \ No newline at end of file
... ...
app/controllers/repositories_controller.rb
... ... @@ -18,6 +18,7 @@ class RepositoriesController < ApplicationController
18 18 def new
19 19 @project = Project.find(params[:project_id])
20 20 @repository = Repository.new
  21 +
21 22 end
22 23  
23 24 # GET /repositories/1/edit
... ...
app/views/repositories/_form.html.erb
... ... @@ -30,8 +30,8 @@
30 30 </div>
31 31  
32 32 <div class="field">
33   - <%= f.label :configuration %><br>
34   - <%= f.text_field :configuration_id %>
  33 + <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %>
  34 + <%= f.select( :configuration_id, configuration_list ) %>
35 35 </div>
36 36 <div class="actions">
37 37 <%= f.submit %>
... ...
config/database.yml.sample
1   -# SQLite version 3.x
2   -# gem install sqlite3
3   -#
4   -# Ensure the SQLite 3 gem is defined in your Gemfile
5   -# gem 'sqlite3'
6 1 development:
7 2 adapter: sqlite3
8 3 database: db/development.sqlite3
9 4 pool: 5
10 5 timeout: 5000
11 6  
12   -# Warning: The database defined as "test" will be erased and
13   -# re-generated from your development database when you run "rake".
14   -# Do not set this db to the same as development or production.
15 7 test: &test
16 8 adapter: sqlite3
17 9 database: db/test.sqlite3
... ... @@ -25,4 +17,4 @@ production:
25 17 timeout: 5000
26 18  
27 19 cucumber:
28   - <<: *test
29 20 \ No newline at end of file
  21 + <<: *test
... ...
config/database.yml.sample~ 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +# SQLite version 3.x
  2 +# gem install sqlite3
  3 +#
  4 +# Ensure the SQLite 3 gem is defined in your Gemfile
  5 +# gem 'sqlite3'
  6 +development:
  7 + adapter: sqlite3
  8 + database: db/development.sqlite3
  9 + pool: 5
  10 + timeout: 5000
  11 +
  12 +# Warning: The database defined as "test" will be erased and
  13 +# re-generated from your development database when you run "rake".
  14 +# Do not set this db to the same as development or production.
  15 +test: &test
  16 + adapter: sqlite3
  17 + database: db/test.sqlite3
  18 + pool: 5
  19 + timeout: 5000
  20 +
  21 +production:
  22 + adapter: sqlite3
  23 + database: db/production.sqlite3
  24 + pool: 5
  25 + timeout: 5000
  26 +
  27 +cucumber:
  28 + <<: *test
0 29 \ No newline at end of file
... ...
config/database.yml~
1   - development:
2   - adapter: sqlite3
3   - database: db/development.sqlite3
4   - pool: 5
5   - timeout: 5000
  1 +development:
  2 +adapter: sqlite3
  3 +database: db/development.sqlite3
  4 +pool: 5
  5 +timeout: 5000
6 6  
7   -#development:
8   -# adapter: postgresql
9   -# host: localhost
10   -# encoding: utf8
11   -# database: mezuro
12   -# username: mezuro
13   -# password: mezuro
14   -
15   - test:
16   - adapter: sqlite3
17   - database: db/test.sqlite3
18   - pool: 5
19   - timeout: 5000
20   -
21   -# test:
22   -# adapter: postgresql
23   -# host: localhost
24   -# encoding: utf8
25   -# database: mezuro
26   -# username: mezuro
27   -# password: mezuro
  7 +test: &test
  8 +adapter: sqlite3
  9 +database: db/test.sqlite3
  10 +pool: 5
  11 +timeout: 5000
28 12  
29 13 production:
30   - adapter: sqlite3
31   - database: db/production.sqlite3
32   - pool: 5
33   - timeout: 5000
  14 +adapter: sqlite3
  15 +database: db/production.sqlite3
  16 +pool: 5
  17 +timeout: 5000
34 18  
35   -#production:
36   -# adapter: postgresql
37   -# host: localhost
38   -# encoding: utf8
39   -# database: mezuro
40   -# username: mezuro
41   -# password: mezuro
  19 +cucumber:
  20 + <<: *test
... ...