voluntary 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/assets/javascripts/voluntary/application.js +5 -1
- data/app/assets/javascripts/voluntary/lib/moment.js +3195 -0
- data/app/assets/javascripts/voluntary/workflow/user/index.js.coffee +11 -0
- data/app/controllers/voluntary/api/v1/organizations_controller.rb +30 -0
- data/app/controllers/workflow/user/stories_controller.rb +15 -0
- data/app/controllers/workflow/user/tasks_controller.rb +18 -0
- data/app/controllers/workflow/user_controller.rb +3 -3
- data/app/models/story.rb +1 -1
- data/app/views/layouts/application.html.erb +1 -1
- data/app/views/workflow/user/index.html.erb +26 -9
- data/app/views/workflow/user/stories/index.html.erb +26 -0
- data/app/views/workflow/user/tasks/assigned.html.erb +26 -0
- data/config/routes/api.rb +3 -1
- data/config/routes/workflow.rb +2 -0
- data/db/migrate/20150818151512_create_or_alter_arguments.rb +1 -1
- data/lib/generators/voluntary/product_dummy/templates/features/support/user_cuke_helpers.rb +5 -5
- data/lib/voluntary/version.rb +1 -1
- metadata +10 -12
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_behaviour_steps.rb +0 -17
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/area_steps.rb +0 -11
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_behaviour_steps.rb +0 -23
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/comment_steps.rb +0 -25
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/product_steps.rb +0 -15
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb +0 -23
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/story_steps.rb +0 -33
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/task_steps.rb +0 -29
- data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/wizards/story_steps.rb +0 -15
data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/product_steps.rb
DELETED
@@ -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
|
data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb
DELETED
@@ -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
|
data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/story_steps.rb
DELETED
@@ -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
|
data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/task_steps.rb
DELETED
@@ -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
|