ar_loader 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +9 -9
- data/README.markdown +221 -210
- data/Rakefile +76 -76
- data/lib/VERSION +1 -1
- data/lib/ar_loader.rb +66 -53
- data/lib/engine/file_definitions.rb +353 -353
- data/lib/engine/jruby/jexcel_file.rb +181 -181
- data/lib/engine/jruby/method_mapper_excel.rb +43 -43
- data/lib/engine/mapping_file_definitions.rb +87 -87
- data/lib/engine/method_detail.rb +140 -139
- data/lib/engine/method_mapper.rb +156 -156
- data/lib/engine/method_mapper_csv.rb +27 -27
- data/lib/engine/word.rb +70 -70
- data/lib/loaders/loader_base.rb +73 -60
- data/lib/loaders/spree/image_loader.rb +41 -46
- data/lib/loaders/spree/product_loader.rb +91 -92
- data/lib/to_b.rb +24 -24
- data/spec/database.yml +6 -0
- data/spec/db/migrate/20110803201325_create_testbed.rb +25 -0
- data/spec/excel_loader_spec.rb +98 -137
- data/spec/spec_helper.rb +18 -36
- data/spec/spree_loader_spec.rb +158 -0
- data/tasks/{seed_fu_product_template.erb → config/seed_fu_product_template.erb} +15 -15
- data/tasks/{tidy_config.txt → config/tidy_config.txt} +12 -12
- data/tasks/db_tasks.rake +64 -64
- data/tasks/excel_loader.rake +113 -100
- data/tasks/file_tasks.rake +37 -37
- data/tasks/spree/image_load.rake +107 -102
- data/tasks/spree/product_loader.rake +107 -106
- data/tasks/word_to_seedfu.rake +166 -166
- metadata +61 -47
data/LICENSE
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
== ARLoader
|
2
|
-
|
3
|
-
Copyright tom statter @ www.autotelik.co.uk 2011
|
4
|
-
|
5
|
-
Not sure what is appropriate LICENSE
|
6
|
-
|
7
|
-
Free to use in any project, commercial or otherwise as long as copyright not removed ??
|
8
|
-
|
9
|
-
MIT ?
|
1
|
+
== ARLoader
|
2
|
+
|
3
|
+
Copyright tom statter @ www.autotelik.co.uk 2011
|
4
|
+
|
5
|
+
Not sure what is appropriate LICENSE
|
6
|
+
|
7
|
+
Free to use in any project, commercial or otherwise as long as copyright not removed ??
|
8
|
+
|
9
|
+
MIT ?
|
data/README.markdown
CHANGED
@@ -1,211 +1,222 @@
|
|
1
|
-
# AR Loader
|
2
|
-
|
3
|
-
General
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
##
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
1
|
+
# AR Loader
|
2
|
+
|
3
|
+
General Loader for populating database with seed data from various sources.
|
4
|
+
|
5
|
+
Simplifies the specification and loading of data from files into any active record supported database.
|
6
|
+
|
7
|
+
Seamlessly handles loading an active record model's attributes and it's associations,
|
8
|
+
based on reflection against the supplied model - mapping column headings to attributes and associations.
|
9
|
+
|
10
|
+
Fully extendable via spreadsheet headings - simply add new column to Excel/Open Office spreadsheets with
|
11
|
+
attribute or association name, and loader will attempt to find correct association and populate AR object with row data.
|
12
|
+
|
13
|
+
Original focus was on support for the Open Source Spree e-commerce project, so includes specific loaders and rake tasks
|
14
|
+
for loading Spree Products and associated data such as Product Variants, and images.
|
15
|
+
|
16
|
+
Loaders attempt to handle various human read-able forms of column names.
|
17
|
+
|
18
|
+
For example, given an association on the model called, product_properties, will successfully load
|
19
|
+
from columns with headings such as 'product_properties', 'Product Properties', 'product Properties' etc
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
Add gem instruction to your Gemfile. To use the Excel loader, JRuby is required, so to use in a mixed setup
|
24
|
+
of JRuby and deployed to other Rubies, use the following guard.
|
25
|
+
|
26
|
+
if(RUBY_PLATFORM =~ /java/)
|
27
|
+
gem 'activerecord-jdbcmysql-adapter'
|
28
|
+
else
|
29
|
+
gem 'mysql'
|
30
|
+
end
|
31
|
+
|
32
|
+
Install the latest gem :
|
33
|
+
|
34
|
+
`gem install ar_loader`
|
35
|
+
|
36
|
+
To use :
|
37
|
+
|
38
|
+
require 'ar_loader'
|
39
|
+
|
40
|
+
To pull the tasks in, add call in your Rakefile :
|
41
|
+
|
42
|
+
ArLoader::require_tasks
|
43
|
+
|
44
|
+
## Example Spreadsheet
|
45
|
+
|
46
|
+
An example Spreadsheet with headers and comments, suitable for giving to Clients
|
47
|
+
to populate, can be found in test/examples/DemoSpreadsheet.xls
|
48
|
+
|
49
|
+
## Features
|
50
|
+
|
51
|
+
- *Direct Excel file support*
|
52
|
+
|
53
|
+
Includes a wrapper around MS Excel File format, via Apache POI, which
|
54
|
+
enables Products to be loaded directly from Excel files (Excel does not need to be installed) via JRuby.
|
55
|
+
No need to save to CSV first.
|
56
|
+
|
57
|
+
The java jars e.g - 'poi-3.6.jar' - are included.
|
58
|
+
|
59
|
+
- *Semi-Smart Name Lookup*
|
60
|
+
|
61
|
+
Includes helper classes that find and store details of all possible associations on an AR class.
|
62
|
+
Given a user supplied name, attempts to find the requested association.
|
63
|
+
|
64
|
+
Example usage, load from a file or spreadsheet where the column names are only
|
65
|
+
an approximation of the actual associations, so given 'Product Properties' heading,
|
66
|
+
finds real association 'product_properties' to send or call on the AR object
|
67
|
+
|
68
|
+
- *Associations*
|
69
|
+
|
70
|
+
Can handle 'many' type associations and enables multiple association objects to
|
71
|
+
be added via single entry (column). See Details section.
|
72
|
+
|
73
|
+
- *Spree Rake Tasks*
|
74
|
+
|
75
|
+
Rake tasks provided for Spree loading - currently supports Product with associations,
|
76
|
+
and Image loading.
|
77
|
+
|
78
|
+
**Product loading from Excel specifically requires JRuby**.
|
79
|
+
|
80
|
+
Example command lines:
|
81
|
+
|
82
|
+
rake excel_load input=vendor\extensions\autotelik\fixtures\ExampleInfoWeb.xls
|
83
|
+
|
84
|
+
rake excel_load input=C:\MyProducts.xls verbose=true'
|
85
|
+
|
86
|
+
- *Seamless Image loading can be achieved by ensuring SKU or class Name features in Image filename.
|
87
|
+
|
88
|
+
Lookup is performed either via the SKU being prepended to the image name, or by the image name being equal to the **name attribute** of the klass in question.
|
89
|
+
|
90
|
+
Images can be attached to any class defined with a suitable association. The class to use can be configured in rake task via
|
91
|
+
parameter klass=Xyz.
|
92
|
+
|
93
|
+
In the Spree tasks, this defaults to Product, so attempts to attach Image to a Product via Product SKU or Name.
|
94
|
+
|
95
|
+
Image loading **does not** specifically require JRuby
|
96
|
+
|
97
|
+
A report is generated in the current working directory detailing any Images in the paths that could not be matched with a Product.
|
98
|
+
|
99
|
+
Example cmd lines :
|
100
|
+
|
101
|
+
rake image_load input=vendor\extensions\autotelik\lib\fixtures
|
102
|
+
rake image_load input="C:\images\Paintings' dummy=true
|
103
|
+
rake image_load input="C:\images\TaxonIcons" skip_if_no_assoc=true klass=Taxon
|
104
|
+
|
105
|
+
## Example Wrapper Tasks for Spree Site Extension
|
106
|
+
|
107
|
+
These tasks show how to write your own high level wrapper task, that will seed the database from multiple spreedsheets.
|
108
|
+
|
109
|
+
The images in this example have been named with the SKU present in name (separated by whitespace) e.g "PRINT_001 Stonehenge.jpg"
|
110
|
+
|
111
|
+
A report is generated in the current working directory detailing any Images in the paths that could not be matched with a Product.
|
112
|
+
|
113
|
+
require 'ar_loader'
|
114
|
+
|
115
|
+
namespace :mysite do
|
116
|
+
|
117
|
+
desc "Load Products for site"
|
118
|
+
task :load, :needs => [:environment] do |t, args|
|
119
|
+
|
120
|
+
[ "vendor/extensions/site/db/seed/Paintings.xls",
|
121
|
+
"vendor/extensions/site/db/seed/Drawings.xls"
|
122
|
+
].each do |x|
|
123
|
+
Rake::Task['autotelik:excel_load'].execute(
|
124
|
+
:input => x,
|
125
|
+
:verbose => true,
|
126
|
+
:sku_prefix => ""
|
127
|
+
)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
desc "Load Images for site based on SKU"
|
132
|
+
task :load_images, :clean, :dummy, :needs => [:environment] do |t, args|
|
133
|
+
|
134
|
+
if(args[:clean])
|
135
|
+
Image.delete_all
|
136
|
+
FileUtils.rm_rf( "public/assests/products" )
|
137
|
+
end
|
138
|
+
|
139
|
+
["01_paintings_jpegs", "02_drawings_jpegs"].each do |x|
|
140
|
+
|
141
|
+
# image names start with associated Product SKU,
|
142
|
+
# skip rather then exit if no matching product found
|
143
|
+
|
144
|
+
Rake::Task['autotelik:image_load'].execute(
|
145
|
+
:input => "/my_site_load_info//#{x}",
|
146
|
+
:dummy => args[:dummy],
|
147
|
+
:verbose => false, :sku => true, :skip_if_no_assoc => true
|
148
|
+
)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
## Details
|
153
|
+
|
154
|
+
### Associations
|
155
|
+
|
156
|
+
A single association column can contain multiple name/value sets in default form :
|
157
|
+
|
158
|
+
Name1:value1, value2|Name2:value1, value2, value3|Name3:value1, value2 etc
|
159
|
+
|
160
|
+
So for example a Column for an 'Option Types' association on a Product,
|
161
|
+
could contain 2 options with a number of values each :
|
162
|
+
|
163
|
+
'Option Types'
|
164
|
+
size:small,medium,large|colour:red,white
|
165
|
+
size:small|colour:blue,red,white
|
166
|
+
|
167
|
+
### Properties
|
168
|
+
|
169
|
+
The properties to associate with this product.
|
170
|
+
Properties are for small snippets of text, shared across many products,
|
171
|
+
and are for display purposes only.
|
172
|
+
|
173
|
+
An optional display value can be supplied to supplement the displayed text.
|
174
|
+
|
175
|
+
As for all associations can contain multiple name/value sets in default form :
|
176
|
+
|
177
|
+
Property:display_value|Property:display_value
|
178
|
+
|
179
|
+
Example - No values :
|
180
|
+
manufacturer|standard
|
181
|
+
|
182
|
+
Example - Display values :
|
183
|
+
manufacturer:somebody else plc|standard:ISOBlah21
|
184
|
+
|
185
|
+
## TODO
|
186
|
+
|
187
|
+
- Make more generic, so have smart switching to Ruby and directly support csv,
|
188
|
+
when JRuby and/or Excel not available.
|
189
|
+
|
190
|
+
- Smart sorting of column processing order ....
|
191
|
+
|
192
|
+
Does not currently ensure mandatory columns (for valid?) processed first.
|
193
|
+
Since Product needs saving before associations can be processed, user currently
|
194
|
+
needs to ensure SKU, name, price columns are among first columns
|
195
|
+
|
196
|
+
## License
|
197
|
+
|
198
|
+
Copyright:: (c) Autotelik Media Ltd 2011
|
199
|
+
|
200
|
+
Author :: Tom Statter
|
201
|
+
|
202
|
+
Date :: Feb 2011
|
203
|
+
|
204
|
+
The MIT License
|
205
|
+
|
206
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
207
|
+
of this software and associated documentation files (the "Software"), to deal
|
208
|
+
in the Software without restriction, including without limitation the rights
|
209
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
210
|
+
copies of the Software, and to permit persons to whom the Software is
|
211
|
+
furnished to do so, subject to the following conditions:
|
212
|
+
|
213
|
+
The above copyright notice and this permission notice shall be included in
|
214
|
+
all copies or substantial portions of the Software.
|
215
|
+
|
216
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
217
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
218
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
219
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
220
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
221
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
211
222
|
THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,76 +1,76 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/clean'
|
4
|
-
require 'rake/gempackagetask'
|
5
|
-
require 'rake/rdoctask'
|
6
|
-
require 'rake/testtask'
|
7
|
-
require "lib/ar_loader"
|
8
|
-
|
9
|
-
# Copyright:: (c) Autotelik Media Ltd 2011
|
10
|
-
# Author :: Tom Statter
|
11
|
-
# Date :: Aug 2010
|
12
|
-
#
|
13
|
-
# License:: MIT - Free, OpenSource
|
14
|
-
#
|
15
|
-
# Details:: Gem::Specification for Active Record Loader gem.
|
16
|
-
#
|
17
|
-
# Specifically enabled for uploading Spree products but easily
|
18
|
-
# extended to any AR model.
|
19
|
-
#
|
20
|
-
# Currently support direct access to Excel Spreedsheets via JRuby
|
21
|
-
#
|
22
|
-
# TODO - Switch for non JRuby Rubies, enable load via CSV file instead of Excel.
|
23
|
-
#
|
24
|
-
ArLoader::require_tasks
|
25
|
-
|
26
|
-
spec = Gem::Specification.new do |s|
|
27
|
-
s.name = ArLoader.gem_name
|
28
|
-
s.version = ArLoader.gem_version
|
29
|
-
s.has_rdoc = true
|
30
|
-
s.extra_rdoc_files = ['README.markdown', 'LICENSE']
|
31
|
-
s.summary = 'File based loader for Active Record models'
|
32
|
-
s.description = 'A file based loader for Active Record models. Seed database directly from Excel/CSV. Includes rake support for Spree'
|
33
|
-
s.author = 'thomas statter'
|
34
|
-
s.email = 'rubygems@autotelik.co.uk'
|
35
|
-
s.date = DateTime.now.strftime("%Y-%m-%d")
|
36
|
-
s.homepage = %q{http://www.autotelik.co.uk}
|
37
|
-
|
38
|
-
# s.executables = ['your_executable_here']
|
39
|
-
s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{lib,spec,tasks}/**/*")
|
40
|
-
s.require_path = "lib"
|
41
|
-
s.bindir = "bin"
|
42
|
-
end
|
43
|
-
|
44
|
-
Rake::GemPackageTask.new(spec) do |p|
|
45
|
-
p.gem_spec = spec
|
46
|
-
p.need_tar = true
|
47
|
-
p.need_zip = true
|
48
|
-
end
|
49
|
-
|
50
|
-
Rake::RDocTask.new do |rdoc|
|
51
|
-
files =['README.markdown', 'LICENSE', 'lib/**/*.rb']
|
52
|
-
rdoc.rdoc_files.add(files)
|
53
|
-
rdoc.main = "README.markdown" # page to start on
|
54
|
-
rdoc.title = "ARLoader Docs"
|
55
|
-
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
56
|
-
rdoc.options << '--line-numbers'
|
57
|
-
end
|
58
|
-
|
59
|
-
Rake::TestTask.new do |t|
|
60
|
-
t.test_files = FileList['test/**/*.rb']
|
61
|
-
end
|
62
|
-
|
63
|
-
# Add in our own Tasks
|
64
|
-
|
65
|
-
# Long parameter lists so ensure rake -T produces nice wide output
|
66
|
-
ENV['RAKE_COLUMNS'] = '180'
|
67
|
-
|
68
|
-
desc 'Build gem and install in one step'
|
69
|
-
task :pik_install, :needs => [:gem] do |t, args|
|
70
|
-
|
71
|
-
puts "Installing version #{ArLoader.gem_version}"
|
72
|
-
|
73
|
-
gem = "#{ArLoader.gem_name}-#{ArLoader.gem_version}.gem"
|
74
|
-
cmd = "pik gem install --no-ri --no-rdoc pkg\\#{gem}"
|
75
|
-
system(cmd)
|
76
|
-
end
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'rake/gempackagetask'
|
5
|
+
require 'rake/rdoctask'
|
6
|
+
require 'rake/testtask'
|
7
|
+
require "lib/ar_loader"
|
8
|
+
|
9
|
+
# Copyright:: (c) Autotelik Media Ltd 2011
|
10
|
+
# Author :: Tom Statter
|
11
|
+
# Date :: Aug 2010
|
12
|
+
#
|
13
|
+
# License:: MIT - Free, OpenSource
|
14
|
+
#
|
15
|
+
# Details:: Gem::Specification for Active Record Loader gem.
|
16
|
+
#
|
17
|
+
# Specifically enabled for uploading Spree products but easily
|
18
|
+
# extended to any AR model.
|
19
|
+
#
|
20
|
+
# Currently support direct access to Excel Spreedsheets via JRuby
|
21
|
+
#
|
22
|
+
# TODO - Switch for non JRuby Rubies, enable load via CSV file instead of Excel.
|
23
|
+
#
|
24
|
+
ArLoader::require_tasks
|
25
|
+
|
26
|
+
spec = Gem::Specification.new do |s|
|
27
|
+
s.name = ArLoader.gem_name
|
28
|
+
s.version = ArLoader.gem_version
|
29
|
+
s.has_rdoc = true
|
30
|
+
s.extra_rdoc_files = ['README.markdown', 'LICENSE']
|
31
|
+
s.summary = 'File based loader for Active Record models'
|
32
|
+
s.description = 'A file based loader for Active Record models. Seed database directly from Excel/CSV. Includes rake support for Spree'
|
33
|
+
s.author = 'thomas statter'
|
34
|
+
s.email = 'rubygems@autotelik.co.uk'
|
35
|
+
s.date = DateTime.now.strftime("%Y-%m-%d")
|
36
|
+
s.homepage = %q{http://www.autotelik.co.uk}
|
37
|
+
|
38
|
+
# s.executables = ['your_executable_here']
|
39
|
+
s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{lib,spec,tasks}/**/*")
|
40
|
+
s.require_path = "lib"
|
41
|
+
s.bindir = "bin"
|
42
|
+
end
|
43
|
+
|
44
|
+
Rake::GemPackageTask.new(spec) do |p|
|
45
|
+
p.gem_spec = spec
|
46
|
+
p.need_tar = true
|
47
|
+
p.need_zip = true
|
48
|
+
end
|
49
|
+
|
50
|
+
Rake::RDocTask.new do |rdoc|
|
51
|
+
files =['README.markdown', 'LICENSE', 'lib/**/*.rb']
|
52
|
+
rdoc.rdoc_files.add(files)
|
53
|
+
rdoc.main = "README.markdown" # page to start on
|
54
|
+
rdoc.title = "ARLoader Docs"
|
55
|
+
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
56
|
+
rdoc.options << '--line-numbers'
|
57
|
+
end
|
58
|
+
|
59
|
+
Rake::TestTask.new do |t|
|
60
|
+
t.test_files = FileList['test/**/*.rb']
|
61
|
+
end
|
62
|
+
|
63
|
+
# Add in our own Tasks
|
64
|
+
|
65
|
+
# Long parameter lists so ensure rake -T produces nice wide output
|
66
|
+
ENV['RAKE_COLUMNS'] = '180'
|
67
|
+
|
68
|
+
desc 'Build gem and install in one step'
|
69
|
+
task :pik_install, :needs => [:gem] do |t, args|
|
70
|
+
|
71
|
+
puts "Installing version #{ArLoader.gem_version}"
|
72
|
+
|
73
|
+
gem = "#{ArLoader.gem_name}-#{ArLoader.gem_version}.gem"
|
74
|
+
cmd = "pik gem install --no-ri --no-rdoc pkg\\#{gem}"
|
75
|
+
system(cmd)
|
76
|
+
end
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|