trollolo 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +5 -1
  4. data/CHANGELOG.md +29 -0
  5. data/Gemfile +7 -2
  6. data/README.md +19 -0
  7. data/bin/trollolo +1 -1
  8. data/lib/array.rb +6 -0
  9. data/lib/backup.rb +67 -0
  10. data/lib/burndown_chart.rb +96 -67
  11. data/lib/burndown_data.rb +62 -123
  12. data/lib/card.rb +74 -30
  13. data/lib/cli.rb +131 -9
  14. data/lib/column.rb +61 -0
  15. data/lib/result.rb +0 -0
  16. data/lib/scrum_board.rb +104 -0
  17. data/lib/settings.rb +9 -4
  18. data/lib/trello_wrapper.rb +62 -0
  19. data/lib/trollolo.rb +10 -7
  20. data/lib/version.rb +1 -1
  21. data/scripts/.gitignore +1 -0
  22. data/scripts/burndowndata.py +113 -0
  23. data/scripts/create_burndown.py +111 -146
  24. data/scripts/graph.py +116 -0
  25. data/scripts/plot.py +131 -0
  26. data/spec/data/board.json +63 -0
  27. data/spec/data/burndown-data.yaml +3 -0
  28. data/spec/data/burndown_dir/burndown-data-01.yaml +1 -1
  29. data/spec/data/burndown_dir/burndown-data-02.yaml +1 -1
  30. data/spec/data/card.json +61 -0
  31. data/spec/data/full-board.json +1626 -0
  32. data/spec/data/lists.json +25 -25
  33. data/spec/data/trollolorc +5 -0
  34. data/spec/{command_line_spec.rb → integration/command_line_spec.rb} +1 -4
  35. data/spec/integration/create_burndown_spec.rb +57 -0
  36. data/spec/integration/integration_spec_helper.rb +10 -0
  37. data/spec/integration/support/aruba_hook.rb +11 -0
  38. data/spec/integration/support/custom_matchers.rb +13 -0
  39. data/spec/{wrapper → integration/wrapper}/credentials_input_wrapper +2 -2
  40. data/spec/{wrapper → integration/wrapper}/empty_config_trollolo_wrapper +2 -2
  41. data/spec/integration/wrapper/trollolo_wrapper +10 -0
  42. data/spec/unit/backup_spec.rb +107 -0
  43. data/spec/unit/burndown_chart_spec.rb +396 -0
  44. data/spec/unit/burndown_data_spec.rb +118 -0
  45. data/spec/unit/card_spec.rb +79 -0
  46. data/spec/unit/cli_spec.rb +38 -0
  47. data/spec/unit/retrieve_data_spec.rb +54 -0
  48. data/spec/unit/scrum_board_spec.rb +18 -0
  49. data/spec/{settings_spec.rb → unit/settings_spec.rb} +1 -1
  50. data/spec/{spec_helper.rb → unit/spec_helper.rb} +4 -12
  51. data/spec/unit/support/test_data_operations.rb +7 -0
  52. data/spec/unit/support/update_webmock_data +17 -0
  53. data/spec/unit/support/webmocks.rb +52 -0
  54. data/spec/unit/trello_wrapper_spec.rb +47 -0
  55. data/trollolo.gemspec +10 -11
  56. metadata +54 -37
  57. data/lib/trello.rb +0 -66
  58. data/spec/burndown_chart_spec.rb +0 -307
  59. data/spec/burndown_data_spec.rb +0 -125
  60. data/spec/card_spec.rb +0 -15
  61. data/spec/cli_spec.rb +0 -18
  62. data/spec/data/cards.json +0 -1002
  63. data/spec/trello_spec.rb +0 -32
  64. data/spec/wrapper/trollolo_wrapper +0 -11
@@ -1,32 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Trello do
4
-
5
- let(:trello) { Trello.new(board_id: "myboard", developer_public_key: "mykey", member_token: "mytoken") }
6
-
7
- describe "lists" do
8
- it "returns a list of cards" do
9
- stub_request(:get, "https://trello.com/1/boards/myboard/lists?key=mykey&token=mytoken").
10
- to_return(:status => 200, :body => load_test_file('lists.json'))
11
- expect(trello.lists).to be_a(Array)
12
- end
13
-
14
- it "handles a server returning garbage" do
15
- stub_request(:get, "https://trello.com/1/boards/myboard/lists?key=mykey&token=mytoken").
16
- to_return(:status => 503, :body => "nginx says no")
17
- expect { trello.lists }.to raise_error(Trello::ApiError)
18
- end
19
-
20
- it "handles a non-200 response" do
21
- stub_request(:get, "https://trello.com/1/boards/myboard/lists?key=mykey&token=mytoken").
22
- to_return(:status => 404, :body => "{}")
23
- expect { trello.lists }.to raise_error(Trello::ApiError)
24
- end
25
-
26
- it "handles a non-json response" do
27
- stub_request(:get, "https://trello.com/1/boards/myboard/lists?key=mykey&token=mytoken").
28
- to_return(:status => 200, :body => "well, garbage.")
29
- expect { trello.lists }.to raise_error(Trello::ApiError)
30
- end
31
- end
32
- end
@@ -1,11 +0,0 @@
1
- #!/usr/bin/ruby
2
-
3
- test_config_path = File.expand_path('../../data/trollolorc',__FILE__)
4
- bin_path = File.expand_path('../../../bin/trollolo',__FILE__)
5
-
6
- ENV["TROLLOLO_CONFIG_PATH"] = test_config_path
7
- #cmd = "TROLLOLO_CONFIG_PATH=#{test_config_path} #{bin_path} #{ARGV.join(" ")}"
8
-
9
- cmd = "#{bin_path} #{ARGV.join(" ")}"
10
-
11
- exec(cmd)