Active 0.0.42 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.gitignore +6 -0
  2. data/.irbrc +21 -0
  3. data/.rspec +1 -0
  4. data/.rvmrc +2 -0
  5. data/Active.gemspec +28 -29
  6. data/Gemfile +4 -0
  7. data/History.txt +5 -2
  8. data/{README.txt → README.md} +4 -20
  9. data/Rakefile +11 -17
  10. data/lib/Active.rb +11 -79
  11. data/lib/active/activity.rb +7 -0
  12. data/lib/active/article.rb +7 -0
  13. data/lib/active/asset.rb +205 -0
  14. data/lib/active/errors.rb +9 -0
  15. data/lib/active/query.rb +225 -0
  16. data/lib/active/result.rb +7 -0
  17. data/lib/active/results.rb +6 -0
  18. data/lib/active/training.rb +7 -0
  19. data/lib/active/version.rb +3 -0
  20. data/lib/ext/hash_extensions.rb +8 -0
  21. data/spec/asset_spec.rb +47 -0
  22. data/spec/search_spec.rb +383 -432
  23. data/spec/spec_helper.rb +23 -2
  24. metadata +113 -116
  25. data/bin/Active +0 -7
  26. data/lib/.DS_Store +0 -0
  27. data/lib/services/.DS_Store +0 -0
  28. data/lib/services/IActivity.rb +0 -39
  29. data/lib/services/_ats.rb +0 -215
  30. data/lib/services/active_works.rb +0 -167
  31. data/lib/services/activity.rb +0 -512
  32. data/lib/services/address.rb +0 -17
  33. data/lib/services/ats.rb +0 -229
  34. data/lib/services/dto/user.rb +0 -9
  35. data/lib/services/gsa.rb +0 -205
  36. data/lib/services/reg_center.rb +0 -270
  37. data/lib/services/sanitize.rb +0 -108
  38. data/lib/services/search.rb +0 -494
  39. data/lib/services/validators.rb +0 -124
  40. data/rspec-tm +0 -1
  41. data/rvmrc +0 -1
  42. data/spec/.DS_Store +0 -0
  43. data/spec/Active_spec.rb +0 -28
  44. data/spec/activeworks_spec.rb +0 -60
  45. data/spec/activity_spec.rb +0 -421
  46. data/spec/ats_spec.rb +0 -106
  47. data/spec/benchmark/search_bench.rb +0 -55
  48. data/spec/custom_matchers_spec.rb +0 -27
  49. data/spec/gsa_spec.rb +0 -210
  50. data/spec/reg_spec.rb +0 -173
  51. data/spec/search_memcached_spec.rb +0 -42
  52. data/spec/validators_spec.rb +0 -19
  53. data/test/test_Active.rb +0 -0
  54. data/version.txt +0 -1
@@ -1,42 +0,0 @@
1
- require 'dalli'
2
- require 'fake_web'
3
- # Require the spec helper relative to this file
4
- require File.join(File.dirname(__FILE__), %w[spec_helper])
5
- require File.join(File.dirname(__FILE__), %w[custom_matchers_spec])
6
- require File.join(File.dirname(__FILE__), %w[ .. lib services search])
7
- require File.join(File.dirname(__FILE__), %w[ .. lib services activity])
8
- include Active::Services
9
-
10
-
11
- describe Search do
12
- after(:each) do
13
- begin
14
- Active.CACHE.flush() if Active.CACHE
15
- rescue Exception => e
16
- end
17
- Active.memcache_host(nil)
18
- end
19
- it "should search by city" do
20
- Active.memcache_host("localhost:11211")
21
- s = Search.search({:city=>"Oceanside"})
22
- s.city.should eql("Oceanside")
23
- s.results.should_not be_nil
24
- s.results.should have_at_least(1).items
25
- Active.CACHE.get('ce16c9ef2b618d0d5a88d46933109e4d').results.length.should eql(10)
26
- s = Search.search({:city=>"Oceanside"})
27
- s.city.should eql("Oceanside")
28
- s.results.should_not be_nil
29
- s.results.should have_at_least(1).items
30
- end
31
- it "should be fail safe" do
32
- Active.memcache_host("fake:11211")
33
- s = Search.search({:city=>"Oceanside"})
34
- s.city.should eql("Oceanside")
35
- s.results.should have_at_least(1).items
36
- end
37
- end
38
-
39
-
40
-
41
-
42
-
@@ -1,19 +0,0 @@
1
- # Require the spec helper relative to this file
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
3
- require File.join(File.dirname(__FILE__), %w[custom_matchers_spec])
4
- require File.join(File.dirname(__FILE__), %w[ .. lib services search])
5
- require File.join(File.dirname(__FILE__), %w[ .. lib services activity])
6
- include Active
7
- include Active::Services
8
-
9
-
10
- describe Validators do
11
-
12
- it "should find a valid email address" do
13
- Validators.email("Jeremy.Sheppard@co.kent.de.u").should be_true
14
- Validators.email("diney.bom-fim_23db@google.com").should be_true
15
- Validators.email("jspooner@gmail.com").should be_true
16
- Validators.email("jspooner@ga").should be_false
17
- end
18
-
19
- end
File without changes
@@ -1 +0,0 @@
1
- 0.0.42