enju_search_log 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/Rakefile +12 -1
- data/app/controllers/search_histories_controller.rb +3 -4
- data/app/helpers/search_histories_helper.rb +8 -9
- data/db/migrate/20120418121539_add_save_search_history_to_user.rb +5 -0
- data/lib/enju_search_log/engine.rb +1 -1
- data/lib/enju_search_log/version.rb +1 -1
- data/spec/dummy/config/initializers/devise.rb +0 -4
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +57 -19
data/MIT-LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ end
|
|
14
14
|
|
15
15
|
RDoc::Task.new(:rdoc) do |rdoc|
|
16
16
|
rdoc.rdoc_dir = 'rdoc'
|
17
|
-
rdoc.title = '
|
17
|
+
rdoc.title = 'EnjuSearchLog'
|
18
18
|
rdoc.options << '--line-numbers'
|
19
19
|
rdoc.rdoc_files.include('README.rdoc')
|
20
20
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
@@ -43,3 +43,14 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
43
43
|
end
|
44
44
|
|
45
45
|
task :default => :spec
|
46
|
+
require 'rake/testtask'
|
47
|
+
|
48
|
+
Rake::TestTask.new(:test) do |t|
|
49
|
+
t.libs << 'lib'
|
50
|
+
t.libs << 'test'
|
51
|
+
t.pattern = 'test/**/*_test.rb'
|
52
|
+
t.verbose = false
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
task :default => :test
|
@@ -20,7 +20,7 @@ class SearchHistoriesController < ApplicationController
|
|
20
20
|
end
|
21
21
|
|
22
22
|
respond_to do |format|
|
23
|
-
format.html # index.
|
23
|
+
format.html # index.html.erb
|
24
24
|
format.json { render :json => @search_histories.to_json }
|
25
25
|
end
|
26
26
|
end
|
@@ -29,7 +29,7 @@ class SearchHistoriesController < ApplicationController
|
|
29
29
|
# GET /search_histories/1.json
|
30
30
|
def show
|
31
31
|
respond_to do |format|
|
32
|
-
format.html # show.
|
32
|
+
format.html # show.html.erb
|
33
33
|
format.json { render :json => @search_history.to_json }
|
34
34
|
end
|
35
35
|
end
|
@@ -40,9 +40,8 @@ class SearchHistoriesController < ApplicationController
|
|
40
40
|
@search_history.destroy
|
41
41
|
|
42
42
|
respond_to do |format|
|
43
|
-
#format.html { redirect_to user_search_histories_url(@user) }
|
44
43
|
format.html { redirect_to search_histories_url }
|
45
|
-
format.json { head :
|
44
|
+
format.json { head :no_content }
|
46
45
|
end
|
47
46
|
end
|
48
47
|
end
|
@@ -18,15 +18,14 @@ module SearchHistoriesHelper
|
|
18
18
|
end
|
19
19
|
divisor = ((max - min).div(classes.size)) + 1
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
content_tag :div, :class => "hTagcloud" do
|
22
|
+
content_tag :ul, :class => "popularity" do
|
23
|
+
query_and_numbers.each do |query|
|
24
|
+
content_tag :li do
|
25
|
+
link_to(h(query[0]), manifestations_url(:query => query[0]), :class => classes[(query[1] - min).div(divisor)])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
27
29
|
end
|
28
|
-
html << %( </ul>\n)
|
29
|
-
html << %(</div>\n)
|
30
|
-
html.html_safe
|
31
30
|
end
|
32
31
|
end
|
@@ -92,10 +92,6 @@ Devise.setup do |config|
|
|
92
92
|
# If true, extends the user's remember period when remembered via cookie.
|
93
93
|
# config.extend_remember_period = false
|
94
94
|
|
95
|
-
# If true, uses the password salt as remember token. This should be turned
|
96
|
-
# to false if you are not using database authenticatable.
|
97
|
-
config.use_salt_as_remember_token = true
|
98
|
-
|
99
95
|
# Options to be passed to the created cookie. For instance, you can set
|
100
96
|
# :secure => true in order to force SSL only cookies.
|
101
97
|
# config.cookie_options = {}
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20120418121539) do
|
15
15
|
|
16
16
|
create_table "roles", :force => true do |t|
|
17
17
|
t.string "name"
|
@@ -73,6 +73,7 @@ ActiveRecord::Schema.define(:version => 20111201163718) do
|
|
73
73
|
t.datetime "last_sign_in_at"
|
74
74
|
t.string "current_sign_in_ip"
|
75
75
|
t.string "last_sign_in_ip"
|
76
|
+
t.boolean "save_search_history"
|
76
77
|
end
|
77
78
|
|
78
79
|
add_index "users", ["email"], :name => "index_users_on_email"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_search_log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: devise
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: cancan
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: will_paginate
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: '0'
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: sqlite3
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
@@ -65,10 +85,15 @@ dependencies:
|
|
65
85
|
version: '0'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: rspec-rails
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
99
|
- - ! '>='
|
@@ -76,18 +101,28 @@ dependencies:
|
|
76
101
|
version: '0'
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: factory_girl_rails
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
|
-
- -
|
115
|
+
- - ! '>='
|
86
116
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
117
|
+
version: '0'
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
91
126
|
description: Search log management for Next-L Enju
|
92
127
|
email:
|
93
128
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -107,6 +142,7 @@ files:
|
|
107
142
|
- config/routes.rb
|
108
143
|
- db/migrate/090_create_search_histories.rb
|
109
144
|
- db/migrate/20100623173800_rename_search_history_version_to_sru_version.rb
|
145
|
+
- db/migrate/20120418121539_add_save_search_history_to_user.rb
|
110
146
|
- lib/enju_search_log/engine.rb
|
111
147
|
- lib/enju_search_log/version.rb
|
112
148
|
- lib/enju_search_log.rb
|
@@ -145,6 +181,7 @@ files:
|
|
145
181
|
- spec/dummy/config/locales/en.yml
|
146
182
|
- spec/dummy/config/routes.rb
|
147
183
|
- spec/dummy/config.ru
|
184
|
+
- spec/dummy/db/development.sqlite3
|
148
185
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
149
186
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|
150
187
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|
@@ -185,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
222
|
version: '0'
|
186
223
|
requirements: []
|
187
224
|
rubyforge_project:
|
188
|
-
rubygems_version: 1.8.
|
225
|
+
rubygems_version: 1.8.23
|
189
226
|
signing_key:
|
190
227
|
specification_version: 3
|
191
228
|
summary: enju_subject plugin
|
@@ -221,6 +258,7 @@ test_files:
|
|
221
258
|
- spec/dummy/config/locales/en.yml
|
222
259
|
- spec/dummy/config/routes.rb
|
223
260
|
- spec/dummy/config.ru
|
261
|
+
- spec/dummy/db/development.sqlite3
|
224
262
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
225
263
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|
226
264
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|