Skip to content

Commit

Permalink
Merge pull request hotsh#819 from carols10cents/ruby-2
Browse files Browse the repository at this point in the history
Adds support and preference for Ruby 2.0.0
  • Loading branch information
wilkie committed Oct 8, 2014
2 parents 33e3540 + cc80bd4 commit a2fed55
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 63 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rstatus
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0
47 changes: 0 additions & 47 deletions .rvmrc.example

This file was deleted.

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.3
services:
- mongodb
- elasticsearch
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source 'http://rubygems.org'

ruby '1.9.3'

gem 'rails', '3.2.14'

# Gems used only for assets and not required
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Edit your profile and attach your twitter account if you want.

## Quick facts and links

- The stack: ruby/rails 3.2/mongodb
- The stack: ruby (1.9.3 OR 2.0.0 OR 2.1.3)/rails 3.2/mongodb
- [The code][code]
- [The documentation][docs] (We could use lots of improvement here!)
- [The Issues list][issues]
Expand Down Expand Up @@ -120,9 +120,9 @@ Edit your profile and attach your twitter account if you want.
If you'd like to contribute, we'd love to have you! Your first order of
business is setting up a development environment and making sure all the tests
pass on your system. Rstat.us is a Ruby on Rails 3.2 application, so it's
assumed you already have [Ruby](http://www.ruby-lang.org/en/downloads) (1.9.2
or 1.9.3 preferred, 1.8.7 compatibility is not guaranteed), rubygems (comes
with Ruby as of 1.9.2), and [bundler](http://gembundler.com/) on your machine.
assumed you already have [Ruby](http://www.ruby-lang.org/en/downloads) (1.9.3, 2.0.0
or 2.1.3 preferred, 1.8.7/1.9.2 compatibility is not guaranteed), rubygems (comes
with Ruby), and [bundler](http://gembundler.com/) on your machine.
If not, each of those links has instructions, and we're willing to help via
one of the contact methods above if you have issues.

Expand All @@ -148,8 +148,6 @@ bug_. For example, [this is an issue with running a development environment on
windows](https://github.com/hotsh/rstat.us/issues/547) that we need to fix.
Please report any issues you have.

If you use RVM, you'll want to copy `.rvmrc.example` to `.rvmrc`.

### Getting a local version running

First off: you will need MongoDB (www.mongodb.org). They have a [quickstart
Expand All @@ -172,7 +170,7 @@ generated for you and your config.yml file updated. When you run tests a new
random SECRET_TOKEN will be generated each time. You can always copy
config/config.yml.sample to config/config.yml and edit it on your own beforehand.

- encoding is UTF-8 by default for ruby 1.9.3
- encoding is UTF-8 by default
- Notes about config settings are in the example file (config/config.yml.example)

And start the server:
Expand Down
24 changes: 18 additions & 6 deletions test/acceptance/search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
it "allows access to search" do
search_for("droids")

assert_match @update_text, page.body
within '#search' do
assert has_text? @update_text
end
end
end

Expand All @@ -47,7 +49,9 @@
it "allows access to search" do
search_for("droids")

assert_match @update_text, page.body
within '#search' do
assert has_text? @update_text
end
end

it "returns updates on blank search" do
Expand All @@ -71,25 +75,33 @@
it "gets a match for a word in the update" do
search_for("droids")

assert_match @update_text, page.body
within '#search' do
assert has_text? @update_text
end
end

it "doesn't get a match for a substring ending a word in the update" do
search_for("roids")

assert_match "No statuses match your search.", page.body
within '#content' do
assert has_text? "No statuses match your search."
end
end

it "doesn't get a match for a substring starting a word in the update" do
search_for("loo")

assert_match "No statuses match your search.", page.body
within '#content' do
assert has_text? "No statuses match your search."
end
end

it "gets a case-insensitive match for a word in the update" do
search_for("DROIDS")

assert_match @update_text, page.body
within '#search' do
assert has_text? @update_text
end
end

it "gets a match for hashtag search" do
Expand Down
4 changes: 3 additions & 1 deletion test/enhancements/elasticsearch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
it "gets a match for words in the update out of order" do
search_for("for looking")

assert_match @update_text, page.body
within '#search' do
assert has_text? @update_text
end
end
end

0 comments on commit a2fed55

Please sign in to comment.