kanbantastic 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/.gitignore +3 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +42 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.rdoc +0 -0
  7. data/Rakefile +9 -0
  8. data/kanbantastic.gemspec +35 -0
  9. data/lib/kanbantastic.rb +8 -0
  10. data/lib/kanbantastic/base.rb +140 -0
  11. data/lib/kanbantastic/column.rb +45 -0
  12. data/lib/kanbantastic/config.rb +15 -0
  13. data/lib/kanbantastic/task.rb +130 -0
  14. data/lib/kanbantastic/user.rb +15 -0
  15. data/lib/kanbantastic/version.rb +3 -0
  16. data/spec/cassettes/base/get.yml +166 -0
  17. data/spec/cassettes/base/post.yml +164 -0
  18. data/spec/cassettes/base/put.yml +154 -0
  19. data/spec/cassettes/base/rectify_time.yml +30 -0
  20. data/spec/cassettes/cassette2.yml +63 -0
  21. data/spec/cassettes/cassette3.yml +63 -0
  22. data/spec/cassettes/cassette6.yml +123 -0
  23. data/spec/cassettes/task/all.yml +123 -0
  24. data/spec/cassettes/task/archive1.yml +557 -0
  25. data/spec/cassettes/task/archive2.yml +371 -0
  26. data/spec/cassettes/task/archived1.yml +185 -0
  27. data/spec/cassettes/task/archived2.yml +619 -0
  28. data/spec/cassettes/task/create.yml +123 -0
  29. data/spec/cassettes/task/find.yml +125 -0
  30. data/spec/cassettes/task/move_to_first_column.yml +722 -0
  31. data/spec/cassettes/task/move_to_last_column.yml +846 -0
  32. data/spec/cassettes/task/move_to_next_column.yml +350 -0
  33. data/spec/cassettes/task/move_to_previous_column.yml +412 -0
  34. data/spec/cassettes/task/move_to_second_column.yml +722 -0
  35. data/spec/cassettes/task/owner.yml +185 -0
  36. data/spec/cassettes/task/update.yml +185 -0
  37. data/spec/cassettes/task/update_column_id.yml +247 -0
  38. data/spec/cassettes/workspaces_with_projects.yml +34 -0
  39. data/spec/kanbantastic/base_spec.rb +179 -0
  40. data/spec/kanbantastic/column_spec.rb +83 -0
  41. data/spec/kanbantastic/config_spec.rb +12 -0
  42. data/spec/kanbantastic/kanbanery_spec.rb +16 -0
  43. data/spec/kanbantastic/task_spec.rb +380 -0
  44. data/spec/spec_helper.rb +22 -0
  45. metadata +194 -0
@@ -0,0 +1,15 @@
1
+ module Kanbantastic
2
+
3
+ class User
4
+ include ActiveModel::Validations
5
+ attr_reader :name, :email, :avatar
6
+ validates_presence_of :name, :email, :avatar
7
+
8
+ def initialize(name, email, avatar)
9
+ @name = name
10
+ @email = email
11
+ @avatar = avatar
12
+ self.valid?
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module Kanbantastic
2
+ VERSION = "0.1.5"
3
+ end
@@ -0,0 +1,166 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://envision.kanbanery.com:443/api/v1test
6
+ body:
7
+ headers:
8
+ x-kanbanery-apitoken:
9
+ - secret
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ server:
16
+ - nginx/0.8.53
17
+ date:
18
+ - <%= Time.now.utc %>
19
+ content-type:
20
+ - text/html; charset=utf-8
21
+ transfer-encoding:
22
+ - chunked
23
+ status:
24
+ - 404 Not Found
25
+ cache-control:
26
+ - no-cache
27
+ x-ua-compatible:
28
+ - IE=Edge,chrome=1
29
+ x-runtime:
30
+ - "0.062005"
31
+ body: |
32
+ <!DOCTYPE html>
33
+ <html>
34
+ <head>
35
+ <meta name="charset" content="utf-8" />
36
+ <title>envision - Kanbanery</title>
37
+
38
+ <link rel="SHORTCUT ICON" href="/favicon.ico" />
39
+ <link rel="icon" type="image/png" href="/favicon.png" />
40
+ <link rel="apple-touch-icon" href="/images/iphone-icon.png" />
41
+
42
+
43
+ <link href="/assets/main.css?1299489467" media="all" rel="stylesheet" type="text/css" />
44
+
45
+ <script type="text/javascript">
46
+ var Application = {};
47
+ Application.domain = "kanbanery.com";
48
+ </script>
49
+
50
+ <script src="/assets/main.js?1299489467" type="text/javascript"></script>
51
+ <script src="/js/templates.js?1299489552" type="text/javascript"></script>
52
+
53
+ <script type="text/javascript">
54
+ WEB_SOCKET_SWF_LOCATION = "/javascripts/vendor/web-socket-js/WebSocketMain.swf";
55
+ </script>
56
+
57
+
58
+
59
+ <script type="text/javascript">
60
+ var initBoardData = [];
61
+ </script>
62
+
63
+ <!--[if lt IE 9]>
64
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
65
+ <![endif]-->
66
+
67
+ </head>
68
+ <body>
69
+ <div id="header" class="clearfix">
70
+ <h1><a href="http://kanbanery.com/"><img alt="Kanbanery-logo-small" src="/images/kanbanery-logo-small.png?1299489403" /></a></h1>
71
+ <ul id="account">
72
+ <li><a href="http://support.kanbanery.com">Support</a></li>
73
+ <li><a href="https://kanbanery.com/login">Sign in</a></li>
74
+ <li><a href="http://kanbanery.com/pricing">Create an account</a></li>
75
+
76
+ </ul>
77
+ <div id="flash"></div>
78
+ </div>
79
+
80
+ <div id="content">
81
+ <div class="wrapper">
82
+ <h2>Not found: These aren't the droids you are looking for</h2>
83
+
84
+ <img class="four04" src="/images/404.jpg" alt="These aren't the droids you're looking for" />
85
+
86
+ <p>We're sorry but you apparently reached the page that never existed, has been moved or has not been found for any reason. Please <a href="javascript:history.back(-1);">go back</a>.</p>
87
+ </div>
88
+ </div>
89
+
90
+ <script type="text/javascript">
91
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
92
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
93
+
94
+ try {
95
+ var pageTracker = _gat._getTracker("UA-13022891-1");
96
+ pageTracker._setDomainName(".kanbanery.com");
97
+ pageTracker._trackPageview();
98
+ } catch(err) {}
99
+ </script>
100
+
101
+ </body>
102
+ </html>
103
+
104
+ http_version: "1.1"
105
+ - !ruby/struct:VCR::HTTPInteraction
106
+ request: !ruby/struct:VCR::Request
107
+ method: :get
108
+ uri: https://envision.kanbanery.com:443/api/v1/user/workspaces.json
109
+ body:
110
+ headers:
111
+ x-kanbanery-apitoken:
112
+ - secret
113
+ response: !ruby/struct:VCR::Response
114
+ status: !ruby/struct:VCR::ResponseStatus
115
+ code: 200
116
+ message: OK
117
+ headers:
118
+ server:
119
+ - nginx/0.8.53
120
+ date:
121
+ - <%= Time.now.utc %>
122
+ content-type:
123
+ - application/json; charset=utf-8
124
+ transfer-encoding:
125
+ - chunked
126
+ status:
127
+ - 200 OK
128
+ etag:
129
+ - "\"19f8716b8a535191f0014603f4a75ebe\""
130
+ cache-control:
131
+ - max-age=0, private, must-revalidate
132
+ x-ua-compatible:
133
+ - IE=Edge,chrome=1
134
+ x-runtime:
135
+ - "0.038398"
136
+ body: "[{\"id\":1394,\"created_at\":\"2010-10-19T11:29:31+00:00\",\"updated_at\":\"2010-10-19T11:29:31+00:00\",\"name\":\"envision\",\"type\":\"Workspace\",\"projects\":[{\"id\":2817,\"created_at\":\"2011-01-18T23:54:09+00:00\",\"updated_at\":\"2011-02-04T02:33:32+00:00\",\"name\":\"Envision Integration\",\"type\":\"Project\"}]}]"
137
+ http_version: "1.1"
138
+ - !ruby/struct:VCR::HTTPInteraction
139
+ request: !ruby/struct:VCR::Request
140
+ method: :head
141
+ uri: https://kanbanery.com:443/api/v1/test.json
142
+ body:
143
+ headers:
144
+ x-kanbanery-apitoken:
145
+ - secret
146
+ response: !ruby/struct:VCR::Response
147
+ status: !ruby/struct:VCR::ResponseStatus
148
+ code: 404
149
+ message: Not Found
150
+ headers:
151
+ server:
152
+ - nginx/0.8.53
153
+ date:
154
+ - <%= Time.now.utc %>
155
+ content-type:
156
+ - text/html; charset=utf-8
157
+ status:
158
+ - 404 Not Found
159
+ cache-control:
160
+ - no-cache
161
+ x-ua-compatible:
162
+ - IE=Edge,chrome=1
163
+ x-runtime:
164
+ - "0.006662"
165
+ body:
166
+ http_version: "1.1"
@@ -0,0 +1,164 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://envision.kanbanery.com:443/api/v1test
6
+ body:
7
+ headers:
8
+ x-kanbanery-apitoken:
9
+ - secret
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ server:
16
+ - nginx/0.8.53
17
+ date:
18
+ - <%= Time.now.utc %>
19
+ content-type:
20
+ - text/html; charset=utf-8
21
+ transfer-encoding:
22
+ - chunked
23
+ status:
24
+ - 404 Not Found
25
+ cache-control:
26
+ - no-cache
27
+ x-ua-compatible:
28
+ - IE=Edge,chrome=1
29
+ x-runtime:
30
+ - "0.009121"
31
+ body: |
32
+ <!DOCTYPE html>
33
+ <html>
34
+ <head>
35
+ <meta name="charset" content="utf-8" />
36
+ <title>envision - Kanbanery</title>
37
+
38
+ <link rel="SHORTCUT ICON" href="/favicon.ico" />
39
+ <link rel="icon" type="image/png" href="/favicon.png" />
40
+ <link rel="apple-touch-icon" href="/images/iphone-icon.png" />
41
+
42
+
43
+ <link href="/assets/main.css?1299489467" media="all" rel="stylesheet" type="text/css" />
44
+
45
+ <script type="text/javascript">
46
+ var Application = {};
47
+ Application.domain = "kanbanery.com";
48
+ </script>
49
+
50
+ <script src="/assets/main.js?1299489467" type="text/javascript"></script>
51
+ <script src="/js/templates.js?1299489552" type="text/javascript"></script>
52
+
53
+ <script type="text/javascript">
54
+ WEB_SOCKET_SWF_LOCATION = "/javascripts/vendor/web-socket-js/WebSocketMain.swf";
55
+ </script>
56
+
57
+
58
+
59
+ <script type="text/javascript">
60
+ var initBoardData = [];
61
+ </script>
62
+
63
+ <!--[if lt IE 9]>
64
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
65
+ <![endif]-->
66
+
67
+ </head>
68
+ <body>
69
+ <div id="header" class="clearfix">
70
+ <h1><a href="http://kanbanery.com/"><img alt="Kanbanery-logo-small" src="/images/kanbanery-logo-small.png?1299489403" /></a></h1>
71
+ <ul id="account">
72
+ <li><a href="http://support.kanbanery.com">Support</a></li>
73
+ <li><a href="https://kanbanery.com/login">Sign in</a></li>
74
+ <li><a href="http://kanbanery.com/pricing">Create an account</a></li>
75
+
76
+ </ul>
77
+ <div id="flash"></div>
78
+ </div>
79
+
80
+ <div id="content">
81
+ <div class="wrapper">
82
+ <h2>Not found: These aren't the droids you are looking for</h2>
83
+
84
+ <img class="four04" src="/images/404.jpg" alt="These aren't the droids you're looking for" />
85
+
86
+ <p>We're sorry but you apparently reached the page that never existed, has been moved or has not been found for any reason. Please <a href="javascript:history.back(-1);">go back</a>.</p>
87
+ </div>
88
+ </div>
89
+
90
+ <script type="text/javascript">
91
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
92
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
93
+
94
+ try {
95
+ var pageTracker = _gat._getTracker("UA-13022891-1");
96
+ pageTracker._setDomainName(".kanbanery.com");
97
+ pageTracker._trackPageview();
98
+ } catch(err) {}
99
+ </script>
100
+
101
+ </body>
102
+ </html>
103
+
104
+ http_version: "1.1"
105
+ - !ruby/struct:VCR::HTTPInteraction
106
+ request: !ruby/struct:VCR::Request
107
+ method: :post
108
+ uri: https://envision.kanbanery.com:443/api/v1/projects/2817/tasks.json
109
+ body: task[title]=Testing&task[task_type_name]=Work%20Package
110
+ headers:
111
+ x-kanbanery-apitoken:
112
+ - secret
113
+ response: !ruby/struct:VCR::Response
114
+ status: !ruby/struct:VCR::ResponseStatus
115
+ code: 201
116
+ message: Created
117
+ headers:
118
+ server:
119
+ - nginx/0.8.53
120
+ date:
121
+ - <%= Time.now.utc %>
122
+ content-type:
123
+ - application/json; charset=utf-8
124
+ transfer-encoding:
125
+ - chunked
126
+ status:
127
+ - 201 Created
128
+ cache-control:
129
+ - no-cache
130
+ x-ua-compatible:
131
+ - IE=Edge,chrome=1
132
+ x-runtime:
133
+ - "0.281039"
134
+ body: "{\"id\":38705,\"created_at\":\"2011-03-10T19:01:02+00:00\",\"updated_at\":\"2011-03-10T19:01:02+00:00\",\"title\":\"Testing\",\"description\":null,\"task_type_id\":15592,\"estimate_id\":null,\"column_id\":15090,\"creator_id\":2608,\"owner_id\":null,\"position\":86,\"priority\":null,\"ready_to_pull\":false,\"moved_at\":null,\"deadline\":null,\"blocked\":false,\"type\":\"Task\"}"
135
+ http_version: "1.1"
136
+ - !ruby/struct:VCR::HTTPInteraction
137
+ request: !ruby/struct:VCR::Request
138
+ method: :head
139
+ uri: https://kanbanery.com:443/api/v1/test.json
140
+ body:
141
+ headers:
142
+ x-kanbanery-apitoken:
143
+ - secret
144
+ response: !ruby/struct:VCR::Response
145
+ status: !ruby/struct:VCR::ResponseStatus
146
+ code: 404
147
+ message: Not Found
148
+ headers:
149
+ server:
150
+ - nginx/0.8.53
151
+ date:
152
+ - <%= Time.now.utc %>
153
+ content-type:
154
+ - text/html; charset=utf-8
155
+ status:
156
+ - 404 Not Found
157
+ cache-control:
158
+ - no-cache
159
+ x-ua-compatible:
160
+ - IE=Edge,chrome=1
161
+ x-runtime:
162
+ - "0.006149"
163
+ body:
164
+ http_version: "1.1"
@@ -0,0 +1,154 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :put
5
+ uri: https://envision.kanbanery.com:443/api/v1/tasks/2.json
6
+ body:
7
+ headers:
8
+ x-kanbanery-apitoken:
9
+ - secret
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ server:
16
+ - nginx/0.8.53
17
+ date:
18
+ - <%= Time.now.utc %>
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ transfer-encoding:
22
+ - chunked
23
+ status:
24
+ - 404 Not Found
25
+ cache-control:
26
+ - no-cache
27
+ x-ua-compatible:
28
+ - IE=Edge,chrome=1
29
+ x-runtime:
30
+ - "0.106347"
31
+ body: 404 Not Found
32
+ http_version: "1.1"
33
+ - !ruby/struct:VCR::HTTPInteraction
34
+ request: !ruby/struct:VCR::Request
35
+ method: :post
36
+ uri: https://envision.kanbanery.com:443/api/v1/projects/2817/tasks.json
37
+ body: task[title]=Testing&task[task_type_name]=Work%20Package
38
+ headers:
39
+ x-kanbanery-apitoken:
40
+ - secret
41
+ response: !ruby/struct:VCR::Response
42
+ status: !ruby/struct:VCR::ResponseStatus
43
+ code: 201
44
+ message: Created
45
+ headers:
46
+ server:
47
+ - nginx/0.8.53
48
+ date:
49
+ - <%= Time.now.utc %>
50
+ content-type:
51
+ - application/json; charset=utf-8
52
+ transfer-encoding:
53
+ - chunked
54
+ status:
55
+ - 201 Created
56
+ cache-control:
57
+ - no-cache
58
+ x-ua-compatible:
59
+ - IE=Edge,chrome=1
60
+ x-runtime:
61
+ - "0.402312"
62
+ body: "{\"id\":38706,\"created_at\":\"2011-03-10T19:01:26+00:00\",\"updated_at\":\"2011-03-10T19:01:26+00:00\",\"title\":\"Testing\",\"description\":null,\"task_type_id\":15592,\"estimate_id\":null,\"column_id\":15090,\"creator_id\":2608,\"owner_id\":null,\"position\":87,\"priority\":null,\"ready_to_pull\":false,\"moved_at\":null,\"deadline\":null,\"blocked\":false,\"type\":\"Task\"}"
63
+ http_version: "1.1"
64
+ - !ruby/struct:VCR::HTTPInteraction
65
+ request: !ruby/struct:VCR::Request
66
+ method: :head
67
+ uri: https://kanbanery.com:443/api/v1/test.json
68
+ body:
69
+ headers:
70
+ x-kanbanery-apitoken:
71
+ - secret
72
+ response: !ruby/struct:VCR::Response
73
+ status: !ruby/struct:VCR::ResponseStatus
74
+ code: 404
75
+ message: Not Found
76
+ headers:
77
+ server:
78
+ - nginx/0.8.53
79
+ date:
80
+ - <%= Time.now.utc %>
81
+ content-type:
82
+ - text/html; charset=utf-8
83
+ status:
84
+ - 404 Not Found
85
+ cache-control:
86
+ - no-cache
87
+ x-ua-compatible:
88
+ - IE=Edge,chrome=1
89
+ x-runtime:
90
+ - "0.006677"
91
+ body:
92
+ http_version: "1.1"
93
+ - !ruby/struct:VCR::HTTPInteraction
94
+ request: !ruby/struct:VCR::Request
95
+ method: :put
96
+ uri: https://envision.kanbanery.com:443/api/v1/tasks/38706.json
97
+ body: task[title]=Testing123
98
+ headers:
99
+ x-kanbanery-apitoken:
100
+ - secret
101
+ response: !ruby/struct:VCR::Response
102
+ status: !ruby/struct:VCR::ResponseStatus
103
+ code: 200
104
+ message: OK
105
+ headers:
106
+ server:
107
+ - nginx/0.8.53
108
+ date:
109
+ - <%= Time.now.utc %>
110
+ content-type:
111
+ - application/json; charset=utf-8
112
+ transfer-encoding:
113
+ - chunked
114
+ status:
115
+ - 200 OK
116
+ etag:
117
+ - "\"255dd9fbdab98a13483dbd1682cb498c\""
118
+ cache-control:
119
+ - max-age=0, private, must-revalidate
120
+ x-ua-compatible:
121
+ - IE=Edge,chrome=1
122
+ x-runtime:
123
+ - "0.405632"
124
+ body: "{\"id\":38706,\"created_at\":\"2011-03-10T19:01:26+00:00\",\"updated_at\":\"2011-03-10T19:01:35+00:00\",\"title\":\"Testing123\",\"description\":null,\"task_type_id\":15592,\"estimate_id\":null,\"column_id\":15090,\"creator_id\":2608,\"owner_id\":null,\"position\":87,\"priority\":0,\"ready_to_pull\":false,\"moved_at\":null,\"deadline\":null,\"blocked\":false,\"type\":\"Task\"}"
125
+ http_version: "1.1"
126
+ - !ruby/struct:VCR::HTTPInteraction
127
+ request: !ruby/struct:VCR::Request
128
+ method: :head
129
+ uri: https://kanbanery.com:443/api/v1/test.json
130
+ body:
131
+ headers:
132
+ x-kanbanery-apitoken:
133
+ - secret
134
+ response: !ruby/struct:VCR::Response
135
+ status: !ruby/struct:VCR::ResponseStatus
136
+ code: 404
137
+ message: Not Found
138
+ headers:
139
+ server:
140
+ - nginx/0.8.53
141
+ date:
142
+ - <%= Time.now.utc %>
143
+ content-type:
144
+ - text/html; charset=utf-8
145
+ status:
146
+ - 404 Not Found
147
+ cache-control:
148
+ - no-cache
149
+ x-ua-compatible:
150
+ - IE=Edge,chrome=1
151
+ x-runtime:
152
+ - "0.005465"
153
+ body:
154
+ http_version: "1.1"