rhosync 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ ## 2.1.1
2
+ * #7679395 - added support for gzipped bulk data files
3
+ * #8167507 - fixed typo in console login page
4
+ * #7025387 - customizable redis.conf for windows
5
+
1
6
  ## 2.1.0
2
7
  * #4302316 - don't allow set blank admin password
3
8
  * #5672322 - stats for user count
@@ -37,7 +37,7 @@ class RhosyncConsole::Server
37
37
  end
38
38
 
39
39
  get '/loginpage' do
40
- erb :login, :layout => :false
40
+ erb :login, :layout => false
41
41
  end
42
42
 
43
43
  get '/homepage' do
@@ -1,5 +1,6 @@
1
1
  require 'sqlite3'
2
2
  require 'zip/zip'
3
+ require 'zlib'
3
4
 
4
5
  module Rhosync
5
6
  module BulkDataJob
@@ -153,7 +154,10 @@ module Rhosync
153
154
  end
154
155
  populate_sources_table(db,sources_refs)
155
156
  db.execute_batch(File.open(index,'r').read)
157
+ db.execute_batch( "VACUUM;");
158
+ db.close
156
159
  compress("#{bulk_data.dbfile}.rzip",bulk_data.dbfile)
160
+ gzip_compress("#{bulk_data.dbfile}.gzip",bulk_data.dbfile)
157
161
  end
158
162
 
159
163
  def self.create_hsql_data_file(bulk_data,ts)
@@ -166,6 +170,7 @@ module Rhosync
166
170
  'com.rhomobile.hsqldata.HsqlData',
167
171
  dbfile, hsql_file
168
172
  )
173
+ gzip_compress("#{hsql_file}.data.gzip","#{hsql_file}.data")
169
174
  end
170
175
 
171
176
  def self.get_file_args(bulk_data_name,ts)
@@ -180,5 +185,16 @@ module Rhosync
180
185
  zipfile.add(URI.escape(File.basename(file)),file)
181
186
  end
182
187
  end
188
+
189
+ def self.gzip_compress(archive,file)
190
+ data = File.new(file, "rb")
191
+ File.open(archive, 'wb') do |f|
192
+ gz = Zlib::GzipWriter.new(f)
193
+ gz.write data.read
194
+ gz.close
195
+ end
196
+ data.close
197
+ end
198
+
183
199
  end
184
200
  end
@@ -1,3 +1,3 @@
1
1
  module Rhosync
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -12,7 +12,7 @@ describe "BulkDataJob" do
12
12
  delete_data_directory
13
13
  end
14
14
 
15
- it "should create sqlite data file from master document" do
15
+ it "should create bulk data files from master document" do
16
16
  set_state('test_db_storage' => @data)
17
17
  docname = bulk_data_docname(@a.id,@u.id)
18
18
  expected = { @s_fields[:name] => @data,
@@ -29,7 +29,9 @@ describe "BulkDataJob" do
29
29
  verify_result(@s.docname(:md) => @data,@s.docname(:md_copy) => @data)
30
30
  validate_db(data,expected).should == true
31
31
  File.exists?(data.dbfile+'.rzip').should == true
32
+ File.exists?(data.dbfile+'.gzip').should == true
32
33
  File.exists?(data.dbfile+'.hsqldb.data').should == true
34
+ File.exists?(data.dbfile+'.hsqldb.data.gzip').should == true
33
35
  File.exists?(data.dbfile+'.hsqldb.script').should == true
34
36
  File.exists?(data.dbfile+'.hsqldb.properties').should == true
35
37
  path = File.join(File.dirname(data.dbfile),'tmp')
@@ -56,7 +56,7 @@ class RedisRunner
56
56
  def self.start
57
57
  if windows?
58
58
  puts "Starting redis in a new window..."
59
- sh "start #{File.join(redis_home,'redis-server')}" rescue
59
+ sh "start #{File.join(redis_home,'redis-server')} #{File.join(redis_home,'redis.conf')}" rescue
60
60
  "redis-server not installed on your path, please run 'rake redis:install' first."
61
61
  else
62
62
  puts 'Detach with Ctrl+\ Re-attach with rake redis:attach'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhosync
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
4
+ hash: 9
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 0
10
- version: 2.1.0
9
+ - 1
10
+ version: 2.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rhomobile
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-14 00:00:00 -08:00
18
+ date: 2011-01-04 00:00:00 -08:00
19
19
  default_executable: rhosync
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -311,7 +311,6 @@ files:
311
311
  - bench/benchapp/settings/settings.yml
312
312
  - bench/benchapp/sources/mock_adapter.rb
313
313
  - bench/benchapp/sources/queue_mock_adapter.rb
314
- - bench/benchapp/tmp/restart.txt
315
314
  - bench/lib/bench.rb
316
315
  - bench/lib/bench/cli.rb
317
316
  - bench/lib/bench/logging.rb
@@ -574,7 +573,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
574
573
  requirements: []
575
574
 
576
575
  rubyforge_project:
577
- rubygems_version: 1.3.7
576
+ rubygems_version: 1.4.1
578
577
  signing_key:
579
578
  specification_version: 3
580
579
  summary: RhoSync Synchronization Framework
File without changes