rankable_graph 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -68,7 +68,6 @@ For more examples please refer to the tests.
68
68
 
69
69
  == Requirements
70
70
 
71
- * Ruby 1.9
72
71
  * {glib2}[http://library.gnome.org/devel/glib/2.22/] >= 2.22.2
73
72
 
74
73
  == Note on Patches/Pull Requests
data/Rakefile CHANGED
@@ -12,7 +12,6 @@ begin
12
12
  gem.authors = ["Daniel Cadenas"]
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
14
14
  gem.extensions = ["ext/extconf.rb"]
15
- gem.required_ruby_version = '>= 1.9'
16
15
  gem.requirements << 'glib2, v2.22.2 or greater'
17
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
17
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rankable_graph}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Cadenas"]
12
- s.date = %q{2010-02-05}
12
+ s.date = %q{2010-09-19}
13
13
  s.description = %q{A Ruby Pagerank implementation}
14
14
  s.email = %q{dev@cuboxsa.com}
15
15
  s.extensions = ["ext/extconf.rb"]
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
25
25
  "Rakefile",
26
26
  "VERSION",
27
27
  "benchmark.rb",
28
- "ext/Makefile",
29
28
  "ext/extconf.rb",
30
29
  "ext/rankable_graph.c",
31
30
  "rankable_graph.gemspec",
@@ -36,9 +35,8 @@ Gem::Specification.new do |s|
36
35
  s.homepage = %q{http://github.com/cubox/rankable_graph}
37
36
  s.rdoc_options = ["--charset=UTF-8"]
38
37
  s.require_paths = ["lib"]
39
- s.required_ruby_version = Gem::Requirement.new(">= 1.9")
40
38
  s.requirements = ["glib2, v2.22.2 or greater"]
41
- s.rubygems_version = %q{1.3.5}
39
+ s.rubygems_version = %q{1.3.7}
42
40
  s.summary = %q{A Ruby Pagerank implementation}
43
41
  s.test_files = [
44
42
  "spec/rankable_graph_spec.rb",
@@ -49,7 +47,7 @@ Gem::Specification.new do |s|
49
47
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
48
  s.specification_version = 3
51
49
 
52
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
51
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
54
52
  else
55
53
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
@@ -51,6 +51,23 @@ describe RankableGraph do
51
51
  assert_rank(rankable_graph, expected_rank)
52
52
  end
53
53
 
54
+ it "should not change the graph when adding the same link many times" do
55
+ rankable_graph = RankableGraph.new
56
+ rankable_graph.link(0, 2)
57
+ rankable_graph.link(0, 2)
58
+ rankable_graph.link(0, 2)
59
+ rankable_graph.link(1, 2)
60
+ rankable_graph.link(1, 2)
61
+
62
+ expected_rank = {
63
+ 0 => 21.3,
64
+ 1 => 21.3,
65
+ 2 => 57.4
66
+ }
67
+
68
+ assert_rank(rankable_graph, expected_rank)
69
+ end
70
+
54
71
  it "should return correct results for a star graph" do
55
72
  rankable_graph = RankableGraph.new
56
73
  rankable_graph.link(0, 2)
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rankable_graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 1
10
+ version: 0.2.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - Daniel Cadenas
@@ -9,19 +15,25 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-05 00:00:00 -02:00
18
+ date: 2010-09-19 00:00:00 -03:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 13
30
+ segments:
31
+ - 1
32
+ - 2
33
+ - 9
23
34
  version: 1.2.9
24
- version:
35
+ type: :development
36
+ version_requirements: *id001
25
37
  description: A Ruby Pagerank implementation
26
38
  email: dev@cuboxsa.com
27
39
  executables: []
@@ -39,7 +51,6 @@ files:
39
51
  - Rakefile
40
52
  - VERSION
41
53
  - benchmark.rb
42
- - ext/Makefile
43
54
  - ext/extconf.rb
44
55
  - ext/rankable_graph.c
45
56
  - rankable_graph.gemspec
@@ -56,21 +67,27 @@ rdoc_options:
56
67
  require_paths:
57
68
  - lib
58
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
59
71
  requirements:
60
72
  - - ">="
61
73
  - !ruby/object:Gem::Version
62
- version: "1.9"
63
- version:
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
64
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
65
80
  requirements:
66
81
  - - ">="
67
82
  - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
68
86
  version: "0"
69
- version:
70
87
  requirements:
71
88
  - glib2, v2.22.2 or greater
72
89
  rubyforge_project:
73
- rubygems_version: 1.3.5
90
+ rubygems_version: 1.3.7
74
91
  signing_key:
75
92
  specification_version: 3
76
93
  summary: A Ruby Pagerank implementation
data/ext/Makefile DELETED
@@ -1,181 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- #### Start of system configuration section. ####
5
-
6
- srcdir = .
7
- topdir = /usr/local/include/ruby19-1.9.1
8
- hdrdir = /usr/local/include/ruby19-1.9.1
9
- arch_hdrdir = /usr/local/include/ruby19-1.9.1/$(arch)
10
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
11
- prefix = $(DESTDIR)/usr/local
12
- exec_prefix = $(prefix)
13
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
14
- sitehdrdir = $(rubyhdrdir)/site_ruby
15
- rubyhdrdir = $(includedir)/$(RUBY_INSTALL_NAME)-$(ruby_version)
16
- vendordir = $(libdir)/$(RUBY_INSTALL_NAME)/vendor_ruby
17
- sitedir = $(libdir)/$(RUBY_INSTALL_NAME)/site_ruby
18
- mandir = $(datarootdir)/man
19
- localedir = $(datarootdir)/locale
20
- libdir = $(exec_prefix)/lib
21
- psdir = $(docdir)
22
- pdfdir = $(docdir)
23
- dvidir = $(docdir)
24
- htmldir = $(docdir)
25
- infodir = $(datarootdir)/info
26
- docdir = $(datarootdir)/doc/$(PACKAGE)
27
- oldincludedir = $(DESTDIR)/usr/include
28
- includedir = $(prefix)/include
29
- localstatedir = $(prefix)/var
30
- sharedstatedir = $(prefix)/com
31
- sysconfdir = $(prefix)/etc
32
- datadir = $(datarootdir)
33
- datarootdir = $(prefix)/share
34
- libexecdir = $(exec_prefix)/libexec
35
- sbindir = $(exec_prefix)/sbin
36
- bindir = $(exec_prefix)/bin
37
- rubylibdir = $(libdir)/$(ruby_install_name)/$(ruby_version)
38
- archdir = $(rubylibdir)/$(arch)
39
- sitelibdir = $(sitedir)/$(ruby_version)
40
- sitearchdir = $(sitelibdir)/$(sitearch)
41
- vendorlibdir = $(vendordir)/$(ruby_version)
42
- vendorarchdir = $(vendorlibdir)/$(sitearch)
43
-
44
- CC = gcc
45
- CXX = g++
46
- LIBRUBY = $(LIBRUBY_SO)
47
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
48
- LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
49
- LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
50
- OUTFLAG = -o
51
- COUTFLAG = -o
52
-
53
- RUBY_EXTCONF_H =
54
- cflags = $(optflags) $(debugflags) $(warnflags)
55
- optflags = -O2
56
- debugflags = -g
57
- warnflags = -Wall -Wno-parentheses
58
- CFLAGS = -fno-common $(cflags) -fno-common -pipe -fno-common -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include
59
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
60
- DEFS =
61
- CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
62
- CXXFLAGS = $(CFLAGS) $(cxxflags)
63
- ldflags = -L. -L/usr/local/lib -L/opt/local/lib
64
- dldflags =
65
- archflag =
66
- DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
67
- LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
68
- LDSHAREDXX = $(LDSHARED)
69
- AR = ar
70
- EXEEXT =
71
-
72
- RUBY_INSTALL_NAME = ruby19
73
- RUBY_SO_NAME = ruby19
74
- arch = i386-darwin10.2.0
75
- sitearch = i386-darwin10.2.0
76
- ruby_version = 1.9.1
77
- ruby = /usr/local/bin/ruby19
78
- RUBY = $(ruby)
79
- RM = rm -f
80
- RM_RF = $(RUBY) -run -e rm -- -rf
81
- RMDIRS = $(RUBY) -run -e rmdir -- -p
82
- MAKEDIRS = mkdir -p
83
- INSTALL = /usr/bin/install -c
84
- INSTALL_PROG = $(INSTALL) -m 0755
85
- INSTALL_DATA = $(INSTALL) -m 644
86
- COPY = cp
87
-
88
- #### End of system configuration section. ####
89
-
90
- preload =
91
-
92
- libpath = . $(libdir)
93
- LIBPATH = -L. -L$(libdir)
94
- DEFFILE =
95
-
96
- CLEANFILES = mkmf.log
97
- DISTCLEANFILES =
98
- DISTCLEANDIRS =
99
-
100
- extout =
101
- extout_prefix =
102
- target_prefix =
103
- LOCAL_LIBS =
104
- LIBS = $(LIBRUBYARG_SHARED) -lglib-2.0 -lintl -liconv -lpthread -ldl -lobjc
105
- SRCS = rankable_graph.c
106
- OBJS = rankable_graph.o
107
- TARGET = rankable_graph
108
- DLLIB = $(TARGET).bundle
109
- EXTSTATIC =
110
- STATIC_LIB =
111
-
112
- BINDIR = $(bindir)
113
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
114
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
115
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
116
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
117
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
118
-
119
- TARGET_SO = $(DLLIB)
120
- CLEANLIBS = $(TARGET).bundle
121
- CLEANOBJS = *.o *.bak
122
-
123
- all: $(DLLIB)
124
- static: $(STATIC_LIB)
125
-
126
- clean-rb-default::
127
- clean-rb::
128
- clean-so::
129
- clean: clean-so clean-rb-default clean-rb
130
- @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
131
-
132
- distclean-rb-default::
133
- distclean-rb::
134
- distclean-so::
135
- distclean: clean distclean-so distclean-rb-default distclean-rb
136
- @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
137
- @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
138
- @-$(RMDIRS) $(DISTCLEANDIRS)
139
-
140
- realclean: distclean
141
- install: install-so install-rb
142
-
143
- install-so: $(RUBYARCHDIR)
144
- install-so: $(RUBYARCHDIR)/$(DLLIB)
145
- $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
146
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
147
- install-rb: pre-install-rb install-rb-default
148
- install-rb-default: pre-install-rb-default
149
- pre-install-rb: Makefile
150
- pre-install-rb-default: Makefile
151
- $(RUBYARCHDIR):
152
- $(MAKEDIRS) $@
153
-
154
- site-install: site-install-so site-install-rb
155
- site-install-so: install-so
156
- site-install-rb: install-rb
157
-
158
- .SUFFIXES: .c .m .cc .cxx .cpp .C .o
159
-
160
- .cc.o:
161
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
162
-
163
- .cxx.o:
164
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
165
-
166
- .cpp.o:
167
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
168
-
169
- .C.o:
170
- $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
171
-
172
- .c.o:
173
- $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
174
-
175
- $(DLLIB): $(OBJS) Makefile
176
- @-$(RM) $(@)
177
- $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
178
-
179
-
180
-
181
- $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h