lucid_works 0.7.18 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/.rvmrc +2 -3
  2. data/Gemfile +2 -8
  3. data/Gemfile.lock +45 -53
  4. data/README.rdoc +2 -6
  5. data/Rakefile +1 -1
  6. data/config/locales/en.yml +221 -239
  7. data/lib/lucid_works/activity.rb +8 -5
  8. data/lib/lucid_works/base.rb +27 -16
  9. data/lib/lucid_works/cache.rb +13 -0
  10. data/lib/lucid_works/cluster.rb +84 -0
  11. data/lib/lucid_works/collection/settings.rb +15 -6
  12. data/lib/lucid_works/collection.rb +62 -92
  13. data/lib/lucid_works/datasource/history.rb +2 -1
  14. data/lib/lucid_works/datasource/mapping.rb +12 -0
  15. data/lib/lucid_works/datasource/schedule.rb +5 -2
  16. data/lib/lucid_works/datasource/status.rb +3 -2
  17. data/lib/lucid_works/datasource.rb +31 -48
  18. data/lib/lucid_works/datasource_property.rb +2 -1
  19. data/lib/lucid_works/datasource_type.rb +14 -0
  20. data/lib/lucid_works/dynamicfield.rb +12 -0
  21. data/lib/lucid_works/elevation.rb +93 -0
  22. data/lib/lucid_works/exceptions.rb +0 -4
  23. data/lib/lucid_works/field.rb +31 -111
  24. data/lib/lucid_works/field_commons.rb +133 -0
  25. data/lib/lucid_works/gem_version.rb +1 -1
  26. data/lib/lucid_works/inflections.rb +3 -0
  27. data/lib/lucid_works/patch_time.rb +4 -0
  28. data/lib/lucid_works/request_handler.rb +16 -0
  29. data/lib/lucid_works/role.rb +23 -8
  30. data/lib/lucid_works/schema/attribute.rb +1 -1
  31. data/lib/lucid_works/schema/boolean_attribute.rb +1 -1
  32. data/lib/lucid_works/schema/integer_attribute.rb +3 -4
  33. data/lib/lucid_works/server/crawlers_status.rb +15 -0
  34. data/lib/lucid_works/server.rb +35 -14
  35. data/lib/lucid_works/simple_naming.rb +1 -7
  36. data/lib/lucid_works/synonym.rb +1 -1
  37. data/lib/lucid_works/version.rb +1 -0
  38. data/lib/lucid_works.rb +8 -1
  39. data/lucid_works.gemspec +8 -9
  40. data/spec/fixtures/zookeeper/clusterstate.json +30 -0
  41. data/spec/fixtures/zookeeper/clusterstate_broken_shard.json +29 -0
  42. data/spec/fixtures/zookeeper/live_nodes.json +28 -0
  43. data/spec/fixtures/zookeeper/live_nodes_no_children.json +26 -0
  44. data/spec/fixtures/zookeeper/live_nodes_one_child.json +36 -0
  45. data/spec/lib/lucid_works/base_spec.rb +33 -24
  46. data/spec/lib/lucid_works/cache_spec.rb +44 -0
  47. data/spec/lib/lucid_works/cluster_spec.rb +109 -0
  48. data/spec/lib/lucid_works/collection/activity_spec.rb +29 -0
  49. data/spec/lib/lucid_works/collection/prime_activities_spec.rb +1 -1
  50. data/spec/lib/lucid_works/collection/settings_spec.rb +31 -0
  51. data/spec/lib/lucid_works/collection_spec.rb +166 -107
  52. data/spec/lib/lucid_works/datasource/schedule_spec.rb +75 -46
  53. data/spec/lib/lucid_works/datasource/status_spec.rb +5 -5
  54. data/spec/lib/lucid_works/datasource_property_spec.rb +41 -0
  55. data/spec/lib/lucid_works/datasource_spec.rb +40 -12
  56. data/spec/lib/lucid_works/datasource_type_spec.rb +31 -0
  57. data/spec/lib/lucid_works/dynamicfield_spec.rb +214 -0
  58. data/spec/lib/lucid_works/elevation_spec.rb +175 -0
  59. data/spec/lib/lucid_works/field_spec.rb +52 -21
  60. data/spec/lib/lucid_works/fieldtype_spec.rb +0 -1
  61. data/spec/lib/lucid_works/request_handler_spec.rb +11 -0
  62. data/spec/lib/lucid_works/role_spec.rb +77 -0
  63. data/spec/lib/lucid_works/server/crawlers_status_spec.rb +21 -0
  64. data/spec/lib/lucid_works/server_spec.rb +123 -22
  65. data/spec/lib/lucid_works/{collection/synonym_spec.rb → synonym_spec.rb} +23 -22
  66. data/spec/lib/lucid_works/version_spec.rb +6 -0
  67. metadata +132 -64
  68. data/spec/lib/lucid_works/collection/acl_config_spec.rb +0 -212
data/.rvmrc CHANGED
@@ -1,4 +1,3 @@
1
- rvm use 1.9.2-p180@lucidworks --create
2
-
3
- # Enable the following to run the tests under MRI 1.8
1
+ # rvm use 1.9.2-p180@lucidworks --create
4
2
  # rvm use ruby-1.8.7-p352@lucidworks --create
3
+ rvm use jruby-1.7.3@lucidworks --create
data/Gemfile CHANGED
@@ -1,18 +1,12 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in lucid_works.gemspec
4
3
  gemspec
5
4
 
6
5
  group :development do
7
- platforms :ruby_18 do
8
- gem 'ruby-debug'
9
- end
10
- platforms :ruby_19 do
11
- gem 'ruby-debug19', :require => 'ruby-debug'
12
- end
6
+ gem 'ruby-debug', :platforms => [:mri_18, :jruby]
7
+ gem 'ruby-debug19', :platforms => :mri_19
13
8
  gem 'rspec'
14
9
  gem 'autotest'
15
10
  gem "autotest-fsevent"
16
11
  gem 'timecop'
17
- gem 'tzinfo'
18
12
  end
data/Gemfile.lock CHANGED
@@ -1,76 +1,69 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lucid_works (0.7.14)
5
- activemodel (>= 3)
6
- activesupport (>= 3)
4
+ lucid_works (0.9.3)
5
+ activemodel (>= 4)
6
+ activesupport (>= 4)
7
7
  json
8
8
  nokogiri
9
- rest-client (>= 1.6.1)
10
- rsolr
11
- rsolr-ext
9
+ rest-client (= 1.6.7)
10
+ rsolr (= 1.0.9)
12
11
 
13
12
  GEM
14
13
  remote: http://rubygems.org/
15
14
  specs:
16
- ZenTest (4.5.0)
17
- activemodel (3.0.10)
18
- activesupport (= 3.0.10)
19
- builder (~> 2.1.2)
20
- i18n (~> 0.5.0)
21
- activesupport (3.0.10)
22
- archive-tar-minitar (0.5.2)
15
+ ZenTest (4.8.1)
16
+ activemodel (4.0.0)
17
+ activesupport (= 4.0.0)
18
+ builder (~> 3.1.0)
19
+ activesupport (4.0.0)
20
+ i18n (~> 0.6, >= 0.6.4)
21
+ minitest (~> 4.2)
22
+ multi_json (~> 1.3)
23
+ thread_safe (~> 0.1)
24
+ tzinfo (~> 0.3.37)
25
+ atomic (1.1.10-java)
23
26
  autotest (4.4.6)
24
27
  ZenTest (>= 4.4.1)
25
- autotest-fsevent (0.2.5)
28
+ autotest-fsevent (0.2.8)
26
29
  sys-uname
27
- builder (2.1.2)
28
- columnize (0.3.4)
29
- diff-lcs (1.1.2)
30
- i18n (0.5.0)
31
- json (1.5.3)
32
- linecache (0.46)
33
- rbx-require-relative (> 0.0.4)
34
- linecache19 (0.5.12)
35
- ruby_core_source (>= 0.1.4)
36
- mime-types (1.16)
37
- nokogiri (1.5.0)
38
- rbx-require-relative (0.0.5)
30
+ builder (3.1.4)
31
+ columnize (0.3.6)
32
+ diff-lcs (1.1.3)
33
+ ffi (1.1.0-java)
34
+ i18n (0.6.4)
35
+ json (1.8.0-java)
36
+ mime-types (1.23)
37
+ mini_portile (0.5.1)
38
+ minitest (4.7.5)
39
+ multi_json (1.7.7)
40
+ nokogiri (1.6.0-java)
41
+ mini_portile (~> 0.5.0)
39
42
  rest-client (1.6.7)
40
43
  mime-types (>= 1.16)
41
- rsolr (1.0.2)
44
+ rsolr (1.0.9)
42
45
  builder (>= 2.1.2)
43
- rsolr-ext (1.0.3)
44
- rsolr (>= 1.0.2)
45
- rspec (2.5.0)
46
- rspec-core (~> 2.5.0)
47
- rspec-expectations (~> 2.5.0)
48
- rspec-mocks (~> 2.5.0)
49
- rspec-core (2.5.1)
50
- rspec-expectations (2.5.0)
51
- diff-lcs (~> 1.1.2)
52
- rspec-mocks (2.5.0)
46
+ rspec (2.11.0)
47
+ rspec-core (~> 2.11.0)
48
+ rspec-expectations (~> 2.11.0)
49
+ rspec-mocks (~> 2.11.0)
50
+ rspec-core (2.11.1)
51
+ rspec-expectations (2.11.1)
52
+ diff-lcs (~> 1.1.3)
53
+ rspec-mocks (2.11.1)
53
54
  ruby-debug (0.10.4)
54
55
  columnize (>= 0.1)
55
56
  ruby-debug-base (~> 0.10.4.0)
56
- ruby-debug-base (0.10.4)
57
- linecache (>= 0.3)
58
- ruby-debug-base19 (0.11.25)
59
- columnize (>= 0.3.1)
60
- linecache19 (>= 0.5.11)
61
- ruby_core_source (>= 0.1.4)
62
- ruby-debug19 (0.11.6)
63
- columnize (>= 0.3.1)
64
- linecache19 (>= 0.5.11)
65
- ruby-debug-base19 (>= 0.11.19)
66
- ruby_core_source (0.1.5)
67
- archive-tar-minitar (>= 0.5.2)
68
- sys-uname (0.8.5)
57
+ ruby-debug-base (0.10.4-java)
58
+ sys-uname (0.9.0)
59
+ ffi (>= 1.0.0)
60
+ thread_safe (0.1.2-java)
61
+ atomic
69
62
  timecop (0.3.5)
70
- tzinfo (0.3.27)
63
+ tzinfo (0.3.37)
71
64
 
72
65
  PLATFORMS
73
- ruby
66
+ java
74
67
 
75
68
  DEPENDENCIES
76
69
  autotest
@@ -80,4 +73,3 @@ DEPENDENCIES
80
73
  ruby-debug
81
74
  ruby-debug19
82
75
  timecop
83
- tzinfo
data/README.rdoc CHANGED
@@ -144,7 +144,7 @@ Collection has_many :datasources. Datasources are modeled using the LucidWorks:
144
144
  collection.datasource(123) -> a single LucidWorks::Datasource
145
145
 
146
146
  datasource = collection.create_datasource(
147
- :crawler => LucidWorks::Datasource::CRAWLERS['web'],
147
+ :crawler => 'lucid.aperture',
148
148
  :type => 'web',
149
149
  :name => "example.com",
150
150
  :url => "http://example.com/",
@@ -279,13 +279,9 @@ However eventually this strategy hit a brick wall that would have been extremely
279
279
 
280
280
  Given the design of ActiveResource these would have been expensive to implement and it became simpler to just write a simple ORM by marrying ActiveModel and RestClient.
281
281
 
282
- == Maintainers
283
-
284
- * Sam Pierson (http://github.com/sampierson)
285
-
286
282
  == License
287
283
 
288
- Copyright 2011 Lucid Imagination
284
+ Copyright 2012 Lucid Imagination
289
285
  http://lucidimagination.com
290
286
 
291
287
  Licensed under the Apache License, Version 2.0 (the "License");
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'bundler'
2
- require 'rake/rdoctask'
2
+ require 'rdoc/task'
3
3
 
4
4
  Bundler::GemHelper.install_tasks
5
5