www-delicious 0.2.0 → 0.3.0

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.
@@ -1,6 +1,15 @@
1
1
  = Changelog
2
2
 
3
3
 
4
+ == Release 0.3.0
5
+
6
+ * FIXED: Compatibility fixes for Ruby 1.9. WWW::Delicious is now 100% compatible with 1.9. You should remember to define the proper content encoding with magic comments when working with UTF-8/MultiByte XML or Ruby files, see http://redmine.ruby-lang.org/wiki/ruby-19/ScriptEncoding (closes #142).
7
+
8
+ * FIXED: Forced Rakefile to require Echoe >= 3.1 to prevent outdated .gemspec files (closes #143).
9
+
10
+ * CHANGED: Don't use File.dirname(__FILE__) in require statement to prevent recursive inclusions.
11
+
12
+
4
13
  == Release 0.2.0
5
14
 
6
15
  * ADDED: :base_uri initialization option allows to create a new instance specifying a custom base_uri for all API calls. This is useful, for example, if you want to use ma.gno.lia Mirror'd APIs (http://wiki.ma.gnolia.com/Mirror%27d_API) instead the del.icio.us one (thanks to Jörg Battermann).
@@ -1,4 +1,8 @@
1
- Copyright (c) 2008 Simone Carletti <weppos@weppos.net>
1
+ = License
2
+
3
+ (The MIT License)
4
+
5
+ Copyright (c) 2008-2009 Simone Carletti <weppos@weppos.net>
2
6
 
3
7
  Permission is hereby granted, free of charge, to any person obtaining
4
8
  a copy of this software and associated documentation files (the
data/Manifest CHANGED
@@ -6,16 +6,19 @@ lib/www/delicious/post.rb
6
6
  lib/www/delicious/tag.rb
7
7
  lib/www/delicious/version.rb
8
8
  lib/www/delicious.rb
9
- MIT-LICENSE.rdoc
9
+ LICENSE.rdoc
10
10
  Rakefile
11
11
  README.rdoc
12
12
  setup.rb
13
+ test/bundle_test.rb
14
+ test/delicious_test.rb
13
15
  test/fixtures/net_response_invalid_account.yml
14
16
  test/fixtures/net_response_success.yml
15
- test/helper.rb
17
+ test/online_test.rb
18
+ test/post_test.rb
19
+ test/tag_test.rb
16
20
  test/test_all.rb
17
- test/test_offline.rb
18
- test/test_online.rb
21
+ test/test_helper.rb
19
22
  test/testcases/element/bundle.xml
20
23
  test/testcases/element/invalid_root.xml
21
24
  test/testcases/element/post.xml
@@ -40,10 +43,4 @@ test/testcases/response/tags_get_empty.xml
40
43
  test/testcases/response/tags_rename.xml
41
44
  test/testcases/response/update.delicious1.xml
42
45
  test/testcases/response/update.xml
43
- test/unit/bundle_test.rb
44
- test/unit/delicious_test.rb
45
- test/unit/online/online_test.rb
46
- test/unit/post_test.rb
47
- test/unit/tag_test.rb
48
- TODO
49
46
  Manifest
@@ -2,7 +2,7 @@
2
2
 
3
3
  WWW::Delicious is a Ruby client for http://del.icio.us XML API.
4
4
 
5
- It provides both read and write functionalities. You can read user Posts, Tags
5
+ It provides both read and write functionality. You can read user Posts, Tags
6
6
  and Bundles but you can create new Posts, Tags and Bundles as well.
7
7
 
8
8
 
@@ -23,46 +23,43 @@ WWW::Delicious will try to give you the most with less efforts.
23
23
 
24
24
  == Dependencies
25
25
 
26
- * Ruby 1.8.6
26
+ * Ruby >= 1.8.6 (not tested with previous versions)
27
27
 
28
-
29
- == Source
30
-
31
- WWW::Delicious source code is managed via GIT and hosted at GitHub: http://github.com/weppos/www-delicious/.
28
+ As of release 0.3.0, WWW::Delicious is compatible with Ruby 1.9.1.
32
29
 
33
30
 
34
31
  == Download and Installation
35
32
 
36
- Installing WWW::Delicious as a GEM is probably the best and easiest way.
37
- You must have RubyGems[http://rubyforge.org/projects/rubygems/] installed
38
- for the following instruction to work:
33
+ RubyGems[http://rubyforge.org/projects/rubygems/] is the preferred install method.
34
+ To get the latest version, simply type the following instruction into your command prompt:
39
35
 
40
36
  $ sudo gem install www-delicious
37
+
38
+ Depending on your system, you might need su privileges.
41
39
 
42
- To install the library manually grab the source code from the website,
40
+ To install the library manually, downlad the latest version from
43
41
  navigate to the root library directory and enter:
44
42
 
45
43
  $ sudo ruby setup.rb
46
44
 
47
45
  If you need the latest development version you can download the source code
48
- from the GIT repositories listed above.
49
- Beware that the code might not as stable as the official release.
46
+ from one of the GIT repositories listed above.
47
+ Beware that the code might not be as stable as the official release.
50
48
 
51
49
 
52
- == Usage
50
+ == Getting Started
53
51
 
54
52
  In order to use this library you need a valid del.icio.us account.
55
- Go to http://del.icio.us/ and register for a new account if you don't
56
- already have one.
53
+ Go to http://del.icio.us/ and register for a new account if you don't already have one.
57
54
 
58
- Then create a valid instance of WWW::Delicious with the account credentials.
55
+ Then create a valid instance of WWW::Delicious providing your account credentials.
59
56
 
60
57
  require 'www/delicious'
61
58
 
62
59
  # create a new instance with given username and password
63
60
  d = WWW::Delicious.new('username', 'password')
64
61
 
65
- Now you can use your delicious instance to call on of the API methods available.
62
+ Now you can use your instance to interact with the API interface.
66
63
 
67
64
 
68
65
  === Last account update
@@ -174,36 +171,32 @@ You can also create new bundles or delete existing ones.
174
171
  d.bundles_delete('OldBundle')
175
172
 
176
173
 
177
- == Documentation
178
-
179
- Visit the website[http://code.simonecarletti.com/www-delicious] for the full documentation
180
- and more examples.
181
-
182
-
183
174
  == Author
184
175
 
185
- * {Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
186
-
187
- If you like this software, please {recommend me}[http://www.workingwithrails.com/person/11967-simone-carletti] at Working with Rails.
176
+ {Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
188
177
 
189
178
 
190
- == Website and Project Home
179
+ == Resources
191
180
 
192
- * {Project Homepage}[http://code.simonecarletti.com/www-delicious]
193
- * {At GitHub}[http://github.com/weppos/www-delicious/]
194
- * {At RubyForge}[http://rubyforge.org/projects/www-delicious/]
181
+ * {Homepage}[http://code.simonecarletti.com/www-delicious]
182
+ * {API}[http://www-delicious.rubyforge.org/]
183
+ * {GitHub}[http://github.com/weppos/www-delicious/]
184
+ * {RubyForge}[http://rubyforge.org/projects/www-delicious/]
195
185
 
196
186
 
197
187
  == FeedBack and Bug reports
198
188
 
199
- Feel free to email {Simone Carletti}[mailto:weppos@weppos.net]
200
- with any questions or feedback.
189
+ Feel free to email {Simone Carletti}[mailto:weppos@weppos.net] with any questions or feedback.
201
190
 
202
- Please submit your bug reports to the Redmine installation for WWW::Delicious
203
- available at http://code.simonecarletti.com/www-delicious.
191
+ Please use the {Ticket System}[http://code.simonecarletti.com/projects/show/www-delicious] to submit bug reports or feature request.
204
192
 
205
193
 
206
194
  == Changelog
207
195
 
208
- See CHANGELOG file.
196
+ See the CHANGELOG.rdoc file for details.
197
+
198
+
199
+ == License
200
+
201
+ Copyright (c) 2008-2009 Simone Carletti, WWW::Delicious is released under the MIT license.
209
202
 
data/Rakefile CHANGED
@@ -1,21 +1,23 @@
1
1
  require 'rubygems'
2
+ require 'rake'
3
+
4
+ gem 'echoe', '>= 3.1'
2
5
  require 'echoe'
3
6
 
4
- $LOAD_PATH.unshift(File.dirname(__FILE__) + "/lib")
7
+ $:.unshift(File.dirname(__FILE__) + "/lib")
5
8
  require 'www/delicious'
6
9
 
7
-
10
+
8
11
  # Common package properties
9
- PKG_NAME = ENV['PKG_NAME'] || WWW::Delicious::GEM
12
+ PKG_NAME = ENV['PKG_NAME'] || WWW::Delicious::GEM
10
13
  PKG_VERSION = ENV['PKG_VERSION'] || WWW::Delicious::VERSION
11
14
  PKG_SUMMARY = "Ruby client for del.icio.us API."
12
- PKG_FILES = FileList.new("{lib,test}/**/*.rb") do |fl|
13
- fl.exclude 'TODO'
14
- fl.include %w(README.rdoc CHANGELOG.rdoc MIT-LICENSE.rdoc)
15
- fl.include %w(Rakefile setup.rb)
15
+ PKG_FILES = FileList.new("{lib,test}/**/*.rb") do |files|
16
+ files.include %w(README.rdoc CHANGELOG.rdoc LICENSE.rdoc)
17
+ files.include %w(Rakefile setup.rb)
16
18
  end
17
19
  RUBYFORGE_PROJECT = 'www-delicious'
18
-
20
+
19
21
  if ENV['SNAPSHOT'].to_i == 1
20
22
  PKG_VERSION << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
21
23
  end
@@ -25,21 +27,21 @@ Echoe.new(PKG_NAME, PKG_VERSION) do |p|
25
27
  p.author = "Simone Carletti"
26
28
  p.email = "weppos@weppos.net"
27
29
  p.summary = PKG_SUMMARY
28
- p.description = <<-EOF
30
+ p.description = <<-EOD
29
31
  WWW::Delicious is a del.icio.us API client implemented in Ruby. \
30
32
  It provides access to all available del.icio.us API queries \
31
33
  and returns the original XML response as a friendly Ruby object.
32
- EOF
34
+ EOD
33
35
  p.url = "http://code.simonecarletti.com/www-delicious"
34
36
  p.project = RUBYFORGE_PROJECT
35
37
 
36
38
  p.need_zip = true
37
- p.rcov_options = ["-x Rakefile -x mocha -x rcov"]
39
+ p.rcov_options = ["--main << README.rdoc -x Rakefile -x mocha -x rcov"]
38
40
  p.rdoc_pattern = /^(lib|CHANGELOG.rdoc|README.rdoc)/
39
41
 
40
- p.development_dependencies = ["rake >=0.8",
41
- "echoe >=3",
42
- "mocha >=0.9"]
42
+ p.development_dependencies += ["rake >=0.8",
43
+ "echoe >=3.1",
44
+ "mocha >=0.9"]
43
45
  end
44
46
 
45
47
 
@@ -4,9 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
@@ -16,11 +17,11 @@
16
17
  require 'net/https'
17
18
  require 'rexml/document'
18
19
  require 'time'
19
- require File.dirname(__FILE__) + '/delicious/bundle'
20
- require File.dirname(__FILE__) + '/delicious/post'
21
- require File.dirname(__FILE__) + '/delicious/tag'
22
- require File.dirname(__FILE__) + '/delicious/errors'
23
- require File.dirname(__FILE__) + '/delicious/version'
20
+ require 'www/delicious/bundle'
21
+ require 'www/delicious/post'
22
+ require 'www/delicious/tag'
23
+ require 'www/delicious/errors'
24
+ require 'www/delicious/version'
24
25
 
25
26
 
26
27
  module WWW #:nodoc:
@@ -73,21 +74,12 @@ module WWW #:nodoc:
73
74
  #
74
75
  # datetime = d.update # => Wed Mar 12 08:41:20 UTC 2008
75
76
  # datetime.strftime('%Y') # => 2008
76
- #
77
- #
78
- #
79
- # Category:: WWW
80
- # Package:: WWW::Delicious
81
- # Author:: Simone Carletti <weppos@weppos.net>
82
77
  #
83
78
  class Delicious
84
79
 
85
80
  NAME = 'WWW::Delicious'
86
81
  GEM = 'www-delicious'
87
82
  AUTHOR = 'Simone Carletti <weppos@weppos.net>'
88
- VERSION = defined?(Version) ? Version::STRING : nil
89
- STATUS = 'alpha'
90
- BUILD = ''.match(/(\d+)/).to_a.first
91
83
 
92
84
  # del.icio.us account username
93
85
  attr_reader :username
@@ -4,10 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Subpackage:: WWW::Delicious::Bundle
10
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
11
  #
12
12
  #--
13
13
  # SVN: $Id$
@@ -4,10 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Subpackage:: WWW::Delicious::Post
10
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
11
  #
12
12
  #--
13
13
  # SVN: $Id$
@@ -55,6 +55,7 @@ module WWW
55
55
  self
56
56
  end
57
57
 
58
+
58
59
  class << self
59
60
 
60
61
  #
@@ -4,9 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
@@ -4,10 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Subpackage:: WWW::Delicious::Post
10
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
11
  #
12
12
  #--
13
13
  # SVN: $Id$
@@ -4,10 +4,10 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Subpackage:: WWW::Delicious::Tag
10
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
11
  #
12
12
  #--
13
13
  # SVN: $Id$
@@ -4,25 +4,30 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
- # SVN: $Id: delicious.rb 34 2008-04-23 20:27:30Z weppos $
13
+ # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- module WWW #:nodoc:
17
+ module WWW
17
18
  class Delicious
18
19
 
19
- module Version #:nodoc:
20
+ module Version
20
21
  MAJOR = 0
21
- MINOR = 2
22
- TINY = 0
22
+ MINOR = 3
23
+ TINY = 0
23
24
 
24
25
  STRING = [MAJOR, MINOR, TINY].join('.')
25
26
  end
26
27
 
28
+ VERSION = Version::STRING
29
+ STATUS = 'beta'
30
+ BUILD = ''.match(/(\d+)/).to_a.first
31
+
27
32
  end
28
33
  end
@@ -4,16 +4,17 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/../helper'
17
+ require 'test_helper'
17
18
  require 'www/delicious/bundle'
18
19
 
19
20
 
@@ -4,16 +4,17 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/../helper'
17
+ require 'test_helper'
17
18
 
18
19
 
19
20
  class DeliciousTest < Test::Unit::TestCase
@@ -27,35 +28,35 @@ class DeliciousTest < Test::Unit::TestCase
27
28
  end
28
29
 
29
30
 
30
- def test_initialize_raises_without_account
31
+ def test_initialize_should_raise_without_account
31
32
  assert_raise(ArgumentError) { WWW::Delicious.new() }
32
33
  assert_raise(ArgumentError) { WWW::Delicious.new(TEST_USERNAME) }
33
34
  end
34
35
 
35
- def test_initialize_account
36
+ def test_initialize_should_set_account_credentials
36
37
  assert_equal(TEST_USERNAME, @delicious.username)
37
38
  assert_equal(TEST_PASSWORD, @delicious.password)
38
39
  end
39
40
 
40
- def test_initialize_option_user_agent
41
+ def test_initialize_should_allow_option_user_agent
41
42
  useragent = 'MyClass/1.0 (Foo/Bar +http://foo.com/)'
42
43
  delicious = instance(:user_agent => useragent)
43
44
  assert_equal(useragent, delicious.user_agent)
44
45
  end
45
46
 
46
- def test_initialize_option_user_agent_default
47
+ def test_initialize_should_default_option_user_agent_unless_option
47
48
  useragent = instance.user_agent
48
49
  assert_match("Ruby/#{RUBY_VERSION}", useragent)
49
50
  assert_match("#{WWW::Delicious::NAME}/#{WWW::Delicious::VERSION}", useragent)
50
51
  end
51
52
 
52
- def test_initialize_option_base_uri
53
+ def test_initialize_should_allow_option_base_uri
53
54
  base_uri = 'https://ma.gnolia.com/api/mirrord'
54
55
  delicious = instance(:base_uri => base_uri)
55
56
  assert_equal(URI.parse(base_uri), delicious.base_uri)
56
57
  end
57
58
 
58
- def test_initialize_option_base_uri_default
59
+ def test_initialize_should_default_option_base_uri_unless_option
59
60
  base_uri = instance.base_uri
60
61
  assert_equal(URI.parse('https://api.del.icio.us'), base_uri)
61
62
  end
@@ -247,7 +248,7 @@ class DeliciousTest < Test::Unit::TestCase
247
248
  results = @delicious.posts_get
248
249
  assert_instance_of(Array, results)
249
250
  assert_equal(3, results.length)
250
- assert_equal('New to Git? GitHub', results.first.title)
251
+ assert_equal('New to Git? - GitHub', results.first.title)
251
252
  assert_equal('.c( whytheluckystiff )o. -- The Fully Upturned Bin', results.last.title)
252
253
  end
253
254
 
@@ -265,7 +266,7 @@ class DeliciousTest < Test::Unit::TestCase
265
266
  results = @delicious.posts_recent
266
267
  assert_instance_of(Array, results)
267
268
  assert_equal(15, results.length)
268
- assert_equal('New to Git? GitHub', results.first.title)
269
+ assert_equal('New to Git? - GitHub', results.first.title)
269
270
  assert_equal('RichText | Lightview for modal dialogs on Rails', results.last.title)
270
271
  end
271
272
 
@@ -283,7 +284,7 @@ class DeliciousTest < Test::Unit::TestCase
283
284
  results = @delicious.posts_all
284
285
  assert_instance_of(Array, results)
285
286
  assert_equal(8, results.length)
286
- assert_equal('New to Git? GitHub', results.first.title)
287
+ assert_equal('New to Git? - GitHub', results.first.title)
287
288
  assert_equal('ASP 101 - Object Oriented ASP: Using Classes in Classic ASP', results.last.title)
288
289
  end
289
290
 
@@ -4,20 +4,20 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/../../helper'
17
+ require 'test_helper'
17
18
 
18
19
 
19
- # overwrite if file is called alone
20
- RUN_ONLINE_TESTS = ($0 == __FILE__) unless defined? RUN_ONLINE_TESTS and RUN_ONLINE_TESTS
20
+ RUN_ONLINE_TESTS = ($0 == __FILE__) unless defined?(RUN_ONLINE_TESTS)
21
21
 
22
22
  puts "Online test #{__FILE__} skipped.\n" +
23
23
  "Use `ONLINE=1` to run online tests.\n" unless RUN_ONLINE_TESTS
@@ -4,16 +4,17 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/../helper'
17
+ require 'test_helper'
17
18
  require 'www/delicious/post'
18
19
 
19
20
 
@@ -4,16 +4,17 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/../helper'
17
+ require 'test_helper'
17
18
  require 'www/delicious/tag'
18
19
 
19
20
 
@@ -4,14 +4,16 @@
4
4
  # Ruby client for del.icio.us API.
5
5
  #
6
6
  #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
10
11
  #
11
12
  #--
12
13
  # SVN: $Id$
13
14
  #++
14
15
 
15
16
 
16
- require File.dirname(__FILE__) + '/helper'
17
- Dir.glob(File.dirname(__FILE__) + '/unit/**/*_test.rb').sort.each { |unit| require unit }
17
+ require 'test_helper'
18
+
19
+ Dir.glob(File.dirname(__FILE__) + '/**/*_test.rb').sort.each { |unit| require unit }
@@ -0,0 +1,43 @@
1
+ #
2
+ # = WWW::Delicious
3
+ #
4
+ # Ruby client for del.icio.us API.
5
+ #
6
+ #
7
+ # Category:: WWW
8
+ # Package:: WWW::Delicious
9
+ # Author:: Simone Carletti <weppos@weppos.net>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ # SVN: $Id$
14
+ #++
15
+
16
+
17
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
18
+
19
+ require 'rubygems'
20
+ require 'test/unit'
21
+ require 'mocha'
22
+ require 'www/delicious'
23
+
24
+ # testcase file path
25
+ TESTCASES_PATH = File.dirname(__FILE__) + '/testcases' unless defined?(TESTCASES_PATH)
26
+ FIXTURES_PATH = File.dirname(__FILE__) + '/fixtures' unless defined?(FIXTURES_PATH)
27
+
28
+ # prevent online tests to be run automatically
29
+ RUN_ONLINE_TESTS = (ENV['ONLINE'].to_i == 1) unless defined?(RUN_ONLINE_TESTS)
30
+
31
+
32
+ class Test::Unit::TestCase
33
+
34
+ # asserts all given attributes match mapped value in +instance+.
35
+ # +instance+ is the instance to be tested,
36
+ # +expected_mapping+ is the attribute => value mapping.
37
+ def assert_attributes(instance, expected_mapping)
38
+ expected_mapping.each do |key, value|
39
+ assert_equal(value, instance.send(key.to_sym), "Expected `#{key}` to be `#{value}`")
40
+ end
41
+ end
42
+
43
+ end
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <posts user="weppos" update="2008-08-02T11:55:35Z" tag="" total="1702">
3
- <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="-1" extended=""/>
4
- <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="-1" extended="Here are some useful configuration options for Git."/>
3
+ <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? - GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="-1" extended=""/>
4
+ <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration - Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="-1" extended="Here are some useful configuration options for Git."/>
5
5
  <post href="http://whytheluckystiff.net/articles/theFullyUpturnedBin.html" hash="02ae7e6473e6ad87d6d5a8fc254dd274" description=".c( whytheluckystiff )o. -- The Fully Upturned Bin" tag="programming ruby garbagecollection" time="2008-07-31T13:09:26Z" others="-1" extended="About memory management and Garbage Collection in Ruby."/>
6
6
  <post href="http://www.learnasp.com/learn/subgetrows.asp" hash="14f798447ad0e8b3f98d6c89773ce345" description="dbtable" tag="programming asp vbscript database" time="2008-07-29T19:29:38Z" others="-1" extended=""/>
7
7
  <post href="http://www.xmlfiles.com/articles/seth/xmldatatransfer/default.asp" hash="e3dfcc0f5cf9ce519783b7a9b1904998" description="XML Files - An ASP Class for XML Data Transfer" tag="programming asp vbscript classes xml" time="2008-07-29T19:29:17Z" others="-1" extended=""/>
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <posts user="weppos" dt="2008-07-31" tag="">
3
- <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="264" extended=""/>
4
- <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="17" extended="Here are some useful configuration options for Git."/>
3
+ <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? - GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="264" extended=""/>
4
+ <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration - Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="17" extended="Here are some useful configuration options for Git."/>
5
5
  <post href="http://whytheluckystiff.net/articles/theFullyUpturnedBin.html" hash="02ae7e6473e6ad87d6d5a8fc254dd274" description=".c( whytheluckystiff )o. -- The Fully Upturned Bin" tag="programming ruby garbagecollection" time="2008-07-31T13:09:26Z" others="317" extended="About memory management and Garbage Collection in Ruby."/>
6
6
  </posts>
7
7
  <!-- fe02.api.del.ac4.yahoo.net uncompressed/chunked Sat Aug 2 13:37:09 PDT 2008 -->
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <posts user="weppos" tag="">
3
- <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="265" extended=""/>
4
- <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="17" extended="Here are some useful configuration options for Git."/>
3
+ <post href="http://github.com/blog/120-new-to-git" hash="eca1f8a028417349f71077adf64faee8" description="New to Git? - GitHub" tag="scm git" time="2008-07-31T15:44:54Z" others="265" extended=""/>
4
+ <post href="http://arthurkoziel.com/2008/05/02/git-configuration/" hash="fd68cebf1efc8267755fffdf83d34a65" description="Git Configuration - Arthur Koziel’s Blog" tag="scm git" time="2008-07-31T15:44:19Z" others="17" extended="Here are some useful configuration options for Git."/>
5
5
  <post href="http://whytheluckystiff.net/articles/theFullyUpturnedBin.html" hash="02ae7e6473e6ad87d6d5a8fc254dd274" description=".c( whytheluckystiff )o. -- The Fully Upturned Bin" tag="programming ruby garbagecollection" time="2008-07-31T13:09:26Z" others="317" extended="About memory management and Garbage Collection in Ruby."/>
6
6
  <post href="http://www.learnasp.com/learn/subgetrows.asp" hash="14f798447ad0e8b3f98d6c89773ce345" description="dbtable" tag="programming asp vbscript database" time="2008-07-29T19:29:38Z" others="0" extended=""/>
7
7
  <post href="http://www.xmlfiles.com/articles/seth/xmldatatransfer/default.asp" hash="e3dfcc0f5cf9ce519783b7a9b1904998" description="XML Files - An ASP Class for XML Data Transfer" tag="programming asp vbscript classes xml" time="2008-07-29T19:29:17Z" others="14" extended=""/>
@@ -1,146 +1,41 @@
1
+ # -*- encoding: utf-8 -*-
1
2
 
2
- # Gem::Specification for Www-delicious-0.2.0
3
- # Originally generated by Echoe
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{www-delicious}
5
+ s.version = "0.3.0"
4
6
 
5
- --- !ruby/object:Gem::Specification
6
- name: www-delicious
7
- version: !ruby/object:Gem::Version
8
- version: 0.2.0
9
- platform: ruby
10
- authors:
11
- - Simone Carletti
12
- autorequire:
13
- bindir: bin
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Simone Carletti"]
9
+ s.date = %q{2009-02-10}
10
+ s.description = %q{WWW::Delicious is a del.icio.us API client implemented in Ruby. It provides access to all available del.icio.us API queries and returns the original XML response as a friendly Ruby object.}
11
+ s.email = %q{weppos@weppos.net}
12
+ s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/www/delicious/bundle.rb", "lib/www/delicious/element.rb", "lib/www/delicious/errors.rb", "lib/www/delicious/post.rb", "lib/www/delicious/tag.rb", "lib/www/delicious/version.rb", "lib/www/delicious.rb", "README.rdoc"]
13
+ s.files = ["CHANGELOG.rdoc", "lib/www/delicious/bundle.rb", "lib/www/delicious/element.rb", "lib/www/delicious/errors.rb", "lib/www/delicious/post.rb", "lib/www/delicious/tag.rb", "lib/www/delicious/version.rb", "lib/www/delicious.rb", "LICENSE.rdoc", "Rakefile", "README.rdoc", "setup.rb", "test/bundle_test.rb", "test/delicious_test.rb", "test/fixtures/net_response_invalid_account.yml", "test/fixtures/net_response_success.yml", "test/online_test.rb", "test/post_test.rb", "test/tag_test.rb", "test/test_all.rb", "test/test_helper.rb", "test/testcases/element/bundle.xml", "test/testcases/element/invalid_root.xml", "test/testcases/element/post.xml", "test/testcases/element/post_unshared.xml", "test/testcases/element/tag.xml", "test/testcases/response/bundles_all.xml", "test/testcases/response/bundles_all_empty.xml", "test/testcases/response/bundles_delete.xml", "test/testcases/response/bundles_set.xml", "test/testcases/response/bundles_set_error.xml", "test/testcases/response/posts_add.xml", "test/testcases/response/posts_all.xml", "test/testcases/response/posts_dates.xml", "test/testcases/response/posts_dates_with_tag.xml", "test/testcases/response/posts_delete.xml", "test/testcases/response/posts_get.xml", "test/testcases/response/posts_get_with_tag.xml", "test/testcases/response/posts_recent.xml", "test/testcases/response/posts_recent_with_tag.xml", "test/testcases/response/tags_get.xml", "test/testcases/response/tags_get_empty.xml", "test/testcases/response/tags_rename.xml", "test/testcases/response/update.delicious1.xml", "test/testcases/response/update.xml", "Manifest", "www-delicious.gemspec"]
14
+ s.has_rdoc = true
15
+ s.homepage = %q{http://code.simonecarletti.com/www-delicious}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Www-delicious", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{www-delicious}
19
+ s.rubygems_version = %q{1.3.1}
20
+ s.summary = %q{Ruby client for del.icio.us API.}
21
+ s.test_files = ["test/test_all.rb"]
14
22
 
15
- date: 2008-08-11 00:00:00 +02:00
16
- default_executable:
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
19
- name: rake
20
- type: :development
21
- version_requirement:
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: "0.8"
27
- version:
28
- - !ruby/object:Gem::Dependency
29
- name: echoe
30
- type: :development
31
- version_requirement:
32
- version_requirements: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: "3"
37
- version:
38
- - !ruby/object:Gem::Dependency
39
- name: mocha
40
- type: :development
41
- version_requirement:
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0.9"
47
- version:
48
- description: WWW::Delicious is a del.icio.us API client implemented in Ruby. It provides access to all available del.icio.us API queries and returns the original XML response as a friendly Ruby object.
49
- email: weppos@weppos.net
50
- executables: []
23
+ if s.respond_to? :specification_version then
24
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
+ s.specification_version = 2
51
26
 
52
- extensions: []
53
-
54
- extra_rdoc_files:
55
- - CHANGELOG.rdoc
56
- - lib/www/delicious/bundle.rb
57
- - lib/www/delicious/element.rb
58
- - lib/www/delicious/errors.rb
59
- - lib/www/delicious/post.rb
60
- - lib/www/delicious/tag.rb
61
- - lib/www/delicious/version.rb
62
- - lib/www/delicious.rb
63
- - README.rdoc
64
- files:
65
- - CHANGELOG.rdoc
66
- - lib/www/delicious/bundle.rb
67
- - lib/www/delicious/element.rb
68
- - lib/www/delicious/errors.rb
69
- - lib/www/delicious/post.rb
70
- - lib/www/delicious/tag.rb
71
- - lib/www/delicious/version.rb
72
- - lib/www/delicious.rb
73
- - MIT-LICENSE.rdoc
74
- - Rakefile
75
- - README.rdoc
76
- - setup.rb
77
- - test/fixtures/net_response_invalid_account.yml
78
- - test/fixtures/net_response_success.yml
79
- - test/helper.rb
80
- - test/test_all.rb
81
- - test/test_offline.rb
82
- - test/test_online.rb
83
- - test/testcases/element/bundle.xml
84
- - test/testcases/element/invalid_root.xml
85
- - test/testcases/element/post.xml
86
- - test/testcases/element/post_unshared.xml
87
- - test/testcases/element/tag.xml
88
- - test/testcases/response/bundles_all.xml
89
- - test/testcases/response/bundles_all_empty.xml
90
- - test/testcases/response/bundles_delete.xml
91
- - test/testcases/response/bundles_set.xml
92
- - test/testcases/response/bundles_set_error.xml
93
- - test/testcases/response/posts_add.xml
94
- - test/testcases/response/posts_all.xml
95
- - test/testcases/response/posts_dates.xml
96
- - test/testcases/response/posts_dates_with_tag.xml
97
- - test/testcases/response/posts_delete.xml
98
- - test/testcases/response/posts_get.xml
99
- - test/testcases/response/posts_get_with_tag.xml
100
- - test/testcases/response/posts_recent.xml
101
- - test/testcases/response/posts_recent_with_tag.xml
102
- - test/testcases/response/tags_get.xml
103
- - test/testcases/response/tags_get_empty.xml
104
- - test/testcases/response/tags_rename.xml
105
- - test/testcases/response/update.delicious1.xml
106
- - test/testcases/response/update.xml
107
- - test/unit/bundle_test.rb
108
- - test/unit/delicious_test.rb
109
- - test/unit/online/online_test.rb
110
- - test/unit/post_test.rb
111
- - test/unit/tag_test.rb
112
- - TODO
113
- - Manifest
114
- - www-delicious.gemspec
115
- has_rdoc: true
116
- homepage: http://code.simonecarletti.com/www-delicious
117
- post_install_message:
118
- rdoc_options:
119
- - --line-numbers
120
- - --inline-source
121
- - --title
122
- - Www-delicious
123
- - --main
124
- - README.rdoc
125
- require_paths:
126
- - lib
127
- required_ruby_version: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: "0"
132
- version:
133
- required_rubygems_version: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "="
136
- - !ruby/object:Gem::Version
137
- version: "1.2"
138
- version:
139
- requirements: []
140
-
141
- rubyforge_project: www-delicious
142
- rubygems_version: 1.2.0
143
- specification_version: 2
144
- summary: Ruby client for del.icio.us API.
145
- test_files:
146
- - test/test_all.rb
27
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
+ s.add_development_dependency(%q<rake>, [">= 0.8"])
29
+ s.add_development_dependency(%q<echoe>, [">= 3.1"])
30
+ s.add_development_dependency(%q<mocha>, [">= 0.9"])
31
+ else
32
+ s.add_dependency(%q<rake>, [">= 0.8"])
33
+ s.add_dependency(%q<echoe>, [">= 3.1"])
34
+ s.add_dependency(%q<mocha>, [">= 0.9"])
35
+ end
36
+ else
37
+ s.add_dependency(%q<rake>, [">= 0.8"])
38
+ s.add_dependency(%q<echoe>, [">= 3.1"])
39
+ s.add_dependency(%q<mocha>, [">= 0.9"])
40
+ end
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: www-delicious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-11 00:00:00 +02:00
12
+ date: 2009-02-10 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: "3"
33
+ version: "3.1"
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: mocha
@@ -67,16 +67,19 @@ files:
67
67
  - lib/www/delicious/tag.rb
68
68
  - lib/www/delicious/version.rb
69
69
  - lib/www/delicious.rb
70
- - MIT-LICENSE.rdoc
70
+ - LICENSE.rdoc
71
71
  - Rakefile
72
72
  - README.rdoc
73
73
  - setup.rb
74
+ - test/bundle_test.rb
75
+ - test/delicious_test.rb
74
76
  - test/fixtures/net_response_invalid_account.yml
75
77
  - test/fixtures/net_response_success.yml
76
- - test/helper.rb
78
+ - test/online_test.rb
79
+ - test/post_test.rb
80
+ - test/tag_test.rb
77
81
  - test/test_all.rb
78
- - test/test_offline.rb
79
- - test/test_online.rb
82
+ - test/test_helper.rb
80
83
  - test/testcases/element/bundle.xml
81
84
  - test/testcases/element/invalid_root.xml
82
85
  - test/testcases/element/post.xml
@@ -101,12 +104,6 @@ files:
101
104
  - test/testcases/response/tags_rename.xml
102
105
  - test/testcases/response/update.delicious1.xml
103
106
  - test/testcases/response/update.xml
104
- - test/unit/bundle_test.rb
105
- - test/unit/delicious_test.rb
106
- - test/unit/online/online_test.rb
107
- - test/unit/post_test.rb
108
- - test/unit/tag_test.rb
109
- - TODO
110
107
  - Manifest
111
108
  - www-delicious.gemspec
112
109
  has_rdoc: true
@@ -129,14 +126,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
126
  version:
130
127
  required_rubygems_version: !ruby/object:Gem::Requirement
131
128
  requirements:
132
- - - "="
129
+ - - ">="
133
130
  - !ruby/object:Gem::Version
134
131
  version: "1.2"
135
132
  version:
136
133
  requirements: []
137
134
 
138
135
  rubyforge_project: www-delicious
139
- rubygems_version: 1.2.0
136
+ rubygems_version: 1.3.1
140
137
  signing_key:
141
138
  specification_version: 2
142
139
  summary: Ruby client for del.icio.us API.
data/TODO DELETED
@@ -1,4 +0,0 @@
1
- == tags_delete(foo)
2
-
3
- This method should fetch all posts with :tag => foo and update them deleting the foo tag.
4
-
@@ -1,48 +0,0 @@
1
- #
2
- # = WWW::Delicious
3
- #
4
- # Ruby client for del.icio.us API.
5
- #
6
- #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
10
- #
11
- #--
12
- # SVN: $Id$
13
- #++
14
-
15
-
16
- # prepend lib folder
17
- $:.unshift(File.dirname(__FILE__) + '/../lib')
18
-
19
- require 'rubygems'
20
- require 'test/unit'
21
- require 'www/delicious'
22
-
23
- gem 'mocha'
24
- require 'mocha'
25
-
26
- # testcase file path
27
- TESTCASES_PATH = File.dirname(__FILE__) + '/testcases' unless defined?(TESTCASES_PATH)
28
- FIXTURES_PATH = File.dirname(__FILE__) + '/fixtures' unless defined?(FIXTURES_PATH)
29
-
30
- # prevent online tests to be run automatically
31
- RUN_ONLINE_TESTS = (ENV['ONLINE'] == "1") unless defined? RUN_ONLINE_TESTS
32
-
33
- module Test
34
- module Unit
35
- class TestCase
36
-
37
- # asserts all given attributes match mapped value in +instance+.
38
- # +instance+ is the instance to be tested,
39
- # +expected_mapping+ is the attribute => value mapping.
40
- def assert_attributes(instance, expected_mapping)
41
- expected_mapping.each do |key, value|
42
- assert_equal(value, instance.send(key.to_sym), "Expected `#{key}` to be `#{value}`")
43
- end
44
- end
45
-
46
- end
47
- end
48
- end
@@ -1,17 +0,0 @@
1
- #
2
- # = WWW::Delicious
3
- #
4
- # Ruby client for del.icio.us API.
5
- #
6
- #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
10
- #
11
- #--
12
- # SVN: $Id$
13
- #++
14
-
15
-
16
- require File.dirname(__FILE__) + '/helper'
17
- Dir.glob(File.dirname(__FILE__) + '/unit/**/*_test.rb').sort.each { |unit| require unit }
@@ -1,19 +0,0 @@
1
- #
2
- # = WWW::Delicious
3
- #
4
- # Ruby client for del.icio.us API.
5
- #
6
- #
7
- # Category:: WWW
8
- # Package:: WWW::Delicious
9
- # Author:: Simone Carletti <weppos@weppos.net>
10
- #
11
- #--
12
- # SVN: $Id$
13
- #++
14
-
15
-
16
- RUN_ONLINE_TESTS = true
17
-
18
- require File.dirname(__FILE__) + '/helper'
19
- Dir.glob(File.dirname(__FILE__) + '/unit/online/*_test.rb').sort.each { |unit| require unit }