mirrored 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/History.txt +2 -0
  2. data/License.txt +20 -0
  3. data/Manifest.txt +47 -0
  4. data/README.txt +1 -0
  5. data/Rakefile +4 -0
  6. data/config/hoe.rb +71 -0
  7. data/config/requirements.rb +17 -0
  8. data/lib/mirrored/base.rb +50 -0
  9. data/lib/mirrored/connection.rb +39 -0
  10. data/lib/mirrored/date.rb +28 -0
  11. data/lib/mirrored/post.rb +120 -0
  12. data/lib/mirrored/tag.rb +34 -0
  13. data/lib/mirrored/update.rb +16 -0
  14. data/lib/mirrored/version.rb +9 -0
  15. data/lib/mirrored.rb +25 -0
  16. data/script/destroy +14 -0
  17. data/script/generate +14 -0
  18. data/script/txt2html +74 -0
  19. data/setup.rb +1585 -0
  20. data/tasks/deployment.rake +27 -0
  21. data/tasks/environment.rake +7 -0
  22. data/tasks/website.rake +17 -0
  23. data/test/fixtures/xml/add_post_done.xml +2 -0
  24. data/test/fixtures/xml/all_posts.xml +2919 -0
  25. data/test/fixtures/xml/all_posts_by_tag.xml +30 -0
  26. data/test/fixtures/xml/dates.xml +739 -0
  27. data/test/fixtures/xml/dates_for_tag.xml +270 -0
  28. data/test/fixtures/xml/delete_post.xml +2 -0
  29. data/test/fixtures/xml/delete_post_failed.xml +2 -0
  30. data/test/fixtures/xml/posts.xml +6 -0
  31. data/test/fixtures/xml/posts_by_date.xml +4 -0
  32. data/test/fixtures/xml/posts_by_tag.xml +4 -0
  33. data/test/fixtures/xml/posts_by_url.xml +4 -0
  34. data/test/fixtures/xml/recent_posts.xml +19 -0
  35. data/test/fixtures/xml/recent_posts_by_tag.xml +19 -0
  36. data/test/fixtures/xml/recent_posts_by_tag_and_count.xml +8 -0
  37. data/test/fixtures/xml/tag_rename.xml +2 -0
  38. data/test/fixtures/xml/tags.xml +1368 -0
  39. data/test/test_base.rb +33 -0
  40. data/test/test_date.rb +26 -0
  41. data/test/test_helper.rb +12 -0
  42. data/test/test_post.rb +135 -0
  43. data/test/test_tag.rb +23 -0
  44. data/test/test_update.rb +18 -0
  45. data/website/css/common.css +47 -0
  46. data/website/index.html +92 -0
  47. metadata +109 -0
@@ -0,0 +1,27 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,17 @@
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
4
+ sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
5
+ end
6
+ end
7
+
8
+ desc 'Upload website files to rubyforge'
9
+ task :website_upload do
10
+ host = "#{rubyforge_username}@rubyforge.org"
11
+ remote_dir = "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}/"
12
+ local_dir = 'website'
13
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
14
+ end
15
+
16
+ desc 'Generate and upload website files'
17
+ task :website => [:website_generate, :website_upload, :publish_docs]
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <result code="done" />