iudex-da 1.2.b.3-java → 1.2.b.4-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ === 1.2.b.4 (2012-8-1)
2
+ * Add ReadFilter (and FactoryHelper.create_read_filter) to get current
3
+ database state of orders that are synthesized or handled in session,
4
+ instead of being polled.
5
+ * Allow migration profile extensions to include absolute/external
6
+ directory paths.
7
+
1
8
  === 1.2.b.3 (2012-7-22)
2
9
  * Move retry loop from UpdateFilter to ContentUpdater, supporting the
3
10
  same retry logic via the importer as well. Importing on a live
data/Manifest.txt CHANGED
@@ -33,4 +33,4 @@ test/setup.rb
33
33
  test/test_migrate.rb
34
34
  test/test_poll_work.rb
35
35
  test/test_pool_factory.rb
36
- lib/iudex-da/iudex-da-1.2.b.3.jar
36
+ lib/iudex-da/iudex-da-1.2.b.4.jar
data/lib/iudex-da.rb CHANGED
@@ -34,6 +34,7 @@ module Iudex
34
34
 
35
35
  module Filters
36
36
  import 'iudex.da.filters.UpdateFilter'
37
+ import 'iudex.da.filters.ReadFilter'
37
38
  end
38
39
 
39
40
  end
data/lib/iudex-da/ar.rb CHANGED
@@ -34,12 +34,26 @@ module Iudex::DA
34
34
 
35
35
  def migrate( target_version = nil )
36
36
  base = File.join( LIB_DIR, '..', '..', 'db' )
37
+ paths = [ base ]
37
38
 
38
39
  profiles = Hooker.apply( [ :iudex, :migration_profiles ], [] )
39
40
 
40
- ext = profiles.compact.map { |p| "/#{p}" }.join(',')
41
- base += "{#{ext},}" unless ext.empty?
42
- ActiveRecord::Migrator.migrate( base, target_version )
41
+ paths += profiles.compact.map do |p|
42
+ p = p.to_s
43
+ if p =~ %r{^/}
44
+ p
45
+ else
46
+ File.join( base, p )
47
+ end
48
+ end
49
+
50
+ pattern = if paths.size > 1
51
+ '{' + paths.join( ',' ) + '}'
52
+ else
53
+ paths.first
54
+ end
55
+
56
+ ActiveRecord::Migrator.migrate( pattern, target_version )
43
57
  end
44
58
 
45
59
  module_function :migrate
data/lib/iudex-da/base.rb CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  module Iudex
18
18
  module DA
19
- VERSION = '1.2.b.3'
19
+ VERSION = '1.2.b.4'
20
20
 
21
21
  LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
22
22
  end
@@ -33,19 +33,27 @@ module Iudex
33
33
 
34
34
  # Create UpdateFilter given fields and filter list factory
35
35
  # methods
36
- def create_update_filter( fields = [],
36
+ def create_update_filter( fields,
37
37
  post_sym = nil,
38
38
  update_sym = nil,
39
39
  new_sym = nil )
40
- fields = ( keys( :uhash ) + fields ).uniq
41
40
 
42
- f = UpdateFilter.new( data_source, ContentMapper.new( fields ) )
41
+ f = UpdateFilter.new( data_source, field_mapper( fields ) )
43
42
  create_chain( update_sym ) { |c| f.update_ref_filter = c }
44
43
  create_chain( new_sym ) { |c| f.new_ref_filter = c }
45
44
  create_chain( post_sym ) { |c| f.content_filter = c }
46
45
  f
47
46
  end
48
47
 
48
+ def create_read_filter( fields = [] )
49
+ f = ReadFilter.new( data_source, field_mapper( fields ) )
50
+ end
51
+
52
+ def field_mapper( fields )
53
+ fields = keys( ( [ :uhash ] + fields ).flatten.compact )
54
+ ContentMapper.new( fields )
55
+ end
56
+
49
57
  end
50
58
 
51
59
  end
data/pom.xml CHANGED
@@ -5,7 +5,7 @@
5
5
  <groupId>iudex</groupId>
6
6
  <artifactId>iudex-da</artifactId>
7
7
  <packaging>jar</packaging>
8
- <version>1.2.b.3</version>
8
+ <version>1.2.b.4</version>
9
9
  <name>Iudex Data Access</name>
10
10
 
11
11
  <parent>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: iudex-da
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 4
5
- version: 1.2.b.3
5
+ version: 1.2.b.4
6
6
  platform: java
7
7
  authors:
8
8
  - David Kellum
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-07-23 00:00:00 Z
13
+ date: 2012-08-01 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: iudex-core
@@ -160,7 +160,7 @@ files:
160
160
  - test/test_migrate.rb
161
161
  - test/test_poll_work.rb
162
162
  - test/test_pool_factory.rb
163
- - lib/iudex-da/iudex-da-1.2.b.3.jar
163
+ - lib/iudex-da/iudex-da-1.2.b.4.jar
164
164
  homepage: http://github.com/dekellum/iudex
165
165
  licenses: []
166
166
 
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  requirements: []
189
189
 
190
190
  rubyforge_project:
191
- rubygems_version: 1.8.24
191
+ rubygems_version: 1.8.15
192
192
  signing_key:
193
193
  specification_version: 3
194
194
  summary: Iudex is a general purpose web crawler and feed processor in ruby/java.