radiant-ray-extension 3.0.0.alpha → 3.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/Rakefile +2 -0
- data/doc/NilClass.html +178 -0
- data/doc/Ray/CLI.html +211 -197
- data/doc/Ray/Extension/Git.html +435 -0
- data/doc/Ray/Extension/RubyGem.html +858 -0
- data/doc/Ray/Extension/Zip.html +453 -0
- data/doc/Ray/Extension.html +755 -0
- data/doc/Ray/{Cache.html → Search/Cache.html} +108 -256
- data/doc/Ray/{GitHub.html → Search/GitHub.html} +167 -81
- data/doc/Ray/{RubyGems.html → Search/RubyGems.html} +118 -68
- data/doc/Ray/Search.html +822 -0
- data/doc/Ray.html +89 -34
- data/doc/String.html +99 -29
- data/doc/_index.html +1 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +2 -4
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +3 -3
- data/lib/ray/cli.rb +146 -193
- data/lib/ray/constants.rb +7 -12
- data/lib/ray/extension.rb +203 -89
- data/lib/ray/search.rb +198 -43
- data/lib/ray/utility.rb +31 -0
- data/lib/ray.rb +2 -7
- data/spec/fixtures/cache_single.yml +2 -1
- data/spec/fixtures/cassettes/combined_search_empty.yml +71 -0
- data/spec/fixtures/cassettes/combined_search_multiple.yml +264 -0
- data/spec/fixtures/cassettes/combined_search_single.yml +108 -0
- data/spec/fixtures/cassettes/github_reorder_children_zip_file.yml +487 -0
- data/spec/fixtures/cassettes/github_sitemap_xml_zip_file.yml +553 -0
- data/spec/fixtures/cassettes/{github_v2_api_no_matches.yml → github_v2_search_empty.yml} +3 -3
- data/spec/fixtures/cassettes/github_v2_search_multiple.yml +225 -0
- data/spec/fixtures/cassettes/github_v2_search_single.yml +76 -0
- data/spec/fixtures/cassettes/{zip_file.yml → github_zip_file.yml} +3 -3
- data/spec/fixtures/cassettes/{rubygems_v1_api_gem_info.yml → rubygems_v1_gem_info.yml} +5 -5
- data/spec/fixtures/cassettes/{rubygems_v1_api_no_matches.yml → rubygems_v1_search_empty.yml} +3 -3
- data/spec/fixtures/cassettes/rubygems_v1_search_multiple.yml +40 -0
- data/spec/fixtures/cassettes/{rubygems_v1_api_search_reorder_children.yml → rubygems_v1_search_single.yml} +6 -6
- data/spec/fixtures/dummy.zip +0 -0
- data/spec/ray/extension_spec.rb +172 -0
- data/spec/ray/search_spec.rb +300 -0
- data/spec/spec_helper.rb +36 -9
- metadata +50 -85
- data/doc/Extension.html +0 -1189
- data/doc/Ray/Gem.html +0 -760
- data/doc/Ray/Git.html +0 -278
- data/doc/Ray/Zip.html +0 -300
- data/doc/Search.html +0 -433
- data/lib/ray/extension/gem.rb +0 -96
- data/lib/ray/extension/git.rb +0 -30
- data/lib/ray/extension/zip.rb +0 -44
- data/lib/ray/search/cache.rb +0 -61
- data/lib/ray/search/github.rb +0 -40
- data/lib/ray/search/rubygems.rb +0 -36
- data/lib/ray/string.rb +0 -18
- data/spec/fixtures/Gemfile +0 -4
- data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +0 -38
- data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +0 -75
- data/spec/fixtures/cassettes/github_v2_api_search_single.yml +0 -74
- data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +0 -75
- data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +0 -34
- data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +0 -36
- data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +0 -41
- data/spec/fixtures/dummy/README +0 -1
- data/spec/fixtures/dummy/Rakefile +0 -109
- data/spec/fixtures/dummy/config/initializers/radiant_config.rb +0 -3
- data/spec/fixtures/dummy/config/locales/en.yml +0 -3
- data/spec/fixtures/dummy/config/routes.rb +0 -5
- data/spec/fixtures/dummy/dummy_extension.rb +0 -21
- data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +0 -8
- data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +0 -47
- data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
- data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +0 -29
- data/spec/ray/extension/gem_spec.rb +0 -214
- data/spec/ray/extension/git_spec.rb +0 -216
- data/spec/ray/extension/zip_spec.rb +0 -239
- data/spec/ray/search/cache_spec.rb +0 -74
- data/spec/ray/search/github_spec.rb +0 -137
- data/spec/ray/search/rubygems_spec.rb +0 -127
- data/spec/ray/string_spec.rb +0 -30
@@ -0,0 +1,225 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://github.com:80/api/v2/json/repos/search/radiant+archive
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
server:
|
14
|
+
- nginx/1.0.4
|
15
|
+
date:
|
16
|
+
- Sat, 05 Nov 2011 20:18:29 GMT
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
connection:
|
20
|
+
- keep-alive
|
21
|
+
status:
|
22
|
+
- 200 OK
|
23
|
+
x-ratelimit-limit:
|
24
|
+
- '60'
|
25
|
+
etag:
|
26
|
+
- ! '"dbedfbe40454f75e89ed1b746246669c"'
|
27
|
+
x-frame-options:
|
28
|
+
- deny
|
29
|
+
x-ratelimit-remaining:
|
30
|
+
- '58'
|
31
|
+
x-runtime:
|
32
|
+
- 30ms
|
33
|
+
content-length:
|
34
|
+
- '3245'
|
35
|
+
cache-control:
|
36
|
+
- private, max-age=0, must-revalidate
|
37
|
+
body: ! '{"repositories":[{"type":"repo","followers":7,"description":"Page archiving
|
38
|
+
for Radiant CMS bundled with the main project","url":"https://github.com/radiant/radiant-archive-extension","has_wiki":true,"created_at":"2010/04/30
|
39
|
+
13:17:08 -0700","organization":"radiant","homepage":"http://radiantcms.org","has_issues":true,"fork":false,"language":"Ruby","pushed_at":"2011/10/30
|
40
|
+
19:12:40 -0700","open_issues":1,"username":"radiant","pushed":"2011/10/30 19:12:40
|
41
|
+
-0700","size":124,"private":false,"name":"radiant-archive-extension","owner":"radiant","has_downloads":true,"created":"2010/04/30
|
42
|
+
13:17:08 -0700","watchers":7,"score":4.264274,"forks":4},{"type":"repo","followers":4,"description":"Extends
|
43
|
+
the core Archive extension to add Quarter archives.","url":"https://github.com/tricycle/radiant-archive-by-quarter-extension","has_wiki":true,"created_at":"2009/04/05
|
44
|
+
22:25:22 -0700","organization":"tricycle","homepage":"http://github.com/tricycle/radiant-archive-by-quarter-extension","has_issues":true,"language":"","fork":false,"pushed_at":"2009/04/05
|
45
|
+
22:27:09 -0700","open_issues":0,"username":"tricycle","pushed":"2009/04/05 22:27:09
|
46
|
+
-0700","size":0,"private":false,"name":"radiant-archive-by-quarter-extension","owner":"tricycle","has_downloads":true,"created":"2009/04/05
|
47
|
+
22:25:22 -0700","watchers":4,"score":3.2218196,"forks":0},{"type":"repo","followers":3,"description":"Some
|
48
|
+
hacks for standart Radiant CMS archive extension, improving its usability","url":"https://github.com/alno/radiant-archive-hacks-extension","has_wiki":true,"created_at":"2009/02/04
|
49
|
+
12:07:46 -0800","homepage":"http://github.com/alno/radiant-archive-hacks-extension","has_issues":true,"fork":false,"language":"Ruby","pushed_at":"2009/02/27
|
50
|
+
00:03:13 -0800","open_issues":0,"username":"alno","pushed":"2009/02/27 00:03:13
|
51
|
+
-0800","size":336,"private":false,"name":"radiant-archive-hacks-extension","owner":"alno","has_downloads":true,"created":"2009/02/04
|
52
|
+
12:07:46 -0800","watchers":3,"score":3.7430468,"forks":3},{"type":"repo","followers":1,"description":"Adds
|
53
|
+
radius tags that lets you iterate over all pages that have an ArchivePage as
|
54
|
+
parent.","url":"https://github.com/jomz/radiant-archive_children-extension","has_wiki":true,"created_at":"2011/07/18
|
55
|
+
05:43:22 -0700","homepage":"","has_issues":true,"fork":false,"language":"Ruby","pushed_at":"2011/07/18
|
56
|
+
05:45:50 -0700","open_issues":0,"username":"jomz","pushed":"2011/07/18 05:45:50
|
57
|
+
-0700","size":100,"private":false,"name":"radiant-archive_children-extension","owner":"jomz","has_downloads":true,"created":"2011/07/18
|
58
|
+
05:43:22 -0700","watchers":1,"score":3.7430468,"forks":1},{"type":"repo","followers":1,"description":"Radiant
|
59
|
+
extension for displaying Archive pages in their own paginated tab","url":"https://github.com/jsntv200/radiant-archive_tabs-extension","has_wiki":true,"created_at":"2010/08/28
|
60
|
+
02:22:25 -0700","master_branch":"master","homepage":"","has_issues":true,"fork":false,"language":"Ruby","pushed_at":"2011/09/01
|
61
|
+
01:38:10 -0700","open_issues":0,"username":"jsntv200","pushed":"2011/09/01 01:38:10
|
62
|
+
-0700","size":3204,"private":false,"name":"radiant-archive_tabs-extension","owner":"jsntv200","has_downloads":true,"created":"2010/08/28
|
63
|
+
02:22:25 -0700","watchers":1,"score":3.7430468,"forks":1}]}'
|
64
|
+
http_version: '1.1'
|
65
|
+
- !ruby/struct:VCR::HTTPInteraction
|
66
|
+
request: !ruby/struct:VCR::Request
|
67
|
+
method: :get
|
68
|
+
uri: https://api.github.com:443/users/radiant
|
69
|
+
body:
|
70
|
+
headers:
|
71
|
+
response: !ruby/struct:VCR::Response
|
72
|
+
status: !ruby/struct:VCR::ResponseStatus
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
server:
|
77
|
+
- nginx/1.0.4
|
78
|
+
date:
|
79
|
+
- Sat, 05 Nov 2011 20:18:30 GMT
|
80
|
+
content-type:
|
81
|
+
- application/json; charset=utf-8
|
82
|
+
connection:
|
83
|
+
- keep-alive
|
84
|
+
status:
|
85
|
+
- 200 OK
|
86
|
+
x-ratelimit-limit:
|
87
|
+
- '5000'
|
88
|
+
etag:
|
89
|
+
- ! '"96f611c29e31d7ea060ff450d9a786b1"'
|
90
|
+
x-ratelimit-remaining:
|
91
|
+
- '4982'
|
92
|
+
content-length:
|
93
|
+
- '547'
|
94
|
+
body: ! '{"followers":181,"type":"Organization","public_gists":2,"created_at":"2008-06-20T15:23:06Z","url":"https://api.github.com/orgs/radiant","login":"radiant","public_repos":46,"avatar_url":"https://secure.gravatar.com/avatar/b2fed76c7a4cf1778adb683b70281481?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","location":null,"company":null,"following":0,"html_url":"https://github.com/radiant","name":"Radiant
|
95
|
+
CMS dev team","blog":"http://radiantcms.org/blog/","email":"radiantcms-dev@googlegroups.com","id":14429}'
|
96
|
+
http_version: '1.1'
|
97
|
+
- !ruby/struct:VCR::HTTPInteraction
|
98
|
+
request: !ruby/struct:VCR::Request
|
99
|
+
method: :get
|
100
|
+
uri: https://api.github.com:443/users/tricycle
|
101
|
+
body:
|
102
|
+
headers:
|
103
|
+
response: !ruby/struct:VCR::Response
|
104
|
+
status: !ruby/struct:VCR::ResponseStatus
|
105
|
+
code: 200
|
106
|
+
message: OK
|
107
|
+
headers:
|
108
|
+
server:
|
109
|
+
- nginx/1.0.4
|
110
|
+
date:
|
111
|
+
- Sat, 05 Nov 2011 20:18:30 GMT
|
112
|
+
content-type:
|
113
|
+
- application/json; charset=utf-8
|
114
|
+
connection:
|
115
|
+
- keep-alive
|
116
|
+
status:
|
117
|
+
- 200 OK
|
118
|
+
x-ratelimit-limit:
|
119
|
+
- '5000'
|
120
|
+
etag:
|
121
|
+
- ! '"f363f6fe3079d2cced99137c7113bd01"'
|
122
|
+
x-ratelimit-remaining:
|
123
|
+
- '4981'
|
124
|
+
content-length:
|
125
|
+
- '530'
|
126
|
+
body: ! '{"followers":10,"type":"Organization","created_at":"2008-05-28T03:53:36Z","url":"https://api.github.com/orgs/tricycle","public_gists":0,"avatar_url":"https://secure.gravatar.com/avatar/ab214309fb1c99948cbda45b1f4b0560?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","html_url":"https://github.com/tricycle","blog":"http://trikeapps.com/","location":"Melbourne,
|
127
|
+
AU","company":null,"following":0,"name":"TrikeApps","email":"info@trikeapps.com","id":11724,"public_repos":83,"login":"tricycle"}'
|
128
|
+
http_version: '1.1'
|
129
|
+
- !ruby/struct:VCR::HTTPInteraction
|
130
|
+
request: !ruby/struct:VCR::Request
|
131
|
+
method: :get
|
132
|
+
uri: https://api.github.com:443/users/alno
|
133
|
+
body:
|
134
|
+
headers:
|
135
|
+
response: !ruby/struct:VCR::Response
|
136
|
+
status: !ruby/struct:VCR::ResponseStatus
|
137
|
+
code: 200
|
138
|
+
message: OK
|
139
|
+
headers:
|
140
|
+
server:
|
141
|
+
- nginx/1.0.4
|
142
|
+
date:
|
143
|
+
- Sat, 05 Nov 2011 20:18:30 GMT
|
144
|
+
content-type:
|
145
|
+
- application/json; charset=utf-8
|
146
|
+
connection:
|
147
|
+
- keep-alive
|
148
|
+
status:
|
149
|
+
- 200 OK
|
150
|
+
x-ratelimit-limit:
|
151
|
+
- '5000'
|
152
|
+
etag:
|
153
|
+
- ! '"a8e5bbbb3a092aba61edc8c9b524378c"'
|
154
|
+
x-ratelimit-remaining:
|
155
|
+
- '4980'
|
156
|
+
content-length:
|
157
|
+
- '593'
|
158
|
+
body: ! '{"followers":10,"type":"User","hireable":true,"created_at":"2008-10-24T05:47:27Z","url":"https://api.github.com/users/alno","bio":"","html_url":"https://github.com/alno","gravatar_id":"7ba93c0a07d2caa804c0d4874e7fac0e","location":"Moscow","login":"alno","public_repos":26,"company":"Evil
|
159
|
+
Martians","public_gists":8,"following":3,"name":"Alexey Noskov","avatar_url":"https://secure.gravatar.com/avatar/7ba93c0a07d2caa804c0d4874e7fac0e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","blog":"http://alno.name/","email":"alexey.noskov@gmail.com","id":30774}'
|
160
|
+
http_version: '1.1'
|
161
|
+
- !ruby/struct:VCR::HTTPInteraction
|
162
|
+
request: !ruby/struct:VCR::Request
|
163
|
+
method: :get
|
164
|
+
uri: https://api.github.com:443/users/jomz
|
165
|
+
body:
|
166
|
+
headers:
|
167
|
+
response: !ruby/struct:VCR::Response
|
168
|
+
status: !ruby/struct:VCR::ResponseStatus
|
169
|
+
code: 200
|
170
|
+
message: OK
|
171
|
+
headers:
|
172
|
+
server:
|
173
|
+
- nginx/1.0.4
|
174
|
+
date:
|
175
|
+
- Sat, 05 Nov 2011 20:18:30 GMT
|
176
|
+
content-type:
|
177
|
+
- application/json; charset=utf-8
|
178
|
+
connection:
|
179
|
+
- keep-alive
|
180
|
+
status:
|
181
|
+
- 200 OK
|
182
|
+
x-ratelimit-limit:
|
183
|
+
- '5000'
|
184
|
+
etag:
|
185
|
+
- ! '"a04842d80aae474756851987fc8cee55"'
|
186
|
+
x-ratelimit-remaining:
|
187
|
+
- '4979'
|
188
|
+
content-length:
|
189
|
+
- '602'
|
190
|
+
body: ! '{"followers":30,"type":"User","hireable":false,"created_at":"2008-03-21T16:06:59Z","url":"https://api.github.com/users/jomz","bio":null,"html_url":"https://github.com/jomz","gravatar_id":"e511b3937bae263e4f8ea596dabf8474","location":"Ghent,
|
191
|
+
Belgium","login":"jomz","public_repos":72,"company":"Monkeypatch","public_gists":2,"following":12,"name":"Benny
|
192
|
+
Degezelle","avatar_url":"https://secure.gravatar.com/avatar/e511b3937bae263e4f8ea596dabf8474?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","blog":"http://monkeypatch.be","email":"hi@monkeypatch.be","id":3541}'
|
193
|
+
http_version: '1.1'
|
194
|
+
- !ruby/struct:VCR::HTTPInteraction
|
195
|
+
request: !ruby/struct:VCR::Request
|
196
|
+
method: :get
|
197
|
+
uri: https://api.github.com:443/users/jsntv200
|
198
|
+
body:
|
199
|
+
headers:
|
200
|
+
response: !ruby/struct:VCR::Response
|
201
|
+
status: !ruby/struct:VCR::ResponseStatus
|
202
|
+
code: 200
|
203
|
+
message: OK
|
204
|
+
headers:
|
205
|
+
server:
|
206
|
+
- nginx/1.0.4
|
207
|
+
date:
|
208
|
+
- Sat, 05 Nov 2011 20:18:31 GMT
|
209
|
+
content-type:
|
210
|
+
- application/json; charset=utf-8
|
211
|
+
connection:
|
212
|
+
- keep-alive
|
213
|
+
status:
|
214
|
+
- 200 OK
|
215
|
+
x-ratelimit-limit:
|
216
|
+
- '5000'
|
217
|
+
etag:
|
218
|
+
- ! '"d3826e66bacf4c3e4a3ab0720f1df0a6"'
|
219
|
+
x-ratelimit-remaining:
|
220
|
+
- '4978'
|
221
|
+
content-length:
|
222
|
+
- '563'
|
223
|
+
body: ! '{"followers":0,"type":"User","created_at":"2010-08-27T05:22:35Z","url":"https://api.github.com/users/jsntv200","public_gists":0,"avatar_url":"https://secure.gravatar.com/avatar/c4d7f12f15a042f85af6c30aee18f21e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","html_url":"https://github.com/jsntv200","blog":null,"gravatar_id":"c4d7f12f15a042f85af6c30aee18f21e","location":"Australia","company":null,"following":0,"name":"Jason
|
224
|
+
Taylor","hireable":false,"email":null,"id":377644,"public_repos":19,"bio":null,"login":"jsntv200"}'
|
225
|
+
http_version: '1.1'
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://github.com:80/api/v2/json/repos/search/radiant+reorder_children
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
server:
|
14
|
+
- nginx/1.0.4
|
15
|
+
date:
|
16
|
+
- Sat, 05 Nov 2011 20:12:44 GMT
|
17
|
+
content-type:
|
18
|
+
- application/json; charset=utf-8
|
19
|
+
connection:
|
20
|
+
- keep-alive
|
21
|
+
status:
|
22
|
+
- 200 OK
|
23
|
+
x-ratelimit-limit:
|
24
|
+
- '60'
|
25
|
+
etag:
|
26
|
+
- ! '"262b6a3ce3cdd070b992eb63a8e91cc6"'
|
27
|
+
x-frame-options:
|
28
|
+
- deny
|
29
|
+
x-ratelimit-remaining:
|
30
|
+
- '59'
|
31
|
+
x-runtime:
|
32
|
+
- 16ms
|
33
|
+
content-length:
|
34
|
+
- '627'
|
35
|
+
cache-control:
|
36
|
+
- private, max-age=0, must-revalidate
|
37
|
+
body: ! '{"repositories":[{"type":"repo","followers":2,"description":"Adds the
|
38
|
+
ability to reorder the children of a certain page with drag and drop.","open_issues":0,"pushed":"2011/10/13
|
39
|
+
06:23:03 -0700","url":"https://github.com/jomz/radiant-reorder_children-extension","created_at":"2011/06/14
|
40
|
+
05:34:36 -0700","has_downloads":true,"homepage":"","fork":false,"language":"Ruby","pushed_at":"2011/10/13
|
41
|
+
06:23:03 -0700","has_wiki":true,"username":"jomz","size":128,"private":false,"has_issues":true,"name":"radiant-reorder_children-extension","owner":"jomz","created":"2011/06/14
|
42
|
+
05:34:36 -0700","watchers":2,"score":6.8202057,"forks":2}]}'
|
43
|
+
http_version: '1.1'
|
44
|
+
- !ruby/struct:VCR::HTTPInteraction
|
45
|
+
request: !ruby/struct:VCR::Request
|
46
|
+
method: :get
|
47
|
+
uri: https://api.github.com:443/users/jomz
|
48
|
+
body:
|
49
|
+
headers:
|
50
|
+
response: !ruby/struct:VCR::Response
|
51
|
+
status: !ruby/struct:VCR::ResponseStatus
|
52
|
+
code: 200
|
53
|
+
message: OK
|
54
|
+
headers:
|
55
|
+
server:
|
56
|
+
- nginx/1.0.4
|
57
|
+
date:
|
58
|
+
- Sat, 05 Nov 2011 20:12:44 GMT
|
59
|
+
content-type:
|
60
|
+
- application/json; charset=utf-8
|
61
|
+
connection:
|
62
|
+
- keep-alive
|
63
|
+
status:
|
64
|
+
- 200 OK
|
65
|
+
x-ratelimit-limit:
|
66
|
+
- '5000'
|
67
|
+
etag:
|
68
|
+
- ! '"160dd8c94d491baad797925e231d3996"'
|
69
|
+
x-ratelimit-remaining:
|
70
|
+
- '4993'
|
71
|
+
content-length:
|
72
|
+
- '602'
|
73
|
+
body: ! '{"public_gists":2,"followers":30,"type":"User","bio":null,"created_at":"2008-03-21T16:06:59Z","url":"https://api.github.com/users/jomz","public_repos":72,"login":"jomz","blog":"http://monkeypatch.be","gravatar_id":"e511b3937bae263e4f8ea596dabf8474","location":"Ghent,
|
74
|
+
Belgium","company":"Monkeypatch","avatar_url":"https://secure.gravatar.com/avatar/e511b3937bae263e4f8ea596dabf8474?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","following":12,"html_url":"https://github.com/jomz","name":"Benny
|
75
|
+
Degezelle","email":"hi@monkeypatch.be","hireable":false,"id":3541}'
|
76
|
+
http_version: '1.1'
|
@@ -13,7 +13,7 @@
|
|
13
13
|
server:
|
14
14
|
- nginx/1.0.4
|
15
15
|
date:
|
16
|
-
-
|
16
|
+
- Sat, 12 Nov 2011 01:11:09 GMT
|
17
17
|
content-type:
|
18
18
|
- text/html; charset=utf-8
|
19
19
|
connection:
|
@@ -25,7 +25,7 @@
|
|
25
25
|
location:
|
26
26
|
- https://nodeload.github.com/johnmuhl/ray-dummy-extension/zipball/master
|
27
27
|
x-runtime:
|
28
|
-
-
|
28
|
+
- 8ms
|
29
29
|
content-length:
|
30
30
|
- '137'
|
31
31
|
set-cookie:
|
@@ -51,7 +51,7 @@
|
|
51
51
|
server:
|
52
52
|
- nginx/1.0.4
|
53
53
|
date:
|
54
|
-
-
|
54
|
+
- Sat, 12 Nov 2011 01:11:11 GMT
|
55
55
|
content-type:
|
56
56
|
- application/octet-stream
|
57
57
|
connection:
|
@@ -11,17 +11,17 @@
|
|
11
11
|
message: OK
|
12
12
|
headers:
|
13
13
|
date:
|
14
|
-
-
|
14
|
+
- Tue, 15 Nov 2011 21:34:47 GMT
|
15
15
|
server:
|
16
16
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
17
17
|
x-powered-by:
|
18
18
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
19
19
|
etag:
|
20
|
-
- ! '"
|
20
|
+
- ! '"2e866c0b6c6b2430a5843962f9376ba3"'
|
21
21
|
x-ua-compatible:
|
22
22
|
- IE=Edge,chrome=1
|
23
23
|
x-runtime:
|
24
|
-
- '0.
|
24
|
+
- '0.017673'
|
25
25
|
cache-control:
|
26
26
|
- max-age=0, private, must-revalidate
|
27
27
|
status:
|
@@ -30,7 +30,7 @@
|
|
30
30
|
- chunked
|
31
31
|
content-type:
|
32
32
|
- application/json; charset=utf-8
|
33
|
-
body: ! '{"dependencies":{"runtime":[],"development":[]},"name":"radiant-reorder_children-extension","downloads":
|
34
|
-
Radiant better by adding reorder_children!","version_downloads":
|
33
|
+
body: ! '{"dependencies":{"runtime":[],"development":[]},"name":"radiant-reorder_children-extension","downloads":582,"info":"Makes
|
34
|
+
Radiant better by adding reorder_children!","version_downloads":112,"version":"1.0.5","homepage_uri":"http://github.com/jomz/radiant-reorder_children-extension","bug_tracker_uri":null,"source_code_uri":null,"gem_uri":"http://rubygems.org/gems/radiant-reorder_children-extension-1.0.5.gem","project_uri":"http://rubygems.org/gems/radiant-reorder_children-extension","authors":"Benny
|
35
35
|
Degezelle","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null}'
|
36
36
|
http_version: '1.1'
|
data/spec/fixtures/cassettes/{rubygems_v1_api_no_matches.yml → rubygems_v1_search_empty.yml}
RENAMED
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri:
|
5
|
+
uri: https://rubygems.org:443/api/v1/search.json?query=radiant-zzz
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
response: !ruby/struct:VCR::Response
|
@@ -11,7 +11,7 @@
|
|
11
11
|
message: OK
|
12
12
|
headers:
|
13
13
|
date:
|
14
|
-
- Fri,
|
14
|
+
- Fri, 04 Nov 2011 19:20:19 GMT
|
15
15
|
server:
|
16
16
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
17
17
|
x-powered-by:
|
@@ -21,7 +21,7 @@
|
|
21
21
|
x-ua-compatible:
|
22
22
|
- IE=Edge,chrome=1
|
23
23
|
x-runtime:
|
24
|
-
- '1.
|
24
|
+
- '1.179308'
|
25
25
|
cache-control:
|
26
26
|
- max-age=0, private, must-revalidate
|
27
27
|
status:
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://rubygems.org:443/api/v1/search.json?query=radiant-archive
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
date:
|
14
|
+
- Fri, 04 Nov 2011 20:50:18 GMT
|
15
|
+
server:
|
16
|
+
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
17
|
+
x-powered-by:
|
18
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
19
|
+
etag:
|
20
|
+
- ! '"1705aca738f1b048d63d0713cd2be5cd"'
|
21
|
+
x-ua-compatible:
|
22
|
+
- IE=Edge,chrome=1
|
23
|
+
x-runtime:
|
24
|
+
- '1.180019'
|
25
|
+
cache-control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
status:
|
28
|
+
- '200'
|
29
|
+
transfer-encoding:
|
30
|
+
- chunked
|
31
|
+
content-type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
body: ! '[{"dependencies":{"runtime":[],"development":[]},"name":"radiant-archive-extension","downloads":1176,"info":"Provides
|
34
|
+
page types for news or blog archives.","version_downloads":118,"version":"1.0.3","homepage_uri":"http://radiantcms.org","bug_tracker_uri":null,"source_code_uri":null,"gem_uri":"http://rubygems.org/gems/radiant-archive-extension-1.0.3.gem","project_uri":"http://rubygems.org/gems/radiant-archive-extension","authors":"Radiant
|
35
|
+
CMS Dev Team","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null},{"dependencies":{"runtime":[],"development":[]},"name":"radiant-archive_tabs-extension","downloads":424,"info":"Display
|
36
|
+
Archive pages in their own paginated tab.","version_downloads":116,"version":"1.0.5","homepage_uri":"https://github.com/jsntv200/radiant-archive_tabs-extension","bug_tracker_uri":null,"source_code_uri":null,"gem_uri":"http://rubygems.org/gems/radiant-archive_tabs-extension-1.0.5.gem","project_uri":"http://rubygems.org/gems/radiant-archive_tabs-extension","authors":"Jason
|
37
|
+
Taylor","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null},{"dependencies":{"runtime":[],"development":[]},"name":"radiant-archive_children-extension","downloads":62,"info":"Makes
|
38
|
+
Radiant better by adding archive_children!","version_downloads":62,"version":"1.0.0","homepage_uri":"http://yourwebsite.com/archive_children","bug_tracker_uri":null,"source_code_uri":null,"gem_uri":"http://rubygems.org/gems/radiant-archive_children-extension-1.0.0.gem","project_uri":"http://rubygems.org/gems/radiant-archive_children-extension","authors":"Benny
|
39
|
+
Degezelle","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null}]'
|
40
|
+
http_version: '1.1'
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri:
|
5
|
+
uri: https://rubygems.org:443/api/v1/search.json?query=radiant-reorder_children
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
response: !ruby/struct:VCR::Response
|
@@ -11,17 +11,17 @@
|
|
11
11
|
message: OK
|
12
12
|
headers:
|
13
13
|
date:
|
14
|
-
- Fri,
|
14
|
+
- Fri, 04 Nov 2011 19:35:25 GMT
|
15
15
|
server:
|
16
16
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
17
17
|
x-powered-by:
|
18
18
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
19
19
|
etag:
|
20
|
-
- ! '"
|
20
|
+
- ! '"64325950e961043fb281f81635a2d6a6"'
|
21
21
|
x-ua-compatible:
|
22
22
|
- IE=Edge,chrome=1
|
23
23
|
x-runtime:
|
24
|
-
- '1.
|
24
|
+
- '1.188777'
|
25
25
|
cache-control:
|
26
26
|
- max-age=0, private, must-revalidate
|
27
27
|
status:
|
@@ -30,7 +30,7 @@
|
|
30
30
|
- chunked
|
31
31
|
content-type:
|
32
32
|
- application/json; charset=utf-8
|
33
|
-
body: ! '[{"dependencies":{"runtime":[],"development":[]},"name":"radiant-reorder_children-extension","downloads":
|
34
|
-
Radiant better by adding reorder_children!","version_downloads":
|
33
|
+
body: ! '[{"dependencies":{"runtime":[],"development":[]},"name":"radiant-reorder_children-extension","downloads":485,"info":"Makes
|
34
|
+
Radiant better by adding reorder_children!","version_downloads":45,"version":"1.0.5","homepage_uri":"http://github.com/jomz/radiant-reorder_children-extension","bug_tracker_uri":null,"source_code_uri":null,"gem_uri":"http://rubygems.org/gems/radiant-reorder_children-extension-1.0.5.gem","project_uri":"http://rubygems.org/gems/radiant-reorder_children-extension","authors":"Benny
|
35
35
|
Degezelle","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null}]'
|
36
36
|
http_version: '1.1'
|
data/spec/fixtures/dummy.zip
CHANGED
Binary file
|
@@ -0,0 +1,172 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "ray/extension"
|
3
|
+
|
4
|
+
Ray::EXT_DIR = File.expand_path "tmp/vendor/extensions"
|
5
|
+
|
6
|
+
module Ray
|
7
|
+
class Extension
|
8
|
+
def run_rake_tasks ; end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe Ray::Extension::Zip do
|
13
|
+
|
14
|
+
describe "new" do
|
15
|
+
it "must have uri attribute" do
|
16
|
+
zip = Ray::Extension::Zip.new
|
17
|
+
zip.uri.must_equal nil
|
18
|
+
end
|
19
|
+
|
20
|
+
it "must have name attribute" do
|
21
|
+
zip = Ray::Extension::Zip.new
|
22
|
+
zip.name.must_equal nil
|
23
|
+
end
|
24
|
+
|
25
|
+
it "must accept arguments" do
|
26
|
+
zip = Ray::Extension::Zip.new "dummy", "http://example.com/ext.zip"
|
27
|
+
zip.name.must_equal "dummy"
|
28
|
+
zip.uri.must_equal "http://example.com/ext.zip"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "download" do
|
33
|
+
after { cleanup }
|
34
|
+
|
35
|
+
it "must download the file" do
|
36
|
+
zip = Ray::Extension::Zip.new "dummy", "https://github.com/johnmuhl/ray-dummy-extension/zipball/master"
|
37
|
+
VCR.use_cassette("github_zip_file") { zip.download }
|
38
|
+
File.exist?("#{Ray::TMP}/master").must_equal true
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "extract" do
|
43
|
+
before do
|
44
|
+
FileUtils.mkdir_p Ray::TMP
|
45
|
+
FileUtils.cp "spec/fixtures/dummy.zip", "#{Ray::TMP}/dummy.zip"
|
46
|
+
end
|
47
|
+
|
48
|
+
after { cleanup }
|
49
|
+
|
50
|
+
it "must extract the contents of the zip file" do
|
51
|
+
Ray::Extension::Zip.new("dummy").extract
|
52
|
+
File.exist?("#{Ray::TMP}/dummy/dummy_extension.rb").must_equal true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "install" do
|
57
|
+
before do
|
58
|
+
FileUtils.mkdir_p Ray::TMP
|
59
|
+
FileUtils.mkdir_p Ray::EXT_DIR
|
60
|
+
FileUtils.cp "spec/fixtures/dummy.zip", "#{Ray::TMP}/dummy.zip"
|
61
|
+
Ray::Extension::Zip.new("dummy").extract
|
62
|
+
end
|
63
|
+
|
64
|
+
after { cleanup }
|
65
|
+
|
66
|
+
it "must install the extension in vendor/extensions" do
|
67
|
+
Ray::Extension::Zip.new("dummy").install
|
68
|
+
File.exist?("#{Ray::EXT_DIR}/dummy/dummy_extension.rb").must_equal true
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
describe Ray::Extension::Git do
|
75
|
+
|
76
|
+
describe "new" do
|
77
|
+
it "must have uri attribute" do
|
78
|
+
zip = Ray::Extension::Git.new
|
79
|
+
zip.uri.must_equal nil
|
80
|
+
end
|
81
|
+
|
82
|
+
it "must have name attribute" do
|
83
|
+
zip = Ray::Extension::Git.new
|
84
|
+
zip.name.must_equal nil
|
85
|
+
end
|
86
|
+
|
87
|
+
it "must accept arguments" do
|
88
|
+
zip = Ray::Extension::Git.new "dummy", "http://example.com/ext.zip"
|
89
|
+
zip.name.must_equal "dummy"
|
90
|
+
zip.uri.must_equal "http://example.com/ext.zip"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
describe "clone" do
|
95
|
+
before do
|
96
|
+
FileUtils.mkdir_p Ray::TMP
|
97
|
+
end
|
98
|
+
|
99
|
+
after { cleanup }
|
100
|
+
|
101
|
+
it "must clone the repository" do
|
102
|
+
git = Ray::Extension::Git.new "dummy", "https://github.com/johnmuhl/ray-dummy-extension"
|
103
|
+
git.clone
|
104
|
+
File.exist?("#{Ray::TMP}/dummy/dummy_extension.rb").must_equal true
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe "install" do
|
109
|
+
before do
|
110
|
+
FileUtils.mkdir_p Ray::TMP
|
111
|
+
FileUtils.mkdir_p Ray::EXT_DIR
|
112
|
+
FileUtils.cp "spec/fixtures/dummy.zip", "#{Ray::TMP}/dummy.zip"
|
113
|
+
Ray::Extension::Zip.new("dummy").extract
|
114
|
+
end
|
115
|
+
|
116
|
+
after { cleanup }
|
117
|
+
|
118
|
+
it "must install the extension in vendor/extensions" do
|
119
|
+
Ray::Extension::Git.new("dummy").install
|
120
|
+
File.exist?("#{Ray::EXT_DIR}/dummy/dummy_extension.rb").must_equal true
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
describe Ray::Extension::RubyGem do
|
127
|
+
|
128
|
+
describe "new" do
|
129
|
+
it "must have name attribute" do
|
130
|
+
rubygem = Ray::Extension::RubyGem.new
|
131
|
+
rubygem.name.must_equal nil
|
132
|
+
end
|
133
|
+
|
134
|
+
it "must accept arguments" do
|
135
|
+
VCR.use_cassette("rubygems_v1_gem_info") do
|
136
|
+
rubygem = Ray::Extension::RubyGem.new "reorder-children"
|
137
|
+
rubygem.name.must_equal "reorder_children"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
describe "bundle" do
|
143
|
+
# before do
|
144
|
+
# FileUtils.mkdir_p Ray::TMP
|
145
|
+
# end
|
146
|
+
|
147
|
+
# after { cleanup }
|
148
|
+
|
149
|
+
it "must bundle the gem" do
|
150
|
+
# rubygem = Ray::Extension::RubyGem.new "dummy", "https://github.com/johnmuhl/ray-dummy-extension"
|
151
|
+
# rubygem.bundle
|
152
|
+
# File.exist?("#{Ray::TMP}/dummy/dummy_extension.rb").must_equal true
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
describe "install" do
|
157
|
+
# before do
|
158
|
+
# FileUtils.mkdir_p Ray::TMP
|
159
|
+
# FileUtils.mkdir_p Ray::EXT_DIR
|
160
|
+
# FileUtils.cp "spec/fixtures/dummy.zip", "#{Ray::TMP}/dummy.zip"
|
161
|
+
# Ray::Extension::Zip.new("dummy").extract
|
162
|
+
# end
|
163
|
+
|
164
|
+
# after { cleanup }
|
165
|
+
|
166
|
+
it "must install the extension in vendor/extensions" do
|
167
|
+
# Ray::Extension::RubyGem.new("dummy").install
|
168
|
+
# File.exist?("#{Ray::EXT_DIR}/dummy/dummy_extension.rb").must_equal true
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
end
|