lib/generators/social2social/install_generator.rb in social2social-0.0.3 vs lib/generators/social2social/install_generator.rb in social2social-0.0.4
- old
+ new
@@ -1,33 +1,19 @@
class Social2social::InstallGenerator < Rails::Generators::Base
include Rails::Generators::Migration
- hook_for :social_stream
-
source_root File.expand_path('../templates', __FILE__)
- def route_pshb
- route "match 'pshb/callback' => 'pshb#callback', :as => :pshb_callback"
- end
-
- def route_ru
- route "match 'remoteuser/' => 'remoteusers#index', :as => :add_remote_user"
- end
-
def config_initializer
copy_file 'initializer.rb', 'config/initializers/social2social.rb'
end
def inject_remote_user_relation
append_file 'config/relations.yml',
"\nremote_subject:\n friend:\n name: friend\n permissions:\n - [ follow ]\n sphere: personal\n"+
" public:\n name: public\n permissions:\n - [ read, tie, star_tie ]\n sphere: personal"
end
-
- def inject_translations
- copy_file 'en.yml', 'config/locales/s2s.en.yml'
- end
-
+
def copy_public
directory "public"
end
require 'rails/generators/active_record'