Permalink
Browse files

switching to jeweler

  • Loading branch information...
1 parent 7f13c88 commit fd765d7da9efd48ce774a9889b33efe45bb0bc48 @gotascii committed Oct 20, 2009
Showing with 129 additions and 2,117 deletions.
  1. +0 −8 History.txt
  2. +20 −0 LICENSE
  3. +0 −17 Manifest.txt
  4. +56 −0 README.rdoc
  5. +0 −77 README.txt
  6. +1 −55 lib/simple_importer.rb
  7. BIN pkg/simple_importer-1.0.0.gem
  8. BIN pkg/simple_importer-1.0.0.tgz
  9. +0 −8 pkg/simple_importer-1.0.0/History.txt
  10. +0 −17 pkg/simple_importer-1.0.0/Manifest.txt
  11. +0 −74 pkg/simple_importer-1.0.0/README.txt
  12. +0 −21 pkg/simple_importer-1.0.0/Rakefile
  13. +0 −98 pkg/simple_importer-1.0.0/lib/simple_importer.rb
  14. +0 −76 pkg/simple_importer-1.0.0/tasks/ann.rake
  15. +0 −22 pkg/simple_importer-1.0.0/tasks/annotations.rake
  16. +0 −40 pkg/simple_importer-1.0.0/tasks/bones.rake
  17. +0 −48 pkg/simple_importer-1.0.0/tasks/doc.rake
  18. +0 −116 pkg/simple_importer-1.0.0/tasks/gem.rake
  19. +0 −49 pkg/simple_importer-1.0.0/tasks/manifest.rake
  20. +0 −32 pkg/simple_importer-1.0.0/tasks/post_load.rake
  21. +0 −57 pkg/simple_importer-1.0.0/tasks/rubyforge.rake
  22. +0 −227 pkg/simple_importer-1.0.0/tasks/setup.rb
  23. +0 −38 pkg/simple_importer-1.0.0/tasks/test.rake
  24. +0 −4 pkg/simple_importer-1.0.0/test/test_helper.rb
  25. +0 −43 pkg/simple_importer-1.0.0/test/test_simple_importer.rb
  26. BIN pkg/simple_importer-1.0.1.gem
  27. BIN pkg/simple_importer-1.0.1.tgz
  28. +0 −8 pkg/simple_importer-1.0.1/History.txt
  29. +0 −17 pkg/simple_importer-1.0.1/Manifest.txt
  30. +0 −74 pkg/simple_importer-1.0.1/README.txt
  31. +0 −21 pkg/simple_importer-1.0.1/Rakefile
  32. +0 −98 pkg/simple_importer-1.0.1/lib/simple_importer.rb
  33. +0 −76 pkg/simple_importer-1.0.1/tasks/ann.rake
  34. +0 −22 pkg/simple_importer-1.0.1/tasks/annotations.rake
  35. +0 −40 pkg/simple_importer-1.0.1/tasks/bones.rake
  36. +0 −48 pkg/simple_importer-1.0.1/tasks/doc.rake
  37. +0 −116 pkg/simple_importer-1.0.1/tasks/gem.rake
  38. +0 −49 pkg/simple_importer-1.0.1/tasks/manifest.rake
  39. +0 −32 pkg/simple_importer-1.0.1/tasks/post_load.rake
  40. +0 −57 pkg/simple_importer-1.0.1/tasks/rubyforge.rake
  41. +0 −227 pkg/simple_importer-1.0.1/tasks/setup.rb
  42. +0 −38 pkg/simple_importer-1.0.1/tasks/test.rake
  43. +0 −4 pkg/simple_importer-1.0.1/test/test_helper.rb
  44. +0 −43 pkg/simple_importer-1.0.1/test/test_simple_importer.rb
  45. +52 −20 simple_importer.gemspec
View
@@ -1,8 +0,0 @@
-== 1.0.1 / 2008-06-11
-
-* tsv/csv now support an optional argument that indicates whether or not to ignore the header (first) line of the file
-
-== 1.0.0 / 2008-06-10
-
-* 1 major enhancement
- * Birthday!
View
@@ -0,0 +1,20 @@
+Copyright (c) 2009 Justin Marney
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,17 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-lib/simple_importer.rb
-tasks/ann.rake
-tasks/annotations.rake
-tasks/bones.rake
-tasks/doc.rake
-tasks/gem.rake
-tasks/manifest.rake
-tasks/post_load.rake
-tasks/rubyforge.rake
-tasks/setup.rb
-tasks/test.rake
-test/test_helper.rb
-test/test_simple_importer.rb
View
@@ -0,0 +1,56 @@
+= simple_importer
+
+Simple API for importing from csv, tsv and xml.
+
+== Usage
+
+extend your import modules and define import methods
+ module AccessoryImporter
+ extend SimpleImporter
+
+ # if true is passed to run, reset will get called first if it exists.
+ def self.reset
+ Accessory.find(:all).each {|a| a.destroy }
+ end
+
+ def self.import
+ csv('Accessory Schema.csv') do |row|
+ unless row[0].nil? || row[0] == 'SKU'
+ accessory = Accessory.create!(:sku => row[0],
+ :image => row[1],
+ :thumbnail_image => row[2],
+ :name => row[3],
+ :supplier_cost => row[4],
+ :retail_cost => row[5],
+ :description => row[6])
+ end
+ end
+ end
+ end
+
+run your import modules (from a rake task perhaps)
+ AccessoryImporter.run
+
+The csv & tsv import methods also take an optional (default false) boolean parameter that indicates whether or not to ignore the header (first) line.
+
+There are a bunch of helpful api methods, check the tests for more info.
+
+== Requirements
+
+* hpricot is required if you intend to import xml.
+* test/spec and mocha are required to run the tests.
+
+== Note on Patches/Pull Requests
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history.
+ (if you want to have your own version, that is fine but
+ bump version in a commit by itself I can ignore when I pull)
+* Send me a pull request. Bonus points for topic branches.
+
+== Copyright
+
+Copyright (c) 2009 Justin Marney. See LICENSE for details.
View
@@ -1,77 +0,0 @@
-simple_importer
- by Justin Marney
- http://github.com/vigetlabs/simple_importer/
-
-== DESCRIPTION:
-
-Simple API for importing from csv, tsv and xml.
-
-== FEATURES/PROBLEMS:
-
-* FIXME (list of features or problems)
-
-== SYNOPSIS:
-
-# extend your import modules and define import methods
-module AccessoryImporter
- extend SimpleImporter
-
- # if true is passed to run, reset will get called first if it exists.
- def self.reset
- Accessory.find(:all).each {|a| a.destroy }
- end
-
- def self.import
- csv('Accessory Schema.csv') do |row|
- unless row[0].nil? || row[0] == 'SKU'
- accessory = Accessory.create!(:sku => row[0],
- :image => row[1],
- :thumbnail_image => row[2],
- :name => row[3],
- :supplier_cost => row[4],
- :retail_cost => row[5],
- :description => row[6])
- end
- end
- end
-end
-
-# run your import modules (from a rake task perhaps)
-AccessoryImporter.run
-
-The csv & tsv import methods also take an optional (default false) boolean
-parameter that indicates whether or not to ignore the header (first) line.
-
-== REQUIREMENTS:
-
-Hpricot is required if you intend to import xml.
-test/spec and mocha are required to run the tests.
-
-== INSTALL:
-
-sudo gem install vigetlabs-simple_importer -s http://gems.github.com
-
-== LICENSE:
-
-(The MIT License)
-
-Copyright (c) 2008 Justin Marney
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,9 +1,3 @@
-# $Id$
-
-# Equivalent to a header guard in C/C++
-# Used to prevent the class/module from being loaded more than once
-unless defined? SimpleImporter
-
require 'csv'
module SimpleImporter
@@ -47,52 +41,4 @@ def run(reset_flag = false)
reset if reset_flag && respond_to?(:reset)
import
end
-
- # :stopdoc:
- VERSION = '1.0.1'
- LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
- # :startdoc:
-
- # Returns the version string for the library.
- #
- def self.version
- VERSION
- end
-
- # Returns the library path for the module. If any arguments are given,
- # they will be joined to the end of the libray path using
- # <tt>File.join</tt>.
- #
- def self.libpath( *args )
- args.empty? ? LIBPATH : ::File.join(LIBPATH, *args)
- end
-
- # Returns the lpath for the module. If any arguments are given,
- # they will be joined to the end of the path using
- # <tt>File.join</tt>.
- #
- def self.path( *args )
- args.empty? ? PATH : ::File.join(PATH, *args)
- end
-
- # Utility method used to rquire all files ending in .rb that lie in the
- # directory below this file that has the same name as the filename passed
- # in. Optionally, a specific _directory_ name can be passed in such that
- # the _filename_ does not have to be equivalent to the directory.
- #
- def self.require_all_libs_relative_to( fname, dir = nil )
- dir ||= ::File.basename(fname, '.*')
- search_me = ::File.expand_path(
- ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
-
- Dir.glob(search_me).sort.each {|rb| require rb}
- end
-
-end # module SimpleImporter
-
-SimpleImporter.require_all_libs_relative_to __FILE__
-
-end # unless defined?
-
-# EOF
+end
Binary file not shown.
Binary file not shown.
@@ -1,8 +0,0 @@
-== 1.0.1 / 2008-06-11
-
-* tsv/csv now support an optional argument that indicates whether or not to ignore the header (first) line of the file
-
-== 1.0.0 / 2008-06-10
-
-* 1 major enhancement
- * Birthday!
@@ -1,17 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-lib/simple_importer.rb
-tasks/ann.rake
-tasks/annotations.rake
-tasks/bones.rake
-tasks/doc.rake
-tasks/gem.rake
-tasks/manifest.rake
-tasks/post_load.rake
-tasks/rubyforge.rake
-tasks/setup.rb
-tasks/test.rake
-test/test_helper.rb
-test/test_simple_importer.rb
@@ -1,74 +0,0 @@
-simple_importer
- by Justin Marney
- http://github.com/gotascii/simple_importer/
-
-== DESCRIPTION:
-
-Simple API for importing from csv, tsv and xml.
-
-== FEATURES/PROBLEMS:
-
-* FIXME (list of features or problems)
-
-== SYNOPSIS:
-
-# extend your import modules and define import methods
-module SpecialImporter
- extend AccessoryImporter
-
- # if true is passed to run, reset will get called first if it exists.
- def self.reset
- Accessory.find(:all).each {|a| a.destroy }
- end
-
- def self.import
- csv('Accessory Schema.csv') do |row|
- unless row[0].nil? || row[0] == 'SKU'
- accessory = Accessory.create!(:sku => row[0],
- :image => row[1],
- :thumbnail_image => row[2],
- :name => row[3],
- :supplier_cost => row[4],
- :retail_cost => row[5],
- :description => row[6])
- end
- end
- end
-end
-
-# run your import modules (from a rake task perhaps)
-XmlImporter.run
-
-== REQUIREMENTS:
-
-Hpricot is required if you intend to import xml.
-test/spec and mocha are required to run the tests.
-
-== INSTALL:
-
-sudo gem install gotascii-simple_importer -s http://gems.github.com
-
-== LICENSE:
-
-(The MIT License)
-
-Copyright (c) 2008 Justin Marney
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,21 +0,0 @@
-# Look in the tasks/setup.rb file for the various options that can be
-# configured in this Rakefile. The .rake files in the tasks directory
-# are where the options are used.
-
-load 'tasks/setup.rb'
-
-ensure_in_path 'lib'
-require 'simple_importer'
-
-task :default => 'spec:run'
-
-PROJ.name = 'simple_importer'
-PROJ.authors = 'Justin Marney'
-PROJ.email = 'justin.marney@viget.com'
-PROJ.url = 'FIXME (project homepage)'
-PROJ.rubyforge_name = 'simple_importer'
-
-PROJ.spec_opts << '--color'
-PROJ.version = SimpleImporter::VERSION
-
-# EOF
Oops, something went wrong.

0 comments on commit fd765d7

Please sign in to comment.