diff --git a/Gemfile b/Gemfile index 66326040a..ca534f833 100644 --- a/Gemfile +++ b/Gemfile @@ -117,6 +117,7 @@ end group :test do gem 'capybara', '~> 0.3.9' gem 'cucumber-rails', '0.3.2' + gem 'cucumber-api-steps', :require => false gem 'database_cleaner', '0.6.0' gem 'diaspora-client', :git => 'git://github.com/diaspora/diaspora-client.git' #"0.1.0", #:path => '~/workspace/diaspora-client' diff --git a/Gemfile.lock b/Gemfile.lock index 4c64a6f71..f509aa43d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -150,6 +150,9 @@ GEM gherkin (~> 2.5.0) json (>= 1.4.6) term-ansicolor (>= 1.0.6) + cucumber-api-steps (0.6) + cucumber (>= 0.8.3) + jsonpath (>= 0.1.2) cucumber-rails (0.3.2) cucumber (>= 0.8.0) culerity (0.2.15) @@ -235,6 +238,8 @@ GEM jasmine-core (1.2.0.rc1) json (1.4.6) json_pure (1.6.1) + jsonpath (0.4.2) + multi_json jwt (0.1.3) json (>= 1.2.4) linecache (0.43) @@ -481,6 +486,7 @@ DEPENDENCIES carrierwave (= 0.5.2) chef (= 0.9.12) cloudfiles (= 1.4.10) + cucumber-api-steps cucumber-rails (= 0.3.2) database_cleaner (= 0.6.0) devise (~> 1.3.1) diff --git a/config/routes.rb b/config/routes.rb index 25881a366..0c3e44237 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -165,6 +165,12 @@ Diaspora::Application.routes.draw do get :me end + namespace :api do + namespace :v0 do + get "/users/:username" => 'users#show', :as => 'user' + end + end + # Mobile site diff --git a/features/support/env.rb b/features/support/env.rb index 5c6c5ecd7..b03c6cedf 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -16,6 +16,8 @@ require 'capybara/rails' require 'capybara/cucumber' require 'capybara/session' require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript +require 'cucumber/api_steps' + # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In # order to ease the transition to Capybara we set the default here. If you'd # prefer to use XPath just remove this line and adjust any selectors in your diff --git a/lib/stream/aspect.rb b/lib/stream/aspect.rb index 0ab9822f6..29b016671 100644 --- a/lib/stream/aspect.rb +++ b/lib/stream/aspect.rb @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -class Stream::Aspect< Stream::Base +class Stream::Aspect < Stream::Base # @param user [User] # @param inputted_aspect_ids [Array] Ids of aspects for given stream