Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 65d814bb437c2d59e17ac292c0b8d8fd278e266b Thomas Statter committed Feb 2, 2012
Showing with 6,944 additions and 0 deletions.
  1. +5 −0 .document
  2. +65 −0 .gitignore
  3. +25 −0 Gemfile
  4. +211 −0 Gemfile.lock
  5. +27 −0 LICENSE.txt
  6. +286 −0 README.markdown
  7. +19 −0 README.rdoc
  8. +96 −0 Rakefile
  9. +3 −0 VERSION
  10. +16 −0 bin/autospec
  11. +16 −0 bin/convert_to_should_syntax
  12. +16 −0 bin/erubis
  13. +16 −0 bin/htmldiff
  14. +16 −0 bin/jeweler
  15. +16 −0 bin/ldiff
  16. +16 −0 bin/nokogiri
  17. +16 −0 bin/rackup
  18. +16 −0 bin/rails
  19. +16 −0 bin/rake
  20. +16 −0 bin/rake2thor
  21. +16 −0 bin/ri
  22. +16 −0 bin/rspec
  23. +16 −0 bin/spree
  24. +16 −0 bin/thor
  25. +16 −0 bin/tilt
  26. +16 −0 bin/tt
  27. +64 −0 datashift.gemspec
  28. +397 −0 lib/applications/jruby/jexcel_file.rb
  29. +79 −0 lib/applications/jruby/word.rb
  30. +114 −0 lib/datashift.rb
  31. +12 −0 lib/datashift/exceptions.rb
  32. +353 −0 lib/datashift/file_definitions.rb
  33. +88 −0 lib/datashift/mapping_file_definitions.rb
  34. +233 −0 lib/datashift/method_detail.rb
  35. +253 −0 lib/datashift/method_mapper.rb
  36. +36 −0 lib/generators/csv_generator.rb
  37. +122 −0 lib/generators/excel_generator.rb
  38. +14 −0 lib/generators/generator_base.rb
  39. +24 −0 lib/helpers/core_ext/to_b.rb
  40. +131 −0 lib/helpers/spree_helper.rb
  41. BIN lib/java/poi-3.7/._poi-3.7-20101029.jar5645100390082102460.tmp
  42. +507 −0 lib/java/poi-3.7/LICENSE
  43. +21 −0 lib/java/poi-3.7/NOTICE
  44. +115 −0 lib/java/poi-3.7/RELEASE_NOTES.txt
  45. BIN lib/java/poi-3.7/lib/commons-logging-1.1.jar
  46. BIN lib/java/poi-3.7/lib/junit-3.8.1.jar
  47. BIN lib/java/poi-3.7/lib/log4j-1.2.13.jar
  48. BIN lib/java/poi-3.7/ooxml-lib/dom4j-1.6.1.jar
  49. BIN lib/java/poi-3.7/ooxml-lib/geronimo-stax-api_1.0_spec-1.0.jar
  50. BIN lib/java/poi-3.7/ooxml-lib/xmlbeans-2.3.0.jar
  51. BIN lib/java/poi-3.7/poi-3.7-20101029.jar
  52. BIN lib/java/poi-3.7/poi-examples-3.7-20101029.jar
  53. BIN lib/java/poi-3.7/poi-ooxml-3.7-20101029.jar
  54. BIN lib/java/poi-3.7/poi-ooxml-schemas-3.7-20101029.jar
  55. BIN lib/java/poi-3.7/poi-scratchpad-3.7-20101029.jar
  56. +99 −0 lib/loaders/csv_loader.rb
  57. +150 −0 lib/loaders/excel_loader.rb
  58. +332 −0 lib/loaders/loader_base.rb
  59. +137 −0 lib/loaders/spreadsheet_loader.rb
  60. +46 −0 lib/loaders/spree/image_loader.rb
  61. +225 −0 lib/loaders/spree/product_loader.rb
  62. +31 −0 spec/csv_loader_spec.rb
  63. +27 −0 spec/datashift_spec.rb
  64. +85 −0 spec/db/migrate/20110803201325_create_test_bed.rb
  65. +79 −0 spec/excel_generator_spec.rb
  66. +177 −0 spec/excel_loader_spec.rb
  67. +141 −0 spec/file_definitions.rb
  68. BIN spec/fixtures/BadAssociationName.xls
  69. BIN spec/fixtures/DemoNegativeTesting.xls
  70. BIN spec/fixtures/ProjectsMultiCategories.xls
  71. BIN spec/fixtures/ProjectsSingleCategories.xls
  72. BIN spec/fixtures/SimpleProjects.xls
  73. +25 −0 spec/fixtures/config/database.yml
  74. BIN spec/fixtures/interact_models_db.sqlite
  75. BIN spec/fixtures/interact_spree_db.sqlite
  76. +4 −0 spec/fixtures/negative/SpreeProdMiss1Mandatory.csv
  77. BIN spec/fixtures/negative/SpreeProdMiss1Mandatory.xls
  78. +4 −0 spec/fixtures/negative/SpreeProdMissManyMandatory.csv
  79. BIN spec/fixtures/negative/SpreeProdMissManyMandatory.xls
  80. BIN spec/fixtures/simple_export_spec.xls
  81. BIN spec/fixtures/simple_template_spec.xls
  82. +4 −0 spec/fixtures/spree/SpreeProducts.csv
  83. BIN spec/fixtures/spree/SpreeProducts.xls
  84. +4 −0 spec/fixtures/spree/SpreeProductsMultiColumn.csv
  85. BIN spec/fixtures/spree/SpreeProductsMultiColumn.xls
  86. +4 −0 spec/fixtures/spree/SpreeProductsSimple.csv
  87. BIN spec/fixtures/spree/SpreeProductsSimple.xls
  88. +5 −0 spec/fixtures/spree/SpreeZoneExample.csv
  89. BIN spec/fixtures/spree/SpreeZoneExample.xls
  90. +57 −0 spec/fixtures/test_model_defs.rb
  91. +121 −0 spec/loader_spec.rb
  92. +238 −0 spec/method_mapper_spec.rb
  93. +116 −0 spec/spec_helper.rb
  94. +64 −0 spec/spree_generator_spec.rb
  95. +311 −0 spec/spree_loader_spec.rb
  96. +215 −0 spec/spree_method_mapping_spec.rb
  97. +15 −0 tasks/config/seed_fu_product_template.erb
  98. +13 −0 tasks/config/tidy_config.txt
  99. +65 −0 tasks/db_tasks.rake
  100. +79 −0 tasks/excel_generator.rake
  101. +37 −0 tasks/file_tasks.rake
  102. +50 −0 tasks/import/csv.rake
  103. +67 −0 tasks/import/excel.rake
  104. +109 −0 tasks/spree/image_load.rake
  105. +44 −0 tasks/spree/product_loader.rake
  106. +167 −0 tasks/word_to_seedfu.rake
  107. +18 −0 test/helper.rb
  108. +7 −0 test/test_interact.rb
@@ -0,0 +1,5 @@
+lib/**/*.rb
+bin/*
+-
+features/**/*.feature
+LICENSE.txt
@@ -0,0 +1,65 @@
+# rcov generated
+coverage
+coverage.data
+
+*~
+*.cache
+*.log
+*.pid
+*.tmproj
+*.sw?
+logs
+logs/**
+spec/logs
+spec/fixtures/results
+
+nbproject
+Thumbs.db
+
+
+# rdoc generated
+rdoc
+
+# yard generated
+doc
+.yardoc
+
+# bundler
+.bundle
+
+# jeweler generated
+pkg
+
+# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
+#
+# * Create a file at ~/.gitignore
+# * Include files you want ignored
+# * Run: git config --global core.excludesfile ~/.gitignore
+#
+# After doing this, these files will be ignored in all your git projects,
+# saving you from having to 'pollute' every project you touch with them
+#
+# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
+#
+# For MacOS:
+#
+.DS_Store
+
+# For TextMate
+#*.tmproj
+#tmtags
+
+# For emacs:
+#*~
+#\#*
+#.\#*
+
+# For vim:
+*.swp
+
+# For redcar:
+#.redcar
+
+# For rubinius:
+#*.rbc
+/nbproject/private/
25 Gemfile
@@ -0,0 +1,25 @@
+source "http://rubygems.org"
+# Add dependencies required to use your gem here.
+# Example:
+# gem "activesupport", ">= 2.3.5"
+
+# Add dependencies to develop your gem here.
+# Include everything needed to run rake, tests, features, etc.
+group :development do
+ gem "rails", '3.1.3'
+ gem "activerecord", '3.1.3'
+ gem "activesupport", '3.1.3'
+
+ platform :jruby do
+ gem 'jruby-openssl'
+ gem 'activerecord-jdbcsqlite3-adapter'
+ end
+
+ gem 'spree', '0.70.3'
+ gem "rspec", ">= 0"
+ gem "shoulda", ">= 0"
+ gem "rdoc", "~> 3.12"
+ gem "bundler", "~> 1.0.0"
+ gem "jeweler", "~> 1.8.3"
+end
+
@@ -0,0 +1,211 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.3)
+ actionpack (= 3.1.3)
+ mail (~> 2.3.0)
+ actionpack (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.5)
+ rack-cache (~> 1.1)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.3)
+ activemerchant (1.17.0)
+ activesupport (>= 2.3.11)
+ braintree (>= 2.0.0)
+ builder (>= 2.0.0)
+ json (>= 1.5.1)
+ activemodel (3.1.3)
+ activesupport (= 3.1.3)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activerecord-jdbc-adapter (1.2.2)
+ activerecord-jdbcsqlite3-adapter (1.2.2)
+ activerecord-jdbc-adapter (~> 1.2.2)
+ jdbc-sqlite3 (~> 3.7.2)
+ activeresource (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
+ activesupport (3.1.3)
+ multi_json (~> 1.0)
+ acts_as_list (0.1.4)
+ arel (2.2.1)
+ bcrypt-ruby (3.0.1-java)
+ bouncy-castle-java (1.5.0146.1)
+ braintree (2.13.3)
+ builder (>= 2.0.0)
+ builder (3.0.0)
+ cancan (1.6.5)
+ cocaine (0.2.1)
+ deface (0.7.2)
+ nokogiri (~> 1.5.0)
+ rails (>= 3.0.9)
+ devise (1.4.7)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.0.3)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ faker (1.0.0)
+ i18n (~> 0.4)
+ git (1.2.5)
+ highline (1.6.2)
+ hike (1.2.1)
+ i18n (0.6.0)
+ jdbc-sqlite3 (3.7.2)
+ jeweler (1.8.3)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rdoc
+ jquery-rails (1.0.19)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ jruby-openssl (0.7.5)
+ bouncy-castle-java (>= 1.5.0146.1)
+ json (1.6.5-java)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ meta_search (1.1.1)
+ actionpack (~> 3.1.0)
+ activerecord (~> 3.1.0)
+ activesupport (~> 3.1.0)
+ polyamorous (~> 0.5.0)
+ mime-types (1.17.2)
+ multi_json (1.0.4)
+ nested_set (1.6.8)
+ activerecord (>= 3.0.0)
+ railties (>= 3.0.0)
+ nokogiri (1.5.0-java)
+ orm_adapter (0.0.6)
+ paperclip (2.4.1)
+ activerecord (>= 2.3.0)
+ activesupport (>= 2.3.2)
+ cocaine (>= 0.0.2)
+ mime-types
+ polyamorous (0.5.0)
+ activerecord (~> 3.0)
+ polyglot (0.3.3)
+ rack (1.3.6)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.3)
+ actionmailer (= 3.1.3)
+ actionpack (= 3.1.3)
+ activerecord (= 3.1.3)
+ activeresource (= 3.1.3)
+ activesupport (= 3.1.3)
+ bundler (~> 1.0)
+ railties (= 3.1.3)
+ railties (3.1.3)
+ actionpack (= 3.1.3)
+ activesupport (= 3.1.3)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rd_find_by_param (0.1.1)
+ activerecord (~> 3.0)
+ activesupport (~> 3.0)
+ rd_resource_controller (1.0.1)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ shoulda (2.11.3)
+ spree (0.70.3)
+ spree_api (= 0.70.3)
+ spree_auth (= 0.70.3)
+ spree_core (= 0.70.3)
+ spree_dash (= 0.70.3)
+ spree_promo (= 0.70.3)
+ spree_sample (= 0.70.3)
+ spree_api (0.70.3)
+ spree_auth (= 0.70.3)
+ spree_core (= 0.70.3)
+ spree_auth (0.70.3)
+ cancan (= 1.6.5)
+ devise (= 1.4.7)
+ spree_core (= 0.70.3)
+ spree_core (0.70.3)
+ activemerchant (= 1.17.0)
+ acts_as_list (= 0.1.4)
+ deface (>= 0.7.0)
+ faker (= 1.0.0)
+ highline (= 1.6.2)
+ jquery-rails (>= 1.0.14)
+ kaminari (>= 0.12.4)
+ meta_search (= 1.1.1)
+ nested_set (= 1.6.8)
+ paperclip (= 2.4.1)
+ rails (>= 3.1.1, <= 3.1.3)
+ rd_find_by_param (= 0.1.1)
+ rd_resource_controller
+ state_machine (= 1.0.1)
+ stringex (= 1.0.3)
+ spree_dash (0.70.3)
+ spree_core (= 0.70.3)
+ spree_promo (0.70.3)
+ spree_auth (= 0.70.3)
+ spree_core (= 0.70.3)
+ spree_sample (0.70.3)
+ spree_core (= 0.70.3)
+ sprockets (2.0.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ state_machine (1.0.1)
+ stringex (1.0.3)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.31)
+ warden (1.0.6)
+ rack (>= 1.0)
+
+PLATFORMS
+ java
+
+DEPENDENCIES
+ activerecord (= 3.1.3)
+ activerecord-jdbcsqlite3-adapter
+ activesupport (= 3.1.3)
+ bundler (~> 1.0.0)
+ jeweler (~> 1.8.3)
+ jruby-openssl
+ rails (= 3.1.3)
+ rdoc (~> 3.12)
+ rspec
+ shoulda
+ spree (= 0.70.3)
@@ -0,0 +1,27 @@
+== DataShift
+
+## License
+
+Copyright:: (c) Autotelik Media Ltd 2011
+Author :: Tom Statter
+Date :: Sept 2011
+
+The MIT License
+
+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.
Oops, something went wrong.

0 comments on commit 65d814b

Please sign in to comment.