Active 0.0.42 → 0.1.7
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.
- data/.gitignore +6 -0
- data/.irbrc +21 -0
- data/.rspec +1 -0
- data/.rvmrc +2 -0
- data/Active.gemspec +28 -29
- data/Gemfile +4 -0
- data/History.txt +5 -2
- data/{README.txt → README.md} +4 -20
- data/Rakefile +11 -17
- data/lib/Active.rb +11 -79
- data/lib/active/activity.rb +7 -0
- data/lib/active/article.rb +7 -0
- data/lib/active/asset.rb +205 -0
- data/lib/active/errors.rb +9 -0
- data/lib/active/query.rb +225 -0
- data/lib/active/result.rb +7 -0
- data/lib/active/results.rb +6 -0
- data/lib/active/training.rb +7 -0
- data/lib/active/version.rb +3 -0
- data/lib/ext/hash_extensions.rb +8 -0
- data/spec/asset_spec.rb +47 -0
- data/spec/search_spec.rb +383 -432
- data/spec/spec_helper.rb +23 -2
- metadata +113 -116
- data/bin/Active +0 -7
- data/lib/.DS_Store +0 -0
- data/lib/services/.DS_Store +0 -0
- data/lib/services/IActivity.rb +0 -39
- data/lib/services/_ats.rb +0 -215
- data/lib/services/active_works.rb +0 -167
- data/lib/services/activity.rb +0 -512
- data/lib/services/address.rb +0 -17
- data/lib/services/ats.rb +0 -229
- data/lib/services/dto/user.rb +0 -9
- data/lib/services/gsa.rb +0 -205
- data/lib/services/reg_center.rb +0 -270
- data/lib/services/sanitize.rb +0 -108
- data/lib/services/search.rb +0 -494
- data/lib/services/validators.rb +0 -124
- data/rspec-tm +0 -1
- data/rvmrc +0 -1
- data/spec/.DS_Store +0 -0
- data/spec/Active_spec.rb +0 -28
- data/spec/activeworks_spec.rb +0 -60
- data/spec/activity_spec.rb +0 -421
- data/spec/ats_spec.rb +0 -106
- data/spec/benchmark/search_bench.rb +0 -55
- data/spec/custom_matchers_spec.rb +0 -27
- data/spec/gsa_spec.rb +0 -210
- data/spec/reg_spec.rb +0 -173
- data/spec/search_memcached_spec.rb +0 -42
- data/spec/validators_spec.rb +0 -19
- data/test/test_Active.rb +0 -0
- 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
|
-
|
data/spec/validators_spec.rb
DELETED
@@ -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
|
data/test/test_Active.rb
DELETED
File without changes
|
data/version.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.42
|