ruby-china / homeland Goto Github PK
View Code? Open in Web Editor NEW:circus_tent: An open source forum/community system based on Rails, developed based on Ruby China.
Home Page: https://homeland.ruby-china.org
License: MIT License
:circus_tent: An open source forum/community system based on Rails, developed based on Ruby China.
Home Page: https://homeland.ruby-china.org
License: MIT License
每个用户头像都默认载入 Popover 里面的信息,有点多余了,很多时候不一定用的上
改用 Ajax 载入信息,按需加载。
越来越多垃圾网站信息提交上来,需要过事前审核,以打击垃圾信息的积极度。
It would be nice if ruby-china support emoji.
目前主题列表API不支持分页,/api/topics/index.json?size=30
我觉得应该给主题列表加上分页,这样方便在客户端上读取更多主题数据。
像这样:
/api/topics/index.json?page=3&per_page=30
这样改了,可能会影响到当前已经使用这个api的客户端。
对一个已经关注的帖取消关注取消喜欢之后,仍然会收到新回复的提醒通知。
目前的"标记所有为已读"按钮实际上没有意义,可以改成“清空通知”,以便于节省资源,我现在的通知里面都有 73 页了。
理论上的链接应该为
http://ruby-china.org/topics/1#reply1
实现上是
http://ruby-china.org/notifications#reply1
貌似是因为reply body楼数使用相对链接引起的
If I am on a topics#show
page, and click the login button and try to login
then I will be redirect_to root_url
Bring me back to where I was (aka. topics#show
page)
以上字典写入 SiteConfig 以便线上可以随时维护。
如回帖内容去掉空白以后等于上面任意一项,那出现 flast[:alert] 提醒,“请勿回复无意义的内容,如你想收藏或赞这篇帖子,请用帖子后面的功能”
只要ruby-china账号加上travis-ci的key。在加一个.travis.yml就可以了。
效果请看:
https://github.com/xiaods/ruby-china
目前有一个exceptional error. 我建议@huacnlee在review一下。
Failures:
243
244 1) TopicsHelper format_topic_body should right with Chinese neer URL
245 Failure/Error: '<p>此版本并非线上的http://yavaeye.com的源码.</p>'
246 expected: "<p>此版本并非线上的http://yavaeye.com的源码.</p>"
247 got: "<p>此版本并非线上的<a href=\"http://yavaeye.com\" rel=\"nofollow\" target=\"_blank\">http://yavaeye.com</a>的源码.</p>" (using ==)
248 # ./spec/helpers/topics_helper_spec.rb:10:in `block (3 levels) in <top (required)>'
249
250Finished in 35.6 seconds
251294 examples, 1 failure
252
253Failed examples:
254
255rspec ./spec/helpers/topics_helper_spec.rb:6 # TopicsHelper format_topic_body should right with Chinese neer URL
256rake aborted!
# @huacnlee提醒说在某些环境下面,下面测试会Pass。所以有可能在你的测试环境会失败。
helper.format_topic_body("此版本并非线上的http://yavaeye.com的源码.").should ==
'<p>此版本并非线上的http://yavaeye.com的源码.</p>'
这个断言上面提醒会auto_link,但expected中确给出不加link的result.我怎么感觉意思不同阿。
这里我们到底想让带连接的一句话返回原文,还是加上链接返回句子。
Like this..
http://ruby-china.org/search?q=--no-ri
忘記密碼功能按下"找回密碼"之後會發生錯誤
我这些天在思考API的设计时,感觉如果直接开放数据,有泄漏数据和用户隐私的担忧。所以最起码得提供一种申请机制,申请之后,有一个合法的KEY,在调用API时跟上这个KEY。这样可以保证官方的API不会被随意滥用。
ruby-china 用的 ruby-github 很久没更新了,而 Github 官方 API 接口升级到 V3 ,并在 6 月关闭了 V1, V2 的支持。
由于加入了关注功能,每次回复的时候都会分别给所有关注者发送通知信息,这个过程耗时,需要改成异步动作。
现在的代码里到处是 trailing spaces.
咨询,开发ruby-china的客户端,API到哪儿找到?我没有找到ruby-china的api文档。。。。?
重现步骤:
RT
我这里使用 _python 2.6.6_ 在运行 bundle exec rspec spec
报了 undefined method
Py_IsInitialized' for RubyPython::Python:Module` 错误
代码中的 @
符号也会被处理成 user 链接
example: http://ruby-china.org/topics/2656
https://github.com/ruby-china/ruby-china/blob/master/config/initializers/markdown.rb#L113
看了下日志和源码,似乎是延时任务出错,反序列化的时候异常。
不过代码太复杂没搞懂怎么修。
先移除了导致绑定错误的问题之一 01a04f7
目前还有问题:
多行代码指定语言类型时候,如果写 ruby
,代码可以高亮,但是如果写 Ruby
就无法高亮
把gif禁止掉吧,看了头晕:http://ruby-china.org/topics/2239
目前的页脚各种连接已经很挤了,塞入一个 商店
就更加拥挤了。
是否能将 github
放到页面右上角,做成 “Fork me on github” 的banner,类似 http://club.cnodejs.org/ 的处理方法?
类似发帖和回帖的预览功能
绑定Github有些小问题
app/views/account/edit.html.erb
提示应该是一个“点击解除绑定" 一个"点击绑定", 原文是两个“点击解除绑定"
因为那个location问题(http://ruby-china.org/topics/4329 9楼), 会也在解除绑定的时候出错。
另外, 现在解除绑定不能成功,在文件app/controllers/users_controller.rb
中, 也要改一下
current_user.authorizations.destroy_all(:conditions => {:provider => provider})
要改为
current_user.authorizations.destroy_all({provider: provider})
参看: http://mongoid.org/en/mongoid/docs/persistence.html
Github issue: #69
现在很多帖子回复近百或破百。
新注册用户,在修改完资料(/account/edit),点击“更新资料”后跳转到报错页面(we're sorry, but something ...)。
填写了的表单项包括:email,城市,个人介绍。
其它项留空。
Update: 看情况像是“城市”这一项有时候会触动某些敏感词?
我clone出一份 ruby-china 的代码,按照 README 运行命令一切 OK 。包括 rails s
也成功启动了。
_但是当我执行rake spec
时,报错了:_
.FFFF.FFF.F.F..FF...........F.......FMarkdownTopicConverter.format ERROR: undefined method 'Py_IsInitialized' for RubyPython::Python:Module
FMarkdownTopicConverter.format ERROR: undefined method 'Py_IsInitialized' for RubyPython::Python:Module
Fruby: markdown.c:2426: sd_markdown_render: Assertion 'md->work_bufs[0].size == 0' failed.
执行
bundle exec rspec spec
也一样报错
我安装了 rubypython
$ gem list | grep python
rubypython (0.5.3)
我的环境
$ ruby -v
ruby 1.9.2p318 (2012-02-14 revision 34678) [i686-linux]
$ rails -v
Rails 3.2.6
$ mongo --version
MongoDB shell version: 2.0.6
$ redis-cli -v
redis-cli 2.4.10
_请各位帮忙分析分析,是不是我少安装了什么东西?_
发现有一些比较大的, 和项目不相关的文件在里面. 虽然说会改掉所有的commits, 但长痛不如短痛吧.
2.7M packages/csft_3.2.13-1_i386.deb (ab1a0ce: 1 year, 4 months ago)
2.7M packages/mmseg_3.2.13-1_i386.deb (ab1a0ce: 1 year, 4 months ago)
2.3M coreseek-3.2.13/csft-3.2.13/src/indexer (710437f: 1 year, 6 months ago)
2.3M coreseek-3.2.13/csft-3.2.13/src/indextool (710437f: 1 year, 6 months ago)
7.2M coreseek-3.2.13/csft-3.2.13/src/libsphinx.a (710437f: 1 year, 6 months ago)
2.3M coreseek-3.2.13/csft-3.2.13/src/search (710437f: 1 year, 6 months ago)
2.6M coreseek-3.2.13/csft-3.2.13/src/searchd (710437f: 1 year, 6 months ago)
1.6M coreseek-3.2.13/csft-3.2.13/src/searchd.o (710437f: 1 year, 6 months ago)
2.2M coreseek-3.2.13/csft-3.2.13/src/spelldump (710437f: 1 year, 6 months ago)
3.0M coreseek-3.2.13/csft-3.2.13/src/sphinx.o (710437f: 1 year, 6 months ago)
2.2M coreseek-3.2.13/csft-3.2.13/src/sphinxsort.o (710437f: 1 year, 6 months ago)
2.2M coreseek-3.2.13/csft-3.2.13/src/tests (710437f: 1 year, 6 months ago)
3.7M coreseek-3.2.13/mmseg-3.2.13/data/uni.lib (710437f: 1 year, 6 months ago)
1.1M coreseek-3.2.13/mmseg-3.2.13/data/Lexicon_full_words.txt (710437f: 1 year, 6 months ago)
1.8M coreseek-3.2.13/mmseg-3.2.13/data/unigram.txt (710437f: 1 year, 6 months ago)
1.8M coreseek-3.2.13/mmseg-3.2.13/src/.libs/libmmseg.a (710437f: 1 year, 6 months ago)
topic 页面 弹出的帮助窗口 点击右上角的 "x" 关不掉
RT
由于太多扯淡帖,精品内容容易被掩盖,给帖子实现推荐功能,被推荐的帖子将会出现在精品过滤列表(直接在 默认 / 无人问津 / 最新创建 这个区域增加精品过滤)
仅管理员可推荐,以保证里面出现的内容都是技术讨论的。
目前 Email 修改没有密码存在漏洞,简单点做就禁用 Email 修改吧,这样一来还可以有效防止马甲用户。
回帖的时候输入@跳出来的列表,不能用鼠标选择
从我这里链接网站都是502 Bad Gateway,是bug么?
如 ‘046569’ 这个用户
应该用 attr('data-name')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.