csv_pirate 5.0.4 → 5.0.6.pre1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,61 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+ Gemfile.lock
14
+
15
+ # jeweler generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # 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)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ .DS_Store
32
+
33
+ # For IDEs:
34
+ #
35
+ .project
36
+ .project/*
37
+ .idea
38
+ .idea/*
39
+
40
+ # For TextMate
41
+ #*.tmproj
42
+ #tmtags
43
+
44
+ # For emacs:
45
+ #*~
46
+ #\#*
47
+ #.\#*
48
+
49
+ # For vim:
50
+ #*.swp
51
+
52
+ # For redcar:
53
+ #.redcar
54
+
55
+ # For rubinius:
56
+ #*.rbc
57
+
58
+ # Other
59
+ *.gem
60
+ *.sw?
61
+ spec/csv/*
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
5
+ - jruby-19mode
6
+ - rbx-19mode
7
+ - ruby-head
8
+ - jruby-head
@@ -1,3 +1,13 @@
1
+ Version 5.0.5 2012-08-20
2
+ - Updated to tests to latest rspec
3
+ - Fixed specs to be able to run on other machines that don't have y cruft (like travis-ci!)
4
+ - Moved railtie to it's own file
5
+ - Switched configuration hook to :before_initialize so it will work with rake tasks
6
+ - Switched from jeweler to gem-release
7
+ - Updated version.rb to work with gem-release, and maintain previous functionality
8
+ - Added new specs
9
+ - refactored some bits of logic
10
+
1
11
  Version 5.0.4 2011-06-16
2
12
  - File Cleanup
3
13
 
data/Gemfile CHANGED
@@ -1,14 +1,3 @@
1
- source :rubygems
1
+ source "http://rubygems.org"
2
2
 
3
- #FasterCSV became the built-in CSV library in Ruby 1.9, so is only required if using Ruby 1.8
4
- if RUBY_VERSION =~ /^1\.8\.\d*/
5
- gem 'fastercsv', '>= 1.4.0'
6
- end
7
-
8
- group :development do
9
- gem 'rspec', '~> 2.6'
10
- gem "shoulda", ">= 0"
11
- gem "bundler", "~> 1.0.0"
12
- gem "jeweler", "~> 1.6.2"
13
- gem "rcov", ">= 0"
14
- end
3
+ gemspec
@@ -1,4 +1,6 @@
1
- Copyright (c) 2008 Peter H. Boling
1
+ Copyright (c) 2008-2012 Peter H. Boling (http://peterboling.com)
2
+
3
+ MIT License
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -1,5 +1,7 @@
1
1
  == CsvPirate
2
2
 
3
+ {<img src="https://secure.travis-ci.org/pboling/csv_pirate.png?branch=master" alt="Build Status" />}[http://travis-ci.org/pboling/csv_pirate] <= This cake is a lie. I am not sure why Travis is failing me.
4
+
3
5
  Easily create CSVs of any data that can be derived from your models.
4
6
 
5
7
  CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
@@ -11,7 +13,7 @@ My goal is to have it do EVERYTHING it possibly can for me, since almost every p
11
13
 
12
14
  CsvPirate only works for commissions of swag OR grub!
13
15
 
14
- Initialize method (a.k.a new()) takes a hash of parameters:
16
+ Initialize method (a.k.a new()) takes a hash of parameters, and creates the blank CSV file, and the instance can be modified prior to writing out to CSV:
15
17
 
16
18
  # CsvPirate only works for commissions of swag OR grub!
17
19
  # :swag the ARrr collection of swag to work on (optional)
@@ -37,46 +39,19 @@ Initialize method (a.k.a new()) takes a hash of parameters:
37
39
  # {:join => '-'} joins the method names called to get hte data for that column with '_' underscores.
38
40
  # {:humanize =>'-'} first joins as above, then humanizes the string (this is the default)
39
41
  # {:array => ['col1',col2','col3'] Uses the column names provided. If the array's length is less than the booty array's length it reverts to :humanize =>'_'
40
- # check the source to see if there anything else hiding in there! There are a few new options in the 4.0.0 release, which are as yet undocumented.
41
42
 
42
- The create method has the same parameters, and actually creates the CSV.
43
+ Check the source to see if there anything else hiding in there! (HINT: There a bunch more undocumented options)
44
+
45
+ The create method has the same parameters, and actually writes the data to the CSV.
43
46
 
44
47
  Avast! Here be pirates! To brush up on pirate coding naming conventions:
45
48
 
46
49
  http://www.privateerdragons.com/pirate_dictionary.html
47
50
 
48
- == On The Web
49
-
50
- Source:
51
- http://github.com/pboling/csv_pirate
52
-
53
- Release Announcement:
54
- http://galtzo.blogspot.com/2009/03/csv-pirate.html
55
-
56
-
57
- == Install as a RubyGem from source
51
+ == Install
58
52
 
59
53
  [sudo] gem install csv_pirate
60
54
 
61
- Gem Using Git building from source:
62
-
63
- mkdir -p ~/src
64
- cd ~/src
65
- git clone git://github.com/pboling/csv_pirate.git
66
- cd csv_pirate
67
- gem build csv_pirate.gemspec
68
- sudo gem install csv_pirate-5.0.4.gem # (Or whatever version gets built)
69
-
70
- == Install as a Plugin
71
-
72
- Plugin using Git:
73
-
74
- ruby script/plugin install git://github.com/pboling/csv_pirate.git
75
-
76
- == Install as a Git Submodule (plugin)
77
-
78
- git submodule add git://github.com/pboling/csv_pirate.git vendor/plugins/csv_pirate
79
-
80
55
  == Upgrading
81
56
 
82
57
  From version prior to 5.0
@@ -419,10 +394,6 @@ This allows you to modify the csv_pirate object before creating the csv like thi
419
394
 
420
395
  The tests are run with rspec. The test suite is expanding. Currently there is ample coverage of basic functionality.
421
396
 
422
- You will need these gems to run specs:
423
-
424
- gem install jeweler cucumber test-unit rspec
425
-
426
397
  If on a Ruby prior to Ruby 1.9 you will also need the fastercsv gem
427
398
 
428
399
  To run tests cd to where ever you have csv_pirate installed, and do:
@@ -449,6 +420,13 @@ http://www.bradino.com/misc/sylk-file-format-is-not-valid/
449
420
  * Make sure to add tests, rspec preferred, for it. This is important so I don't break it in a future version unintentionally.
450
421
  * Please try not to mess with the Rakefile, version, or change log. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
451
422
 
423
+ == On The Web
424
+
425
+ Source:
426
+ http://github.com/pboling/csv_pirate
427
+
428
+ Release Announcement:
429
+ http://galtzo.blogspot.com/2009/03/csv-pirate.html
452
430
 
453
431
  == Thanks
454
432
 
@@ -460,4 +438,4 @@ Thanks go to:
460
438
 
461
439
  ----------------------------------------------------------------------------------
462
440
  Author: Peter Boling, peter.boling at gmail dot com
463
- Copyright (c) 2009-2011 Peter H. Boling of 9thBit LLC, released under the MIT license. See LICENSE for details.
441
+ Copyright (c) 2008-2012 Peter H. Boling of 9thBit LLC, released under the MIT license. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,80 +1,46 @@
1
1
  # encoding: utf-8
2
+ #!/usr/bin/env rake
3
+ require "bundler/gem_tasks"
4
+ require 'rake'
2
5
 
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
6
+ require 'rspec/core'
7
+ require 'rspec/core/rake_task'
8
+ RSpec::Core::RakeTask.new(:spec) do |spec|
9
+ spec.pattern = FileList['spec/**/*_spec.rb']
11
10
  end
12
- require 'rake'
11
+
12
+ require 'reek/rake/task'
13
+ Reek::Rake::Task.new do |t|
14
+ t.fail_on_error = true
15
+ t.verbose = false
16
+ t.source_files = 'lib/**/*.rb'
17
+ end
18
+
19
+ require 'roodi'
20
+ require 'roodi_task'
21
+ RoodiTask.new do |t|
22
+ t.verbose = false
23
+ end
24
+
25
+ task :default => :spec
13
26
 
14
27
  begin
15
- require 'jeweler'
16
- Jeweler::Tasks.new do |gemspec|
17
- gemspec.name = "csv_pirate"
18
- gemspec.summary = "Easily create CSVs of any data that can be derived from instance methods on your classes."
19
- gemspec.description = %q{CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
20
- It works better if you are wearing a tricorne!}
21
- gemspec.email = "peter.boling@gmail.com"
22
- gemspec.homepage = "http://github.com/pboling/csv_pirate"
23
- gemspec.authors = ["Peter Boling"]
24
- gemspec.files = ["README.rdoc",
25
- "csv_pirate.gemspec",
26
- "install.rb",
27
- "uninstall.rb",
28
- "lib/csv_pirate.rb",
29
- "lib/csv_pirate/pirate_ship.rb",
30
- "lib/csv_pirate/the_capn.rb",
31
- "lib/csv_pirate/version.rb",
32
- "spec/csv_pirate_spec.rb",
33
- "spec/pirate_ship_spec.rb",
34
- "spec/the_capn_spec.rb",
35
- "spec/spec.opts",
36
- "spec/spec_helper.rb",
37
- "spec/spec_helpers/glowing_gas_ball.rb",
38
- "spec/spec_helpers/star.rb",
39
- "Rakefile",
40
- "Gemfile",
41
- "init.rb",
42
- "LICENSE.txt",
43
- "CHANGELOG.txt",
44
- "VERSION.yml"]
45
- end
46
- Jeweler::RubygemsDotOrgTasks.new
28
+ require 'rdoc/task'
47
29
  rescue LoadError
48
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
30
+ require 'rdoc/rdoc'
31
+ require 'rake/rdoctask'
32
+ RDoc::Task = Rake::RDocTask
49
33
  end
50
34
 
51
- require 'rake/rdoctask'
52
- Rake::RDocTask.new do |rdoc|
35
+ RDoc::Task.new(:rdoc) do |rdoc|
53
36
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
54
-
55
37
  rdoc.rdoc_dir = 'rdoc'
56
- rdoc.title = "csv_pirate2 #{version}"
38
+ rdoc.title = "CacheableFlash #{version}"
39
+ rdoc.options << '--line-numbers'
57
40
  rdoc.rdoc_files.include('README*')
58
41
  rdoc.rdoc_files.include('lib/**/*.rb')
59
42
  end
60
43
 
61
- # require 'spec/rake/spectask'
62
- # Spec::Rake::SpecTask.new(:spec) do |t|
63
- # t.libs << 'lib' << 'spec'
64
- # t.spec_files = FileList['spec/**/*_spec.rb']
65
- # end
66
- #
67
- # Spec::Rake::SpecTask.new(:rcov) do |t|
68
- # t.libs << 'lib' << 'spec'
69
- # t.spec_files = FileList['spec/**/*_spec.rb']
70
- # t.rcov = true
71
- # end
72
- #
73
- #begin
74
- # require 'cucumber/rake/task'
75
- # Cucumber::Rake::Task.new(:features)
76
- #rescue LoadError
77
- # puts "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
78
- #end
44
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
79
45
 
80
- task :default => :spec
46
+ Bundler::GemHelper.install_tasks
data/csv_pirate.gemspec CHANGED
@@ -1,75 +1,36 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/csv_pirate/version', __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
5
  s.name = %q{csv_pirate}
8
- s.version = "5.0.4"
6
+ s.version = CsvPirate::VERSION
9
7
 
10
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
9
  s.authors = ["Peter Boling"]
12
- s.date = %q{2011-06-16}
13
10
  s.description = %q{CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
14
11
  It works better if you are wearing a tricorne!}
15
12
  s.email = %q{peter.boling@gmail.com}
16
13
  s.extra_rdoc_files = [
17
- "LICENSE.txt",
14
+ "LICENSE",
18
15
  "README.rdoc"
19
16
  ]
20
- s.files = [
21
- "CHANGELOG.txt",
22
- "Gemfile",
23
- "LICENSE.txt",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION.yml",
27
- "csv_pirate.gemspec",
28
- "install.rb",
29
- "lib/csv_pirate.rb",
30
- "lib/csv_pirate/pirate_ship.rb",
31
- "lib/csv_pirate/the_capn.rb",
32
- "lib/csv_pirate/version.rb",
33
- "spec/csv_pirate_spec.rb",
34
- "spec/pirate_ship_spec.rb",
35
- "spec/spec.opts",
36
- "spec/spec_helper.rb",
37
- "spec/spec_helpers/glowing_gas_ball.rb",
38
- "spec/spec_helpers/star.rb",
39
- "spec/the_capn_spec.rb",
40
- "uninstall.rb"
41
- ]
17
+ s.files = `git ls-files`.split($\)
18
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
42
20
  s.homepage = %q{http://github.com/pboling/csv_pirate}
21
+ s.licenses = ["MIT"]
43
22
  s.require_paths = ["lib"]
44
23
  s.rubygems_version = %q{1.3.7}
45
24
  s.summary = %q{Easily create CSVs of any data that can be derived from instance methods on your classes.}
46
25
 
47
- if s.respond_to? :specification_version then
48
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
- s.specification_version = 3
50
-
51
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
- s.add_runtime_dependency(%q<fastercsv>, [">= 1.4.0"])
53
- s.add_development_dependency(%q<rspec>, ["~> 2.6"])
54
- s.add_development_dependency(%q<shoulda>, [">= 0"])
55
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
56
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
57
- s.add_development_dependency(%q<rcov>, [">= 0"])
58
- else
59
- s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
60
- s.add_dependency(%q<rspec>, ["~> 2.6"])
61
- s.add_dependency(%q<shoulda>, [">= 0"])
62
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
- s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
64
- s.add_dependency(%q<rcov>, [">= 0"])
65
- end
66
- else
67
- s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
68
- s.add_dependency(%q<rspec>, ["~> 2.6"])
69
- s.add_dependency(%q<shoulda>, [">= 0"])
70
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
71
- s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
72
- s.add_dependency(%q<rcov>, [">= 0"])
26
+ #FasterCSV became the built-in CSV library in Ruby 1.9, so is only required if using Ruby 1.8
27
+ if RUBY_VERSION =~ /^1\.8\.\d*/
28
+ s.add_runtime_dependency(%q<fastercsv>, [">= 1.4.0"])
73
29
  end
30
+ s.add_development_dependency(%q<rspec>, [">= 2.11.0"])
31
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
32
+ s.add_development_dependency(%q<rdoc>, [">= 3.12"])
33
+ s.add_development_dependency(%q<reek>, [">= 1.2.8"])
34
+ s.add_development_dependency(%q<roodi>, [">= 2.1.0"])
35
+ s.add_development_dependency(%q<rake>, [">= 0"])
74
36
  end
75
-
@@ -0,0 +1,9 @@
1
+ Feature: something something
2
+ In order to something something
3
+ A user something something
4
+ something something something
5
+
6
+ Scenario: something something
7
+ Given inspiration
8
+ When I create a sweet new gem
9
+ Then everyone should see how awesome I am
File without changes
@@ -0,0 +1,11 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
+ require 'csv_pirate'
3
+
4
+ #require 'spec/expectations'
5
+
6
+ require 'test/unit/assertions'
7
+
8
+ World do |world|
9
+
10
+ world
11
+ end
data/lib/csv_pirate.rb CHANGED
@@ -1,12 +1,11 @@
1
1
  # CsvPirate
2
- #Copyright ©2009 Peter H. Boling of 9thBit LLC, released under the MIT license
3
- #Gem / Plugin for Rails / Active Record: Easily make CSVs of anything that can be derived from your models
4
- #Language: Ruby (written by a pirate)
5
- #License: MIT License
6
- #Labels: Ruby, Rails, Gem, Plugin
7
- #Version: 1.0
8
- #Project owners:
9
- # peter.boling (The Cap'n)
2
+ # Copyright ©2008-2012 Peter H. Boling of 9thBit LLC, released under the MIT license
3
+ # Gem / Plugin for Rails / Active Record: Easily make CSVs of anything that can be derived from your models
4
+ # Language: Ruby (written by a pirate)
5
+ # License: MIT License
6
+ # Labels: Ruby, Rails, Gem, Plugin
7
+ # Project owners:
8
+ # Peter Boling (The Cap'n)
10
9
  require 'yaml'
11
10
 
12
11
  if RUBY_VERSION.to_f >= 1.9
@@ -15,6 +14,10 @@ else
15
14
  require 'faster_csv'
16
15
  end
17
16
 
17
+ require 'csv_pirate/version.rb'
18
+ require 'csv_pirate/the_capn.rb'
19
+ require 'csv_pirate/pirate_ship.rb'
20
+
18
21
  module CsvPirate
19
22
  # If you are using this on a vanilla Ruby class (no rails or active record) then extend your class like this:
20
23
  # MyClass.send(:extend, NinthBit::PirateShip::ActMethods) if defined?(MyClass)
@@ -23,36 +26,15 @@ module CsvPirate
23
26
  # extend NinthBit::PirateShip::ActMethods
24
27
  # end
25
28
  # If you are using ActiveRecord then it is done for you :)
26
-
27
29
  if defined?(Rails) && defined?(ActiveRecord)
28
30
  if defined?(Rails::Railtie)
29
- # namespace our plugin and inherit from Rails::Railtie
30
- # to get our plugin into the initialization process
31
- class Railtie < Rails::Railtie
32
- # Add a to_prepare block which is executed once in production
33
- # and before each request in development
34
- config.to_prepare do
35
- ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
36
- end
37
- end
31
+ require 'csv_pirate/railtie'
38
32
  else
39
- if !defined?(Rake) && defined?(config) && config.respond_to?(:gems)
40
- #Not sure if this is ever executed...
41
- config.to_prepare do
42
- ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
43
- end
44
- else
45
- #This one cleans up that mess...
46
- ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
47
- end
33
+ ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
48
34
  end
49
35
  end
50
36
  end
51
37
 
52
- require 'csv_pirate/version.rb'
53
- require 'csv_pirate/the_capn.rb'
54
- require 'csv_pirate/pirate_ship.rb'
55
-
56
38
  # Support the old (< v5.0.0) API
57
39
  module NinthBit
58
40
  module PirateShip
@@ -0,0 +1,7 @@
1
+ module CsvPirate
2
+ class Railtie < Rails::Railtie
3
+ config.before_initialize do
4
+ ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
5
+ end
6
+ end
7
+ end
@@ -3,7 +3,7 @@ module CsvPirate
3
3
 
4
4
  BOOKIE = [:counter, :timestamp, :none]
5
5
  MOP_HEADS = [:clean, :dirty]
6
- BRIGANTINE = [:first, :last]
6
+ BRIGANTINE_OPTIONS = [:first, :last]
7
7
  CSV_CLASS = (defined?(CSV) ? CSV : FasterCSV)
8
8
 
9
9
  attr_accessor :waggoner # First part of filename
@@ -45,7 +45,7 @@ module CsvPirate
45
45
  # {:array => ['col1',col2','col3'] Uses the column names provided in the array. If the array provided is too short defaults to :humanize =>'_'
46
46
 
47
47
  attr_accessor :brigantine # the complete file path
48
- attr_accessor :pinnacle # the complete file path
48
+ attr_accessor :pinnacle # an array of strings for CSV header based on blackjack
49
49
  class << self
50
50
  attr_accessor :parlay # verbosity on a scale of 0 - 3 (0=:none, 1=:error, 2=:info, 3=:debug, 0 being no screen output, 1 is default
51
51
  end
@@ -131,7 +131,7 @@ module CsvPirate
131
131
  @pinnacle = self.block_and_tackle
132
132
 
133
133
  # Initialize doesn't write anything to a CSV,
134
- # but does create the traverse_board and opens the waggoner for reading / writing
134
+ # but does create the traverse_board (file) and opens it for reading / writing
135
135
  self.northwest_passage unless self.astrolabe
136
136
 
137
137
  # This will contain the text of the csv from this particular execution
@@ -144,7 +144,6 @@ module CsvPirate
144
144
 
145
145
  @nocturnal = File.basename(self.brigantine)
146
146
 
147
-
148
147
  # Then open the rhumb_lines
149
148
  self.rhumb_lines = File.open(File.expand_path(self.brigantine),self.astrolabe ? "r" : "a")
150
149
  end
@@ -214,6 +213,7 @@ module CsvPirate
214
213
  end
215
214
 
216
215
  # Sail through your db looking for buried treasure!
216
+ # Creates the CSV file and returns the text of the CSV
217
217
  # - restricted to loot that can be seen through spyglasses (if provided)!
218
218
  def hoist_mainstay
219
219
 
@@ -275,7 +275,7 @@ module CsvPirate
275
275
 
276
276
  #complete file path
277
277
  def poop_deck(brig)
278
- if BRIGANTINE.include?(brig)
278
+ if BRIGANTINE_OPTIONS.include?(brig) && !self.flies.empty?
279
279
  self.old_csv_dump(brig)
280
280
  elsif brig.is_a?(String)
281
281
  "#{self.analemma}#{brig}"
@@ -318,15 +318,9 @@ module CsvPirate
318
318
  #TODO: This is a nasty method. Just a quick hack to GTD. Needs to be rethought and refactored. --pboling
319
319
  def to_memory(permanence = {:new => :new}, exclude_id = true, exclude_timestamps = true)
320
320
  return nil unless self.grub
321
- begin
322
- example = self.grub.new
323
- rescue Exception
324
- puts "cannot instantiate instance of #{self.grub} with #{self.grub}.new. CsvPirate#to_memory works most reliably when #{self.grub}.new works with no arguments." if TheCapn.parlance(1)
325
- example = nil
326
- end
327
321
  buccaneers = []
328
322
  self.scuttle do |row|
329
- data_hash = self.data_hash_from_row(row, exclude_id, exclude_timestamps, example)
323
+ data_hash = self.data_hash_from_row(row, exclude_id, exclude_timestamps)
330
324
  case permanence
331
325
  when {:new => :new} then
332
326
  buccaneers << self.grub.new(data_hash)
@@ -397,6 +391,7 @@ module CsvPirate
397
391
  if obj
398
392
  puts "#{self.grub}.#{find_aye(columns)}(#{self.find_aye_arr(data_hash, columns).inspect}): found id = #{obj.id}" if TheCapn.parlance(2)
399
393
  end
394
+ obj
400
395
  end
401
396
 
402
397
  def find_aye(columns)
@@ -409,36 +404,38 @@ module CsvPirate
409
404
  end
410
405
  end
411
406
 
412
- def data_hash_from_row(row, exclude_id = true, exclude_timestamps = true, example = nil)
407
+ def data_hash_from_row(row, exclude_id = true, exclude_timestamps = true)
413
408
  plunder = {}
409
+ method_check = self.grub.instance_methods - Object.methods
410
+ method_check = method_check.select {|x| "#{x}" =~ /=$/}
414
411
  my_booty = self.booty.reject {|x| x.is_a?(Hash)}
415
412
  my_booty = exclude_id ? my_booty.reject {|x| a = x.to_sym; [:id, :ID,:dbid, :DBID, :db_id, :DB_ID].include?(a)} : self.booty
416
413
  my_booty = exclude_timestamps ? my_booty.reject {|x| a = x.to_sym; [:created_at, :updated_at, :created_on, :updated_on].include?(a)} : self.booty
417
- my_booty = my_booty.reject {|x| !example.respond_to?("#{x}=".to_sym)} unless example.nil?
414
+ my_booty = my_booty.select {|x| method_check.include?("#{x}=".to_sym)} if method_check
418
415
  my_booty.each do |method|
419
416
  plunder = plunder.merge({method => row[self.pinnacle[self.booty.index(method)]]})
420
417
  end
421
418
  plunder
422
419
  end
423
420
 
424
- def data_hash_from_row(row, exclude_id = true, exclude_timestamps = true, example = nil)
425
- data_hash = {}
426
- my_booty = self.booty.reject {|x| x.is_a?(Hash)}
427
- my_booty = exclude_id ? my_booty.reject {|x| a = x.to_sym; [:id, :ID,:dbid, :DBID, :db_id, :DB_ID].include?(a)} : self.booty
428
- my_booty = exclude_timestamps ? my_booty.reject {|x| a = x.to_sym; [:created_at, :updated_at, :created_on, :updated_on].include?(a)} : self.booty
429
- my_booty = my_booty.reject {|x| !example.respond_to?("#{x}=".to_sym)} unless example.nil?
430
- my_booty.each do |method|
431
- data_hash = data_hash.merge({method => row[self.pinnacle[self.booty.index(method)]]})
432
- end
433
- data_hash
434
- end
435
-
436
421
  # Grab an old CSV dump (first or last)
437
422
  def old_csv_dump(brig)
438
- file = Dir.entries(self.traverse_board).reject {|x| x.match(/^\./)}.sort.send(brig)
423
+ file = self.flies.send(brig)
439
424
  "#{self.traverse_board}#{file}"
440
425
  end
441
426
 
427
+ def flies
428
+ Dir.entries(self.traverse_board).select {|x| x.match(self.unfurl)}.sort
429
+ end
430
+
431
+ # Regex for matching dumped CSVs
432
+ def unfurl
433
+ wibbly = self.waggoner == '' ? '' : Regexp.escape(self.waggoner)
434
+ timey = self.sand_glass == '' ? '' : '\.\d+'
435
+ wimey = self.gibbet == '' ? '' : Regexp.escape(self.gibbet)
436
+ Regexp.new("#{wibbly}#{timey}#{wimey}")
437
+ end
438
+
442
439
  protected
443
440
 
444
441
  # create the header of the CSV (column/method names)
@@ -596,6 +593,8 @@ module CsvPirate
596
593
  end
597
594
  end
598
595
 
596
+ # !!!EXPERIMENTAL!!!
597
+ #
599
598
  # During a mutiny things are a little different!
600
599
  # Essentially you are using an existing CSV to drive queries to create a second CSV cased on the first
601
600
  # The capn hash is:
@@ -619,21 +618,21 @@ module CsvPirate
619
618
  # :astrolabe => false (false is the default for astrolabe, so we could leave it off the first_mate)
620
619
  #
621
620
  # Example:
622
- # capn = {:grub => User,:spyglasses => [:inactive],:booty => ['id','login','status'],:waggoner => 'orig',:chart => ['log','csv'],:astrolabe => false}
623
- # make_orig = CsvPirate.new(capn)
624
- # make_orig.hoist_mainstay
625
- # make_orig.weigh_anchor
626
- #
627
- # first_mate = {:grub => 'account',:booty => ["id","number","name","created_at"],:waggoner => 'fake',:chart => ['log','csv']}
628
- # OR
629
- # # for same class, we re-use the object loaded from first CSV and make the booty [method] calls on it
630
- # first_mate = {:grub => User,:booty => ["id","login","visits_count"],:waggoner => 'fake',:chart => ['log','csv']}
631
- # OR
632
- # first_mate = {:grub => Account,:spyglasses => 'id',:swag=>'user_id',:booty => ["id","name","number"],:waggoner => 'fake',:chart => ['log','csv']}
633
- # AND
634
- # capn = {:grub => User,:spyglasses => 'login',:swag => 1,:waggoner => 'orig',:chart => ['log','csv'],:astrolabe => true}
635
- # after_mutiny = CsvPirate.mutiny(capn, first_mate)
636
- #
621
+ # capn = {:grub => User,:spyglasses => [:inactive],:booty => ['id','login','status'],:waggoner => 'orig',:chart => ['log','csv'],:astrolabe => false}
622
+ # make_orig = CsvPirate.new(capn)
623
+ # make_orig.hoist_mainstay
624
+ # make_orig.weigh_anchor
625
+ #
626
+ # first_mate = {:grub => 'account',:booty => ["id","number","name","created_at"],:waggoner => 'fake',:chart => ['log','csv']}
627
+ # OR
628
+ # # for same class, we re-use the object loaded from first CSV and make the booty [method] calls on it
629
+ # first_mate = {:grub => User,:booty => ["id","login","visits_count"],:waggoner => 'fake',:chart => ['log','csv']}
630
+ # OR
631
+ # first_mate = {:grub => Account,:spyglasses => 'id',:swag=>'user_id',:booty => ["id","name","number"],:waggoner => 'fake',:chart => ['log','csv']}
632
+ # AND
633
+ # capn = {:grub => User,:spyglasses => 'login',:swag => 1,:waggoner => 'orig',:chart => ['log','csv'],:astrolabe => true}
634
+ # after_mutiny = CsvPirate.mutiny(capn, first_mate)
635
+ #
637
636
  def self.mutiny(capn, first_mate)
638
637
  carrack = TheCapn.new(capn)
639
638
  cutthroat = TheCapn.new(first_mate)
@@ -1,11 +1,12 @@
1
1
  module CsvPirate
2
2
 
3
- @@conf = YAML::load( File.read( File.join( File.dirname(__FILE__), '..', '..', 'VERSION.yml') ) )
3
+ VERSION = "5.0.6.pre1"
4
4
 
5
- MAJOR = @@conf[:major]
6
- MINOR = @@conf[:minor]
7
- PATCH = @@conf[:patch]
8
- BUILD = @@conf[:build]
5
+ VERSION_ARRAY = VERSION.split('.')
6
+
7
+ MAJOR = VERSION_ARRAY[0].to_i
8
+ MINOR = VERSION_ARRAY[2].to_i
9
+ PATCH = VERSION_ARRAY[3].to_i
10
+ BUILD = VERSION_ARRAY[4]
9
11
 
10
- VERSION = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
11
12
  end
@@ -106,10 +106,10 @@ describe CsvPirate::TheCapn do
106
106
  end
107
107
  end
108
108
 
109
- describe "#old_csv_dump" do
110
-
109
+ describe "dated dumps" do
111
110
  before(:each) do
112
- ["1/1/1998","2/2/2002","1/2/2003","3/2/2001","2/1/2007"].map {|x| Date.parse(x)}.each do |date|
111
+ ["1/1/1998","2/2/2002","1/2/2003","3/2/2001","2/1/2007"].each do |x|
112
+ date = Date.parse(x)
113
113
  @csv_pirate = CsvPirate::TheCapn.new({
114
114
  :grub => GlowingGasBall,
115
115
  :spyglasses => [:get_stars],
@@ -123,66 +123,89 @@ describe CsvPirate::TheCapn do
123
123
  end
124
124
  end
125
125
 
126
- it "should find first (oldest) dump" do
127
- @new_csv_pirate = CsvPirate::TheCapn.new({
128
- :grub => GlowingGasBall,
129
- :spyglasses => [:get_stars],
130
- :chart => ["spec","csv","GlowingGasBall","dumps"],
131
- :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
132
- :chronometer => false,
133
- :brigantine => :first,
134
- :swab => :none,
135
- :mop => :clean
136
- })
137
- @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.19980101.export.csv"
126
+ describe "#flies" do
127
+ it "should list exported files" do
128
+ @csv_pirate.flies.include?("GlowingGasBall.19980101.export.csv").should be_true
129
+ @csv_pirate.flies.include?("GlowingGasBall.20010203.export.csv").should be_true
130
+ @csv_pirate.flies.include?("GlowingGasBall.20020202.export.csv").should be_true
131
+ @csv_pirate.flies.include?("GlowingGasBall.20030201.export.csv").should be_true
132
+ @csv_pirate.flies.include?("GlowingGasBall.20070102.export.csv").should be_true
133
+ end
138
134
  end
139
135
 
140
- it "should find last (newest) dump" do
141
- @new_csv_pirate = CsvPirate::TheCapn.new({
142
- :grub => GlowingGasBall,
143
- :spyglasses => [:get_stars],
144
- :chart => ["spec","csv","GlowingGasBall","dumps"],
145
- :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
146
- :chronometer => false,
147
- :brigantine => :last,
148
- :swab => :none,
149
- :mop => :clean
150
- })
151
- @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.20070201.export.csv"
152
- end
153
- end
136
+ describe "#old_csv_dump" do
137
+ it "should find first (oldest) dump" do
138
+ @new_csv_pirate = CsvPirate::TheCapn.new({
139
+ :grub => GlowingGasBall,
140
+ :spyglasses => [:get_stars],
141
+ :chart => ["spec","csv","GlowingGasBall","dumps"],
142
+ :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
143
+ :chronometer => Date.parse('18/4/2011'),
144
+ :brigantine => :first,
145
+ :swab => :none,
146
+ :mop => :clean
147
+ })
148
+ @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.19980101.export.csv"
149
+ end
154
150
 
155
- describe "#to_memory" do
151
+ it "should find last (newest) dump" do
152
+ @new_csv_pirate = CsvPirate::TheCapn.new({
153
+ :grub => GlowingGasBall,
154
+ :spyglasses => [:get_stars],
155
+ :chart => ["spec","csv","GlowingGasBall","dumps"],
156
+ :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
157
+ :chronometer => nil,
158
+ :brigantine => :last,
159
+ :swab => :none,
160
+ :mop => :clean
161
+ })
162
+ @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.20070102.export.csv"
163
+ end
164
+ end
156
165
 
157
- before(:each) do
158
- ["1/1/1998","2/2/2002","1/2/2003","3/2/2001","2/1/2007"].map {|x| Date.parse(x)}.each do |date|
159
- @csv_pirate = CsvPirate::TheCapn.new({
166
+ describe "#to_memory" do
167
+ it "should return an array of 10 grubs built from data in CSV" do
168
+ @new_csv_pirate = CsvPirate::TheCapn.new({
160
169
  :grub => GlowingGasBall,
161
170
  :spyglasses => [:get_stars],
162
171
  :chart => ["spec","csv","GlowingGasBall","dumps"],
163
172
  :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
164
- :chronometer => date,
173
+ :chronometer => false,
174
+ :brigantine => :last,
165
175
  :swab => :none,
166
176
  :mop => :clean
167
177
  })
168
- @csv_pirate.hoist_mainstay
178
+ @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.export.csv"
179
+ @new_csv_pirate.to_memory.class.should == Array
180
+ @new_csv_pirate.hoist_mainstay
181
+ # After the CSV is written we should have an array of stuff
182
+ @new_csv_pirate.to_memory.length.should == 10
169
183
  end
170
184
  end
171
185
 
172
- it "should return an array of 10 grubs built from data in CSV" do
173
- @new_csv_pirate = CsvPirate::TheCapn.new({
174
- :grub => GlowingGasBall,
175
- :spyglasses => [:get_stars],
176
- :chart => ["spec","csv","GlowingGasBall","dumps"],
177
- :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
178
- :chronometer => false,
179
- :brigantine => :last,
180
- :swab => :none,
181
- :mop => :clean
182
- })
183
- @new_csv_pirate.brigantine.should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.20070201.export.csv"
184
- @new_csv_pirate.to_memory.class.should == Array
185
- @new_csv_pirate.to_memory.length.should == 10
186
+ context "protected methods" do
187
+ before(:each) do
188
+ @new_csv_pirate = CsvPirate::TheCapn.new({
189
+ :grub => GlowingGasBall,
190
+ :spyglasses => [:get_stars],
191
+ :chart => ["spec","csv","GlowingGasBall","dumps"],
192
+ :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels ],
193
+ :chronometer => false,
194
+ :swab => :none,
195
+ :mop => :clean
196
+ })
197
+ end
198
+
199
+ describe "#lantern" do
200
+ it "should be a glob" do
201
+ @new_csv_pirate.send(:lantern).should == "spec/csv/GlowingGasBall/dumps/GlowingGasBall.export.*"
202
+ end
203
+ end
204
+ describe "#merchantman" do
205
+ it "should be" do
206
+ @new_csv_pirate.send(:merchantman).should == "GlowingGasBall.export"
207
+ end
208
+ end
186
209
  end
187
210
  end
188
211
 
data/spec/spec_helper.rb CHANGED
@@ -1,12 +1,23 @@
1
- #require 'spec'
2
- require 'rspec/core'
3
1
  require 'csv_pirate'
4
2
 
5
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ # Requires supporting files with custom matchers and macros, etc,
4
+ # in ./support/ and its subdirectories.
5
+ #Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
6
+ # The above does not require the files in the right order on travis-ci, so:
7
+ require 'support/glowing_gas_ball'
8
+ require 'support/star'
6
9
 
10
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
11
  RSpec.configure do |config|
8
-
12
+ config.treat_symbols_as_metadata_keys_with_true_values = true
13
+ config.run_all_when_everything_filtered = true
14
+ #config.filter_run :focus
15
+
16
+ # Run specs in random order to surface order dependencies. If you find an
17
+ # order dependency and want to debug it, you can fix the order by providing
18
+ # the seed, which is printed after each run.
19
+ # --seed 1234
20
+ config.order = 'random'
21
+
9
22
  end
10
23
 
11
- # require all files inside spec_helpers
12
- Dir[File.join(File.dirname(__FILE__), "spec_helpers/*.rb")].each { |file| require file }
File without changes
@@ -1,3 +1,5 @@
1
+ require 'support/glowing_gas_ball'
2
+
1
3
  class Star < GlowingGasBall
2
4
 
3
5
  extend CsvPirate::PirateShip::ActMethods
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :csv_pirate do
3
+ # # Task goes here
4
+ # end
metadata CHANGED
@@ -1,179 +1,184 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: csv_pirate
3
- version: !ruby/object:Gem::Version
4
- hash: 63
5
- prerelease: false
6
- segments:
7
- - 5
8
- - 0
9
- - 4
10
- version: 5.0.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 5.0.6.pre1
5
+ prerelease: 6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Peter Boling
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-06-16 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- type: :runtime
12
+ date: 2012-08-21 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 2.11.0
22
+ type: :development
23
23
  prerelease: false
24
- name: fastercsv
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
26
25
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 7
31
- segments:
32
- - 1
33
- - 4
34
- - 0
35
- version: 1.4.0
36
- requirement: *id001
37
- - !ruby/object:Gem::Dependency
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.11.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: shoulda
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
38
  type: :development
39
39
  prerelease: false
40
- name: rspec
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rdoc
48
+ requirement: !ruby/object:Gem::Requirement
42
49
  none: false
43
- requirements:
44
- - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 15
47
- segments:
48
- - 2
49
- - 6
50
- version: "2.6"
51
- requirement: *id002
52
- - !ruby/object:Gem::Dependency
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '3.12'
53
54
  type: :development
54
55
  prerelease: false
55
- name: shoulda
56
- version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '3.12'
62
+ - !ruby/object:Gem::Dependency
63
+ name: reek
64
+ requirement: !ruby/object:Gem::Requirement
57
65
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 0
64
- version: "0"
65
- requirement: *id003
66
- - !ruby/object:Gem::Dependency
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 1.2.8
67
70
  type: :development
68
71
  prerelease: false
69
- name: bundler
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
71
73
  none: false
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- hash: 23
76
- segments:
77
- - 1
78
- - 0
79
- - 0
80
- version: 1.0.0
81
- requirement: *id004
82
- - !ruby/object:Gem::Dependency
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 1.2.8
78
+ - !ruby/object:Gem::Dependency
79
+ name: roodi
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 2.1.0
83
86
  type: :development
84
87
  prerelease: false
85
- name: jeweler
86
- version_requirements: &id005 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 2.1.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ requirement: !ruby/object:Gem::Requirement
87
97
  none: false
88
- requirements:
89
- - - ~>
90
- - !ruby/object:Gem::Version
91
- hash: 11
92
- segments:
93
- - 1
94
- - 6
95
- - 2
96
- version: 1.6.2
97
- requirement: *id005
98
- - !ruby/object:Gem::Dependency
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
99
102
  type: :development
100
103
  prerelease: false
101
- name: rcov
102
- version_requirements: &id006 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
103
105
  none: false
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- hash: 3
108
- segments:
109
- - 0
110
- version: "0"
111
- requirement: *id006
112
- description: |-
113
- CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
114
- It works better if you are wearing a tricorne!
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: ! 'CsvPirate is the easy way to create a CSV of essentially anything
111
+ in Ruby, in full pirate regalia.
112
+
113
+ It works better if you are wearing a tricorne!'
115
114
  email: peter.boling@gmail.com
116
115
  executables: []
117
-
118
116
  extensions: []
119
-
120
- extra_rdoc_files:
121
- - LICENSE.txt
117
+ extra_rdoc_files:
118
+ - LICENSE
122
119
  - README.rdoc
123
- files:
124
- - CHANGELOG.txt
120
+ files:
121
+ - .document
122
+ - .gitignore
123
+ - .travis.yml
124
+ - CHANGELOG
125
125
  - Gemfile
126
- - LICENSE.txt
126
+ - LICENSE
127
127
  - README.rdoc
128
128
  - Rakefile
129
- - VERSION.yml
130
129
  - csv_pirate.gemspec
130
+ - features/csv_pirate.feature
131
+ - features/steps/csv_pirate_steps.rb
132
+ - features/support/env.rb
131
133
  - install.rb
132
134
  - lib/csv_pirate.rb
133
135
  - lib/csv_pirate/pirate_ship.rb
136
+ - lib/csv_pirate/railtie.rb
134
137
  - lib/csv_pirate/the_capn.rb
135
138
  - lib/csv_pirate/version.rb
136
- - spec/csv_pirate_spec.rb
137
- - spec/pirate_ship_spec.rb
139
+ - spec/csv_pirate/csv_pirate_spec.rb
140
+ - spec/csv_pirate/pirate_ship_spec.rb
141
+ - spec/csv_pirate/the_capn_spec.rb
138
142
  - spec/spec.opts
139
143
  - spec/spec_helper.rb
140
- - spec/spec_helpers/glowing_gas_ball.rb
141
- - spec/spec_helpers/star.rb
142
- - spec/the_capn_spec.rb
144
+ - spec/support/glowing_gas_ball.rb
145
+ - spec/support/star.rb
146
+ - tasks/csv_pirate_tasks.rake
143
147
  - uninstall.rb
144
- has_rdoc: true
145
148
  homepage: http://github.com/pboling/csv_pirate
146
- licenses: []
147
-
149
+ licenses:
150
+ - MIT
148
151
  post_install_message:
149
152
  rdoc_options: []
150
-
151
- require_paths:
153
+ require_paths:
152
154
  - lib
153
- required_ruby_version: !ruby/object:Gem::Requirement
155
+ required_ruby_version: !ruby/object:Gem::Requirement
154
156
  none: false
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- hash: 3
159
- segments:
160
- - 0
161
- version: "0"
162
- required_rubygems_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
162
  none: false
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- hash: 3
168
- segments:
169
- - 0
170
- version: "0"
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
171
167
  requirements: []
172
-
173
168
  rubyforge_project:
174
- rubygems_version: 1.3.7
169
+ rubygems_version: 1.8.24
175
170
  signing_key:
176
171
  specification_version: 3
177
- summary: Easily create CSVs of any data that can be derived from instance methods on your classes.
178
- test_files: []
179
-
172
+ summary: Easily create CSVs of any data that can be derived from instance methods
173
+ on your classes.
174
+ test_files:
175
+ - features/csv_pirate.feature
176
+ - features/steps/csv_pirate_steps.rb
177
+ - features/support/env.rb
178
+ - spec/csv_pirate/csv_pirate_spec.rb
179
+ - spec/csv_pirate/pirate_ship_spec.rb
180
+ - spec/csv_pirate/the_capn_spec.rb
181
+ - spec/spec.opts
182
+ - spec/spec_helper.rb
183
+ - spec/support/glowing_gas_ball.rb
184
+ - spec/support/star.rb
data/VERSION.yml DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- :patch: 4
3
- :build:
4
- :major: 5
5
- :minor: 0