voluntary 0.5.1 → 0.5.2

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/app/assets/javascripts/voluntary/application.js +5 -1
  4. data/app/assets/javascripts/voluntary/lib/moment.js +3195 -0
  5. data/app/assets/javascripts/voluntary/workflow/user/index.js.coffee +11 -0
  6. data/app/controllers/voluntary/api/v1/organizations_controller.rb +30 -0
  7. data/app/controllers/workflow/user/stories_controller.rb +15 -0
  8. data/app/controllers/workflow/user/tasks_controller.rb +18 -0
  9. data/app/controllers/workflow/user_controller.rb +3 -3
  10. data/app/models/story.rb +1 -1
  11. data/app/views/layouts/application.html.erb +1 -1
  12. data/app/views/workflow/user/index.html.erb +26 -9
  13. data/app/views/workflow/user/stories/index.html.erb +26 -0
  14. data/app/views/workflow/user/tasks/assigned.html.erb +26 -0
  15. data/config/routes/api.rb +3 -1
  16. data/config/routes/workflow.rb +2 -0
  17. data/db/migrate/20150818151512_create_or_alter_arguments.rb +1 -1
  18. data/lib/generators/voluntary/product_dummy/templates/features/support/user_cuke_helpers.rb +5 -5
  19. data/lib/voluntary/version.rb +1 -1
  20. metadata +10 -12
  21. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_behaviour_steps.rb +0 -17
  22. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_steps.rb +0 -11
  23. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_behaviour_steps.rb +0 -23
  24. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_steps.rb +0 -25
  25. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/product_steps.rb +0 -15
  26. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb +0 -23
  27. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/story_steps.rb +0 -33
  28. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/task_steps.rb +0 -29
  29. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/wizards/story_steps.rb +0 -15
@@ -1,15 +0,0 @@
1
- Given /^a product named "([^\"]*)"$/ do |name|
2
- attributes = {name: name}
3
- attributes[:user_id] ||= @me.id if @me
4
- attributes[:area_ids] ||= [Area.last.id] if Area.any?
5
-
6
- @product = Product.where(name: name).first || Factory(:product, attributes)
7
-
8
- @product.reload
9
- end
10
-
11
- Then /^I should see the following products:$/ do |expected_table|
12
- rows = find('table').all('tr')
13
- table = rows.map { |r| r.all('th,td').map { |c| c.text.strip } }
14
- expected_table.diff!(table)
15
- end
@@ -1,23 +0,0 @@
1
- module ProjectFactoryMethods
2
- def set_project_defaults(attributes)
3
- attributes[:user_id] ||= @me.id if @me && !attributes[:user_id]
4
- attributes[:product_id] ||= @product.id if @product && !attributes[:product_id]
5
- attributes[:area_ids] ||= [Area.last.id] if Area.any? && !attributes[:area_ids]
6
- end
7
- end
8
-
9
- World(ProjectFactoryMethods)
10
-
11
- Given /^a project named "([^\"]*)"$/ do |name|
12
- attributes = {name: name}
13
- set_project_defaults(attributes)
14
- @project = Factory(:project, attributes)
15
-
16
- @project.reload
17
- end
18
-
19
- Then /^I should see the following projects:$/ do |expected_table|
20
- rows = find('table').all('tr')
21
- table = rows.map { |r| r.all('th,td').map { |c| c.text.strip } }
22
- expected_table.diff!(table)
23
- end
@@ -1,33 +0,0 @@
1
- module StoryFactoryMethods
2
- def new_story(name, options = {})
3
- factory = options[:factory] || :story
4
- attributes = options[:attributes] || {}
5
-
6
- attributes.merge!({name: name})
7
- set_story_defaults(attributes)
8
- @story = Factory(factory, attributes)
9
-
10
- @story.reload
11
- end
12
-
13
- def set_story_defaults(attributes)
14
- attributes[:offeror_id] ||= @me.id if @me && !attributes[:offeror_id]
15
- attributes[:project_id] ||= @project.id if @project && !attributes[:project_id]
16
- end
17
- end
18
-
19
- World(StoryFactoryMethods)
20
-
21
- Given /^a story named "([^\"]*)"$/ do |name|
22
- new_story(name)
23
- end
24
-
25
- Given /^a story without tasks named "([^\"]*)"$/ do |name|
26
- new_story(name, factory: :story_without_tasks)
27
- end
28
-
29
- Then /^I should see the following stories:$/ do |expected_table|
30
- rows = find('table').all('tr')
31
- table = rows.map { |r| r.all('th,td').map { |c| c.text.strip } }
32
- expected_table.diff!(table)
33
- end
@@ -1,29 +0,0 @@
1
- module TaskFactoryMethods
2
- def new_task(name, options = {})
3
- factory = options[:factory] || :task
4
- attributes = options[:attributes] || {}
5
-
6
- attributes.merge!({name: name})
7
- set_task_defaults(attributes)
8
- @task = Factory(factory, attributes)
9
- @task.reload
10
-
11
- @task
12
- end
13
-
14
- def set_task_defaults(attributes)
15
- attributes[:story_id] ||= @story.id if @story && !attributes[:story_id]
16
- end
17
- end
18
-
19
- World(TaskFactoryMethods)
20
-
21
- Given /^a task named "([^\"]*)"$/ do |name|
22
- new_task(name)
23
- end
24
-
25
- Then /^I should see the following tasks:$/ do |expected_table|
26
- rows = find('table').all('tr')
27
- table = rows.map { |r| r.all('th,td').map { |c| c.text.strip } }
28
- expected_table.diff!(table)
29
- end
@@ -1,15 +0,0 @@
1
- When /^(?:|I )fill in the name field of the 1st task with "([^"]*)"$/ do |value|
2
- find(:xpath, '/html/body/div[2]/div/div/div[2]/div[2]/form/fieldset//input[1]').set(value)
3
- end
4
-
5
- When /^(?:|I )fill in the text field of the 1st task with "([^"]*)"$/ do |value|
6
- find(:xpath, '/html/body/div[2]/div/div/div[2]/div[2]/form/fieldset//textarea[1]').set(value)
7
- end
8
-
9
- When /^(?:|I )fill in the name field of the 2nd task with "([^"]*)"$/ do |value|
10
- find(:xpath, '/html/body/div[2]/div/div/div[2]/div[2]/form/div[3]/fieldset//input[1]').set(value)
11
- end
12
-
13
- When /^(?:|I )fill in the text field of the 2nd task with "([^"]*)"$/ do |value|
14
- find(:xpath, '/html/body/div[2]/div/div/div[2]/div[2]/form/div[3]/fieldset//textarea[1]').set(value)
15
- end