hubs 0.0.1
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.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.rubocop.yml +26 -0
- data/.travis.yml +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/app/models/concerns/hub/soft_delete.rb +27 -0
- data/app/models/concerns/hub/uid.rb +17 -0
- data/app/models/concerns/hub/user_relation.rb +81 -0
- data/app/models/hub/follower_notification.rb +8 -0
- data/app/models/hub/liker.rb +11 -0
- data/app/models/hub/liker_notification.rb +9 -0
- data/app/models/hub/notification.rb +7 -0
- data/app/models/hub/relationship.rb +11 -0
- data/app/models/hub/reply.rb +48 -0
- data/app/models/hub/reply_notification.rb +9 -0
- data/app/models/hub/topic.rb +38 -0
- data/app/models/hub/topic_image.rb +7 -0
- data/lib/generators/hub/install_generator.rb +23 -0
- data/lib/generators/hub/templates/config/initializers/hubs.rb +1 -0
- data/lib/hub/version.rb +3 -0
- data/lib/hubs.rb +25 -0
- metadata +150 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 003cea9b5e64eaf911f2cc61ed95d3f3a63ac9de
|
4
|
+
data.tar.gz: 56af3a8574a9e0fdf95b47d764b8fa728503b2c6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cccd9853256283f80e8cae68350f4e5e7113c69c5b39b54709beefa696a3048b91d8097dbce7fd261aa748a0100e55d08af6bbfd1051934a7cdaa779ef735caa
|
7
|
+
data.tar.gz: 09ce385d58fa10829e7a23e78ac2c89a3ead57ac0f523d8a86435fd3aae3b65515cf7a777a004b2a2da529adb9ee1d92b3e79a18390c0fcb9b8f21103cf81b45
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�x������Aa e;
|
data.tar.gz.sig
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.2
|
3
|
+
|
4
|
+
Documentation:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Metrics/LineLength:
|
8
|
+
Max: 300
|
9
|
+
|
10
|
+
Metrics/AbcSize:
|
11
|
+
Max: 57
|
12
|
+
|
13
|
+
Metrics/ClassLength:
|
14
|
+
Max: 150
|
15
|
+
|
16
|
+
Metrics/MethodLength:
|
17
|
+
Max: 20
|
18
|
+
|
19
|
+
Style/NumericLiterals:
|
20
|
+
MinDigits: 7
|
21
|
+
|
22
|
+
Style/AsciiComments:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/ParameterLists:
|
26
|
+
Max: 15
|
data/.travis.yml
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Eric Guo Chun Zhong
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Hubs
|
2
|
+
|
3
|
+
hubs is a WeChat moment clone gem focus mobile only, inspired from [homeland](https://github.com/rails-engine/homeland) gem a lot, but it's having more feature:
|
4
|
+
|
5
|
+
* topic category
|
6
|
+
* post topic with image
|
7
|
+
* topic can reply
|
8
|
+
* user can like/unlike topic
|
9
|
+
* user can following/unfollowing
|
10
|
+
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'hubs'
|
18
|
+
```
|
19
|
+
|
20
|
+
And then execute:
|
21
|
+
|
22
|
+
$ bundle
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
$ gem install hubs
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
```
|
31
|
+
rails g hub:install
|
32
|
+
```
|
33
|
+
|
34
|
+
## Development
|
35
|
+
|
36
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
37
|
+
|
38
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bayetech/hubs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
43
|
+
|
44
|
+
|
45
|
+
## License
|
46
|
+
|
47
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
48
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Hub
|
2
|
+
module SoftDelete
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
alias_method :destroy!, :destroy
|
7
|
+
|
8
|
+
default_scope -> { where(deleted_at: nil) }
|
9
|
+
end
|
10
|
+
|
11
|
+
def destroy
|
12
|
+
run_callbacks(:destroy) do
|
13
|
+
if persisted?
|
14
|
+
t = Time.now.utc
|
15
|
+
update_columns(deleted_at: t, updated_at: t)
|
16
|
+
end
|
17
|
+
|
18
|
+
@destroyed = true
|
19
|
+
end
|
20
|
+
freeze
|
21
|
+
end
|
22
|
+
|
23
|
+
def deleted?
|
24
|
+
deleted_at.present?
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module Hub
|
2
|
+
module UserRelation
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
has_many :topics, -> { order(id: :desc) }, class_name: Topic
|
7
|
+
has_many :active_relationships, class_name: Relationship,
|
8
|
+
foreign_key: 'follower_customer_id',
|
9
|
+
dependent: :destroy
|
10
|
+
has_many :passive_relationships, class_name: Relationship,
|
11
|
+
foreign_key: 'followed_customer_id',
|
12
|
+
dependent: :destroy
|
13
|
+
|
14
|
+
has_many :following, through: :active_relationships, source: :followed_customer
|
15
|
+
has_many :followers, through: :passive_relationships, source: :follower_customer
|
16
|
+
|
17
|
+
has_many :replies, class_name: Hub::Reply, foreign_key: :customer_id
|
18
|
+
has_many :reply_to_replies, class_name: Hub::Reply, foreign_key: :reply_to_customer_id
|
19
|
+
has_many :likers, class_name: Hub::Liker, dependent: :destroy
|
20
|
+
|
21
|
+
has_many :follower_notifications, class_name: Hub::FollowerNotification, foreign_key: :to_customer_id
|
22
|
+
has_many :liker_notifications, class_name: Hub::LikerNotification, foreign_key: :to_customer_id
|
23
|
+
has_many :notifications, class_name: Hub::Notification, foreign_key: :to_customer_id
|
24
|
+
has_many :reply_notifications, class_name: Hub::ReplyNotification, foreign_key: :to_customer_id
|
25
|
+
end
|
26
|
+
|
27
|
+
def unread_notification_count
|
28
|
+
liker_notifications_count + reply_notifications_count + follower_notifications_count + notifications_count
|
29
|
+
end
|
30
|
+
|
31
|
+
def feed
|
32
|
+
Hub::Topic.where(customer: self).or(Hub::Topic.where(customer: following)).page_includes.recent
|
33
|
+
end
|
34
|
+
|
35
|
+
def follow(other_user)
|
36
|
+
active_relationships.create(followed_customer_id: other_user.id)
|
37
|
+
end
|
38
|
+
|
39
|
+
def unfollow(other_user)
|
40
|
+
active_relationships.find_by(followed_customer_id: other_user.id).destroy
|
41
|
+
end
|
42
|
+
|
43
|
+
def following?(other_user)
|
44
|
+
active_relationships.find_by(followed_customer_id: other_user.id).present?
|
45
|
+
end
|
46
|
+
|
47
|
+
def my_replies
|
48
|
+
replies.or(reply_to_replies)
|
49
|
+
end
|
50
|
+
|
51
|
+
def my_participant_topics
|
52
|
+
Hub::Topic.joins('left join hub_replies on hub_replies.hubs_topic_id = hub_topics.id')
|
53
|
+
.joins('left join hub_likers on hub_likers.hubs_topic_id = hub_topics.id')
|
54
|
+
.where('hub_replies.customer_id = ? or hub_likers.customer_id = ?', id, id)
|
55
|
+
.group('hub_topics.id')
|
56
|
+
end
|
57
|
+
|
58
|
+
def like(topic)
|
59
|
+
topic.likers.create(customer_id: id)
|
60
|
+
end
|
61
|
+
|
62
|
+
def unlike(topic)
|
63
|
+
topic.likers.find_by(customer_id: id).destroy
|
64
|
+
end
|
65
|
+
|
66
|
+
def liked?(topic)
|
67
|
+
topic.likers.find_by(customer_id: id).present?
|
68
|
+
end
|
69
|
+
|
70
|
+
def replied?(topic)
|
71
|
+
replies.find_by(topic: topic).present?
|
72
|
+
end
|
73
|
+
|
74
|
+
def can_publish_topic?
|
75
|
+
# 1天之内发送的频率为10
|
76
|
+
topic_count = topics.where('created_at > ? and created_at < ?', Time.current.beginning_of_day, Time.current.end_of_day).count
|
77
|
+
return false if topic_count >= 10
|
78
|
+
true
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module Hub
|
2
|
+
class FollowerNotification < ActiveRecord::Base
|
3
|
+
belongs_to :relationship, foreign_key: :hubs_relationship_id
|
4
|
+
belongs_to :to_customer, class_name: Customer, counter_cache: true
|
5
|
+
belongs_to :actor_customer, class_name: Customer
|
6
|
+
validates :actor_customer_id, :to_customer_id, :hubs_relationship_id, presence: true
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Hub
|
2
|
+
class Liker < ActiveRecord::Base
|
3
|
+
include Hub::Uid
|
4
|
+
belongs_to :customer
|
5
|
+
belongs_to :topic, foreign_key: :hubs_topic_id, counter_cache: true
|
6
|
+
has_one :notification, class_name: LikerNotification, foreign_key: :hubs_liker_id, dependent: :destroy
|
7
|
+
validates :customer_id, :hubs_topic_id, presence: true
|
8
|
+
|
9
|
+
before_create -> (l) { l.build_notification(to_customer: topic.customer, actor_customer: customer, topic: topic, title: topic.title) }
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Hub
|
2
|
+
class LikerNotification < ActiveRecord::Base
|
3
|
+
belongs_to :liker, foreign_key: :hubs_liker_id
|
4
|
+
belongs_to :topic, foreign_key: :hubs_topic_id
|
5
|
+
belongs_to :to_customer, class_name: Customer, counter_cache: true
|
6
|
+
belongs_to :actor_customer, class_name: Customer
|
7
|
+
validates :actor_customer_id, :to_customer_id, :hubs_liker_id, :hubs_topic_id, presence: true
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Hub
|
2
|
+
class Relationship < ActiveRecord::Base
|
3
|
+
belongs_to :follower_customer, class_name: Customer
|
4
|
+
belongs_to :followed_customer, class_name: Customer
|
5
|
+
|
6
|
+
has_one :notification, class_name: FollowerNotification, foreign_key: :hubs_relationship_id, dependent: :destroy
|
7
|
+
validates :follower_customer_id, :followed_customer_id, presence: true
|
8
|
+
|
9
|
+
before_create -> (r) { r.build_notification(to_customer: followed_customer, actor_customer: follower_customer) }
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Hub
|
2
|
+
class Reply < ActiveRecord::Base
|
3
|
+
include Hub::Uid
|
4
|
+
include Hub::SoftDelete
|
5
|
+
|
6
|
+
belongs_to :customer
|
7
|
+
belongs_to :topic, foreign_key: :hubs_topic_id
|
8
|
+
belongs_to :reply_to_customer, class_name: Customer
|
9
|
+
has_one :notification, class_name: ReplyNotification, foreign_key: :hubs_reply_id, dependent: :destroy
|
10
|
+
has_one :reply_to_notification, class_name: ReplyNotification, foreign_key: :hubs_reply_id, dependent: :destroy
|
11
|
+
|
12
|
+
validates :customer_id, :body, :hubs_topic_id, presence: true
|
13
|
+
validate { errors.add(:body, '回复中有不允许发表的汉字或者表情。') unless body_content_valid? }
|
14
|
+
|
15
|
+
before_create -> (r) { r.build_notification(to_customer: topic.customer, actor_customer: customer,
|
16
|
+
topic: topic, title: topic.title, reply_body: body) }
|
17
|
+
before_create -> (r) { r.build_reply_to_notification(to_customer: reply_to_customer, actor_customer: customer,
|
18
|
+
topic: topic, title: topic.title, reply_body: body) },
|
19
|
+
if: -> { reply_to_customer.present? }
|
20
|
+
|
21
|
+
scope :recent, -> { order('id desc') }
|
22
|
+
|
23
|
+
after_commit :update_topic_last_reply_at, on: [:create, :update]
|
24
|
+
|
25
|
+
def update_topic_last_reply_at
|
26
|
+
return if topic.blank?
|
27
|
+
topic.replied_at = Time.current
|
28
|
+
topic.last_active_mark = Time.now.to_i
|
29
|
+
topic.replies_count = topic.replies.count
|
30
|
+
topic.save
|
31
|
+
end
|
32
|
+
|
33
|
+
INVALID_CHARS = %w( ).freeze
|
34
|
+
|
35
|
+
def body_content_valid?
|
36
|
+
INVALID_CHARS.all? do |invalid_char|
|
37
|
+
body.index(invalid_char).nil?
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def corrected_body_content
|
42
|
+
INVALID_CHARS.each do |invalid_char|
|
43
|
+
body.gsub!(invalid_char, '')
|
44
|
+
end
|
45
|
+
body
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Hub
|
2
|
+
class ReplyNotification < ActiveRecord::Base
|
3
|
+
belongs_to :reply, foreign_key: :hubs_reply_id
|
4
|
+
belongs_to :topic, foreign_key: :hubs_topic_id
|
5
|
+
belongs_to :to_customer, class_name: Customer, counter_cache: true
|
6
|
+
belongs_to :actor_customer, class_name: Customer
|
7
|
+
validates :actor_customer_id, :to_customer_id, :hubs_reply_id, :hubs_topic_id, presence: true
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Hub
|
2
|
+
class Topic < ActiveRecord::Base
|
3
|
+
include Hub::Uid
|
4
|
+
include Hub::SoftDelete
|
5
|
+
|
6
|
+
belongs_to :customer
|
7
|
+
has_many :images, foreign_key: :hubs_topic_id, class_name: Hub::TopicImage
|
8
|
+
has_many :replies, foreign_key: :hubs_topic_id
|
9
|
+
has_many :likers, foreign_key: :hubs_topic_id
|
10
|
+
|
11
|
+
enum category: {
|
12
|
+
'巴一下' => 0, '晒好物' => 1, '茶人茶事' => 3, '新品' => 4, '茶道' => 5
|
13
|
+
}
|
14
|
+
|
15
|
+
validates :customer_id, :title, presence: true
|
16
|
+
|
17
|
+
accepts_nested_attributes_for :images, allow_destroy: true
|
18
|
+
|
19
|
+
scope :recent, -> { order('id desc') }
|
20
|
+
scope :show_in_recent, -> { where(show_in_recent: true) }
|
21
|
+
scope :page_includes, -> { includes(:customer, :images) }
|
22
|
+
|
23
|
+
before_create :set_last_active_mark
|
24
|
+
def set_last_active_mark
|
25
|
+
self.last_active_mark = Time.now.to_i
|
26
|
+
end
|
27
|
+
|
28
|
+
after_create :set_show_in_recent
|
29
|
+
def set_show_in_recent
|
30
|
+
Topic.where(customer: customer).update_all(show_in_recent: false)
|
31
|
+
update_column('show_in_recent', true)
|
32
|
+
end
|
33
|
+
|
34
|
+
def activity_at
|
35
|
+
replied_at || updated_at || created_at
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
module Hub
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
desc "Create Hub's base files"
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
def add_initializer
|
9
|
+
path = "#{Rails.root}/config/initializers/hubs.rb"
|
10
|
+
if File.exist?(path)
|
11
|
+
puts 'Skipping config/initializers/hubs.rb creation, as file already exists!'
|
12
|
+
else
|
13
|
+
puts 'Adding Hubs initializer (config/initializers/hubs.rb)...'
|
14
|
+
template 'config/initializers/hubs.rb', path
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_routes
|
19
|
+
route 'mount Hub::Engine, at: "/hub"'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# Hubs config
|
data/lib/hub/version.rb
ADDED
data/lib/hubs.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'hub/version'
|
2
|
+
|
3
|
+
module Hub
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
engine_name 'hub'
|
6
|
+
isolate_namespace Hub
|
7
|
+
end
|
8
|
+
|
9
|
+
if defined? Grape
|
10
|
+
require_relative '../app/models/concerns/hub/user_relation'
|
11
|
+
require_relative '../app/models/concerns/hub/soft_delete'
|
12
|
+
|
13
|
+
cf = File.dirname(__FILE__)
|
14
|
+
|
15
|
+
autoload(:Liker, File.expand_path('../app/models/hub/liker.rb', cf))
|
16
|
+
autoload(:Notification, File.expand_path('../app/models/hub/notification.rb', cf))
|
17
|
+
autoload(:LikerNotification, File.expand_path('../app/models/hub/liker_notification.rb', cf))
|
18
|
+
autoload(:Relationship, File.expand_path('../app/models/hub/relationship.rb', cf))
|
19
|
+
autoload(:FollowerNotification, File.expand_path('../app/models/hub/follower_notification.rb', cf))
|
20
|
+
autoload(:Reply, File.expand_path('../app/models/hub/reply.rb', cf))
|
21
|
+
autoload(:ReplyNotification, File.expand_path('../app/models/hub/reply_notification.rb', cf))
|
22
|
+
autoload(:Topic, File.expand_path('../app/models/hub/topic.rb', cf))
|
23
|
+
autoload(:TopicImage, File.expand_path('../app/models/hub/topic_image.rb', cf))
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hubs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Guo
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAplcmlj
|
14
|
+
Lmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
|
15
|
+
b20wHhcNMTYwNzExMTUyMTU2WhcNMTcwNzExMTUyMTU2WjBBMRMwEQYDVQQDDApl
|
16
|
+
cmljLmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
17
|
+
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6LSiHb79c6Krm
|
18
|
+
TeoHq5fko/QJownbKLtlzHmWCGb6B38mIPqYZBSmfaK9EZr6DTf7TJWB7e/u2+Ep
|
19
|
+
bXCqdUxRDbQZig52DvKfljfgOD/YzALHKAckuk/sskvM2pdtRIowJSYAG/Hz2j1d
|
20
|
+
mngRZaIDd/09CNttRsgCDXZl+qqsNJKCQWZ3T8OdqmlpwkIxo7llKEQ578fQwgZ3
|
21
|
+
8uE4RLMv8fOdFv0EzGXbRyFLCT2WEAH5Ns2Jv12KKbvYCTICdJ36cSV8hOUZT0fG
|
22
|
+
y4FxEXtV9uJVJv3BJ5LE84TWdNiMI1lbFul72p09vebUe2N0Hru3XDnfq69XJ+9e
|
23
|
+
nZC9MFk/AgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
24
|
+
BBR/fjIribDcJvWvxPh+zv2kFGRAejAfBgNVHREEGDAWgRRlcmljLmd1b2N6QGdt
|
25
|
+
YWlsLmNvbTAfBgNVHRIEGDAWgRRlcmljLmd1b2N6QGdtYWlsLmNvbTANBgkqhkiG
|
26
|
+
9w0BAQUFAAOCAQEAIA++aoEJOSbTwQml1cQ+z2psV2R18HKYR7ZM8bGEm9PxGyLt
|
27
|
+
DcpqGIL65VctVjqVzD4RTvDrsFhVICL5o0rLYpC4Qm5jBpx+E2s/akJSDsQcOO12
|
28
|
+
qk+IDlQHJjhf7DOg0+XAIj1/QTvq8s3QrrD8NRoIvGcAXVzqAafcG9NOGIXpqFS1
|
29
|
+
ZdwgixrYZK4p/Z+qIJFiuGvBauegUn0x7WDln52cWXgb+a/oYPBjGtBAZznhSy+R
|
30
|
+
R5k6Ma92sW8jupX4cqbSu9rntdVQkNRpoHIrfU0MZT0cKsg/D1zMteylxrO3KMsz
|
31
|
+
SPQRv+nrI1J0zevFqb8010heoR8SDyUA0Mm3+Q==
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2016-11-13 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: activerecord
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 4.2.7
|
42
|
+
- - "<"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 5.1.x
|
45
|
+
type: :runtime
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 4.2.7
|
52
|
+
- - "<"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 5.1.x
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.13'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.13'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
description: hubs is a Wechat Moment clone gem.
|
98
|
+
email:
|
99
|
+
- eric.guocz@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".rubocop.yml"
|
107
|
+
- ".travis.yml"
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- app/models/concerns/hub/soft_delete.rb
|
111
|
+
- app/models/concerns/hub/uid.rb
|
112
|
+
- app/models/concerns/hub/user_relation.rb
|
113
|
+
- app/models/hub/follower_notification.rb
|
114
|
+
- app/models/hub/liker.rb
|
115
|
+
- app/models/hub/liker_notification.rb
|
116
|
+
- app/models/hub/notification.rb
|
117
|
+
- app/models/hub/relationship.rb
|
118
|
+
- app/models/hub/reply.rb
|
119
|
+
- app/models/hub/reply_notification.rb
|
120
|
+
- app/models/hub/topic.rb
|
121
|
+
- app/models/hub/topic_image.rb
|
122
|
+
- lib/generators/hub/install_generator.rb
|
123
|
+
- lib/generators/hub/templates/config/initializers/hubs.rb
|
124
|
+
- lib/hub/version.rb
|
125
|
+
- lib/hubs.rb
|
126
|
+
homepage: https://github.com/bayetech/hubs
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.2'
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements: []
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.6.8
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: hubs is a Wechat Moment clone gem.
|
150
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|