trollolo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +5 -1
- data/CHANGELOG.md +29 -0
- data/Gemfile +7 -2
- data/README.md +19 -0
- data/bin/trollolo +1 -1
- data/lib/array.rb +6 -0
- data/lib/backup.rb +67 -0
- data/lib/burndown_chart.rb +96 -67
- data/lib/burndown_data.rb +62 -123
- data/lib/card.rb +74 -30
- data/lib/cli.rb +131 -9
- data/lib/column.rb +61 -0
- data/lib/result.rb +0 -0
- data/lib/scrum_board.rb +104 -0
- data/lib/settings.rb +9 -4
- data/lib/trello_wrapper.rb +62 -0
- data/lib/trollolo.rb +10 -7
- data/lib/version.rb +1 -1
- data/scripts/.gitignore +1 -0
- data/scripts/burndowndata.py +113 -0
- data/scripts/create_burndown.py +111 -146
- data/scripts/graph.py +116 -0
- data/scripts/plot.py +131 -0
- data/spec/data/board.json +63 -0
- data/spec/data/burndown-data.yaml +3 -0
- data/spec/data/burndown_dir/burndown-data-01.yaml +1 -1
- data/spec/data/burndown_dir/burndown-data-02.yaml +1 -1
- data/spec/data/card.json +61 -0
- data/spec/data/full-board.json +1626 -0
- data/spec/data/lists.json +25 -25
- data/spec/data/trollolorc +5 -0
- data/spec/{command_line_spec.rb → integration/command_line_spec.rb} +1 -4
- data/spec/integration/create_burndown_spec.rb +57 -0
- data/spec/integration/integration_spec_helper.rb +10 -0
- data/spec/integration/support/aruba_hook.rb +11 -0
- data/spec/integration/support/custom_matchers.rb +13 -0
- data/spec/{wrapper → integration/wrapper}/credentials_input_wrapper +2 -2
- data/spec/{wrapper → integration/wrapper}/empty_config_trollolo_wrapper +2 -2
- data/spec/integration/wrapper/trollolo_wrapper +10 -0
- data/spec/unit/backup_spec.rb +107 -0
- data/spec/unit/burndown_chart_spec.rb +396 -0
- data/spec/unit/burndown_data_spec.rb +118 -0
- data/spec/unit/card_spec.rb +79 -0
- data/spec/unit/cli_spec.rb +38 -0
- data/spec/unit/retrieve_data_spec.rb +54 -0
- data/spec/unit/scrum_board_spec.rb +18 -0
- data/spec/{settings_spec.rb → unit/settings_spec.rb} +1 -1
- data/spec/{spec_helper.rb → unit/spec_helper.rb} +4 -12
- data/spec/unit/support/test_data_operations.rb +7 -0
- data/spec/unit/support/update_webmock_data +17 -0
- data/spec/unit/support/webmocks.rb +52 -0
- data/spec/unit/trello_wrapper_spec.rb +47 -0
- data/trollolo.gemspec +10 -11
- metadata +54 -37
- data/lib/trello.rb +0 -66
- data/spec/burndown_chart_spec.rb +0 -307
- data/spec/burndown_data_spec.rb +0 -125
- data/spec/card_spec.rb +0 -15
- data/spec/cli_spec.rb +0 -18
- data/spec/data/cards.json +0 -1002
- data/spec/trello_spec.rb +0 -32
- data/spec/wrapper/trollolo_wrapper +0 -11
data/spec/trello_spec.rb
DELETED
@@ -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)
|