socializer 0.1.13
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
- data/.editorconfig +11 -0
- data/.gitignore +29 -0
- data/.rubocop.yml +42 -0
- data/.travis.yml +13 -0
- data/CONTRIBUTING.md +46 -0
- data/Gemfile +31 -0
- data/README.md +91 -0
- data/Rakefile +38 -0
- data/app/assets/images/socializer/.gitkeep +0 -0
- data/app/assets/images/socializer/auth_buttons/facebook_128.png +0 -0
- data/app/assets/images/socializer/auth_buttons/facebook_256.png +0 -0
- data/app/assets/images/socializer/auth_buttons/facebook_32.png +0 -0
- data/app/assets/images/socializer/auth_buttons/facebook_64.png +0 -0
- data/app/assets/images/socializer/auth_buttons/google_128.png +0 -0
- data/app/assets/images/socializer/auth_buttons/google_256.png +0 -0
- data/app/assets/images/socializer/auth_buttons/google_32.png +0 -0
- data/app/assets/images/socializer/auth_buttons/google_64.png +0 -0
- data/app/assets/images/socializer/auth_buttons/linkedin_128.png +0 -0
- data/app/assets/images/socializer/auth_buttons/linkedin_256.png +0 -0
- data/app/assets/images/socializer/auth_buttons/linkedin_32.png +0 -0
- data/app/assets/images/socializer/auth_buttons/linkedin_64.png +0 -0
- data/app/assets/images/socializer/auth_buttons/twitter_128.png +0 -0
- data/app/assets/images/socializer/auth_buttons/twitter_256.png +0 -0
- data/app/assets/images/socializer/auth_buttons/twitter_32.png +0 -0
- data/app/assets/images/socializer/auth_buttons/twitter_64.png +0 -0
- data/app/assets/images/socializer/auth_buttons/yahoo_128.png +0 -0
- data/app/assets/images/socializer/auth_buttons/yahoo_256.png +0 -0
- data/app/assets/images/socializer/auth_buttons/yahoo_32.png +0 -0
- data/app/assets/images/socializer/auth_buttons/yahoo_64.png +0 -0
- data/app/assets/images/socializer/close.png +0 -0
- data/app/assets/images/socializer/icons/Bell.png +0 -0
- data/app/assets/images/socializer/icons/Edit.png +0 -0
- data/app/assets/images/socializer/icons/Home.png +0 -0
- data/app/assets/images/socializer/icons/Power.png +0 -0
- data/app/assets/images/socializer/icons/Safe.png +0 -0
- data/app/assets/images/socializer/icons/User.png +0 -0
- data/app/assets/images/socializer/icons/Users.png +0 -0
- data/app/assets/images/socializer/icons/Web.png +0 -0
- data/app/assets/images/socializer/loading.gif +0 -0
- data/app/assets/images/socializer/next.png +0 -0
- data/app/assets/images/socializer/pause.png +0 -0
- data/app/assets/images/socializer/play.png +0 -0
- data/app/assets/images/socializer/previous.png +0 -0
- data/app/assets/javascripts/socializer/activities.js.coffee +47 -0
- data/app/assets/javascripts/socializer/application.js +24 -0
- data/app/assets/javascripts/socializer/circles.js.coffee +33 -0
- data/app/assets/javascripts/socializer/jquery.qtip.min.js +7 -0
- data/app/assets/javascripts/socializer/jquery.tokeninput.js +862 -0
- data/app/assets/javascripts/socializer/notes.js.coffee +38 -0
- data/app/assets/javascripts/socializer/people.js.coffee +7 -0
- data/app/assets/javascripts/socializer/shares.js.coffee +8 -0
- data/app/assets/stylesheets/socializer/activities.css +84 -0
- data/app/assets/stylesheets/socializer/application.css +409 -0
- data/app/assets/stylesheets/socializer/authentications.css +4 -0
- data/app/assets/stylesheets/socializer/circles.css +74 -0
- data/app/assets/stylesheets/socializer/comments.css +4 -0
- data/app/assets/stylesheets/socializer/groups.css +61 -0
- data/app/assets/stylesheets/socializer/jquery.qtip.min.css +2 -0
- data/app/assets/stylesheets/socializer/likes.css +4 -0
- data/app/assets/stylesheets/socializer/memberships.css +4 -0
- data/app/assets/stylesheets/socializer/notes.css +21 -0
- data/app/assets/stylesheets/socializer/notifications.css +46 -0
- data/app/assets/stylesheets/socializer/pages.css +4 -0
- data/app/assets/stylesheets/socializer/persons.css +25 -0
- data/app/assets/stylesheets/socializer/sessions.css +4 -0
- data/app/assets/stylesheets/socializer/shares.css.scss +3 -0
- data/app/assets/stylesheets/socializer/ties.css +4 -0
- data/app/assets/stylesheets/socializer/token-input.css +183 -0
- data/app/controllers/socializer/activities_controller.rb +84 -0
- data/app/controllers/socializer/application_controller.rb +37 -0
- data/app/controllers/socializer/audiences_controller.rb +30 -0
- data/app/controllers/socializer/authentications_controller.rb +13 -0
- data/app/controllers/socializer/circles_controller.rb +54 -0
- data/app/controllers/socializer/comments_controller.rb +37 -0
- data/app/controllers/socializer/groups_controller.rb +70 -0
- data/app/controllers/socializer/likes_controller.rb +50 -0
- data/app/controllers/socializer/memberships_controller.rb +46 -0
- data/app/controllers/socializer/notes_controller.rb +43 -0
- data/app/controllers/socializer/notifications_controller.rb +29 -0
- data/app/controllers/socializer/pages_controller.rb +7 -0
- data/app/controllers/socializer/people_controller.rb +37 -0
- data/app/controllers/socializer/person_addresses_controller.rb +27 -0
- data/app/controllers/socializer/person_contributions_controller.rb +27 -0
- data/app/controllers/socializer/person_educations_controller.rb +27 -0
- data/app/controllers/socializer/person_employments_controller.rb +27 -0
- data/app/controllers/socializer/person_links_controller.rb +27 -0
- data/app/controllers/socializer/person_phones_controller.rb +27 -0
- data/app/controllers/socializer/person_places_controller.rb +27 -0
- data/app/controllers/socializer/person_profiles_controller.rb +27 -0
- data/app/controllers/socializer/sessions_controller.rb +37 -0
- data/app/controllers/socializer/shares_controller.rb +54 -0
- data/app/controllers/socializer/ties_controller.rb +16 -0
- data/app/helpers/socializer/application_helper.rb +22 -0
- data/app/models/concerns/socializer/object_type_base.rb +58 -0
- data/app/models/socializer/activity.rb +162 -0
- data/app/models/socializer/activity_field.rb +10 -0
- data/app/models/socializer/activity_object.rb +118 -0
- data/app/models/socializer/audience.rb +19 -0
- data/app/models/socializer/authentication.rb +20 -0
- data/app/models/socializer/circle.rb +32 -0
- data/app/models/socializer/comment.rb +13 -0
- data/app/models/socializer/group.rb +100 -0
- data/app/models/socializer/group_category.rb +11 -0
- data/app/models/socializer/group_link.rb +12 -0
- data/app/models/socializer/identity.rb +9 -0
- data/app/models/socializer/membership.rb +24 -0
- data/app/models/socializer/note.rb +13 -0
- data/app/models/socializer/notification.rb +16 -0
- data/app/models/socializer/person.rb +129 -0
- data/app/models/socializer/person_address.rb +12 -0
- data/app/models/socializer/person_contribution.rb +12 -0
- data/app/models/socializer/person_education.rb +8 -0
- data/app/models/socializer/person_employment.rb +8 -0
- data/app/models/socializer/person_link.rb +12 -0
- data/app/models/socializer/person_phone.rb +16 -0
- data/app/models/socializer/person_place.rb +11 -0
- data/app/models/socializer/person_profile.rb +12 -0
- data/app/models/socializer/tie.rb +12 -0
- data/app/models/socializer/verb.rb +9 -0
- data/app/views/layouts/socializer/_header.html.erb +11 -0
- data/app/views/layouts/socializer/application.html.erb +60 -0
- data/app/views/socializer/activities/_activity.html.erb +23 -0
- data/app/views/socializer/activities/_activity_bottom.html.erb +55 -0
- data/app/views/socializer/activities/_activity_content.html.erb +19 -0
- data/app/views/socializer/activities/_activity_top.html.erb +22 -0
- data/app/views/socializer/activities/_stream_card.html.erb +6 -0
- data/app/views/socializer/activities/_stream_list.html.erb +16 -0
- data/app/views/socializer/activities/audience.html.erb +19 -0
- data/app/views/socializer/activities/destroy.js.erb +3 -0
- data/app/views/socializer/activities/edit.html.erb +0 -0
- data/app/views/socializer/activities/index.html.erb +15 -0
- data/app/views/socializer/authentications/_form.html.erb +0 -0
- data/app/views/socializer/authentications/_menu.html.erb +5 -0
- data/app/views/socializer/authentications/index.html.erb +8 -0
- data/app/views/socializer/authentications/new.html.erb +8 -0
- data/app/views/socializer/circles/_card.html.erb +7 -0
- data/app/views/socializer/circles/_circles.html.erb +6 -0
- data/app/views/socializer/circles/_form.html.erb +6 -0
- data/app/views/socializer/circles/_menu.html.erb +7 -0
- data/app/views/socializer/circles/contact_of.html.erb +7 -0
- data/app/views/socializer/circles/contacts.html.erb +7 -0
- data/app/views/socializer/circles/edit.html.erb +1 -0
- data/app/views/socializer/circles/find_people.html.erb +7 -0
- data/app/views/socializer/circles/index.html.erb +6 -0
- data/app/views/socializer/circles/new.html.erb +1 -0
- data/app/views/socializer/circles/show.html.erb +10 -0
- data/app/views/socializer/comments/_form.html.erb +8 -0
- data/app/views/socializer/comments/edit.html.erb +1 -0
- data/app/views/socializer/comments/new.html.erb +1 -0
- data/app/views/socializer/groups/_card.html.erb +6 -0
- data/app/views/socializer/groups/_form.html.erb +6 -0
- data/app/views/socializer/groups/_menu.html.erb +10 -0
- data/app/views/socializer/groups/edit.html.erb +1 -0
- data/app/views/socializer/groups/index.html.erb +0 -0
- data/app/views/socializer/groups/joinable.html.erb +16 -0
- data/app/views/socializer/groups/memberships.html.erb +19 -0
- data/app/views/socializer/groups/new.html.erb +1 -0
- data/app/views/socializer/groups/ownerships.html.erb +20 -0
- data/app/views/socializer/groups/pending_invites.html.erb +20 -0
- data/app/views/socializer/groups/public.html.erb +16 -0
- data/app/views/socializer/groups/restricted.html.erb +16 -0
- data/app/views/socializer/groups/show.html.erb +29 -0
- data/app/views/socializer/likes/create.js.erb +2 -0
- data/app/views/socializer/likes/destroy.js.erb +2 -0
- data/app/views/socializer/likes/index.html.erb +5 -0
- data/app/views/socializer/notes/_form.html.erb +7 -0
- data/app/views/socializer/notes/create.js.erb +10 -0
- data/app/views/socializer/notes/destroy.js.erb +3 -0
- data/app/views/socializer/notes/edit.html.erb +1 -0
- data/app/views/socializer/notes/new.html.erb +2 -0
- data/app/views/socializer/notifications/index.html.erb +35 -0
- data/app/views/socializer/pages/index.html.erb +2 -0
- data/app/views/socializer/people/_card.html.erb +15 -0
- data/app/views/socializer/people/_form.html.erb +30 -0
- data/app/views/socializer/people/_login.html.erb +14 -0
- data/app/views/socializer/people/_menu.html.erb +9 -0
- data/app/views/socializer/people/edit.html.erb +2 -0
- data/app/views/socializer/people/index.html.erb +5 -0
- data/app/views/socializer/people/likes.html.erb +6 -0
- data/app/views/socializer/people/message.html.erb +5 -0
- data/app/views/socializer/people/show.html.erb +122 -0
- data/app/views/socializer/person_addresses/_form.html.erb +12 -0
- data/app/views/socializer/person_contributions/_form.html.erb +7 -0
- data/app/views/socializer/person_educations/_form.html.erb +10 -0
- data/app/views/socializer/person_employments/_form.html.erb +10 -0
- data/app/views/socializer/person_links/_form.html.erb +6 -0
- data/app/views/socializer/person_phones/_form.html.erb +6 -0
- data/app/views/socializer/person_places/_form.html.erb +6 -0
- data/app/views/socializer/person_profiles/_form.html.erb +6 -0
- data/app/views/socializer/shares/_form.html.erb +19 -0
- data/app/views/socializer/shares/new.html.erb +1 -0
- data/config.ru +4 -0
- data/config/cucumber.yml +8 -0
- data/config/initializers/inflections.rb +3 -0
- data/config/locales/en.yml +108 -0
- data/config/locales/fr.yml +329 -0
- data/config/rails_best_practices.yml +41 -0
- data/config/routes.rb +71 -0
- data/db/migrate/20110804175740_create_socializer_activity_objects.rb +14 -0
- data/db/migrate/20110804180557_create_socializer_people.rb +31 -0
- data/db/migrate/20110804184415_create_socializer_notes.rb +12 -0
- data/db/migrate/20110804192211_create_socializer_authentications.rb +12 -0
- data/db/migrate/20110805085417_create_socializer_circles.rb +14 -0
- data/db/migrate/20110805090617_create_socializer_activities.rb +17 -0
- data/db/migrate/20110805092635_create_socializer_audiences.rb +14 -0
- data/db/migrate/20110805094846_create_socializer_comments.rb +12 -0
- data/db/migrate/20110805121454_create_socializer_groups.rb +19 -0
- data/db/migrate/20110805121543_create_socializer_memberships.rb +14 -0
- data/db/migrate/20110805125606_create_socializer_ties.rb +13 -0
- data/db/migrate/20111207234435_create_socializer_identities.rb +12 -0
- data/db/migrate/20130524000429_create_socializer_verbs.rb +10 -0
- data/db/migrate/20130528143831_create_socializer_activity_fields.rb +10 -0
- data/db/migrate/20140128235250_create_socializer_notifications.rb +11 -0
- data/db/migrate/20140131065531_create_socializer_person_employments.rb +15 -0
- data/db/migrate/20140131065733_create_socializer_person_educations.rb +15 -0
- data/db/migrate/20140131065836_create_socializer_person_places.rb +11 -0
- data/db/migrate/20140131070051_create_socializer_person_contributions.rb +12 -0
- data/db/migrate/20140131070232_create_socializer_person_links.rb +11 -0
- data/db/migrate/20140131070259_create_socializer_person_profiles.rb +11 -0
- data/db/migrate/20140131070417_create_socializer_person_phones.rb +12 -0
- data/db/migrate/20140131070611_create_socializer_person_addresses.rb +17 -0
- data/db/migrate/20140131070839_create_socializer_group_links.rb +11 -0
- data/db/migrate/20140131070951_create_socializer_group_categories.rb +10 -0
- data/features/support/capybara.rb +14 -0
- data/features/support/env.rb +57 -0
- data/features/support/factory_girl.rb +1 -0
- data/lib/socializer.rb +4 -0
- data/lib/socializer/engine.rb +27 -0
- data/lib/socializer/version.rb +3 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/socializer_tasks.rake +4 -0
- data/script/cucumber +10 -0
- data/socializer.gemspec +49 -0
- data/spec/controllers/socializer/likes_controller_spec.rb +29 -0
- data/spec/controllers/socializer/shares_controller_spec.rb +22 -0
- data/spec/factories/socializer_activities.rb +11 -0
- data/spec/factories/socializer_activity_fields.rb +8 -0
- data/spec/factories/socializer_activity_objects.rb +7 -0
- data/spec/factories/socializer_audiences.rb +9 -0
- data/spec/factories/socializer_authentications.rb +6 -0
- data/spec/factories/socializer_circles.rb +9 -0
- data/spec/factories/socializer_comments.rb +6 -0
- data/spec/factories/socializer_group_categories.rb +8 -0
- data/spec/factories/socializer_group_links.rb +9 -0
- data/spec/factories/socializer_groups.rb +9 -0
- data/spec/factories/socializer_identities.rb +10 -0
- data/spec/factories/socializer_memberships.rb +6 -0
- data/spec/factories/socializer_notes.rb +7 -0
- data/spec/factories/socializer_notifications.rb +10 -0
- data/spec/factories/socializer_people.rb +7 -0
- data/spec/factories/socializer_person_addresses.rb +8 -0
- data/spec/factories/socializer_person_contributions.rb +9 -0
- data/spec/factories/socializer_person_educations.rb +7 -0
- data/spec/factories/socializer_person_employments.rb +7 -0
- data/spec/factories/socializer_person_links.rb +9 -0
- data/spec/factories/socializer_person_phones.rb +9 -0
- data/spec/factories/socializer_person_places.rb +8 -0
- data/spec/factories/socializer_person_profiles.rb +9 -0
- data/spec/factories/socializer_ties.rb +6 -0
- data/spec/factories/socializer_verbs.rb +7 -0
- data/spec/inflector_spec.rb +19 -0
- data/spec/models/socializer/activity_field_spec.rb +25 -0
- data/spec/models/socializer/activity_object_spec.rb +118 -0
- data/spec/models/socializer/activity_spec.rb +16 -0
- data/spec/models/socializer/audience_spec.rb +32 -0
- data/spec/models/socializer/authentication_spec.rb +29 -0
- data/spec/models/socializer/circle_spec.rb +53 -0
- data/spec/models/socializer/comment_spec.rb +19 -0
- data/spec/models/socializer/group_category_spec.rb +23 -0
- data/spec/models/socializer/group_link_spec.rb +25 -0
- data/spec/models/socializer/group_spec.rb +218 -0
- data/spec/models/socializer/identity_spec.rb +32 -0
- data/spec/models/socializer/membership_spec.rb +68 -0
- data/spec/models/socializer/note_spec.rb +19 -0
- data/spec/models/socializer/notification_spec.rb +28 -0
- data/spec/models/socializer/person_address_spec.rb +27 -0
- data/spec/models/socializer/person_contribution_spec.rb +27 -0
- data/spec/models/socializer/person_education_spec.rb +25 -0
- data/spec/models/socializer/person_employment_spec.rb +25 -0
- data/spec/models/socializer/person_link_spec.rb +26 -0
- data/spec/models/socializer/person_phone_spec.rb +28 -0
- data/spec/models/socializer/person_place_spec.rb +25 -0
- data/spec/models/socializer/person_profile_spec.rb +26 -0
- data/spec/models/socializer/person_spec.rb +105 -0
- data/spec/models/socializer/tie_spec.rb +24 -0
- data/spec/models/socializer/verb_spec.rb +24 -0
- data/spec/spec_helper.rb +84 -0
- data/vendor/assets/javascripts/moment/langs.js +5841 -0
- data/vendor/assets/javascripts/moment/moment.js +2400 -0
- metadata +754 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateSocializerPersonAddresses < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :socializer_person_addresses do |t|
|
|
4
|
+
t.integer :person_id, null: false
|
|
5
|
+
t.integer :category
|
|
6
|
+
t.integer :label
|
|
7
|
+
t.string :line1
|
|
8
|
+
t.string :line2
|
|
9
|
+
t.string :city
|
|
10
|
+
t.string :postal_code_or_zip
|
|
11
|
+
t.string :province_or_state
|
|
12
|
+
t.string :country
|
|
13
|
+
|
|
14
|
+
t.timestamps
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Bundler.require :default, :test
|
|
2
|
+
|
|
3
|
+
require 'socializer'
|
|
4
|
+
|
|
5
|
+
require 'capybara'
|
|
6
|
+
require 'capybara/rails'
|
|
7
|
+
# require 'capybara/cucumber'
|
|
8
|
+
|
|
9
|
+
World(Capybara::RSpecMatchers)
|
|
10
|
+
World(Capybara::DSL)
|
|
11
|
+
|
|
12
|
+
Capybara.save_and_open_page_path = 'tmp/capybara'
|
|
13
|
+
|
|
14
|
+
World { Capybara.app.routes.url_helpers }
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
|
5
|
+
# files.
|
|
6
|
+
|
|
7
|
+
require 'cucumber/rails'
|
|
8
|
+
|
|
9
|
+
# Capybara defaults to CSS3 selectors rather than XPath.
|
|
10
|
+
# If you'd prefer to use XPath, just uncomment this line and adjust any
|
|
11
|
+
# selectors in your step definitions to use the XPath syntax.
|
|
12
|
+
# Capybara.default_selector = :xpath
|
|
13
|
+
|
|
14
|
+
# By default, any exception happening in your Rails application will bubble up
|
|
15
|
+
# to Cucumber so that your scenario will fail. This is a different from how
|
|
16
|
+
# your application behaves in the production environment, where an error page will
|
|
17
|
+
# be rendered instead.
|
|
18
|
+
#
|
|
19
|
+
# Sometimes we want to override this default behaviour and allow Rails to rescue
|
|
20
|
+
# exceptions and display an error page (just like when the app is running in production).
|
|
21
|
+
# Typical scenarios where you want to do this is when you test your error pages.
|
|
22
|
+
# There are two ways to allow Rails to rescue exceptions:
|
|
23
|
+
#
|
|
24
|
+
# 1) Tag your scenario (or feature) with @allow-rescue
|
|
25
|
+
#
|
|
26
|
+
# 2) Set the value below to true. Beware that doing this globally is not
|
|
27
|
+
# recommended as it will mask a lot of errors for you!
|
|
28
|
+
#
|
|
29
|
+
ActionController::Base.allow_rescue = false
|
|
30
|
+
|
|
31
|
+
# Remove/comment out the lines below if your app doesn't have a database.
|
|
32
|
+
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
|
|
33
|
+
begin
|
|
34
|
+
DatabaseCleaner.strategy = :transaction
|
|
35
|
+
rescue NameError
|
|
36
|
+
raise 'You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it.'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
|
|
40
|
+
# See the DatabaseCleaner documentation for details. Example:
|
|
41
|
+
#
|
|
42
|
+
# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
|
|
43
|
+
# # { :except => [:widgets] } may not do what you expect here
|
|
44
|
+
# # as Cucumber::Rails::Database.javascript_strategy overrides
|
|
45
|
+
# # this setting.
|
|
46
|
+
# DatabaseCleaner.strategy = :truncation
|
|
47
|
+
# end
|
|
48
|
+
#
|
|
49
|
+
# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
|
|
50
|
+
# DatabaseCleaner.strategy = :transaction
|
|
51
|
+
# end
|
|
52
|
+
#
|
|
53
|
+
|
|
54
|
+
# Possible values are :truncation and :transaction
|
|
55
|
+
# The :transaction strategy is faster, but might give you threading problems.
|
|
56
|
+
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
|
|
57
|
+
Cucumber::Rails::Database.javascript_strategy = :truncation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
World(FactoryGirl::Syntax::Methods)
|
data/lib/socializer.rb
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'coffee-rails'
|
|
2
|
+
require 'sass/rails'
|
|
3
|
+
require 'enumerize'
|
|
4
|
+
require 'omniauth'
|
|
5
|
+
require 'omniauth-identity'
|
|
6
|
+
require 'omniauth-facebook'
|
|
7
|
+
require 'omniauth-linkedin'
|
|
8
|
+
require 'omniauth-openid'
|
|
9
|
+
require 'omniauth-twitter'
|
|
10
|
+
|
|
11
|
+
module Socializer
|
|
12
|
+
class Engine < Rails::Engine
|
|
13
|
+
isolate_namespace Socializer
|
|
14
|
+
|
|
15
|
+
config.generators do |g|
|
|
16
|
+
g.test_framework :rspec,
|
|
17
|
+
fixtures: true,
|
|
18
|
+
view_specs: false,
|
|
19
|
+
helper_specs: false,
|
|
20
|
+
routing_specs: true,
|
|
21
|
+
controller_specs: true,
|
|
22
|
+
request_specs: false
|
|
23
|
+
g.integration_tool false
|
|
24
|
+
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
|
5
|
+
# files.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
|
9
|
+
|
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
|
11
|
+
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
|
12
|
+
|
|
13
|
+
begin
|
|
14
|
+
require 'cucumber/rake/task'
|
|
15
|
+
|
|
16
|
+
namespace :cucumber do
|
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t|
|
|
18
|
+
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
|
19
|
+
t.fork = true # You may get faster startup if you set this to false
|
|
20
|
+
t.profile = 'default'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t|
|
|
24
|
+
t.binary = vendored_cucumber_bin
|
|
25
|
+
t.fork = true # You may get faster startup if you set this to false
|
|
26
|
+
t.profile = 'wip'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
|
30
|
+
t.binary = vendored_cucumber_bin
|
|
31
|
+
t.fork = true # You may get faster startup if you set this to false
|
|
32
|
+
t.profile = 'rerun'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
desc 'Run all features'
|
|
36
|
+
task :all => [:ok, :wip]
|
|
37
|
+
|
|
38
|
+
task :statsetup do
|
|
39
|
+
require 'rails/code_statistics'
|
|
40
|
+
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
|
41
|
+
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
desc 'Alias for cucumber:ok'
|
|
45
|
+
task :cucumber => 'cucumber:ok'
|
|
46
|
+
|
|
47
|
+
task :default => :cucumber
|
|
48
|
+
|
|
49
|
+
task :features => :cucumber do
|
|
50
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
|
|
54
|
+
task 'test:prepare' do
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
task :stats => 'cucumber:statsetup'
|
|
58
|
+
rescue LoadError
|
|
59
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
|
60
|
+
task :cucumber do
|
|
61
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
end
|
data/script/cucumber
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
|
4
|
+
if vendored_cucumber_bin
|
|
5
|
+
load File.expand_path(vendored_cucumber_bin)
|
|
6
|
+
else
|
|
7
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
|
8
|
+
require 'cucumber'
|
|
9
|
+
load Cucumber::BINARY
|
|
10
|
+
end
|
data/socializer.gemspec
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'socializer/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'socializer'
|
|
8
|
+
spec.version = Socializer::VERSION
|
|
9
|
+
spec.authors = ['Dominic Goulet']
|
|
10
|
+
spec.email = ['dominic.goulet@froggedsoft.com']
|
|
11
|
+
spec.description = %q{Add social network capabilities to your projects.}
|
|
12
|
+
spec.summary = %q{Make your project social.}
|
|
13
|
+
spec.homepage = 'http://www.froggedsoft.com'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_dependency('rails', '4.0.2')
|
|
22
|
+
spec.add_dependency('jquery-rails')
|
|
23
|
+
spec.add_dependency('sass-rails')
|
|
24
|
+
spec.add_dependency('coffee-rails')
|
|
25
|
+
spec.add_dependency('uglifier')
|
|
26
|
+
spec.add_dependency('bcrypt-ruby', '~> 3.1.2')
|
|
27
|
+
spec.add_dependency('draper', '~> 1.3.0')
|
|
28
|
+
spec.add_dependency('elasticsearch-rails', '~> 0.1.0.rc1')
|
|
29
|
+
spec.add_dependency('enumerize', '~> 0.7.0')
|
|
30
|
+
spec.add_dependency('omniauth', '~> 1.2.1')
|
|
31
|
+
spec.add_dependency('omniauth-identity', '~> 1.1.1')
|
|
32
|
+
spec.add_dependency('omniauth-facebook', '~> 1.6.0')
|
|
33
|
+
spec.add_dependency('omniauth-linkedin', '~> 0.1.0')
|
|
34
|
+
spec.add_dependency('omniauth-openid', '~> 1.0.1')
|
|
35
|
+
spec.add_dependency('omniauth-twitter', '~> 1.0.1')
|
|
36
|
+
spec.add_dependency('squeel', '~> 1.1.0')
|
|
37
|
+
|
|
38
|
+
spec.add_development_dependency('bundler', '~> 1.5.0')
|
|
39
|
+
spec.add_development_dependency('rake')
|
|
40
|
+
spec.add_development_dependency('sqlite3', '~> 1.3.8')
|
|
41
|
+
spec.add_development_dependency('rspec-rails', '~> 2.14.0')
|
|
42
|
+
# spec.add_development_dependency('cucumber-rails', '~> 1.4.0')
|
|
43
|
+
spec.add_development_dependency('capybara', '~> 2.2.0')
|
|
44
|
+
spec.add_development_dependency('factory_girl_rails', '~> 4.3.0')
|
|
45
|
+
spec.add_development_dependency('shoulda-matchers', '~> 2.5.0')
|
|
46
|
+
spec.add_development_dependency('database_cleaner', '~> 1.2.0')
|
|
47
|
+
spec.add_development_dependency('rails_best_practices', '~> 1.14.4')
|
|
48
|
+
spec.add_development_dependency('rubocop', '~> 0.18.0')
|
|
49
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Socializer
|
|
4
|
+
describe LikesController do
|
|
5
|
+
pending "add additional examples to #{__FILE__}"
|
|
6
|
+
|
|
7
|
+
# describe "GET 'index'" do
|
|
8
|
+
# it "returns http success" do
|
|
9
|
+
# get 'index'
|
|
10
|
+
# response.should be_success
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
|
|
14
|
+
# describe "GET 'create'" do
|
|
15
|
+
# it "returns http success" do
|
|
16
|
+
# get 'create'
|
|
17
|
+
# response.should be_success
|
|
18
|
+
# end
|
|
19
|
+
# end
|
|
20
|
+
|
|
21
|
+
# describe "GET 'destroy'" do
|
|
22
|
+
# it "returns http success" do
|
|
23
|
+
# get 'destroy'
|
|
24
|
+
# response.should be_success
|
|
25
|
+
# end
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Socializer
|
|
4
|
+
describe SharesController do
|
|
5
|
+
pending "add additional examples to #{__FILE__}"
|
|
6
|
+
|
|
7
|
+
# describe "GET 'new'" do
|
|
8
|
+
# it "returns http success" do
|
|
9
|
+
# get 'new'
|
|
10
|
+
# response.should be_success
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
|
|
14
|
+
# describe "GET 'create'" do
|
|
15
|
+
# it "returns http success" do
|
|
16
|
+
# get 'create'
|
|
17
|
+
# response.should be_success
|
|
18
|
+
# end
|
|
19
|
+
# end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Read about factories at https://github.com/thoughtbot/factory_girl
|
|
2
|
+
|
|
3
|
+
# TODO: Redo this factory once the other factories are added
|
|
4
|
+
FactoryGirl.define do
|
|
5
|
+
factory :socializer_activity, class: Socializer::Activity do
|
|
6
|
+
actor_id 1
|
|
7
|
+
activity_object_id 1
|
|
8
|
+
target_id nil
|
|
9
|
+
association :verb, factory: :socializer_verb
|
|
10
|
+
end
|
|
11
|
+
end
|