Permalink
Browse files

Copied changes from kete trunk to plugin trunk

  • Loading branch information...
1 parent 238eb94 commit 83675913445f25f3291e30e5de1e33a56df57e7f Kieran Pilkington committed Jun 24, 2008
Showing with 50 additions and 4 deletions.
  1. +40 −0 fixtures/au_default_creative_commons_licenses.yml
  2. +10 −4 tasks/licenses.rake
@@ -0,0 +1,40 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+one:
+ name: Creative Commons Attribution-Noncommercial 2.5 Australia License
+ description: Creative Commons Attribution-Noncommercial 2.5 Australia License
+ url: http://creativecommons.org/licenses/by-nc/2.5/au/
+ is_available: true
+ image_url: http://i.creativecommons.org/l/by-nc/2.5/au/88x31.png
+ is_creative_commons: true
+ metadata: <a rel="license" href="$$license_url$$"><img alt="$$license_title$$" style="border-width:0" src="$$license_image_url$$"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">$$title$$</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="$$attribute_work_to_url$$" property="cc:attributionName" rel="cc:attributionURL">$$attribute_work_to_name$$</a> is licensed under a <a rel="license" href="$$license_url$$">$$license_title$$</a>
+
+#.<br/>Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="$$source_work_url$$" rel="dc:source">$$source_work_url$$</a>.<br/>Permissions beyond the scope of this license may be available at <a xmlns:cc="http://creativecommons.org/ns#" href="$$more_permissions_url$$" rel="cc:morePermissions">$$more_permissions_url$$</a>
+
+
+two:
+ name: Creative Commons Attribution 2.5 Australia License
+ description: Creative Commons Attribution 2.5 Australia License
+ url: http://creativecommons.org/licenses/by/2.5/au/
+ is_available: true
+ image_url: http://i.creativecommons.org/l/by/2.5/au/88x31.png
+ is_creative_commons: true
+ metadata: <a rel="license" href="$$license_url$$"><img alt="$$license_title$$" style="border-width:0" src="$$license_image_url$$"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">$$title$$</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="$$attribute_work_to_url$$" property="cc:attributionName" rel="cc:attributionURL">$$attribute_work_to_name$$</a> is licensed under a <a rel="license" href="$$license_url$$">$$license_title$$</a>
+
+three:
+ name: Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License
+ description: Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License
+ url: http://creativecommons.org/licenses/by-nc-sa/2.5/au/
+ is_available: true
+ image_url: http://i.creativecommons.org/l/by-nc-sa/2.5/au/88x31.png
+ is_creative_commons: true
+ metadata: <a rel="license" href="$$license_url$$"><img alt="$$license_title$$" style="border-width:0" src="$$license_image_url$$"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">$$title$$</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="$$attribute_work_to_url$$" property="cc:attributionName" rel="cc:attributionURL">$$attribute_work_to_name$$</a> is licensed under a <a rel="license" href="$$license_url$$">$$license_title$$</a>
+
+four:
+ name: Creative Commons Attribution-Share Alike 2.5 Australia License
+ description: Creative Commons Attribution-Share Alike 2.5 Australia License
+ url: http://creativecommons.org/licenses/by-sa/2.5/au/
+ is_available: true
+ image_url: http://i.creativecommons.org/l/by-sa/2.5/au/88x31.png
+ is_creative_commons: true
+ metadata: <a rel="license" href="$$license_url$$"><img alt="$$license_title$$" style="border-width:0" src="$$license_image_url$$"/></a><br/><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">$$title$$</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="$$attribute_work_to_url$$" property="cc:attributionName" rel="cc:attributionURL">$$attribute_work_to_name$$</a> is licensed under a <a rel="license" href="$$license_url$$">$$license_title$$</a>
View
@@ -1,11 +1,17 @@
namespace :acts_as_licensed do
- desc "Import Creative Commons Licenses from plugin fixtures."
+ desc "Import New Zealand Creative Commons Licenses from plugin fixtures."
task :import_nz_cc_licenses => :environment do
-
- attr_sets = YAML.load(File.open(File.join(RAILS_ROOT, 'vendor/plugins/acts_as_licensed/fixtures/nz_default_creative_commons_licenses.yml')))
+ import_attrs(YAML.load(File.open(File.join(RAILS_ROOT, 'vendor/plugins/acts_as_licensed/fixtures/nz_default_creative_commons_licenses.yml'))))
+ end
+
+ desc "Import Australian Creative Commons Licenses from plugin fixtures."
+ task :import_au_cc_licenses => :environment do
+ import_attrs(YAML.load(File.open(File.join(RAILS_ROOT, 'vendor/plugins/acts_as_licensed/fixtures/au_default_creative_commons_licenses.yml'))))
+ end
+
+ def import_attrs(attr_sets)
attr_sets.each do |attrs|
-
# Fixtures are returned as name => { value, .. }. We only need the values.
attrs = attrs.last

0 comments on commit 8367591

Please sign in to comment.