flyboy 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/flyboy/all.sass +5 -1
- data/app/controllers/flyboy/goals_controller.rb +6 -2
- data/app/controllers/flyboy/tasks_controller.rb +6 -1
- data/app/models/flyboy/goal.rb +24 -5
- data/app/models/flyboy/task.rb +13 -2
- data/app/models/flyboy/task_comment.rb +9 -3
- data/app/views/flyboy/_searchbar.html.slim +6 -0
- data/app/views/flyboy/goals/_actions.html.slim +10 -10
- data/app/views/flyboy/goals/_context.html.slim +4 -2
- data/app/views/flyboy/goals/_list.html.slim +26 -0
- data/app/views/flyboy/goals/index.html.slim +6 -29
- data/app/views/flyboy/task_comments/_list.html.slim +1 -1
- data/app/views/flyboy/tasks/_actions.html.slim +6 -6
- data/app/views/flyboy/tasks/_context.html.slim +1 -1
- data/app/views/flyboy/tasks/_list.html.slim +4 -7
- data/app/views/flyboy/tasks/index.html.slim +5 -4
- data/config/locales/fr.yml +1 -0
- data/db/migrate/20150415130939_add_progress_to_goals.rb +6 -0
- data/lib/flyboy/version.rb +1 -1
- data/spec/controllers/flyboy/goals_controller_spec.rb +39 -0
- data/spec/controllers/flyboy/tasks_controller_spec.rb +55 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +9558 -0
- data/spec/dummy/log/test.log +111829 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a88d9c609d05fcc4670c8742b41816c0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d87810c66e05721ba749c5901c1af296 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ebe08f689f659c024f467b77f32a1c49 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a88d9c609d05fcc4670c8742b41816c0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d87810c66e05721ba749c5901c1af296 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ebe08f689f659c024f467b77f32a1c49 +0 -0
- data/spec/dummy/tmp/pids/server.pid +1 -1
- data/spec/models/flyboy/goal_spec.rb +15 -4
- data/spec/models/flyboy/task_comment_spec.rb +22 -0
- data/spec/models/flyboy/task_spec.rb +4 -0
- metadata +38 -3
data/spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc
ADDED
Binary file
|
data/spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
59307
|
@@ -45,15 +45,26 @@ describe Flyboy::Goal do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
describe "#progress" do
|
48
|
-
it "should
|
48
|
+
it "update task should update goal progress" do
|
49
49
|
goal = FactoryGirl.create(:flyboy_goal)
|
50
50
|
task1 = FactoryGirl.create(:flyboy_task, goal: goal, progress: 50)
|
51
51
|
task2 = FactoryGirl.create(:flyboy_task, goal: goal, progress: 100)
|
52
|
-
expect(goal.progress).to eq 75
|
52
|
+
expect(goal.reload.progress).to eq 75
|
53
|
+
task1.progress = 100
|
54
|
+
task1.save
|
55
|
+
expect(goal.reload.progress).to eq 100
|
53
56
|
end
|
54
57
|
|
55
|
-
|
56
|
-
|
58
|
+
it "delete task should update goal progress" do
|
59
|
+
goal = FactoryGirl.create(:flyboy_goal)
|
60
|
+
task1 = FactoryGirl.create(:flyboy_task, goal: goal, progress: 50)
|
61
|
+
expect(goal.reload.progress).to eq 50
|
62
|
+
task1.destroy
|
63
|
+
expect(goal.reload.progress).to eq 0
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should be 0 if new goal" do
|
67
|
+
expect(Flyboy::Goal.new.progress).to eq 0
|
57
68
|
end
|
58
69
|
end
|
59
70
|
|
@@ -5,6 +5,7 @@ describe Flyboy::TaskComment do
|
|
5
5
|
|
6
6
|
it { should validate_presence_of :task }
|
7
7
|
it { should validate_presence_of :date }
|
8
|
+
it { should validate_presence_of :description }
|
8
9
|
|
9
10
|
it 'should have a valid factory' do
|
10
11
|
expect(FactoryGirl.build(:flyboy_task_comment)).to be_valid
|
@@ -27,4 +28,25 @@ describe Flyboy::TaskComment do
|
|
27
28
|
comment = FactoryGirl.create(:flyboy_task_comment, progress: 90, task: task)
|
28
29
|
expect(task.reload.done).to be false
|
29
30
|
end
|
31
|
+
|
32
|
+
describe "default values" do
|
33
|
+
it "#new progress should be 0 if no task" do
|
34
|
+
expect(Flyboy::TaskComment.new.progress).to eq 0
|
35
|
+
end
|
36
|
+
|
37
|
+
it "#new progress should be task progress if task specified" do
|
38
|
+
task = FactoryGirl.create(:flyboy_task, progress: 50)
|
39
|
+
expect(task.comments.new.progress).to eq 50
|
40
|
+
end
|
41
|
+
|
42
|
+
it "#new progress should not override exisring progress" do
|
43
|
+
task = FactoryGirl.create(:flyboy_task)
|
44
|
+
comment1 = FactoryGirl.create(:flyboy_task_comment, task: task, progress: 30)
|
45
|
+
comment2 = FactoryGirl.create(:flyboy_task_comment, task: task, progress: 50)
|
46
|
+
expect(task.reload.progress).to eq 50
|
47
|
+
expect(comment1.reload.progress).to eq 30
|
48
|
+
expect(comment2.reload.progress).to eq 50
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
30
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flyboy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,9 +148,11 @@ files:
|
|
148
148
|
- app/models/flyboy/task_comment.rb
|
149
149
|
- app/pdfs/flyboy/roadmap.rb
|
150
150
|
- app/views/flyboy/_filters.html.slim
|
151
|
+
- app/views/flyboy/_searchbar.html.slim
|
151
152
|
- app/views/flyboy/goals/_actions.html.slim
|
152
153
|
- app/views/flyboy/goals/_context.html.slim
|
153
154
|
- app/views/flyboy/goals/_form.html.slim
|
155
|
+
- app/views/flyboy/goals/_list.html.slim
|
154
156
|
- app/views/flyboy/goals/edit.html.slim
|
155
157
|
- app/views/flyboy/goals/index.html.slim
|
156
158
|
- app/views/flyboy/goals/new.html.slim
|
@@ -173,6 +175,7 @@ files:
|
|
173
175
|
- db/migrate/20150331124858_create_flyboy_task_comments.rb
|
174
176
|
- db/migrate/20150407070804_states_to_string.rb
|
175
177
|
- db/migrate/20150409081956_remove_tasks_cost_and_budget.rb
|
178
|
+
- db/migrate/20150415130939_add_progress_to_goals.rb
|
176
179
|
- lib/flyboy/engine.rb
|
177
180
|
- lib/flyboy/version.rb
|
178
181
|
- lib/flyboy.rb
|
@@ -261,6 +264,14 @@ files:
|
|
261
264
|
- spec/dummy/tmp/cache/assets/development/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_variables.scssc
|
262
265
|
- spec/dummy/tmp/cache/assets/development/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_wells.scssc
|
263
266
|
- spec/dummy/tmp/cache/assets/development/sass/134a214c49ad52e0bb93a0a160487bfdaaf2bdd2/application.sassc
|
267
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc
|
268
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc
|
269
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc
|
270
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc
|
271
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc
|
272
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc
|
273
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc
|
274
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc
|
264
275
|
- spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
|
265
276
|
- spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/application.sassc
|
266
277
|
- spec/dummy/tmp/cache/assets/development/sass/858521e55f04965c8eab876a9304e842dcd3b55c/all.sassc
|
@@ -429,6 +440,14 @@ files:
|
|
429
440
|
- spec/dummy/tmp/cache/assets/test/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_variables.scssc
|
430
441
|
- spec/dummy/tmp/cache/assets/test/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_wells.scssc
|
431
442
|
- spec/dummy/tmp/cache/assets/test/sass/134a214c49ad52e0bb93a0a160487bfdaaf2bdd2/application.sassc
|
443
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc
|
444
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc
|
445
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc
|
446
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc
|
447
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc
|
448
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc
|
449
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc
|
450
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc
|
432
451
|
- spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
|
433
452
|
- spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/application.sassc
|
434
453
|
- spec/dummy/tmp/cache/assets/test/sass/858521e55f04965c8eab876a9304e842dcd3b55c/all.sassc
|
@@ -572,7 +591,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
572
591
|
version: '0'
|
573
592
|
segments:
|
574
593
|
- 0
|
575
|
-
hash:
|
594
|
+
hash: 2323670170704825847
|
576
595
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
577
596
|
none: false
|
578
597
|
requirements:
|
@@ -581,7 +600,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
581
600
|
version: '0'
|
582
601
|
segments:
|
583
602
|
- 0
|
584
|
-
hash:
|
603
|
+
hash: 2323670170704825847
|
585
604
|
requirements: []
|
586
605
|
rubyforge_project:
|
587
606
|
rubygems_version: 1.8.23.2
|
@@ -670,6 +689,14 @@ test_files:
|
|
670
689
|
- spec/dummy/tmp/cache/assets/development/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_variables.scssc
|
671
690
|
- spec/dummy/tmp/cache/assets/development/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_wells.scssc
|
672
691
|
- spec/dummy/tmp/cache/assets/development/sass/134a214c49ad52e0bb93a0a160487bfdaaf2bdd2/application.sassc
|
692
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc
|
693
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc
|
694
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc
|
695
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc
|
696
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc
|
697
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc
|
698
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc
|
699
|
+
- spec/dummy/tmp/cache/assets/development/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc
|
673
700
|
- spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
|
674
701
|
- spec/dummy/tmp/cache/assets/development/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/application.sassc
|
675
702
|
- spec/dummy/tmp/cache/assets/development/sass/858521e55f04965c8eab876a9304e842dcd3b55c/all.sassc
|
@@ -838,6 +865,14 @@ test_files:
|
|
838
865
|
- spec/dummy/tmp/cache/assets/test/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_variables.scssc
|
839
866
|
- spec/dummy/tmp/cache/assets/test/sass/03fca94e3a24de2d345af4e496346cab6a4ebea5/_wells.scssc
|
840
867
|
- spec/dummy/tmp/cache/assets/test/sass/134a214c49ad52e0bb93a0a160487bfdaaf2bdd2/application.sassc
|
868
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/all.sassc
|
869
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/comments.sassc
|
870
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/contexts.sassc
|
871
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/filters.sassc
|
872
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/flash.sassc
|
873
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/forms.sassc
|
874
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/styles.sassc
|
875
|
+
- spec/dummy/tmp/cache/assets/test/sass/2c0db231f5525ae4045d3b5f760e4616fb8e65dd/tables.sassc
|
841
876
|
- spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/all.sassc
|
842
877
|
- spec/dummy/tmp/cache/assets/test/sass/4cd3136ea73cf27a824cea21f80648c87f40dfa2/application.sassc
|
843
878
|
- spec/dummy/tmp/cache/assets/test/sass/858521e55f04965c8eab876a9304e842dcd3b55c/all.sassc
|