tdiary 4.0.1.20130929 → 4.0.1.20131102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Gemfile +0 -9
- data/Gemfile.lock +16 -22
- data/misc/convert2.rb +2 -2
- data/misc/plugin/disp_referrer.rb +1 -1
- data/plugin/05referer.rb +1 -1
- data/plugin/90migrate.rb +1 -1
- data/spec/acceptance/save_conf_referer_spec.rb +3 -3
- data/spec/acceptance_helper.rb +2 -34
- data/tdiary/{io/cache → cache}/file.rb +1 -1
- data/tdiary/configuration.rb +2 -2
- data/tdiary/io/base.rb +49 -47
- data/tdiary/io/default.rb +214 -212
- data/tdiary/io/pstore.rb +43 -41
- data/tdiary/tasks/release.rake +1 -1
- data/tdiary/tasks/rspec.rake +0 -6
- data/tdiary/version.rb +1 -1
- data/test/disp_referrer_test.rb +1 -1
- metadata +14 -19
- data/spec/fixtures/tdiary.conf.rdb +0 -227
- data/tdiary/io/cache/memcached.rb +0 -88
- data/tdiary/io/cache/redis.rb +0 -100
- data/tdiary/io/rdb.rb +0 -213
data/tdiary/io/default.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8; -*-
|
2
2
|
#
|
3
|
-
# defaultio.rb: tDiary IO class for tDiary 2.x
|
3
|
+
# defaultio.rb: tDiary IO class for tDiary 2.x - 4.x format.
|
4
4
|
#
|
5
5
|
# Copyright (C) 2001-2005, TADA Tadashi <t@tdtds.jp>
|
6
6
|
# You can redistribute it and/or modify it under GPL2.
|
@@ -13,278 +13,280 @@ module TDiary
|
|
13
13
|
TDIARY_MAGIC_MINOR = '01.00'
|
14
14
|
TDIARY_MAGIC = "#{TDIARY_MAGIC_MAJOR}.#{TDIARY_MAGIC_MINOR}"
|
15
15
|
|
16
|
-
module
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
module IO
|
17
|
+
module Comment
|
18
|
+
def comment_file( data_path, date )
|
19
|
+
date.strftime( "#{data_path}%Y/%Y%m.tdc" )
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
def restore_comment( file, diaries )
|
23
|
+
minor = ''
|
24
|
+
begin
|
25
|
+
File::open( file ) do |fh|
|
26
|
+
fh.flock( File::LOCK_SH )
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
major, minor = fh.gets.chomp.split( /\./, 2 )
|
29
|
+
unless TDIARY_MAGIC_MAJOR == major then
|
30
|
+
raise StandardError, 'bad file format.'
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
s = fh.read
|
34
|
+
s = migrate_to_01( s ) if minor == '00.00' and !@tdiary.conf['stop_migrate_01']
|
35
|
+
s.split( /\r?\n\.\r?\n/ ).each do |l|
|
36
|
+
headers, body = Default.parse_tdiary( l )
|
37
|
+
next unless body
|
38
|
+
comment = Comment::new(
|
38
39
|
headers['Name'],
|
39
40
|
headers['Mail'],
|
40
41
|
body,
|
41
42
|
Time::at( headers['Last-Modified'].to_i ) )
|
42
|
-
|
43
|
-
|
43
|
+
comment.show = false if headers['Visible'] == 'false'
|
44
|
+
diaries[headers['Date']].add_comment( comment ) if headers['Date']
|
45
|
+
end
|
44
46
|
end
|
47
|
+
rescue Errno::ENOENT
|
45
48
|
end
|
46
|
-
|
49
|
+
return minor == '00.00' ? TDiaryBase::DIRTY_COMMENT : TDiaryBase::DIRTY_NONE
|
47
50
|
end
|
48
|
-
return minor == '00.00' ? TDiaryBase::DIRTY_COMMENT : TDiaryBase::DIRTY_NONE
|
49
|
-
end
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
52
|
+
def store_comment( file, diaries )
|
53
|
+
File::open( file, File::WRONLY | File::CREAT ) do |fhc|
|
54
|
+
fhc.flock( File::LOCK_EX )
|
55
|
+
fhc.rewind
|
56
|
+
fhc.truncate( 0 )
|
57
|
+
fhc.puts( TDIARY_MAGIC )
|
58
|
+
diaries.each do |date,diary|
|
59
|
+
diary.each_comment( diary.count_comments( true ) ) do |com|
|
60
|
+
fhc.puts( "Date: #{date}" )
|
61
|
+
fhc.puts( "Name: #{com.name}" )
|
62
|
+
fhc.puts( "Mail: #{com.mail}" )
|
63
|
+
fhc.puts( "Last-Modified: #{com.date.to_i}" )
|
64
|
+
fhc.puts( "Visible: #{com.visible? ? 'true' : 'false'}" )
|
65
|
+
fhc.puts
|
66
|
+
fhc.puts( com.body.gsub( /\r/, '' ).sub( /\n+\Z/, '' ).gsub( /\n\./, "\n.." ) )
|
67
|
+
fhc.puts( '.' )
|
68
|
+
end
|
67
69
|
end
|
68
70
|
end
|
69
71
|
end
|
70
72
|
end
|
71
|
-
end
|
72
73
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
module Referer
|
75
|
+
def referer_file( data_path, date )
|
76
|
+
date.strftime( "#{data_path}%Y/%Y%m.tdr" )
|
77
|
+
end
|
77
78
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
79
|
+
def restore_referer( file, diaries )
|
80
|
+
begin
|
81
|
+
File::open( file ) do |fh|
|
82
|
+
fh.flock( File::LOCK_SH )
|
83
|
+
fh.read.split( /\r?\n\.\r?\n/ ).each do |l|
|
84
|
+
headers, body = Default.parse_tdiary( l )
|
85
|
+
next unless body
|
86
|
+
body.each do |r|
|
87
|
+
count, ref = r.chomp.split( / /, 2 )
|
88
|
+
next unless ref
|
89
|
+
diaries[headers['Date']].add_referer( ref.chomp, count.to_i )
|
90
|
+
end
|
89
91
|
end
|
90
|
-
end
|
91
92
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
93
|
+
# convert to referer plugin format
|
94
|
+
diaries.each do |date,diary|
|
95
|
+
fname = file.sub( /\.tdr$/, "#{date[6,2]}.tdr".untaint )
|
96
|
+
File::open( fname, File::WRONLY | File::CREAT ) do |fhr|
|
97
|
+
fhr.flock( File::LOCK_EX )
|
98
|
+
fhr.rewind
|
99
|
+
fhr.truncate( 0 )
|
100
|
+
fhr.puts( TDiary::TDIARY_MAGIC )
|
101
|
+
fhr.puts( "Date: #{date}" )
|
102
|
+
fhr.puts
|
103
|
+
diary.each_referer( diary.count_referers ) do |count,ref|
|
104
|
+
fhr.puts( "#{count} #{ref}" )
|
105
|
+
end
|
106
|
+
fhr.puts( '.' )
|
104
107
|
end
|
105
|
-
fhr.puts( '.' )
|
106
108
|
end
|
107
109
|
end
|
110
|
+
File::rename( file, file.sub( /\.tdr$/, '.tdr~' ) )
|
111
|
+
rescue Errno::ENOENT
|
108
112
|
end
|
109
|
-
|
110
|
-
rescue Errno::ENOENT
|
113
|
+
return TDiaryBase::DIRTY_NONE
|
111
114
|
end
|
112
|
-
return TDiaryBase::DIRTY_NONE
|
113
|
-
end
|
114
115
|
|
115
|
-
|
116
|
-
|
116
|
+
def store_referer( file, diaries )
|
117
|
+
return
|
118
|
+
end
|
117
119
|
end
|
118
|
-
end
|
119
120
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
class Default < Base
|
122
|
+
include Comment
|
123
|
+
include Referer
|
124
|
+
include Cache
|
124
125
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
126
|
+
class << self
|
127
|
+
def parse_tdiary( data )
|
128
|
+
header, body = data.split( /\r?\n\r?\n/, 2 )
|
129
|
+
headers = {}
|
130
|
+
if header then
|
131
|
+
header.lines.each do |l|
|
132
|
+
l.chomp!
|
133
|
+
key, val = l.scan( /([^:]*):\s*(.*)/ )[0]
|
134
|
+
headers[key] = val ? val.chomp : nil
|
135
|
+
end
|
134
136
|
end
|
137
|
+
if body then
|
138
|
+
body.gsub!( /^\./, '' )
|
139
|
+
else
|
140
|
+
body = ''
|
141
|
+
end
|
142
|
+
[headers, body]
|
135
143
|
end
|
136
|
-
if body then
|
137
|
-
body.gsub!( /^\./, '' )
|
138
|
-
else
|
139
|
-
body = ''
|
140
|
-
end
|
141
|
-
[headers, body]
|
142
|
-
end
|
143
144
|
|
144
|
-
|
145
|
-
|
146
|
-
|
145
|
+
def load_cgi_conf(conf)
|
146
|
+
conf.class.class_eval { attr_accessor :data_path }
|
147
|
+
raise TDiaryError, 'No @data_path variable.' unless conf.data_path
|
147
148
|
|
148
|
-
|
149
|
-
|
149
|
+
conf.data_path += '/' if /\/$/ !~ conf.data_path
|
150
|
+
raise TDiaryError, 'Do not set @data_path as same as tDiary system directory.' if conf.data_path == "#{TDiary::PATH}/"
|
150
151
|
|
151
|
-
|
152
|
-
|
153
|
-
|
152
|
+
File::open( "#{conf.data_path.untaint}tdiary.conf" ){|f| f.read }
|
153
|
+
rescue IOError, Errno::ENOENT
|
154
|
+
end
|
154
155
|
|
155
|
-
|
156
|
-
|
157
|
-
|
156
|
+
def save_cgi_conf(conf, result)
|
157
|
+
File::open( "#{conf.data_path.untaint}tdiary.conf", 'w' ) {|o| o.print result }
|
158
|
+
rescue IOError, Errno::ENOENT
|
159
|
+
end
|
158
160
|
end
|
159
|
-
end
|
160
161
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
begin
|
171
|
-
FileUtils.mkdir_p(dir)
|
162
|
+
#
|
163
|
+
# block must be return boolean which dirty diaries.
|
164
|
+
#
|
165
|
+
def transaction( date )
|
166
|
+
diaries = {}
|
167
|
+
dir = date.strftime( "#{@data_path}%Y" )
|
168
|
+
@dfile = date.strftime( "#{@data_path}%Y/%Y%m.td2" )
|
169
|
+
cfile = comment_file( @data_path, date )
|
170
|
+
rfile = referer_file( @data_path, date )
|
172
171
|
begin
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
172
|
+
FileUtils.mkdir_p(dir)
|
173
|
+
begin
|
174
|
+
fh = File::open( @dfile, 'r+' )
|
175
|
+
rescue
|
176
|
+
fh = File::open( @dfile, 'w+' )
|
177
|
+
end
|
178
|
+
fh.flock( File::LOCK_EX )
|
178
179
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
180
|
+
cache = restore_parser_cache( date, 'default' )
|
181
|
+
force_save = TDiaryBase::DIRTY_NONE
|
182
|
+
unless cache then
|
183
|
+
force_save |= restore( fh, diaries )
|
184
|
+
force_save |= restore_comment( cfile, diaries )
|
185
|
+
force_save |= restore_referer( rfile, diaries )
|
186
|
+
else
|
187
|
+
diaries.update( cache )
|
188
|
+
end
|
189
|
+
dirty = yield( diaries ) if iterator?
|
190
|
+
store( fh, diaries ) if ((dirty | force_save) & TDiaryBase::DIRTY_DIARY) != 0
|
191
|
+
store_comment( cfile, diaries ) if ((dirty | force_save) & TDiaryBase::DIRTY_COMMENT) != 0
|
192
|
+
store_referer( rfile, diaries ) if ((dirty | force_save) & TDiaryBase::DIRTY_REFERER) != 0
|
193
|
+
if dirty != TDiaryBase::DIRTY_NONE or not cache then
|
194
|
+
store_parser_cache(date, diaries, 'default')
|
195
|
+
end
|
195
196
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
197
|
+
if diaries.empty?
|
198
|
+
begin
|
199
|
+
if fh then
|
200
|
+
fh.close
|
201
|
+
fh = nil
|
202
|
+
end
|
203
|
+
File::delete( @dfile )
|
204
|
+
rescue Errno::ENOENT
|
205
|
+
end
|
206
|
+
begin
|
207
|
+
store_parser_cache(date, nil, nil)
|
208
|
+
rescue Errno::ENOENT
|
201
209
|
end
|
202
|
-
File::delete( @dfile )
|
203
|
-
rescue Errno::ENOENT
|
204
210
|
end
|
211
|
+
# delete dispensable data directory
|
205
212
|
begin
|
206
|
-
|
213
|
+
Dir.delete( dir ) if Dir.new( dir ).entries.reject {|f| "." == f or ".." == f}.empty?
|
207
214
|
rescue Errno::ENOENT
|
208
215
|
end
|
216
|
+
ensure
|
217
|
+
fh.close if fh
|
209
218
|
end
|
210
|
-
# delete dispensable data directory
|
211
|
-
begin
|
212
|
-
Dir.delete( dir ) if Dir.new( dir ).entries.reject {|f| "." == f or ".." == f}.empty?
|
213
|
-
rescue Errno::ENOENT
|
214
|
-
end
|
215
|
-
ensure
|
216
|
-
fh.close if fh
|
217
219
|
end
|
218
|
-
end
|
219
220
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
221
|
+
def calendar
|
222
|
+
calendar = {}
|
223
|
+
Dir["#{@data_path}????"].sort.each do |dir|
|
224
|
+
next unless %r[/\d{4}$] =~ dir
|
225
|
+
Dir["#{dir.untaint}/??????.td2"].sort.each do |file|
|
226
|
+
year, month = file.scan( %r[/(\d{4})(\d\d)\.td2$] )[0]
|
227
|
+
next unless year
|
228
|
+
calendar[year] = [] unless calendar[year]
|
229
|
+
calendar[year] << month
|
230
|
+
end
|
229
231
|
end
|
232
|
+
calendar
|
230
233
|
end
|
231
|
-
calendar
|
232
|
-
end
|
233
234
|
|
234
|
-
|
235
|
-
|
236
|
-
|
235
|
+
def cache_dir
|
236
|
+
@tdiary.conf.cache_path || "#{@data_path}/cache"
|
237
|
+
end
|
237
238
|
|
238
|
-
|
239
|
+
private
|
239
240
|
|
240
|
-
|
241
|
-
begin
|
242
|
-
fh.seek( 0 )
|
241
|
+
def restore( fh, diaries )
|
243
242
|
begin
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
243
|
+
fh.seek( 0 )
|
244
|
+
begin
|
245
|
+
major, minor = fh.gets.chomp.split( /\./, 2 )
|
246
|
+
unless TDIARY_MAGIC_MAJOR == major then
|
247
|
+
raise StandardError, 'bad file format.'
|
248
|
+
end
|
248
249
|
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
250
|
+
# read and parse diary
|
251
|
+
style_name = ''
|
252
|
+
s = fh.read
|
253
|
+
s = migrate_to_01( s ) if minor == '00.00' and !@tdiary.conf['stop_migrate_01']
|
254
|
+
s.split( /\r?\n\.\r?\n/ ).each do |l|
|
255
|
+
headers, body = Default.parse_tdiary( l )
|
256
|
+
style_name = headers['Format'] || 'tDiary'
|
257
|
+
diary = style( style_name )::new( headers['Date'], headers['Title'], body, Time::at( headers['Last-Modified'].to_i ) )
|
258
|
+
diary.show( headers['Visible'] == 'true' ? true : false )
|
259
|
+
diaries[headers['Date']] = diary
|
260
|
+
end
|
261
|
+
rescue NameError
|
262
|
+
# no magic number when it is new file.
|
259
263
|
end
|
260
|
-
rescue NameError
|
261
|
-
# no magic number when it is new file.
|
262
264
|
end
|
265
|
+
return minor == '00.00' ? TDiaryBase::DIRTY_DIARY : TDiaryBase::DIRTY_NONE
|
263
266
|
end
|
264
|
-
return minor == '00.00' ? TDiaryBase::DIRTY_DIARY : TDiaryBase::DIRTY_NONE
|
265
|
-
end
|
266
267
|
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
268
|
+
def store( fh, diaries )
|
269
|
+
begin
|
270
|
+
fh.seek( 0 )
|
271
|
+
fh.puts( TDIARY_MAGIC )
|
272
|
+
diaries.sort_by {|date, diary| date}.each do |date,diary|
|
273
|
+
# save diaries
|
274
|
+
fh.puts( "Date: #{date}" )
|
275
|
+
fh.puts( "Title: #{diary.title}" )
|
276
|
+
fh.puts( "Last-Modified: #{diary.last_modified.to_i}" )
|
277
|
+
fh.puts( "Visible: #{diary.visible? ? 'true' : 'false'}" )
|
278
|
+
fh.puts( "Format: #{diary.style}" )
|
279
|
+
fh.puts
|
280
|
+
fh.puts( diary.to_src.gsub( /\r/, '' ).gsub( /\n\./, "\n.." ) )
|
281
|
+
fh.puts( '.' )
|
282
|
+
end
|
283
|
+
fh.truncate( fh.tell )
|
281
284
|
end
|
282
|
-
fh.truncate( fh.tell )
|
283
285
|
end
|
284
|
-
end
|
285
286
|
|
286
|
-
|
287
|
-
|
287
|
+
def migrate_to_01( day )
|
288
|
+
@tdiary.conf.migrate_to_utf8( day )
|
289
|
+
end
|
288
290
|
end
|
289
291
|
end
|
290
292
|
end
|
data/tdiary/io/pstore.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8; -*-
|
2
2
|
#
|
3
|
-
# pstoreio.rb: tDiary IO class of tdiary 1.x format.
|
3
|
+
# pstoreio.rb: tDiary IO class of tdiary 1.x format.
|
4
4
|
#
|
5
5
|
# Copyright (C) 2001-2005, TADA Tadashi <t@tdtds.jp>
|
6
6
|
# You can redistribute it and/or modify it under GPL2.
|
@@ -8,53 +8,55 @@
|
|
8
8
|
require 'pstore'
|
9
9
|
|
10
10
|
module TDiary
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
module IO
|
12
|
+
class PStore
|
13
|
+
def initialize( tdiary )
|
14
|
+
@data_path = tdiary.conf.data_path
|
15
|
+
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
17
|
+
#
|
18
|
+
# block must be return boolean which dirty diaries.
|
19
|
+
#
|
20
|
+
def transaction( date )
|
21
|
+
diaries = {}
|
22
|
+
filename = date.strftime( "#{@data_path}%Y%m" )
|
23
|
+
begin
|
24
|
+
PStore::new( filename ).transaction do |db|
|
25
|
+
dirty = false
|
26
|
+
if db.root?( 'diary' ) then
|
27
|
+
diaries.update( db['diary'] )
|
28
|
+
end
|
29
|
+
dirty = yield( diaries ) if iterator?
|
30
|
+
if dirty != TDiary::TDiaryBase::DIRTY_NONE then
|
31
|
+
db['diary'] = diaries
|
32
|
+
else
|
33
|
+
db.abort
|
34
|
+
end
|
33
35
|
end
|
36
|
+
rescue PStore::Error, NameError, Errno::EACCES
|
37
|
+
raise PermissionError::new( "make your @data_path to writable via httpd. #$!" )
|
34
38
|
end
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
rescue Errno::ENOENT
|
39
|
+
begin
|
40
|
+
File::delete( filename ) if diaries.empty?
|
41
|
+
rescue Errno::ENOENT
|
42
|
+
end
|
43
|
+
return diaries
|
41
44
|
end
|
42
|
-
return diaries
|
43
|
-
end
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def calendar
|
47
|
+
calendar = {}
|
48
|
+
Dir["#{@data_path}??????"].sort.each do |file|
|
49
|
+
year, month = file.scan( %r[/(\d{4})(\d\d)$] )[0]
|
50
|
+
next unless year
|
51
|
+
calendar[year] = [] unless calendar[year]
|
52
|
+
calendar[year] << month
|
53
|
+
end
|
54
|
+
calendar
|
52
55
|
end
|
53
|
-
calendar
|
54
|
-
end
|
55
56
|
|
56
|
-
|
57
|
-
|
57
|
+
def diary_factory( date, title, body, style = nil )
|
58
|
+
Diary::new( date, title, body )
|
59
|
+
end
|
58
60
|
end
|
59
61
|
end
|
60
62
|
end
|
data/tdiary/tasks/release.rake
CHANGED
@@ -34,7 +34,7 @@ def make_tarball( repo, version = nil )
|
|
34
34
|
sh "chmod +x index.rb index.fcgi update.rb update.fcgi"
|
35
35
|
sh 'rake doc'
|
36
36
|
Bundler.with_clean_env do
|
37
|
-
sh "bundle --path .bundle --without coffee:
|
37
|
+
sh "bundle --path .bundle --without coffee:server:development:test"
|
38
38
|
end
|
39
39
|
Dir.chdir '.bundle/ruby' do
|
40
40
|
v = `ls`.chomp
|
data/tdiary/tasks/rspec.rake
CHANGED
@@ -26,12 +26,6 @@ if defined? RSpec
|
|
26
26
|
ENV['TEST_MODE'] = 'secure'
|
27
27
|
Rake::Task["spec:acceptance"].invoke
|
28
28
|
end
|
29
|
-
|
30
|
-
desc 'Run the code examples in spec/acceptance with RdbIO mode'
|
31
|
-
task :rdb do
|
32
|
-
ENV['TEST_MODE'] = 'rdb'
|
33
|
-
Rake::Task["spec:acceptance"].invoke
|
34
|
-
end
|
35
29
|
end
|
36
30
|
|
37
31
|
desc 'Displayed code coverage with SimpleCov'
|
data/tdiary/version.rb
CHANGED