radiant-ray-extension 3.0.0.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +19 -0
- data/README.markdown +30 -0
- data/Rakefile +26 -0
- data/bin/ray +5 -0
- data/doc/Extension.html +1189 -0
- data/doc/Ray.html +175 -0
- data/doc/Ray/CLI.html +585 -0
- data/doc/Ray/Cache.html +709 -0
- data/doc/Ray/Gem.html +760 -0
- data/doc/Ray/Git.html +278 -0
- data/doc/Ray/GitHub.html +553 -0
- data/doc/Ray/RubyGems.html +501 -0
- data/doc/Ray/Zip.html +300 -0
- data/doc/Search.html +433 -0
- data/doc/String.html +242 -0
- data/doc/_index.html +84 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.LICENSE.html +85 -0
- data/doc/file.README.html +97 -0
- data/doc/file_list.html +46 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +84 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +167 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +46 -0
- data/doc/top-level-namespace.html +105 -0
- data/lib/ray.rb +8 -0
- data/lib/ray/cli.rb +271 -0
- data/lib/ray/constants.rb +17 -0
- data/lib/ray/extension.rb +116 -0
- data/lib/ray/extension/gem.rb +96 -0
- data/lib/ray/extension/git.rb +30 -0
- data/lib/ray/extension/zip.rb +44 -0
- data/lib/ray/search.rb +62 -0
- data/lib/ray/search/cache.rb +61 -0
- data/lib/ray/search/github.rb +40 -0
- data/lib/ray/search/rubygems.rb +36 -0
- data/lib/ray/string.rb +18 -0
- data/ray.gemspec +31 -0
- data/spec/fixtures/Gemfile +4 -0
- data/spec/fixtures/cache_single.yml +8 -0
- data/spec/fixtures/cassettes/github_v2_api_no_matches.yml +38 -0
- data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +38 -0
- data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +75 -0
- data/spec/fixtures/cassettes/github_v2_api_search_single.yml +74 -0
- data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +75 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_gem_info.yml +36 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_no_matches.yml +34 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +34 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +36 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder_children.yml +36 -0
- data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +41 -0
- data/spec/fixtures/cassettes/zip_file.yml +101 -0
- data/spec/fixtures/dummy.zip +0 -0
- data/spec/fixtures/dummy/README +1 -0
- data/spec/fixtures/dummy/Rakefile +109 -0
- data/spec/fixtures/dummy/config/initializers/radiant_config.rb +3 -0
- data/spec/fixtures/dummy/config/locales/en.yml +3 -0
- data/spec/fixtures/dummy/config/routes.rb +5 -0
- data/spec/fixtures/dummy/dummy_extension.rb +21 -0
- data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +8 -0
- data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +47 -0
- data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
- data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +29 -0
- data/spec/ray/cli_spec.rb +56 -0
- data/spec/ray/extension/gem_spec.rb +214 -0
- data/spec/ray/extension/git_spec.rb +216 -0
- data/spec/ray/extension/zip_spec.rb +239 -0
- data/spec/ray/search/cache_spec.rb +74 -0
- data/spec/ray/search/github_spec.rb +137 -0
- data/spec/ray/search/rubygems_spec.rb +127 -0
- data/spec/ray/string_spec.rb +30 -0
- data/spec/spec_helper.rb +27 -0
- metadata +205 -0
@@ -0,0 +1,34 @@
|
|
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:13 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.144724'
|
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'
|
@@ -0,0 +1,34 @@
|
|
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'
|
@@ -0,0 +1,36 @@
|
|
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'
|
@@ -0,0 +1,36 @@
|
|
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_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
|
+
date:
|
14
|
+
- Fri, 18 Nov 2011 23:02:12 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.365795'
|
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'
|
@@ -0,0 +1,41 @@
|
|
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'
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://github.com:443/johnmuhl/ray-dummy-extension/zipball/master
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 302
|
11
|
+
message: Found
|
12
|
+
headers:
|
13
|
+
server:
|
14
|
+
- nginx/1.0.4
|
15
|
+
date:
|
16
|
+
- Wed, 16 Nov 2011 20:35:25 GMT
|
17
|
+
content-type:
|
18
|
+
- text/html; charset=utf-8
|
19
|
+
connection:
|
20
|
+
- keep-alive
|
21
|
+
status:
|
22
|
+
- 302 Found
|
23
|
+
x-frame-options:
|
24
|
+
- deny
|
25
|
+
location:
|
26
|
+
- https://nodeload.github.com/johnmuhl/ray-dummy-extension/zipball/master
|
27
|
+
x-runtime:
|
28
|
+
- 11ms
|
29
|
+
content-length:
|
30
|
+
- '137'
|
31
|
+
set-cookie:
|
32
|
+
- _gh_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--ed7eadd474fd37850b68bd3c08a5c55ad0c3c833;
|
33
|
+
path=/; expires=Fri, 01 Jan 2021 00:00:00 GMT; secure; HttpOnly
|
34
|
+
cache-control:
|
35
|
+
- no-cache
|
36
|
+
strict-transport-security:
|
37
|
+
- max-age=2592000
|
38
|
+
body: <html><body>You are being <a href="https://nodeload.github.com/johnmuhl/ray-dummy-extension/zipball/master">redirected</a>.</body></html>
|
39
|
+
http_version: '1.1'
|
40
|
+
- !ruby/struct:VCR::HTTPInteraction
|
41
|
+
request: !ruby/struct:VCR::Request
|
42
|
+
method: :get
|
43
|
+
uri: https://nodeload.github.com:443/johnmuhl/ray-dummy-extension/zipball/master
|
44
|
+
body:
|
45
|
+
headers:
|
46
|
+
response: !ruby/struct:VCR::Response
|
47
|
+
status: !ruby/struct:VCR::ResponseStatus
|
48
|
+
code: 200
|
49
|
+
message: OK
|
50
|
+
headers:
|
51
|
+
server:
|
52
|
+
- nginx/1.0.4
|
53
|
+
date:
|
54
|
+
- Wed, 16 Nov 2011 20:35:29 GMT
|
55
|
+
content-type:
|
56
|
+
- application/octet-stream
|
57
|
+
connection:
|
58
|
+
- keep-alive
|
59
|
+
content-length:
|
60
|
+
- '1624'
|
61
|
+
content-disposition:
|
62
|
+
- attachment; filename=johnmuhl-ray-dummy-extension-b914abb.zip
|
63
|
+
body: !binary |-
|
64
|
+
UEsDBAoAAAAAALKrTTsAAAAAAAAAAAAAAAAlAAAAam9obm11aGwtcmF5LWR1
|
65
|
+
bW15LWV4dGVuc2lvbi1iOTE0YWJiL1BLAwQKAAAACACyq007phIXHlgAAACB
|
66
|
+
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XVobC1yYXktZHVtbXktZXh0ZW5zaW9uLWI5MTRh
|
98
|
+
YmIvdmVuZG9yL3BsdWdpbnMvd2lsbF9wYWdpbmF0ZS9QSwUGAAAAAAgACAD9
|
99
|
+
AgAAHQMAACgAYjkxNGFiYjQ5NTU2NjNhYTA1ZTljMWUzNGQ3OTQ4NWRjOTQ1
|
100
|
+
NTE1Yg==
|
101
|
+
http_version: '1.1'
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
Dummy extension used to test Ray.
|
@@ -0,0 +1,109 @@
|
|
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 }
|
@@ -0,0 +1,21 @@
|
|
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
|