assembla 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,36 @@
1
+ require File.dirname(__FILE__) + '/../lib/assembla'
2
+
3
+ describe AssEmBlr do
4
+
5
+ before(:all) do
6
+ @assem = AssEmBlr.new(File.dirname(__FILE__) + '/test_config.yml')
7
+ end
8
+
9
+ context "getting selected link contents" do
10
+ it "should parse requested page from Assembla" do
11
+ @assem.page.should be_kind_of(Hpricot::Doc)
12
+ end
13
+ it "should parse all tickets" do
14
+ @assem.parsed.length.should eql(6)
15
+ end
16
+ end
17
+
18
+ context "filterind tickets" do
19
+ it "should filter tickets by assigned user" do
20
+ mine = @assem.find_assigned_to("Above & Beyond")
21
+ mine.length.should eql(2)
22
+ end
23
+
24
+ #TODO find_id should return only one element
25
+ it "should filter tickets by id" do
26
+ with_id = @assem.find_id(841)
27
+ with_id.first.summary.should match /Fix tab order/
28
+ end
29
+
30
+ it "should filter tickets by status" do
31
+ test = @assem.find_with_status("Test")
32
+ test.length.should eql(2)
33
+ end
34
+
35
+ end
36
+ end
data/spec/mock.html ADDED
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head>
3
+ </head><body>
4
+ <div id="header-w">
5
+ <div id="help-panel">
6
+ <div id="help-content"></div>
7
+ </div> <div id="header" class="_"> <div id="content">
8
+ <div class="title-division"><h3>Sprint 17: 8-12 lutego</h3></div>
9
+ <table class="listing tickets sortable" style="table-layout: fixed;" id="group_by_milestone_id_161959">
10
+ <thead>
11
+ <tr>
12
+ <th width="4%">#</th>
13
+ <th width="50%">Summary</th>
14
+ <th width="150px">Assigned to</th>
15
+ <th width="50px">Status</th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <tr style="height: 20px;" id="ticket_827457" class="color3-even ticket_row">
20
+ <td class="number custom">
21
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/526-Logging">526</a>
22
+ </td>
23
+ <td class="summary custom">
24
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/526-Logging">Logging</a>
25
+ </td>
26
+ <td class="assigned_to_id custom">
27
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/526-Logging">Above & Beyond</a> </td>
28
+ <td class="status custom">
29
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/526-Logging">Test</a>
30
+ </td>
31
+ </tr>
32
+
33
+ <tr style="height: 20px;" id="ticket_912977" class="color3-even ticket_row">
34
+ <td class="number custom">
35
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/740-Something-else">740</a>
36
+ </td>
37
+ <td class="summary custom">
38
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/740-Something-else">Somethign else</a>
39
+ </td>
40
+ <td class="assigned_to_id custom">
41
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/740-Something-else">Above & Beyond</a>
42
+ </td>
43
+ <td class="status custom">
44
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/740-Something-else">Accepted</a>
45
+ </td>
46
+ </tr>
47
+
48
+ <tr style="height: 20px;" id="ticket_944697" class="color3-odd ticket_row">
49
+ <td class="number custom">
50
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/803-It's-to-wide-make-it-shorter">803</a>
51
+ </td>
52
+ <td class="summary custom">
53
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/803-It's-to-wide-make-it-shorter">It's to wide make it shorter</a>
54
+ </td>
55
+ <td class="assigned_to_id custom">
56
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/803-It's-to-wide-make-it-shorter">Armin Van B</a>
57
+ </td>
58
+ <td class="status custom">
59
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/803-It's-to-wide-make-it-shorter">New</a>
60
+ </td>
61
+ </tr>
62
+
63
+ <tr style="height: 20px;" id="ticket_955023" class="color3-even ticket_row">
64
+ <td class="number custom">
65
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/826-Padding-is-not-set-correctly">826</a>
66
+ </td>
67
+ <td class="summary custom">
68
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/826-Padding-is-not-set-correctly">Padding is not set correctly </a>
69
+ </td>
70
+ <td class="assigned_to_id custom">
71
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/826-Padding-is-not-set-correctly">Armin Van B</a>
72
+ </td>
73
+ <td class="status custom">
74
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/826-Padding-is-not-set-correctly">Test</a>
75
+ </td>
76
+ </tr>
77
+ <tr style="height: 20px;" id="ticket_959365" class="color3-odd ticket_row">
78
+ <td class="number custom">
79
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/841-Fix-tab-order">841</a>
80
+ </td>
81
+ <td class="summary custom">
82
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/841-Fix-tab-order">Fix tab order</a>
83
+ </td>
84
+ <td class="assigned_to_id custom">
85
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/841-Fix-tab-order">Armin Van B</a>
86
+ </td>
87
+ <td class="status custom">
88
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/841-Fix-tab-order">New</a>
89
+ </td>
90
+ </tr>
91
+
92
+ <tr style="height: 20px;" id="ticket_961125" class="color3-even ticket_row">
93
+ <td class="number custom">
94
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/859-Make-page-design-coherent">859</a>
95
+ </td>
96
+ <td class="summary custom">
97
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/859-Make-page-design-coherent">Make page design coherent</a>
98
+ </td>
99
+ <td class="assigned_to_id custom">
100
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/859-Make-page-design-coherent">Armin Van B</a>
101
+ </td>
102
+ <td class="status custom">
103
+ <a href="https://www.assembla.com/spaces/mockspace/tickets/859-Make-page-design-coherent">New</a>
104
+ </td>
105
+ </tr>
106
+ </tbody> <tfoot></tfoot></table>
107
+ </div>
108
+ </div>
109
+
110
+ </body></html>
@@ -0,0 +1,4 @@
1
+ url: spec/mock.html
2
+ user: Armin
3
+ password: secret
4
+ me: Armin Van B
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: assembla
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.3
5
+ platform: ruby
6
+ authors:
7
+ - Ignacy Moryc
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-02-14 00:00:00 +01:00
13
+ default_executable: ass
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hpricot
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.8.1
24
+ version:
25
+ description: This gem provides access to assembla tickets. It supports listing, creating and modyfing functionality
26
+ email: imoryc@gmail.com
27
+ executables:
28
+ - ass
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - README.textile
33
+ files:
34
+ - .gitignore
35
+ - README.textile
36
+ - Rakefile
37
+ - VERSION
38
+ - assembla.gemspec
39
+ - bin/ass
40
+ - config_default.yml
41
+ - lib/assembla.rb
42
+ - lib/extensions.rb
43
+ - lib/interpreter.rb
44
+ - lib/ticket.rb
45
+ - rdoc/classes/AssEmBlr.html
46
+ - rdoc/created.rid
47
+ - rdoc/files/README_textile.html
48
+ - rdoc/files/lib/assembla_rb.html
49
+ - rdoc/fr_class_index.html
50
+ - rdoc/fr_file_index.html
51
+ - rdoc/fr_method_index.html
52
+ - rdoc/index.html
53
+ - rdoc/rdoc-style.css
54
+ - spec/assembla_spec.rb
55
+ - spec/mock.html
56
+ - spec/test_config.yml
57
+ has_rdoc: true
58
+ homepage: http://github.com/ignacy/assembla
59
+ licenses: []
60
+
61
+ post_install_message:
62
+ rdoc_options:
63
+ - --charset=UTF-8
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
71
+ version:
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ version:
78
+ requirements: []
79
+
80
+ rubyforge_project:
81
+ rubygems_version: 1.3.5
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: Command line access to assembla
85
+ test_files:
86
+ - spec/assembla_spec.rb