roo 1.2.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.txt → README.markdown} +11 -5
- data/lib/roo/excel.rb +141 -92
- data/lib/roo/excelx.rb +132 -127
- data/lib/roo/google.rb +84 -90
- data/lib/roo/openoffice.rb +136 -139
- data/lib/roo/roo_rails_helper.rb +1 -0
- data/lib/roo/version.rb +2 -2
- data/test/Bibelbund.xlsx +0 -0
- data/test/boolean.ods +0 -0
- data/test/boolean.xls +0 -0
- data/test/boolean.xlsx +0 -0
- data/test/datetime_floatconv.xls +0 -0
- data/test/false_encoding.xls +0 -0
- data/test/html-escape.ods +0 -0
- data/test/no_spreadsheet_file.txt +1 -1
- data/test/paragraph.ods +0 -0
- data/test/paragraph.xls +0 -0
- data/test/paragraph.xlsx +0 -0
- data/test/style.ods +0 -0
- data/test/style.xls +0 -0
- data/test/style.xlsx +0 -0
- data/test/test_roo.rb +440 -281
- metadata +69 -72
- data/License.txt +0 -20
- data/Manifest.txt +0 -68
- data/Rakefile +0 -171
- data/base64include.rb +0 -149
- data/examples/roo_soap_client.rb +0 -53
- data/examples/roo_soap_server.rb +0 -29
- data/examples/write_me.rb +0 -33
- data/scripts/txt2html +0 -67
- data/setup.rb +0 -1585
- data/website/index.html +0 -385
- data/website/index.txt +0 -423
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -130
- data/website/template.rhtml +0 -48
metadata
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Hugh McGowan
|
7
8
|
- Thomas Preymesser
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date: 2009-
|
13
|
+
date: 2009-05-29 00:00:00 -05:00
|
13
14
|
default_executable:
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
+
name: spreadsheet
|
17
18
|
type: :runtime
|
18
19
|
version_requirement:
|
19
20
|
version_requirements: !ruby/object:Gem::Requirement
|
20
21
|
requirements:
|
21
22
|
- - ">="
|
22
23
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
24
|
+
version: 0.6.3.1
|
24
25
|
version:
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: rubyzip
|
@@ -40,7 +41,7 @@ dependencies:
|
|
40
41
|
requirements:
|
41
42
|
- - ">="
|
42
43
|
- !ruby/object:Gem::Version
|
43
|
-
version: "0.
|
44
|
+
version: "0.6"
|
44
45
|
version:
|
45
46
|
- !ruby/object:Gem::Dependency
|
46
47
|
name: GData
|
@@ -50,106 +51,103 @@ dependencies:
|
|
50
51
|
requirements:
|
51
52
|
- - ">="
|
52
53
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0.
|
54
|
+
version: 0.0.4
|
54
55
|
version:
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
type: :
|
57
|
+
name: libxml-ruby
|
58
|
+
type: :runtime
|
58
59
|
version_requirement:
|
59
60
|
version_requirements: !ruby/object:Gem::Requirement
|
60
61
|
requirements:
|
61
62
|
- - ">="
|
62
63
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
64
|
+
version: 1.1.3
|
64
65
|
version:
|
65
66
|
description: roo can access the contents of OpenOffice-, Excel- or Google-Spreadsheets
|
66
|
-
email:
|
67
|
+
email: hugh_mcgowan@yahoo.com
|
67
68
|
executables: []
|
68
69
|
|
69
70
|
extensions: []
|
70
71
|
|
71
72
|
extra_rdoc_files:
|
73
|
+
- README.markdown
|
72
74
|
- History.txt
|
73
|
-
- License.txt
|
74
|
-
- Manifest.txt
|
75
|
-
- README.txt
|
76
|
-
- test/no_spreadsheet_file.txt
|
77
|
-
- website/index.txt
|
78
75
|
files:
|
79
|
-
- History.txt
|
80
|
-
- License.txt
|
81
|
-
- Manifest.txt
|
82
|
-
- README.txt
|
83
|
-
- Rakefile
|
84
|
-
- base64include.rb
|
85
|
-
- examples/roo_soap_server.rb
|
86
|
-
- examples/roo_soap_client.rb
|
87
|
-
- examples/write_me.rb
|
88
|
-
- lib/roo.rb
|
89
|
-
- lib/roo/version.rb
|
90
|
-
- lib/roo/generic_spreadsheet.rb
|
91
|
-
- lib/roo/openoffice.rb
|
92
76
|
- lib/roo/excel.rb
|
93
77
|
- lib/roo/excelx.rb
|
78
|
+
- lib/roo/generic_spreadsheet.rb
|
94
79
|
- lib/roo/google.rb
|
80
|
+
- lib/roo/openoffice.rb
|
95
81
|
- lib/roo/roo_rails_helper.rb
|
96
|
-
-
|
97
|
-
-
|
98
|
-
- test/
|
99
|
-
- test/
|
82
|
+
- lib/roo/version.rb
|
83
|
+
- lib/roo.rb
|
84
|
+
- test/bbu.ods
|
85
|
+
- test/bbu.xls
|
86
|
+
- test/bbu.xlsx
|
87
|
+
- test/Bibelbund.csv
|
100
88
|
- test/Bibelbund.ods
|
101
89
|
- test/Bibelbund.xls
|
102
90
|
- test/Bibelbund.xlsx
|
103
|
-
- test/
|
104
|
-
- test/
|
105
|
-
- test/
|
106
|
-
- test/
|
91
|
+
- test/Bibelbund1.ods
|
92
|
+
- test/bode-v1.ods.zip
|
93
|
+
- test/bode-v1.xls.zip
|
94
|
+
- test/boolean.ods
|
95
|
+
- test/boolean.xls
|
96
|
+
- test/boolean.xlsx
|
97
|
+
- test/borders.ods
|
98
|
+
- test/borders.xls
|
99
|
+
- test/borders.xlsx
|
100
|
+
- test/bug-row-column-fixnum-float.xls
|
101
|
+
- test/datetime.ods
|
102
|
+
- test/datetime.xls
|
103
|
+
- test/datetime.xlsx
|
104
|
+
- test/datetime_floatconv.xls
|
105
|
+
- test/emptysheets.ods
|
106
|
+
- test/emptysheets.xls
|
107
|
+
- test/false_encoding.xls
|
108
|
+
- test/formula.ods
|
109
|
+
- test/formula.xls
|
110
|
+
- test/formula.xlsx
|
111
|
+
- test/html-escape.ods
|
107
112
|
- test/no_spreadsheet_file.txt
|
113
|
+
- test/numbers1.csv
|
114
|
+
- test/numbers1.ods
|
115
|
+
- test/numbers1.xls
|
116
|
+
- test/numbers1.xlsx
|
117
|
+
- test/numbers1_excel.csv
|
118
|
+
- test/only_one_sheet.ods
|
119
|
+
- test/only_one_sheet.xls
|
120
|
+
- test/only_one_sheet.xlsx
|
121
|
+
- test/paragraph.ods
|
122
|
+
- test/paragraph.xls
|
123
|
+
- test/paragraph.xlsx
|
124
|
+
- test/ric.ods
|
108
125
|
- test/simple_spreadsheet.ods
|
109
126
|
- test/simple_spreadsheet.xls
|
110
127
|
- test/simple_spreadsheet.xlsx
|
111
128
|
- test/simple_spreadsheet_from_italo.ods
|
112
129
|
- test/simple_spreadsheet_from_italo.xls
|
130
|
+
- test/style.ods
|
131
|
+
- test/style.xls
|
132
|
+
- test/style.xlsx
|
113
133
|
- test/test_helper.rb
|
114
134
|
- test/test_roo.rb
|
135
|
+
- test/time-test.csv
|
115
136
|
- test/time-test.ods
|
116
137
|
- test/time-test.xls
|
117
138
|
- test/time-test.xlsx
|
118
|
-
-
|
119
|
-
-
|
120
|
-
- test/numbers1_excel.csv
|
121
|
-
- test/numbers1.ods
|
122
|
-
- test/numbers1.xls
|
123
|
-
- test/numbers1.xlsx
|
124
|
-
- test/borders.ods
|
125
|
-
- test/borders.xls
|
126
|
-
- test/borders.xlsx
|
127
|
-
- test/formula.ods
|
128
|
-
- test/formula.xls
|
129
|
-
- test/formula.xlsx
|
130
|
-
- test/only_one_sheet.ods
|
131
|
-
- test/only_one_sheet.xls
|
132
|
-
- test/only_one_sheet.xlsx
|
133
|
-
- test/bode-v1.xls.zip
|
134
|
-
- test/bode-v1.ods.zip
|
135
|
-
- test/ric.ods
|
136
|
-
- test/bug-row-column-fixnum-float.xls
|
137
|
-
- test/emptysheets.ods
|
138
|
-
- test/emptysheets.xls
|
139
|
-
- test/datetime.ods
|
140
|
-
- test/datetime.xls
|
141
|
-
- test/datetime.xlsx
|
142
|
-
- website/index.html
|
143
|
-
- website/index.txt
|
144
|
-
- website/javascripts/rounded_corners_lite.inc.js
|
145
|
-
- website/stylesheets/screen.css
|
146
|
-
- website/template.rhtml
|
139
|
+
- README.markdown
|
140
|
+
- History.txt
|
147
141
|
has_rdoc: true
|
148
142
|
homepage: http://roo.rubyforge.org
|
143
|
+
licenses: []
|
144
|
+
|
149
145
|
post_install_message:
|
150
146
|
rdoc_options:
|
151
147
|
- --main
|
152
|
-
- README.
|
148
|
+
- README.markdown
|
149
|
+
- --inline-source
|
150
|
+
- --charset=UTF-8
|
153
151
|
require_paths:
|
154
152
|
- lib
|
155
153
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -167,10 +165,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
165
|
requirements: []
|
168
166
|
|
169
167
|
rubyforge_project: roo
|
170
|
-
rubygems_version: 1.3.
|
168
|
+
rubygems_version: 1.3.3
|
171
169
|
signing_key:
|
172
|
-
specification_version:
|
173
|
-
summary: roo
|
174
|
-
test_files:
|
175
|
-
|
176
|
-
- test/test_roo.rb
|
170
|
+
specification_version: 3
|
171
|
+
summary: roo
|
172
|
+
test_files: []
|
173
|
+
|
data/License.txt
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2007 Thomas Preymesser
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
License.txt
|
3
|
-
Manifest.txt
|
4
|
-
README.txt
|
5
|
-
Rakefile
|
6
|
-
base64include.rb
|
7
|
-
examples/roo_soap_server.rb
|
8
|
-
examples/roo_soap_client.rb
|
9
|
-
examples/write_me.rb
|
10
|
-
lib/roo.rb
|
11
|
-
lib/roo/version.rb
|
12
|
-
lib/roo/generic_spreadsheet.rb
|
13
|
-
lib/roo/openoffice.rb
|
14
|
-
lib/roo/excel.rb
|
15
|
-
lib/roo/excelx.rb
|
16
|
-
lib/roo/google.rb
|
17
|
-
lib/roo/roo_rails_helper.rb
|
18
|
-
scripts/txt2html
|
19
|
-
setup.rb
|
20
|
-
test/false_encoding.xls
|
21
|
-
test/Bibelbund1.ods
|
22
|
-
test/Bibelbund.ods
|
23
|
-
test/Bibelbund.xls
|
24
|
-
test/Bibelbund.xlsx
|
25
|
-
test/Bibelbund.csv
|
26
|
-
test/bbu.xls
|
27
|
-
test/bbu.xlsx
|
28
|
-
test/bbu.ods
|
29
|
-
test/no_spreadsheet_file.txt
|
30
|
-
test/simple_spreadsheet.ods
|
31
|
-
test/simple_spreadsheet.xls
|
32
|
-
test/simple_spreadsheet.xlsx
|
33
|
-
test/simple_spreadsheet_from_italo.ods
|
34
|
-
test/simple_spreadsheet_from_italo.xls
|
35
|
-
test/test_helper.rb
|
36
|
-
test/test_roo.rb
|
37
|
-
test/time-test.ods
|
38
|
-
test/time-test.xls
|
39
|
-
test/time-test.xlsx
|
40
|
-
test/time-test.csv
|
41
|
-
test/numbers1.csv
|
42
|
-
test/numbers1_excel.csv
|
43
|
-
test/numbers1.ods
|
44
|
-
test/numbers1.xls
|
45
|
-
test/numbers1.xlsx
|
46
|
-
test/borders.ods
|
47
|
-
test/borders.xls
|
48
|
-
test/borders.xlsx
|
49
|
-
test/formula.ods
|
50
|
-
test/formula.xls
|
51
|
-
test/formula.xlsx
|
52
|
-
test/only_one_sheet.ods
|
53
|
-
test/only_one_sheet.xls
|
54
|
-
test/only_one_sheet.xlsx
|
55
|
-
test/bode-v1.xls.zip
|
56
|
-
test/bode-v1.ods.zip
|
57
|
-
test/ric.ods
|
58
|
-
test/bug-row-column-fixnum-float.xls
|
59
|
-
test/emptysheets.ods
|
60
|
-
test/emptysheets.xls
|
61
|
-
test/datetime.ods
|
62
|
-
test/datetime.xls
|
63
|
-
test/datetime.xlsx
|
64
|
-
website/index.html
|
65
|
-
website/index.txt
|
66
|
-
website/javascripts/rounded_corners_lite.inc.js
|
67
|
-
website/stylesheets/screen.css
|
68
|
-
website/template.rhtml
|
data/Rakefile
DELETED
@@ -1,171 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/clean'
|
4
|
-
require 'rake/testtask'
|
5
|
-
require 'rake/packagetask'
|
6
|
-
require 'rake/gempackagetask'
|
7
|
-
require 'rake/rdoctask'
|
8
|
-
require 'rake/contrib/rubyforgepublisher'
|
9
|
-
require 'fileutils'
|
10
|
-
require 'hoe'
|
11
|
-
|
12
|
-
include FileUtils
|
13
|
-
require File.join(File.dirname(__FILE__), 'lib', 'roo', 'version')
|
14
|
-
|
15
|
-
AUTHOR = 'Thomas Preymesser' # can also be an array of Authors
|
16
|
-
EMAIL = "thopre@gmail.com"
|
17
|
-
DESCRIPTION = "roo can access the contents of OpenOffice-, Excel- or Google-Spreadsheets"
|
18
|
-
GEM_NAME = 'roo' # what ppl will type to install your gem
|
19
|
-
|
20
|
-
@config_file = "~/.rubyforge/user-config.yml"
|
21
|
-
@config = nil
|
22
|
-
def rubyforge_username
|
23
|
-
unless @config
|
24
|
-
begin
|
25
|
-
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
26
|
-
rescue
|
27
|
-
puts <<-EOS
|
28
|
-
ERROR: No rubyforge config file found: #{@config_file}"
|
29
|
-
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
30
|
-
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
31
|
-
EOS
|
32
|
-
exit
|
33
|
-
end
|
34
|
-
end
|
35
|
-
@rubyforge_username ||= @config["username"]
|
36
|
-
end
|
37
|
-
|
38
|
-
RUBYFORGE_PROJECT = 'roo' # The unix name for your project
|
39
|
-
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
40
|
-
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
41
|
-
|
42
|
-
NAME = "roo"
|
43
|
-
REV = nil
|
44
|
-
# UNCOMMENT IF REQUIRED:
|
45
|
-
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
|
46
|
-
VERS = Roo::VERSION::STRING + (REV ? ".#{REV}" : "")
|
47
|
-
CLEAN.include ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store']
|
48
|
-
RDOC_OPTS = ['--quiet', '--title', 'roo documentation',
|
49
|
-
"--opname", "index.html",
|
50
|
-
"--line-numbers",
|
51
|
-
"--main", "README",
|
52
|
-
"--inline-source"]
|
53
|
-
|
54
|
-
class Hoe
|
55
|
-
def extra_deps
|
56
|
-
@extra_deps.reject { |x| Array(x).first == 'hoe' }
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# Generate all the Rake tasks
|
61
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
62
|
-
hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
63
|
-
p.author = AUTHOR
|
64
|
-
p.description = DESCRIPTION
|
65
|
-
p.email = EMAIL
|
66
|
-
p.summary = DESCRIPTION
|
67
|
-
p.url = HOMEPATH
|
68
|
-
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
69
|
-
p.test_globs = ["test/**/test_*.rb"]
|
70
|
-
p.clean_globs = CLEAN #An array of file patterns to delete on clean.
|
71
|
-
|
72
|
-
# == Optional
|
73
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
74
|
-
#p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
|
75
|
-
p.extra_deps = [
|
76
|
-
# ['ruport', '>= 1.0.0'],
|
77
|
-
# ['ruport-util', '>= 0.5.0'],
|
78
|
-
['parseexcel', '>= 0.5.2'],
|
79
|
-
['rubyzip', '>= 0.9.1'],
|
80
|
-
['hpricot', '>= 0.5'],
|
81
|
-
['hoe', '>= 0.0.0'],
|
82
|
-
['GData', '>= 0.0.3'],
|
83
|
-
]
|
84
|
-
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
85
|
-
end
|
86
|
-
|
87
|
-
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")
|
88
|
-
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
89
|
-
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
90
|
-
|
91
|
-
desc 'Generate website files'
|
92
|
-
task :website_generate do
|
93
|
-
Dir['website/**/*.txt'].each do |txt|
|
94
|
-
sh %{ ruby scripts/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
desc 'Upload website files to rubyforge'
|
99
|
-
task :website_upload do
|
100
|
-
host = "#{rubyforge_username}@rubyforge.org"
|
101
|
-
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
102
|
-
local_dir = 'website'
|
103
|
-
sh %{rsync -av #{local_dir}/ #{host}:#{remote_dir}}
|
104
|
-
end
|
105
|
-
|
106
|
-
desc 'Generate and upload website files'
|
107
|
-
task :website => [:website_generate, :website_upload]
|
108
|
-
|
109
|
-
#-- prey: BEGIN
|
110
|
-
require 'fileutils'
|
111
|
-
include FileUtils::Verbose
|
112
|
-
desc 'Test the local installation'
|
113
|
-
task :test_local_installation do
|
114
|
-
# gehe nach $GEM_PATH und starte dort rake test
|
115
|
-
# cd(ENV['GEM_PATH']+"roo-1.1.0") do
|
116
|
-
cd("/usr/lib/ruby/gems/1.8/gems/roo-1.1.0") do
|
117
|
-
sh %{sudo rake test}
|
118
|
-
end
|
119
|
-
puts 'local installation test done'
|
120
|
-
end
|
121
|
-
#-- prey: END
|
122
|
-
|
123
|
-
desc 'Release the website and new gem version'
|
124
|
-
task :deploy => [:check_log_params, :check_version, :test_local_installation, :website, :release ] do
|
125
|
-
puts "Remember to create SVN tag:"
|
126
|
-
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
127
|
-
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
128
|
-
puts "Suggested comment:"
|
129
|
-
puts "Tagging release #{CHANGES}"
|
130
|
-
end
|
131
|
-
|
132
|
-
desc 'Check to ensure the LOG_* constant in Test are set off'
|
133
|
-
task :check_log_params do
|
134
|
-
require 'test/test_roo'
|
135
|
-
if DISPLAY_LOG
|
136
|
-
raise 'please turn off the DISPLAY_LOG constant for deployment!'
|
137
|
-
end
|
138
|
-
if DB_LOG
|
139
|
-
raise 'please turn off the DB_LOG constant for deployment!'
|
140
|
-
end
|
141
|
-
end
|
142
|
-
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
143
|
-
task :local_deploy => [:website_generate, :install_gem]
|
144
|
-
|
145
|
-
task :check_version do
|
146
|
-
unless ENV['VERSION']
|
147
|
-
puts 'Must pass a VERSION=x.y.z release version'
|
148
|
-
exit
|
149
|
-
end
|
150
|
-
unless ENV['VERSION'] == VERS
|
151
|
-
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
152
|
-
exit
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
task 'stats' do
|
157
|
-
require '/home/tp/ruby-test/scriptlines'
|
158
|
-
files = FileList['lib/**/*.rb']
|
159
|
-
puts ScriptLines.headline
|
160
|
-
sum = ScriptLines.new("TOTAL (#{files.size} file(s))")
|
161
|
-
files.each do |fn|
|
162
|
-
File.open(fn) do |file|
|
163
|
-
script_lines = ScriptLines.new(fn)
|
164
|
-
script_lines.read(file)
|
165
|
-
sum += script_lines
|
166
|
-
puts script_lines
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
puts sum
|
171
|
-
end
|