my_forum 0.0.1.beta4 → 0.0.1.beta5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06969f014a639bbf5548d3246a68aa2876e2eaed
4
- data.tar.gz: 80ce6f3887ce8b44362bf1d576581a7de92f3b60
3
+ metadata.gz: f83a2c0d9d464a7d9ba1ba99909196fe65531c06
4
+ data.tar.gz: d67f6d744db5eeb5ea843e340271b647a4394c34
5
5
  SHA512:
6
- metadata.gz: 5185ab0ad81fc63eaba5423bbb975876167e8074409ce9453fd7f0c94835f940f168a267a6a8dfbcfa47529cfd732ecb6cf8f38acbaeea0f891e6ad33a1cbadd
7
- data.tar.gz: 0b7e50e142c282fa56bb0892137cc1c7b7e11e58d9a7e08c77c8bcf5c58280258f073485239c2829b13abf7aa207ce5e5c58ef5e84f191987f8a2babc5eb8ef6
6
+ metadata.gz: ff0e150259682d41e254dffa603c61b641737725fd956c01193d80e3596bdb3fb9a8cf9bbad38eb91d37ee67589e5673f44987491d2490e5f4d5a2568a2a1983
7
+ data.tar.gz: 7a3280ae8a35d39fe04424c0d2ec038ae02d7bf32fb96516b83ce7c46a4e8930d43bd331354f74c3192e8e5008dba39a1c1516c75baf9704df68b9830e3d0741
data/README.rdoc CHANGED
@@ -15,7 +15,7 @@ MyForum::Engine.use_custom_user_model = true
15
15
 
16
16
  http://w3facility.org/question/ruby-regex-for-stripping-bbcode/
17
17
 
18
- gem build tag_echidna.gemspec
18
+ gem build my_forum.gemspec
19
19
 
20
20
  https://github.com/cpjolicoeur/bb-ruby
21
21
  http://fortawesome.github.io/Font-Awesome/icons/#text-editor
@@ -37,6 +37,10 @@
37
37
  color: #a4a4a4;
38
38
  }
39
39
 
40
+ .post_attachment {
41
+ max-width: 400px;
42
+ }
43
+
40
44
  .quote {
41
45
  border: 1px solid black;
42
46
  }
@@ -57,7 +57,7 @@ module MyForum
57
57
 
58
58
  def attachment_img_path(attachment_id)
59
59
  attachment = Attachment.find_by_id(attachment_id.to_i)
60
- File.join(Attachment::UPLOAD_PATH, attachment.user_id.to_s, attachment.file_name)
60
+ File.join(Attachment::URL, attachment.user_id.to_s, attachment.file_name)
61
61
  end
62
62
  end
63
63
  end
@@ -16,7 +16,7 @@ module MyForum
16
16
 
17
17
  # Attachments
18
18
  text.gsub!(/\[attachment=([0-9]+)\]/i) do |match|
19
- "<img src='#{attachment_img_path($1)}' />"
19
+ "<p> <img class='post_attachment' src='#{attachment_img_path($1)}' /> </p>"
20
20
  end
21
21
 
22
22
  # Bold text
@@ -4,5 +4,6 @@ module MyForum
4
4
  belongs_to :post, class_name: 'MyForum::Post'
5
5
 
6
6
  UPLOAD_PATH = File.join(Rails.public_path, 'uploads', 'attachments')
7
+ URL = File.join('/uploads', 'attachments')
7
8
  end
8
9
  end
@@ -17,7 +17,7 @@ module MyForum
17
17
  end
18
18
 
19
19
  def has_unread_posts?(current_user)
20
- latest_post_ids = self.topics.pluck(:latest_post_id)
20
+ latest_post_ids = self.topics.where('updated_at >= ?', current_user.created_at).pluck(:latest_post_id)
21
21
  read_log = LogReadMark.where("user_id = ? AND post_id IN (?)", current_user.id, latest_post_ids).count
22
22
 
23
23
  latest_post_ids.length != read_log
@@ -17,6 +17,8 @@ module MyForum
17
17
 
18
18
  def unread?(current_user, last_post)
19
19
  return false unless current_user
20
+ return false if current_user.created_at > last_post.created_at
21
+
20
22
  !LogReadMark.where(user_id: current_user.id, topic_id: self.id, post_id: last_post.id).present?
21
23
  end
22
24
 
@@ -27,6 +27,8 @@ module MyForum
27
27
  private
28
28
 
29
29
  def encrypt_password
30
+ return unless password_changed?
31
+
30
32
  self.salt = make_salt unless valid_password?(password)
31
33
  self.password = encrypt(password)
32
34
  end
@@ -8,18 +8,28 @@
8
8
  .container-fluid
9
9
  - @categories.each do |category|
10
10
  .row.category_box
11
- .col-md-12.category_name
11
+ .col-md-10.category_name
12
12
  =category.name
13
-
13
+ .col-md-2.category_name
14
14
  .pull-right.btn-group.btn-group-sm{ rel: 'group' }
15
15
  = link_to t('.create_forum'), new_admin_category_forum_path(category), class: 'btn btn-default'
16
- .btn-group.btn-group-sm{ rel: 'group' }
17
- %button{ class: 'btn btn-default dropdown-toggle', data: { toggle: 'dropdown' } }
18
- Options
19
- .caret
20
- %ul{ class: 'dropdown-menu', role: 'menu' }
21
- %li= link_to t('.edit'), edit_admin_category_path(category)
22
- %li= link_to t('.delete'), '#'
16
+ .pull-right.btn-group.btn-group-sm{ rel: 'group' }
17
+ = link_to t('.edit'), edit_admin_category_path(category), class: 'btn btn-default'
18
+
19
+ -# .btn-group.btn-group-sm
20
+ -# %button{ class: 'btn btn-default dropdown-toggle', data: { toggle: 'dropdown', aria_haspopup: true, aria_expanded: false } }
21
+ -# Options
22
+ -# %span.caret
23
+ -# %ul{ class: 'dropdown-menu'}
24
+ -# %li= link_to t('.edit'), edit_admin_category_path(category)
25
+ -# %li= link_to t('.delete'), '#'
26
+
27
+
28
+
29
+
30
+
31
+
32
+
23
33
 
24
34
 
25
35
  .row.category_forums
@@ -7,15 +7,15 @@
7
7
  .row
8
8
  = f.text_field :color
9
9
 
10
- .row
11
- admin access
12
- .btn-group{ 'data-toggle' => "buttons" }
13
- =f.label :admin_access, class: 'btn btn-success btn-sm active' do
14
- = f.radio_button :admin_access, true
15
- yes
16
- =f.label :admin_access, class: 'btn btn-danger btn-sm' do
17
- = f.radio_button :admin_access, false
18
- &nbsp;no&nbsp;
10
+ -# .row
11
+ -# admin access
12
+ -# .btn-group{ 'data-toggle' => "buttons" }
13
+ -# =f.label :admin_access, class: 'btn btn-success btn-sm active' do
14
+ -# = f.radio_button :admin_access, true
15
+ -# yes
16
+ -# =f.label :admin_access, class: 'btn btn-danger btn-sm' do
17
+ -# = f.radio_button :admin_access, false
18
+ -# &nbsp;no&nbsp;
19
19
 
20
20
 
21
21
 
@@ -33,7 +33,7 @@
33
33
  %div.btn-group.smiles
34
34
  - smiles = %w(acute aggressive beee blum2 blush2 cray dirol download i-m_so_happy ireful2)
35
35
  - smiles.each do |smile_file|
36
- =link_to '#', class: 'btn btn-default btn-sm' do
36
+ =link_to '#', class: 'btn btn-default btn-sm smile-past' do
37
37
  %img{ src: asset_path("my_forum/smiles/#{smile_file}.gif"), class: 'smile' }
38
38
 
39
39
  = form_for @new_post, url: forum_topic_posts_path(forum, topic), role: 'form' do |form|
@@ -60,6 +60,11 @@
60
60
  #loaded-content
61
61
 
62
62
  :coffee
63
+ $('.smile-past').click ->
64
+ smile_icon_path = $(this).find('img').attr('src')
65
+ smile_icon_file = smile_icon_path.split('/').pop()
66
+ $('#quick_answer_textarea').append('::' + smile_icon_file.split('.')[0] + ':: ')
67
+
63
68
  $('#attachment_file').change ->
64
69
  file_data = $('#attachment_file').prop('files')[0]
65
70
  form_data = new FormData()
data/config/routes.rb CHANGED
@@ -3,10 +3,10 @@ MyForum::Engine.routes.draw do
3
3
 
4
4
  match 'signin', to: 'users#signin', via: [:get, :post]
5
5
  match 'logout', to: 'users#logout', via: [:get]
6
- match 'forgot_password', to: 'users#forgot_password', via: [:get, :post]
6
+ match 'forgot_password', to: 'users#forgot_password', via: [:get, :post]
7
7
 
8
- match 'unread_topics', to: 'forums#unread_topics', via: [:get], as: :unread_topics
9
- match 'mark_all_as_read', to: 'forums#mark_all_as_read', via: [:get], as: :mark_all_as_read
8
+ match 'unread_topics', to: 'forums#unread_topics', via: [:get], as: :unread_topics
9
+ match 'mark_all_as_read', to: 'forums#mark_all_as_read', via: [:get], as: :mark_all_as_read
10
10
 
11
11
  resources :images
12
12
  resources :avatars
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta4"
2
+ VERSION = "0.0.1.beta5"
3
3
  end
@@ -2,7 +2,7 @@ namespace :my_forum do
2
2
  namespace :import do
3
3
  namespace :smf do
4
4
 
5
- $connection = Mysql2::Client.new Rails.configuration.database_configuration['smf_import']
5
+ $connection = Rails.env.test? ? SQLite3::Database.new('test.db') : Mysql2::Client.new(Rails.configuration.database_configuration['smf_import'])
6
6
 
7
7
  desc "Import Boards"
8
8
  task boards: :environment do
@@ -18,9 +18,13 @@ namespace :my_forum do
18
18
  INNER JOIN `smf_categories` ON `smf_boards`.`id_cat` = `smf_categories`.`id_cat`
19
19
  SQL
20
20
 
21
+ user_groups = UserGroup.all
22
+
21
23
  result = $connection.query sql
22
24
  result.each do |row|
23
25
  category = MyForum::Category.find_or_create_by(name: row['category_name'])
26
+ category.user_groups << user_groups if user_groups.any?
27
+
24
28
  category.forums.create(name: row['board_name'], description: row['board_description'])
25
29
  end
26
30
  end
@@ -29,6 +33,8 @@ namespace :my_forum do
29
33
  task users: :environment do
30
34
  MyForum::User.destroy_all
31
35
 
36
+ user_group = UserGroup.where(name: 'Member').first
37
+
32
38
  sql = "SELECT member_name, date_registered, real_name, email_address, personal_text, birthdate, website_title, website_url, signature, avatar, is_activated FROM smf_members;"
33
39
  result = $connection.query sql
34
40
  result.each do |row|
@@ -48,6 +54,8 @@ namespace :my_forum do
48
54
  website_url: row['website_url'],
49
55
  is_activated: row['is_activated']
50
56
  })
57
+
58
+ user.user_groups << user_group if user_group
51
59
  rescue => e
52
60
  print e
53
61
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150227210814) do
14
+ ActiveRecord::Schema.define(version: 20151012095554) do
15
15
 
16
16
  create_table "my_forum_categories", force: :cascade do |t|
17
17
  t.string "name"
@@ -36,6 +36,16 @@ ActiveRecord::Schema.define(version: 20150227210814) do
36
36
  t.datetime "updated_at"
37
37
  end
38
38
 
39
+ create_table "my_forum_images", force: :cascade do |t|
40
+ t.integer "user_id"
41
+ t.integer "post_id"
42
+ t.string "file_name"
43
+ t.integer "file_size"
44
+ t.string "type"
45
+ t.datetime "created_at", null: false
46
+ t.datetime "updated_at", null: false
47
+ end
48
+
39
49
  create_table "my_forum_log_read_marks", force: :cascade do |t|
40
50
  t.integer "user_id"
41
51
  t.integer "topic_id"
Binary file
@@ -0,0 +1,219 @@
1
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateMyForumImages (20151012095554)
5
+  (0.0ms) begin transaction
6
+  (0.4ms) CREATE TABLE "my_forum_images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "post_id" integer, "file_name" varchar, "file_size" integer, "type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
7
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151012095554"]]
8
+  (0.8ms) commit transaction
9
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+  (0.1ms) begin transaction
14
+  (0.0ms) SAVEPOINT active_record_1
15
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'demo' LIMIT 1
16
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'demo@example.com' LIMIT 1
17
+ SQL (0.5ms) INSERT INTO "my_forum_users" ("login", "password", "email", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "demo"], ["password", "c0087d860a3f7b297cb962d68dbe54ba3cb92fc90b542d93e8c25a1b0b493935"], ["email", "demo@example.com"], ["salt", "bed2fb764617f0b2e56b7d96e68d6133842a1bdfad6e9ce634c195d685472b28"], ["created_at", "2015-11-13 12:23:23.144229"], ["updated_at", "2015-11-13 12:23:23.144229"]]
18
+  (0.0ms) RELEASE SAVEPOINT active_record_1
19
+ Processing by MyForum::UsersController#signin as HTML
20
+ Parameters: {"user"=>{"login"=>"demo", "password"=>"[FILTERED]"}}
21
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."login" = ? LIMIT 1 [["login", "demo"]]
22
+ Redirected to http://test.host/my_forum/
23
+ Completed 302 Found in 6ms (ActiveRecord: 0.1ms)
24
+  (0.4ms) rollback transaction
25
+  (0.0ms) begin transaction
26
+ Processing by MyForum::UsersController#signin as HTML
27
+ Parameters: {"user"=>{"login"=>"", "password"=>"[FILTERED]"}}
28
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."login" = ? LIMIT 1 [["login", ""]]
29
+ Rendered /Users/vint/rails/my_forum/app/views/my_forum/users/signin.haml within layouts/my_forum/application (0.2ms)
30
+ Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 0.1ms)
31
+ Processing by MyForum::UsersController#signin as HTML
32
+ Parameters: {"user"=>{"login"=>"wrong", "password"=>"[FILTERED]"}}
33
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."login" = ? LIMIT 1 [["login", "wrong"]]
34
+ Rendered /Users/vint/rails/my_forum/app/views/my_forum/users/signin.haml within layouts/my_forum/application (0.1ms)
35
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)
36
+  (0.1ms) rollback transaction
37
+  (0.0ms) begin transaction
38
+  (0.0ms) SAVEPOINT active_record_1
39
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'demo' LIMIT 1
40
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'demo@example.com' LIMIT 1
41
+ SQL (0.3ms) INSERT INTO "my_forum_users" ("login", "password", "email", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "demo"], ["password", "c0087d860a3f7b297cb962d68dbe54ba3cb92fc90b542d93e8c25a1b0b493935"], ["email", "demo@example.com"], ["salt", "bed2fb764617f0b2e56b7d96e68d6133842a1bdfad6e9ce634c195d685472b28"], ["created_at", "2015-11-13 12:23:23.184462"], ["updated_at", "2015-11-13 12:23:23.184462"]]
42
+  (0.0ms) RELEASE SAVEPOINT active_record_1
43
+ Processing by MyForum::UsersController#forgot_password as HTML
44
+ Parameters: {"user"=>{"email"=>"demo@example.com"}}
45
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
46
+ MyForum::UserGroup Load (0.1ms) SELECT "my_forum_user_groups".* FROM "my_forum_user_groups" WHERE "my_forum_user_groups"."name" = ? LIMIT 1 [["name", "Guests"]]
47
+ MyForum::UserGroup Load (0.0ms) SELECT "my_forum_user_groups".* FROM "my_forum_user_groups" WHERE "my_forum_user_groups"."name" = ? LIMIT 1 [["name", "Member"]]
48
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
49
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
50
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
51
+  (0.0ms) SAVEPOINT active_record_1
52
+ SQL (0.3ms) UPDATE "my_forum_users" SET "updated_at" = '2015-11-13 12:23:23.221587' WHERE "my_forum_users"."id" = ? [["id", 2]]
53
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."email" = ? LIMIT 1 [["email", "demo@example.com"]]
55
+  (0.1ms) SAVEPOINT active_record_1
56
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE ("my_forum_users"."login" = 'demo' AND "my_forum_users"."id" != 2) LIMIT 1
57
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE ("my_forum_users"."email" = 'demo@example.com' AND "my_forum_users"."id" != 2) LIMIT 1
58
+ SQL (0.1ms) UPDATE "my_forum_users" SET "password" = ?, "salt" = ?, "updated_at" = ? WHERE "my_forum_users"."id" = ? [["password", "10a6983646f4307601c0602992b7894d0461a7ce3831e00e8b801a2793617b87"], ["salt", "b7f33cc5f046469613857a2a4baee3428fe08d8bd8fe0e4d94ef9741abc65a6a"], ["updated_at", "2015-11-13 12:23:23.236837"], ["id", 2]]
59
+  (0.0ms) RELEASE SAVEPOINT active_record_1
60
+ Rendered /Users/vint/rails/my_forum/app/views/my_forum/user_mailer/reset_password_email.text.erb within layouts/mailer (1.7ms)
61
+ Rendered /Users/vint/rails/my_forum/app/views/my_forum/user_mailer/reset_password_email.haml within layouts/mailer (0.8ms)
62
+
63
+ MyForum::UserMailer#reset_password_email: processed outbound mail in 158.6ms
64
+
65
+ Sent mail to demo@example.com (7.5ms)
66
+ Date: Fri, 13 Nov 2015 14:23:23 +0200
67
+ From: from@example.com
68
+ To: demo@example.com
69
+ Message-ID: <5645d63b60e75_e36e3feab105e2009674@tivobox69.tpeo.local.mail>
70
+ Subject: vaz.od.ua - New password
71
+ Mime-Version: 1.0
72
+ Content-Type: multipart/alternative;
73
+ boundary="--==_mimepart_5645d63b5fb5f_e36e3feab105e2009567";
74
+ charset=UTF-8
75
+ Content-Transfer-Encoding: 7bit
76
+
77
+
78
+ ----==_mimepart_5645d63b5fb5f_e36e3feab105e2009567
79
+ Content-Type: text/plain;
80
+ charset=UTF-8
81
+ Content-Transfer-Encoding: 7bit
82
+
83
+ Your new password is: OPSPOShXBf
84
+
85
+ ----==_mimepart_5645d63b5fb5f_e36e3feab105e2009567
86
+ Content-Type: text/html;
87
+ charset=UTF-8
88
+ Content-Transfer-Encoding: 7bit
89
+
90
+ <html>
91
+ <body>
92
+ Your new password is: OPSPOShXBf
93
+
94
+ </body>
95
+ </html>
96
+
97
+ ----==_mimepart_5645d63b5fb5f_e36e3feab105e2009567--
98
+
99
+ Redirected to http://test.host/my_forum/
100
+ Completed 302 Found in 213ms (ActiveRecord: 1.4ms)
101
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
102
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
103
+  (0.4ms) rollback transaction
104
+  (0.0ms) begin transaction
105
+  (0.0ms) SAVEPOINT active_record_1
106
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'demo' LIMIT 1
107
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'demo@example.com' LIMIT 1
108
+ SQL (0.2ms) INSERT INTO "my_forum_users" ("login", "password", "email", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "demo"], ["password", "c0087d860a3f7b297cb962d68dbe54ba3cb92fc90b542d93e8c25a1b0b493935"], ["email", "demo@example.com"], ["salt", "bed2fb764617f0b2e56b7d96e68d6133842a1bdfad6e9ce634c195d685472b28"], ["created_at", "2015-11-13 12:23:23.407006"], ["updated_at", "2015-11-13 12:23:23.407006"]]
109
+  (0.0ms) RELEASE SAVEPOINT active_record_1
110
+ Processing by MyForum::UsersController#update as HTML
111
+ Parameters: {"user"=>{"email"=>"abc@google.com", "password"=>"[FILTERED]"}, "id"=>"2"}
112
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
113
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
114
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
115
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
116
+  (0.0ms) SAVEPOINT active_record_1
117
+ SQL (0.3ms) UPDATE "my_forum_users" SET "updated_at" = '2015-11-13 12:23:23.412746' WHERE "my_forum_users"."id" = ? [["id", 2]]
118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
119
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
120
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
121
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
122
+ MyForum::UserGroupLink Load (0.0ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
123
+ Unpermitted parameter: password
124
+ SQL (0.0ms) UPDATE "my_forum_users" SET "email" = 'abc@google.com' WHERE "my_forum_users"."id" = ? [["id", 2]]
125
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
126
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
127
+ Redirected to http://test.host/my_forum/users/2/edit
128
+ Completed 302 Found in 9ms (ActiveRecord: 0.8ms)
129
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
130
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
131
+  (0.6ms) rollback transaction
132
+  (0.0ms) begin transaction
133
+  (0.0ms) SAVEPOINT active_record_1
134
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'demo' LIMIT 1
135
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'demo@example.com' LIMIT 1
136
+ SQL (0.2ms) INSERT INTO "my_forum_users" ("login", "password", "email", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "demo"], ["password", "c0087d860a3f7b297cb962d68dbe54ba3cb92fc90b542d93e8c25a1b0b493935"], ["email", "demo@example.com"], ["salt", "bed2fb764617f0b2e56b7d96e68d6133842a1bdfad6e9ce634c195d685472b28"], ["created_at", "2015-11-13 12:23:23.422668"], ["updated_at", "2015-11-13 12:23:23.422668"]]
137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
138
+ Processing by MyForum::UsersController#update as HTML
139
+ Parameters: {"user"=>{"email"=>"abc@google.com", "password"=>"[FILTERED]"}, "id"=>"2"}
140
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
141
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
142
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
143
+ MyForum::UserGroupLink Load (0.0ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
144
+  (0.0ms) SAVEPOINT active_record_1
145
+ SQL (0.3ms) UPDATE "my_forum_users" SET "updated_at" = '2015-11-13 12:23:23.428702' WHERE "my_forum_users"."id" = ? [["id", 2]]
146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
147
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
148
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
149
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
150
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
151
+ Unpermitted parameter: password
152
+ SQL (0.0ms) UPDATE "my_forum_users" SET "email" = 'abc@google.com' WHERE "my_forum_users"."id" = ? [["id", 2]]
153
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
154
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
155
+ Redirected to http://test.host/my_forum/users/2/edit
156
+ Completed 302 Found in 10ms (ActiveRecord: 0.9ms)
157
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
158
+  (0.5ms) rollback transaction
159
+  (0.0ms) begin transaction
160
+  (0.0ms) SAVEPOINT active_record_1
161
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'demo' LIMIT 1
162
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'demo@example.com' LIMIT 1
163
+ SQL (0.2ms) INSERT INTO "my_forum_users" ("login", "password", "email", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "demo"], ["password", "c0087d860a3f7b297cb962d68dbe54ba3cb92fc90b542d93e8c25a1b0b493935"], ["email", "demo@example.com"], ["salt", "bed2fb764617f0b2e56b7d96e68d6133842a1bdfad6e9ce634c195d685472b28"], ["created_at", "2015-11-13 12:23:23.440035"], ["updated_at", "2015-11-13 12:23:23.440035"]]
164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
165
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
166
+ Processing by MyForum::UsersController#update as HTML
167
+ Parameters: {"user"=>{"email"=>"abc@google.com", "password"=>"[FILTERED]", "new_password"=>"[FILTERED]"}, "id"=>"2"}
168
+ MyForum::User Load (0.1ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
169
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
170
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
171
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
172
+  (0.0ms) SAVEPOINT active_record_1
173
+ SQL (0.3ms) UPDATE "my_forum_users" SET "updated_at" = '2015-11-13 12:23:23.447432' WHERE "my_forum_users"."id" = ? [["id", 2]]
174
+  (0.0ms) RELEASE SAVEPOINT active_record_1
175
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
176
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
177
+ Unpermitted parameter: new_password
178
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
179
+ MyForum::UserGroupLink Load (0.0ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
180
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
181
+ MyForum::UserGroupLink Load (0.0ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
182
+  (0.0ms) SAVEPOINT active_record_1
183
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE ("my_forum_users"."login" = 'demo' AND "my_forum_users"."id" != 2) LIMIT 1
184
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE ("my_forum_users"."email" = 'demo@example.com' AND "my_forum_users"."id" != 2) LIMIT 1
185
+ SQL (0.1ms) UPDATE "my_forum_users" SET "password" = ?, "salt" = ?, "updated_at" = ? WHERE "my_forum_users"."id" = ? [["password", "a5b323fe8c8d73b518f2cf9252a5345e3c1f62c122511fb5c9d561d1b7ce869f"], ["salt", "bde3e52fb4efcd8aa2f591a16892cda5bd28905ce68ffd9ad8947f7399866af9"], ["updated_at", "2015-11-13 12:23:23.453291"], ["id", 2]]
186
+  (0.0ms) RELEASE SAVEPOINT active_record_1
187
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
188
+ MyForum::UserGroupLink Load (0.1ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
189
+ Unpermitted parameter: password
190
+ SQL (0.0ms) UPDATE "my_forum_users" SET "email" = 'abc@google.com' WHERE "my_forum_users"."id" = ? [["id", 2]]
191
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? ORDER BY "my_forum_users"."id" ASC LIMIT 1 [["id", 2]]
192
+ MyForum::UserGroupLink Load (0.0ms) SELECT "my_forum_user_group_links".* FROM "my_forum_user_group_links" WHERE "my_forum_user_group_links"."user_id" IN (2)
193
+ Redirected to http://test.host/my_forum/users/2/edit
194
+ Completed 302 Found in 15ms (ActiveRecord: 1.3ms)
195
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
196
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."id" = ? LIMIT 1 [["id", 2]]
197
+  (0.5ms) rollback transaction
198
+  (0.0ms) begin transaction
199
+ Processing by MyForum::UsersController#create as HTML
200
+ Parameters: {"user"=>{"email"=>"new_user@google.com", "password"=>"[FILTERED]", "login"=>"new_user"}}
201
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'new_user' LIMIT 1
202
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'new_user@google.com' LIMIT 1
203
+  (0.0ms) SAVEPOINT active_record_1
204
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" = 'new_user' LIMIT 1
205
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" = 'new_user@google.com' LIMIT 1
206
+ SQL (0.3ms) INSERT INTO "my_forum_users" ("login", "email", "password", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["login", "new_user"], ["email", "new_user@google.com"], ["password", "e2b8a2fb39b563429ff82fd998d511f83b95c153f9f95734a1568eb83f904be5"], ["salt", "cde64a184cab702a89dfc2d04392a9bba764d776a2da25f0a2f9708442cb4f8e"], ["created_at", "2015-11-13 12:23:23.471223"], ["updated_at", "2015-11-13 12:23:23.471223"]]
207
+ SQL (0.1ms) INSERT INTO "my_forum_user_group_links" ("user_group_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["user_group_id", 2], ["user_id", 2], ["created_at", "2015-11-13 12:23:23.472689"], ["updated_at", "2015-11-13 12:23:23.472689"]]
208
+  (0.0ms) RELEASE SAVEPOINT active_record_1
209
+ Redirected to http://test.host/my_forum/
210
+ Completed 302 Found in 12ms (ActiveRecord: 0.8ms)
211
+ MyForum::User Load (0.0ms) SELECT "my_forum_users".* FROM "my_forum_users" WHERE "my_forum_users"."email" = ? LIMIT 1 [["email", "new_user@google.com"]]
212
+  (0.3ms) rollback transaction
213
+  (0.1ms) begin transaction
214
+  (0.0ms) SAVEPOINT active_record_1
215
+ MyForum::User Exists (0.1ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."login" IS NULL LIMIT 1
216
+ MyForum::User Exists (0.0ms) SELECT 1 AS one FROM "my_forum_users" WHERE "my_forum_users"."email" IS NULL LIMIT 1
217
+ SQL (0.2ms) INSERT INTO "my_forum_users" ("password", "salt", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["password", "ef806c1a30e8af9c7802b9bd803b3b6e1aae1fe847a1dcfd46eec171b581ae7b"], ["salt", "320528c90278e2667c17d852c6755701198e98abb4d9d6d9cb6df61aa87a7016"], ["created_at", "2015-11-13 12:23:23.479063"], ["updated_at", "2015-11-13 12:23:23.479063"]]
218
+  (0.0ms) RELEASE SAVEPOINT active_record_1
219
+  (0.3ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_forum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta4
4
+ version: 0.0.1.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2015-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -299,6 +299,7 @@ files:
299
299
  - spec/dummy/db/development.sqlite3
300
300
  - spec/dummy/db/schema.rb
301
301
  - spec/dummy/db/test.sqlite3
302
+ - spec/dummy/log/test.log
302
303
  - spec/dummy/public/404.html
303
304
  - spec/dummy/public/422.html
304
305
  - spec/dummy/public/500.html
@@ -365,6 +366,7 @@ test_files:
365
366
  - spec/dummy/db/development.sqlite3
366
367
  - spec/dummy/db/schema.rb
367
368
  - spec/dummy/db/test.sqlite3
369
+ - spec/dummy/log/test.log
368
370
  - spec/dummy/public/404.html
369
371
  - spec/dummy/public/422.html
370
372
  - spec/dummy/public/500.html