recommendify 0.2.3 → 0.3.0

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/Rakefile CHANGED
@@ -14,8 +14,5 @@ task YARD::Rake::YardocTask.new
14
14
 
15
15
  desc "Compile the native client"
16
16
  task :build_native do
17
- out_dir = ::File.expand_path("../bin", __FILE__)
18
- src_dir = ::File.expand_path("../src", __FILE__)
19
- %x{mkdir -p #{out_dir}}
20
- %x{gcc -Wall #{src_dir}/recommendify.c -lhiredis -o #{out_dir}/recommendify}
17
+ exec "cd ext && ruby extconf.rb && make"
21
18
  end
File without changes
File without changes
data/ext/extconf.rb ADDED
@@ -0,0 +1,18 @@
1
+ makefile = <<-MAKEFILE
2
+ all: prepare build
3
+
4
+ build:
5
+ gcc -Wall recommendify.c -lhiredis -o ../bin/recommendify
6
+
7
+ prepare:
8
+ mkdir -p ../bin
9
+
10
+ clean:
11
+ rm -f *.o
12
+
13
+ install: prepare
14
+ MAKEFILE
15
+
16
+ File.open(::File.expand_path("../Makefile", __FILE__), "w+") do |f|
17
+ f.write(makefile)
18
+ end
File without changes
File without changes
File without changes
File without changes
data/{src → ext}/sort.c RENAMED
File without changes
File without changes
data/recommendify.gemspec CHANGED
@@ -3,22 +3,23 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "recommendify"
6
- s.version = "0.2.3"
6
+ s.version = "0.3.0"
7
7
  s.date = Date.today.to_s
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Paul Asmuth"]
10
10
  s.email = ["paul@paulasmuth.com"]
11
11
  s.homepage = "http://github.com/paulasmuth/recommendify"
12
- s.summary = %q{Distributed item-based "Collaborative Filtering" with ruby and redis}
13
- s.description = %q{Distributed item-based "Collaborative Filtering" with ruby and redis}
12
+ s.summary = %q{ruby/redis based recommendation engine (collaborative filtering)}
13
+ s.description = %q{Recommendify is a distributed, incremental item-based recommendation engine for binary input ratings. It's based on ruby and redis and uses an approach called "Collaborative Filtering"}
14
14
  s.licenses = ["MIT"]
15
15
 
16
+ s.extensions = ['ext/extconf.rb']
17
+
16
18
  s.add_dependency "redis", ">= 2.2.2"
17
19
 
18
20
  s.add_development_dependency "rspec", "~> 2.8.0"
19
21
 
20
22
  s.files = `git ls-files`.split("\n") - [".gitignore", ".rspec", ".travis.yml"]
21
23
  s.test_files = `git ls-files -- spec/*`.split("\n")
22
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
24
  s.require_paths = ["lib"]
24
25
  end
data/spec/base_spec.rb CHANGED
@@ -4,8 +4,8 @@ describe Recommendify::Base do
4
4
 
5
5
  before(:each) do
6
6
  flush_redis!
7
- Recommendify::Base.class_variable_set(:@@max_neighbors, nil)
8
- Recommendify::Base.class_variable_set(:@@input_matrices, {})
7
+ Recommendify::Base.send(:class_variable_set, :@@max_neighbors, nil)
8
+ Recommendify::Base.send(:class_variable_set, :@@input_matrices, {})
9
9
  end
10
10
 
11
11
  describe "configuration" do
@@ -24,7 +24,7 @@ describe Recommendify::Base do
24
24
 
25
25
  it "should add an input_matrix by 'key'" do
26
26
  Recommendify::Base.input_matrix(:myinput, :similarity_func => :jaccard)
27
- Recommendify::Base.class_variable_get(:@@input_matrices).keys.should == [:myinput]
27
+ Recommendify::Base.send(:class_variable_get, :@@input_matrices).keys.should == [:myinput]
28
28
  end
29
29
 
30
30
  it "should retrieve an input_matrix on a new instance" do
metadata CHANGED
@@ -1,56 +1,63 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: recommendify
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
4
5
  prerelease:
5
- version: 0.2.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Paul Asmuth
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-02-25 00:00:00 +01:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: redis
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &71701010 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
24
21
  version: 2.2.2
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *71701010
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &71700770 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
29
+ requirements:
33
30
  - - ~>
34
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
35
32
  version: 2.8.0
36
33
  type: :development
37
- version_requirements: *id002
38
- description: Distributed item-based "Collaborative Filtering" with ruby and redis
39
- email:
34
+ prerelease: false
35
+ version_requirements: *71700770
36
+ description: Recommendify is a distributed, incremental item-based recommendation
37
+ engine for binary input ratings. It's based on ruby and redis and uses an approach
38
+ called "Collaborative Filtering"
39
+ email:
40
40
  - paul@paulasmuth.com
41
41
  executables: []
42
-
43
- extensions: []
44
-
42
+ extensions:
43
+ - ext/extconf.rb
45
44
  extra_rdoc_files: []
46
-
47
- files:
45
+ files:
48
46
  - Gemfile
49
47
  - README.md
50
48
  - Rakefile
51
49
  - doc/example.png
52
50
  - doc/example.rb
53
51
  - doc/example_data.csv
52
+ - ext/cc_item.h
53
+ - ext/cosine.c
54
+ - ext/extconf.rb
55
+ - ext/iikey.c
56
+ - ext/jaccard.c
57
+ - ext/output.c
58
+ - ext/recommendify.c
59
+ - ext/sort.c
60
+ - ext/version.h
54
61
  - lib/recommendify.rb
55
62
  - lib/recommendify/base.rb
56
63
  - lib/recommendify/cc_matrix.rb
@@ -72,43 +79,32 @@ files:
72
79
  - spec/similarity_matrix_spec.rb
73
80
  - spec/sparse_matrix_spec.rb
74
81
  - spec/spec_helper.rb
75
- - src/cc_item.h
76
- - src/cosine.c
77
- - src/iikey.c
78
- - src/jaccard.c
79
- - src/output.c
80
- - src/recommendify.c
81
- - src/sort.c
82
- - src/version.h
83
- has_rdoc: true
84
82
  homepage: http://github.com/paulasmuth/recommendify
85
- licenses:
83
+ licenses:
86
84
  - MIT
87
85
  post_install_message:
88
86
  rdoc_options: []
89
-
90
- require_paths:
87
+ require_paths:
91
88
  - lib
92
- required_ruby_version: !ruby/object:Gem::Requirement
89
+ required_ruby_version: !ruby/object:Gem::Requirement
93
90
  none: false
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: "0"
98
- required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
96
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: "0"
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
104
101
  requirements: []
105
-
106
102
  rubyforge_project:
107
- rubygems_version: 1.6.2
103
+ rubygems_version: 1.8.6
108
104
  signing_key:
109
105
  specification_version: 3
110
- summary: Distributed item-based "Collaborative Filtering" with ruby and redis
111
- test_files:
106
+ summary: ruby/redis based recommendation engine (collaborative filtering)
107
+ test_files:
112
108
  - spec/base_spec.rb
113
109
  - spec/cc_matrix_shared.rb
114
110
  - spec/cosine_input_matrix_spec.rb
@@ -119,3 +115,4 @@ test_files:
119
115
  - spec/similarity_matrix_spec.rb
120
116
  - spec/sparse_matrix_spec.rb
121
117
  - spec/spec_helper.rb
118
+ has_rdoc: