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.
Files changed (81) hide show
  1. data/README.markdown +1 -1
  2. data/Rakefile +2 -0
  3. data/doc/NilClass.html +178 -0
  4. data/doc/Ray/CLI.html +211 -197
  5. data/doc/Ray/Extension/Git.html +435 -0
  6. data/doc/Ray/Extension/RubyGem.html +858 -0
  7. data/doc/Ray/Extension/Zip.html +453 -0
  8. data/doc/Ray/Extension.html +755 -0
  9. data/doc/Ray/{Cache.html → Search/Cache.html} +108 -256
  10. data/doc/Ray/{GitHub.html → Search/GitHub.html} +167 -81
  11. data/doc/Ray/{RubyGems.html → Search/RubyGems.html} +118 -68
  12. data/doc/Ray/Search.html +822 -0
  13. data/doc/Ray.html +89 -34
  14. data/doc/String.html +99 -29
  15. data/doc/_index.html +1 -1
  16. data/doc/file.LICENSE.html +1 -1
  17. data/doc/file.README.html +2 -4
  18. data/doc/index.html +1 -1
  19. data/doc/top-level-namespace.html +3 -3
  20. data/lib/ray/cli.rb +146 -193
  21. data/lib/ray/constants.rb +7 -12
  22. data/lib/ray/extension.rb +203 -89
  23. data/lib/ray/search.rb +198 -43
  24. data/lib/ray/utility.rb +31 -0
  25. data/lib/ray.rb +2 -7
  26. data/spec/fixtures/cache_single.yml +2 -1
  27. data/spec/fixtures/cassettes/combined_search_empty.yml +71 -0
  28. data/spec/fixtures/cassettes/combined_search_multiple.yml +264 -0
  29. data/spec/fixtures/cassettes/combined_search_single.yml +108 -0
  30. data/spec/fixtures/cassettes/github_reorder_children_zip_file.yml +487 -0
  31. data/spec/fixtures/cassettes/github_sitemap_xml_zip_file.yml +553 -0
  32. data/spec/fixtures/cassettes/{github_v2_api_no_matches.yml → github_v2_search_empty.yml} +3 -3
  33. data/spec/fixtures/cassettes/github_v2_search_multiple.yml +225 -0
  34. data/spec/fixtures/cassettes/github_v2_search_single.yml +76 -0
  35. data/spec/fixtures/cassettes/{zip_file.yml → github_zip_file.yml} +3 -3
  36. data/spec/fixtures/cassettes/{rubygems_v1_api_gem_info.yml → rubygems_v1_gem_info.yml} +5 -5
  37. data/spec/fixtures/cassettes/{rubygems_v1_api_no_matches.yml → rubygems_v1_search_empty.yml} +3 -3
  38. data/spec/fixtures/cassettes/rubygems_v1_search_multiple.yml +40 -0
  39. data/spec/fixtures/cassettes/{rubygems_v1_api_search_reorder_children.yml → rubygems_v1_search_single.yml} +6 -6
  40. data/spec/fixtures/dummy.zip +0 -0
  41. data/spec/ray/extension_spec.rb +172 -0
  42. data/spec/ray/search_spec.rb +300 -0
  43. data/spec/spec_helper.rb +36 -9
  44. metadata +50 -85
  45. data/doc/Extension.html +0 -1189
  46. data/doc/Ray/Gem.html +0 -760
  47. data/doc/Ray/Git.html +0 -278
  48. data/doc/Ray/Zip.html +0 -300
  49. data/doc/Search.html +0 -433
  50. data/lib/ray/extension/gem.rb +0 -96
  51. data/lib/ray/extension/git.rb +0 -30
  52. data/lib/ray/extension/zip.rb +0 -44
  53. data/lib/ray/search/cache.rb +0 -61
  54. data/lib/ray/search/github.rb +0 -40
  55. data/lib/ray/search/rubygems.rb +0 -36
  56. data/lib/ray/string.rb +0 -18
  57. data/spec/fixtures/Gemfile +0 -4
  58. data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +0 -38
  59. data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +0 -75
  60. data/spec/fixtures/cassettes/github_v2_api_search_single.yml +0 -74
  61. data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +0 -75
  62. data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +0 -34
  63. data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +0 -36
  64. data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +0 -41
  65. data/spec/fixtures/dummy/README +0 -1
  66. data/spec/fixtures/dummy/Rakefile +0 -109
  67. data/spec/fixtures/dummy/config/initializers/radiant_config.rb +0 -3
  68. data/spec/fixtures/dummy/config/locales/en.yml +0 -3
  69. data/spec/fixtures/dummy/config/routes.rb +0 -5
  70. data/spec/fixtures/dummy/dummy_extension.rb +0 -21
  71. data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +0 -8
  72. data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +0 -47
  73. data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
  74. data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +0 -29
  75. data/spec/ray/extension/gem_spec.rb +0 -214
  76. data/spec/ray/extension/git_spec.rb +0 -216
  77. data/spec/ray/extension/zip_spec.rb +0 -239
  78. data/spec/ray/search/cache_spec.rb +0 -74
  79. data/spec/ray/search/github_spec.rb +0 -137
  80. data/spec/ray/search/rubygems_spec.rb +0 -127
  81. data/spec/ray/string_spec.rb +0 -30
@@ -1,40 +0,0 @@
1
- require "ray/search"
2
-
3
- module Ray
4
-
5
- class GitHub
6
-
7
- include Search
8
-
9
- attr_reader :query, :results, :uri
10
-
11
- def initialize query
12
- @query = query
13
- @uri = "#{Ray::GH_V2_API}/repos/search/radiant+#{@query}"
14
- @results = search
15
- end
16
-
17
- def normalize response
18
- response = MultiJson.decode response
19
- results = {}
20
- response["repositories"].each do |extension|
21
- results[extension["name"].to_extension_name] = {
22
- :author => real_name(extension["owner"]),
23
- :description => extension["description"],
24
- :homepage => extension["url"],
25
- :name => extension["name"].to_extension_name,
26
- :uri => extension["url"],
27
- :version => "latest"
28
- }
29
- end
30
- return results
31
- end
32
-
33
- def real_name owner
34
- response = open("#{GH_V3_API}/users/#{owner}").read
35
- MultiJson.decode(response)["name"]
36
- end
37
-
38
- end
39
-
40
- end
@@ -1,36 +0,0 @@
1
- require "ray/search"
2
-
3
- module Ray
4
-
5
- class RubyGems
6
-
7
- include Search
8
-
9
- attr_reader :query, :uri
10
- attr_accessor :results
11
-
12
- def initialize query
13
- @query = query
14
- @uri = "#{Ray::RG_V1_API}/search.json?query=radiant-#{@query}"
15
- @results = search
16
- end
17
-
18
- def normalize response
19
- response = MultiJson.decode response
20
- results = {}
21
- response.each do |extension|
22
- results[extension["name"].to_extension_name] = {
23
- :author => extension["authors"],
24
- :description => extension["info"],
25
- :homepage => extension["homepage_uri"],
26
- :name => extension["name"].to_extension_name,
27
- :uri => extension["gem_uri"],
28
- :version => extension["version"]
29
- }
30
- end
31
- return results
32
- end
33
-
34
- end
35
-
36
- end
data/lib/ray/string.rb DELETED
@@ -1,18 +0,0 @@
1
- class String
2
-
3
- def to_extension_name
4
- return nil if self.empty?
5
-
6
- name = self.gsub /radiant[-_]/i, ""
7
- name.gsub! /[-_]extension/i, ""
8
- name.gsub! /-/, "_"
9
-
10
- return name.downcase
11
- end
12
-
13
- def wrap columns = 80, indent = 0, prefix = ""
14
- indent = " " * indent
15
- self.gsub(/(.{1,#{columns}})( +|$\n?)|(.{1,#{columns}})/,"#{prefix}#{indent}\\1\\3\n")
16
- end
17
-
18
- end
@@ -1,4 +0,0 @@
1
- source :rubygems
2
-
3
- gem "radiant"
4
- gem "sqlite3"
@@ -1,38 +0,0 @@
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+no-matches
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
- - Fri, 18 Nov 2011 21:52:16 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
- - ! '"56b08340755bc2851ce6c91d650b849f"'
27
- x-frame-options:
28
- - deny
29
- x-ratelimit-remaining:
30
- - '58'
31
- x-runtime:
32
- - 8ms
33
- content-length:
34
- - '19'
35
- cache-control:
36
- - private, max-age=0, must-revalidate
37
- body: ! '{"repositories":[]}'
38
- http_version: '1.1'
@@ -1,75 +0,0 @@
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
- - Fri, 18 Nov 2011 22:31:00 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
- - ! '"0499cce19bbddf169e54003ffbcceb3b"'
27
- x-frame-options:
28
- - deny
29
- x-ratelimit-remaining:
30
- - '59'
31
- x-runtime:
32
- - 14ms
33
- content-length:
34
- - '627'
35
- cache-control:
36
- - private, max-age=0, must-revalidate
37
- body: ! '{"repositories":[{"type":"repo","has_issues":true,"language":"Ruby","username":"jomz","pushed":"2011/10/13
38
- 06:23:03 -0700","open_issues":0,"description":"Adds the ability to reorder the
39
- children of a certain page with drag and drop.","watchers":2,"fork":false,"created":"2011/06/14
40
- 05:34:36 -0700","has_downloads":true,"followers":2,"url":"https://github.com/jomz/radiant-reorder_children-extension","size":128,"private":false,"name":"radiant-reorder_children-extension","owner":"jomz","created_at":"2011/06/14
41
- 05:34:36 -0700","score":6.8556094,"homepage":"","forks":2,"pushed_at":"2011/10/13
42
- 06:23:03 -0700","has_wiki":true}]}'
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
- - Fri, 18 Nov 2011 22:31:03 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
- - ! '"6734e86608a2fc0b9026723f88356490"'
69
- x-ratelimit-remaining:
70
- - '4997'
71
- content-length:
72
- - '602'
73
- body: ! '{"public_gists":2,"type":"User","location":"Ghent, Belgium","company":"Monkeypatch","email":"hi@monkeypatch.be","following":12,"gravatar_id":"e511b3937bae263e4f8ea596dabf8474","blog":"http://monkeypatch.be","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/e511b3937bae263e4f8ea596dabf8474?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_repos":73,"followers":30,"html_url":"https://github.com/jomz","bio":null,"url":"https://api.github.com/users/jomz","created_at":"2008-03-21T16:06:59Z","name":"Benny
74
- Degezelle","id":3541,"login":"jomz"}'
75
- http_version: '1.1'
@@ -1,74 +0,0 @@
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+ray
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
- - Fri, 18 Nov 2011 22:11:52 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
- - ! '"2875b402ba79e984857eac953499807c"'
27
- x-frame-options:
28
- - deny
29
- x-ratelimit-remaining:
30
- - '59'
31
- x-runtime:
32
- - 12ms
33
- content-length:
34
- - '702'
35
- cache-control:
36
- - private, max-age=0, must-revalidate
37
- body: ! '{"repositories":[{"type":"repo","has_wiki":true,"language":"Ruby","integrate_branch":"master","username":"johnmuhl","forks":9,"has_issues":true,"master_branch":"master","description":"friendly
38
- extension management for radiant cms using git or http.","watchers":25,"fork":false,"open_issues":0,"pushed":"2011/11/15
39
- 18:10:53 -0800","created":"2008/07/14 18:22:15 -0700","followers":25,"url":"https://github.com/johnmuhl/radiant-ray-extension","size":377,"private":false,"has_downloads":true,"name":"radiant-ray-extension","owner":"johnmuhl","created_at":"2008/07/14
40
- 18:22:15 -0700","score":4.364375,"homepage":"http://johnmuhl.github.com/radiant-ray-extension/","pushed_at":"2011/11/15
41
- 18:10:53 -0800"}]}'
42
- http_version: '1.1'
43
- - !ruby/struct:VCR::HTTPInteraction
44
- request: !ruby/struct:VCR::Request
45
- method: :get
46
- uri: https://api.github.com:443/users/johnmuhl
47
- body:
48
- headers:
49
- response: !ruby/struct:VCR::Response
50
- status: !ruby/struct:VCR::ResponseStatus
51
- code: 200
52
- message: OK
53
- headers:
54
- server:
55
- - nginx/1.0.4
56
- date:
57
- - Fri, 18 Nov 2011 22:11:55 GMT
58
- content-type:
59
- - application/json; charset=utf-8
60
- connection:
61
- - keep-alive
62
- status:
63
- - 200 OK
64
- x-ratelimit-limit:
65
- - '5000'
66
- etag:
67
- - ! '"a088e48ac1c357a4c98a8fe6ed41d401"'
68
- x-ratelimit-remaining:
69
- - '4998'
70
- content-length:
71
- - '567'
72
- body: ! '{"public_repos":51,"type":"User","blog":"","public_gists":59,"location":"tx","hireable":false,"company":"nope","html_url":"https://github.com/johnmuhl","email":"git@johnmuhl.com","bio":null,"following":0,"gravatar_id":"d551315856f31fc88e33c95cde28e5e8","avatar_url":"https://secure.gravatar.com/avatar/d551315856f31fc88e33c95cde28e5e8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"johnmuhl","followers":16,"url":"https://api.github.com/users/johnmuhl","created_at":"2008-04-19T19:51:49Z","name":"john
73
- muhl","id":7944}'
74
- http_version: '1.1'
@@ -1,75 +0,0 @@
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+ray
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
- - Fri, 18 Nov 2011 22:10:23 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
- - ! '"2bec1556e8df7de02ba703759d621248"'
27
- x-frame-options:
28
- - deny
29
- x-ratelimit-remaining:
30
- - '59'
31
- x-runtime:
32
- - 123ms
33
- content-length:
34
- - '702'
35
- cache-control:
36
- - private, max-age=0, must-revalidate
37
- body: ! '{"repositories":[{"type":"repo","forks":9,"language":"Ruby","integrate_branch":"master","username":"johnmuhl","pushed_at":"2011/11/15
38
- 18:10:53 -0800","master_branch":"master","open_issues":0,"pushed":"2011/11/15
39
- 18:10:53 -0800","description":"friendly extension management for radiant cms
40
- using git or http.","watchers":25,"fork":false,"created":"2008/07/14 18:22:15
41
- -0700","has_downloads":true,"followers":25,"url":"https://github.com/johnmuhl/radiant-ray-extension","size":377,"private":false,"has_issues":true,"name":"radiant-ray-extension","owner":"johnmuhl","created_at":"2008/07/14
42
- 18:22:15 -0700","score":4.364375,"homepage":"http://johnmuhl.github.com/radiant-ray-extension/","has_wiki":true}]}'
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/johnmuhl
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
- - Fri, 18 Nov 2011 22:10:26 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
- - ! '"66792fb4bfa9cb936ac07a8d9d48cb3d"'
69
- x-ratelimit-remaining:
70
- - '4999'
71
- content-length:
72
- - '567'
73
- body: ! '{"type":"User","login":"johnmuhl","location":"tx","hireable":false,"company":"nope","html_url":"https://github.com/johnmuhl","email":"git@johnmuhl.com","bio":null,"public_repos":51,"following":0,"blog":"","gravatar_id":"d551315856f31fc88e33c95cde28e5e8","avatar_url":"https://secure.gravatar.com/avatar/d551315856f31fc88e33c95cde28e5e8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_gists":59,"followers":16,"url":"https://api.github.com/users/johnmuhl","created_at":"2008-04-19T19:51:49Z","name":"john
74
- muhl","id":7944}'
75
- http_version: '1.1'
@@ -1,34 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: http://rubygems.org:80/api/v1/search.json?query=radiant-no-matches
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, 18 Nov 2011 22:59:11 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
- - ! '"d751713988987e9331980363e24189ce"'
21
- x-ua-compatible:
22
- - IE=Edge,chrome=1
23
- x-runtime:
24
- - '1.150912'
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: ! '[]'
34
- http_version: '1.1'
@@ -1,36 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: http://rubygems.org:80/api/v1/search.json?query=radiant-reorder
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, 18 Nov 2011 23:04:01 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
- - ! '"dd928382dc4092cb0b33eb0066b1c1ee"'
21
- x-ua-compatible:
22
- - IE=Edge,chrome=1
23
- x-runtime:
24
- - '1.205445'
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-reorder_children-extension","downloads":625,"info":"Makes
34
- Radiant better by adding reorder_children!","version_downloads":135,"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
- Degezelle","mailing_list_uri":null,"documentation_uri":null,"wiki_uri":null}]'
36
- http_version: '1.1'
@@ -1,41 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: http://rubygems.org:80/api/v1/search.json?query=radiant-ray
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, 18 Nov 2011 23:03:59 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
- - ! '"bd91cf697fe7bbad73bcb28eb855ea26"'
21
- x-ua-compatible:
22
- - IE=Edge,chrome=1
23
- x-runtime:
24
- - '1.238516'
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":[{"name":"multi_json","requirements":"~>
34
- 1"},{"name":"rake","requirements":"~> 0.8"},{"name":"thor","requirements":"~>
35
- 0.14"},{"name":"zip","requirements":"~> 2"}],"development":[]},"name":"radiant-ray-extension","downloads":7,"info":"Ray
36
- simplifies finding, installing, disabling, enabling and uninstalling \nRadiant
37
- extensions. It uses RubyGems and GitHub to find (and cache) extension \ninformation
38
- but you can install extensions from any location.\n\nRubyGems, Git and zip archives
39
- are used to install extensions based on \npreference or availability.\n","version_downloads":7,"version":"3.0.0.pre","homepage_uri":"http://johnmuhl.github.com/radiant-ray-extension/","bug_tracker_uri":"https://github.com/johnmuhl/radiant-ray-extension/issues","source_code_uri":"https://github.com/johnmuhl/radiant-ray-extension.git","gem_uri":"http://rubygems.org/gems/radiant-ray-extension-3.0.0.pre.gem","project_uri":"http://rubygems.org/gems/radiant-ray-extension","authors":"john
40
- muhl","mailing_list_uri":"","documentation_uri":"http://rubydoc.info/github/johnmuhl/radiant-ray-extension","wiki_uri":"https://github.com/johnmuhl/radiant-ray-extension/wiki"}]'
41
- http_version: '1.1'
@@ -1 +0,0 @@
1
- Dummy extension used to test Ray.
@@ -1,109 +0,0 @@
1
- # Determine where the RSpec plugin is by loading the boot
2
- unless defined? RADIANT_ROOT
3
- ENV["RAILS_ENV"] = "test"
4
- case
5
- when ENV["RADIANT_ENV_FILE"]
6
- require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
7
- when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
8
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
9
- else
10
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
11
- end
12
- end
13
-
14
- require 'rake'
15
- require 'rdoc/task'
16
- require 'rake/testtask'
17
-
18
- rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
19
- $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
20
- require 'spec/rake/spectask'
21
- require 'cucumber'
22
- require 'cucumber/rake/task'
23
-
24
- # Cleanup the RADIANT_ROOT constant so specs will load the environment
25
- Object.send(:remove_const, :RADIANT_ROOT)
26
-
27
- extension_root = File.expand_path(File.dirname(__FILE__))
28
-
29
- task :default => [:spec, :features]
30
- task :stats => "spec:statsetup"
31
-
32
- desc "Run all specs in spec directory"
33
- Spec::Rake::SpecTask.new(:spec) do |t|
34
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
35
- t.spec_files = FileList['spec/**/*_spec.rb']
36
- end
37
-
38
- task :features => 'spec:integration'
39
-
40
- namespace :spec do
41
- desc "Run all specs in spec directory with RCov"
42
- Spec::Rake::SpecTask.new(:rcov) do |t|
43
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
44
- t.spec_files = FileList['spec/**/*_spec.rb']
45
- t.rcov = true
46
- t.rcov_opts = ['--exclude', 'spec', '--rails']
47
- end
48
-
49
- desc "Print Specdoc for all specs"
50
- Spec::Rake::SpecTask.new(:doc) do |t|
51
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
52
- t.spec_files = FileList['spec/**/*_spec.rb']
53
- end
54
-
55
- [:models, :controllers, :views, :helpers].each do |sub|
56
- desc "Run the specs under spec/#{sub}"
57
- Spec::Rake::SpecTask.new(sub) do |t|
58
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
59
- t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
60
- end
61
- end
62
-
63
- desc "Run the Cucumber features"
64
- Cucumber::Rake::Task.new(:integration) do |t|
65
- t.fork = true
66
- t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
67
- # t.feature_pattern = "#{extension_root}/features/**/*.feature"
68
- t.profile = "default"
69
- end
70
-
71
- # Setup specs for stats
72
- task :statsetup do
73
- require 'code_statistics'
74
- ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
75
- ::STATS_DIRECTORIES << %w(View\ specs spec/views)
76
- ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
77
- ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
78
- ::CodeStatistics::TEST_TYPES << "Model specs"
79
- ::CodeStatistics::TEST_TYPES << "View specs"
80
- ::CodeStatistics::TEST_TYPES << "Controller specs"
81
- ::CodeStatistics::TEST_TYPES << "Helper specs"
82
- ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
83
- end
84
-
85
- namespace :db do
86
- namespace :fixtures do
87
- desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
88
- task :load => :environment do
89
- require 'active_record/fixtures'
90
- ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
91
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
92
- Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
93
- end
94
- end
95
- end
96
- end
97
- end
98
-
99
- desc 'Generate documentation for the dummy extension.'
100
- RDoc:Task.new(:rdoc) do |rdoc|
101
- rdoc.rdoc_dir = 'rdoc'
102
- rdoc.title = 'DummyExtension'
103
- rdoc.options << '--line-numbers' << '--inline-source'
104
- rdoc.rdoc_files.include('README')
105
- rdoc.rdoc_files.include('lib/**/*.rb')
106
- end
107
-
108
- # Load any custom rakefiles for extension
109
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
@@ -1,3 +0,0 @@
1
- Radiant.config do |config|
2
- # config.define "setting.name", :default => 'value', :select_from => ['foo', 'bar']
3
- end
@@ -1,3 +0,0 @@
1
- ---
2
- en:
3
- dummy: Dummy
@@ -1,5 +0,0 @@
1
- ActionController::Routing::Routes.draw do |map|
2
- # map.namespace :admin, :member => { :remove => :get } do |admin|
3
- # admin.resources :dummy
4
- # end
5
- end
@@ -1,21 +0,0 @@
1
- # Uncomment this if you reference any of your controllers in activate
2
- # require_dependency "application_controller"
3
- require "radiant-dummy-extension"
4
-
5
- class DummyExtension < Radiant::Extension
6
- version RadiantDummyExtension::VERSION
7
- description RadiantDummyExtension::DESCRIPTION
8
- url RadiantDummyExtension::URL
9
-
10
- # See your config/routes.rb file in this extension to define custom routes
11
-
12
- extension_config do |config|
13
- # config is the Radiant.configuration object
14
- end
15
-
16
- def activate
17
- # tab 'Content' do
18
- # add_item "Dummy", "/admin/dummy", :after => "Pages"
19
- # end
20
- end
21
- end
@@ -1,8 +0,0 @@
1
- module RadiantDummyExtension
2
- VERSION = "1.0.0"
3
- SUMMARY = "Dummy for Radiant CMS"
4
- DESCRIPTION = "Makes Radiant better by adding dummy!"
5
- URL = "http://example.com/dummy"
6
- AUTHORS = ["Your Name"]
7
- EMAIL = ["your email"]
8
- end