enju_search_log 0.0.7 → 0.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -43,14 +43,3 @@ 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
@@ -8,9 +8,7 @@ class SearchHistory < ActiveRecord::Base
8
8
  scope :not_found, where(:number_of_records => 0)
9
9
  belongs_to :user
10
10
 
11
- def self.per_page
12
- 10
13
- end
11
+ paginates_per 10
14
12
 
15
13
  # http://d.hatena.ne.jp/rubyco/20070528
16
14
  def self.not_found_query(number, duration = 1.year.ago)
@@ -14,7 +14,7 @@
14
14
  <%- end -%>
15
15
  <% end %>
16
16
 
17
- <table class="index">
17
+ <table class="table table-striped index">
18
18
  <tr>
19
19
  <th><%= t('activerecord.attributes.search_history.query') -%></th>
20
20
  <th><%= t('activerecord.attributes.search_history.number_of_records') -%></th>
@@ -48,7 +48,7 @@
48
48
  <%- end -%>
49
49
  </table>
50
50
 
51
- <%= will_paginate(@search_histories) -%>
51
+ <%= paginate(@search_histories) -%>
52
52
  </div>
53
53
  </div>
54
54
 
@@ -1,6 +1,4 @@
1
- require 'devise'
2
- require 'cancan'
3
- require 'will_paginate'
1
+ require 'enju_core'
4
2
 
5
3
  module EnjuSearchLog
6
4
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuSearchLog
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0.pre"
3
3
  end
@@ -0,0 +1,17 @@
1
+ module EnjuSearchLog
2
+ module Generators
3
+ class ViewsGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../../../../app/views', __FILE__)
5
+
6
+ def copy_files
7
+ directories = %w(
8
+ search_histories
9
+ )
10
+
11
+ directories.each do |dir|
12
+ directory dir, "app/views/#{dir}"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,19 +1,40 @@
1
1
  class AddDeviseToUsers < ActiveRecord::Migration
2
2
  def self.up
3
3
  change_table(:users) do |t|
4
- t.database_authenticatable :null => false
5
- t.recoverable
6
- t.rememberable
7
- t.trackable
4
+ ## Database authenticatable
5
+ t.string :email, :null => false, :default => ""
6
+ t.string :encrypted_password, :null => false, :default => ""
8
7
 
9
- # t.encryptable
10
- # t.confirmable
11
- # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
12
- # t.token_authenticatable
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
13
11
 
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
14
 
15
- # Uncomment below if timestamps were not included in your original model.
16
- # t.timestamps
15
+ ## Trackable
16
+ t.integer :sign_in_count, :default => 0
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Encryptable
23
+ t.string :password_salt
24
+
25
+ ## Confirmable
26
+ t.string :confirmation_token
27
+ t.datetime :confirmed_at
28
+ t.datetime :confirmation_sent_at
29
+ t.string :unconfirmed_email # Only if using reconfirmable
30
+
31
+ ## Lockable
32
+ t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
33
+ t.string :unlock_token # Only if unlock strategy is :email or :both
34
+ t.datetime :locked_at
35
+
36
+ # Token authenticatable
37
+ t.string :authentication_token
17
38
  end
18
39
 
19
40
  add_index :users, :email #, :unique => true
@@ -18,8 +18,8 @@ ActiveRecord::Schema.define(:version => 20120418121539) do
18
18
  t.text "display_name"
19
19
  t.text "note"
20
20
  t.integer "position"
21
- t.datetime "created_at"
22
- t.datetime "updated_at"
21
+ t.datetime "created_at", :null => false
22
+ t.datetime "updated_at", :null => false
23
23
  end
24
24
 
25
25
  create_table "search_histories", :force => true do |t|
@@ -42,8 +42,8 @@ ActiveRecord::Schema.define(:version => 20120418121539) do
42
42
  t.text "diagnostics"
43
43
  t.text "extra_response_data"
44
44
  t.text "echoed_search_retrieve_request"
45
- t.datetime "created_at"
46
- t.datetime "updated_at"
45
+ t.datetime "created_at", :null => false
46
+ t.datetime "updated_at", :null => false
47
47
  end
48
48
 
49
49
  add_index "search_histories", ["user_id"], :name => "index_search_histories_on_user_id"
@@ -51,8 +51,8 @@ ActiveRecord::Schema.define(:version => 20120418121539) do
51
51
  create_table "user_has_roles", :force => true do |t|
52
52
  t.integer "user_id"
53
53
  t.integer "role_id"
54
- t.datetime "created_at"
55
- t.datetime "updated_at"
54
+ t.datetime "created_at", :null => false
55
+ t.datetime "updated_at", :null => false
56
56
  end
57
57
 
58
58
  create_table "users", :force => true do |t|
@@ -61,19 +61,28 @@ ActiveRecord::Schema.define(:version => 20120418121539) do
61
61
  t.string "username"
62
62
  t.text "note"
63
63
  t.string "locale"
64
- t.datetime "created_at"
65
- t.datetime "updated_at"
66
- t.string "email", :default => "", :null => false
67
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
64
+ t.datetime "created_at", :null => false
65
+ t.datetime "updated_at", :null => false
66
+ t.string "email", :default => "", :null => false
67
+ t.string "encrypted_password", :default => "", :null => false
68
68
  t.string "reset_password_token"
69
69
  t.datetime "reset_password_sent_at"
70
70
  t.datetime "remember_created_at"
71
- t.integer "sign_in_count", :default => 0
71
+ t.integer "sign_in_count", :default => 0
72
72
  t.datetime "current_sign_in_at"
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
+ t.string "password_salt"
77
+ t.string "confirmation_token"
78
+ t.datetime "confirmed_at"
79
+ t.datetime "confirmation_sent_at"
80
+ t.string "unconfirmed_email"
81
+ t.integer "failed_attempts", :default => 0
82
+ t.string "unlock_token"
83
+ t.datetime "locked_at"
84
+ t.string "authentication_token"
85
+ t.boolean "save_search_history", :default => false, :null => false
77
86
  end
78
87
 
79
88
  add_index "users", ["email"], :name => "index_users_on_email"
Binary file
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_search_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.1.0.pre
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kosuke Tanabe
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-23 00:00:00.000000000 Z
12
+ date: 2012-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -28,53 +28,21 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.2'
30
30
  - !ruby/object:Gem::Dependency
31
- name: devise
31
+ name: enju_biblio
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: cancan
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: will_paginate
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
35
+ - - ~>
68
36
  - !ruby/object:Gem::Version
69
- version: '0'
37
+ version: 0.1.0.pre
70
38
  type: :runtime
71
39
  prerelease: false
72
40
  version_requirements: !ruby/object:Gem::Requirement
73
41
  none: false
74
42
  requirements:
75
- - - ! '>='
43
+ - - ~>
76
44
  - !ruby/object:Gem::Version
77
- version: '0'
45
+ version: 0.1.0.pre
78
46
  - !ruby/object:Gem::Dependency
79
47
  name: sqlite3
80
48
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +115,7 @@ files:
147
115
  - lib/enju_search_log/user.rb
148
116
  - lib/enju_search_log/version.rb
149
117
  - lib/enju_search_log.rb
118
+ - lib/generators/enju_search_log/views_generator.rb
150
119
  - lib/tasks/enju_search_log_tasks.rake
151
120
  - MIT-LICENSE
152
121
  - Rakefile
@@ -217,9 +186,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
186
  required_rubygems_version: !ruby/object:Gem::Requirement
218
187
  none: false
219
188
  requirements:
220
- - - ! '>='
189
+ - - ! '>'
221
190
  - !ruby/object:Gem::Version
222
- version: '0'
191
+ version: 1.3.1
223
192
  requirements: []
224
193
  rubyforge_project:
225
194
  rubygems_version: 1.8.23