samurai_contacts 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +22 -0
- data/app/assets/javascripts/samurai/contacts/application.js +13 -0
- data/app/assets/stylesheets/samurai/contacts/application.css +14 -0
- data/app/controllers/samurai/contacts/admin/contacts/contacts_controller.rb +14 -0
- data/app/controllers/samurai/contacts/application_controller.rb +6 -0
- data/app/controllers/samurai/contacts/contacts_controller.rb +63 -0
- data/app/decorators/controllers/admin_controller_decorator.rb +9 -0
- data/app/decorators/controllers/dashboard_controller_decorator.rb +9 -0
- data/app/decorators/models/ability_decorator.rb +18 -0
- data/app/decorators/models/user_decorator.rb +3 -0
- data/app/helpers/samurai/contacts/application_helper.rb +6 -0
- data/app/models/samurai/contacts/contact.rb +7 -0
- data/app/overrides/add_contacts_link_to_admin_nav.rb +5 -0
- data/app/overrides/add_contacts_link_to_nav.rb +6 -0
- data/app/overrides/add_contacts_list_to_admin_dashboard.rb +5 -0
- data/app/overrides/add_contacts_list_to_dashboard.rb +5 -0
- data/app/views/samurai/contacts/admin/contacts/index.html.erb +42 -0
- data/app/views/samurai/contacts/contacts/_form.html.erb +38 -0
- data/app/views/samurai/contacts/contacts/edit.html.erb +14 -0
- data/app/views/samurai/contacts/contacts/index.html.erb +42 -0
- data/app/views/samurai/contacts/contacts/new.html.erb +14 -0
- data/app/views/samurai/contacts/contacts/show.html.erb +19 -0
- data/app/views/samurai/contacts/overrides/_admin_contacts_link.html.erb +5 -0
- data/app/views/samurai/contacts/overrides/_contacts_link.html.erb +3 -0
- data/app/views/samurai/contacts/overrides/_contacts_list.html.erb +28 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20150418125605_create_samurai_contacts.rb +14 -0
- data/lib/samurai/contacts.rb +6 -0
- data/lib/samurai/contacts/engine.rb +27 -0
- data/lib/samurai/contacts/version.rb +5 -0
- data/lib/samurai_contacts.rb +2 -0
- data/lib/tasks/samurai/contacts_tasks.rake +4 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/samurai/contacts_test.rb +7 -0
- data/test/test_helper.rb +20 -0
- metadata +142 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7af1b60b90af324649da50743b7d7c8c031eb278
|
4
|
+
data.tar.gz: d685d07d3008c06aca2349070dd4e3934646270a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ad408157d2b577913cc5e92b02d79f66d4409f34a53ac83c7fe73cd82475d22e61c3aa4e2045965760998d2dcd6d019556759ae81e966d1cf82bb61927826820
|
7
|
+
data.tar.gz: b8e0059c99ad16e2d07c85e43ee40b4ea2324d050a0dc35b29e107bf68040760fbc3454bb056c24c2a2f6e218f533115f14aaab02cdc8d945da5acfa7c6f38df
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 Lucas Mendelowski
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Samurai::Contacts'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
Bundler::GemHelper.install_tasks
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
task default: :test
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. It is generally better to create a new file per style scope.
|
11
|
+
*
|
12
|
+
*= require_tree .
|
13
|
+
*= require_self
|
14
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_dependency "samurai/application_controller"
|
2
|
+
|
3
|
+
module Samurai
|
4
|
+
module Contacts
|
5
|
+
module Admin
|
6
|
+
class ContactsController < Samurai::Admin::AdminController
|
7
|
+
# GET /contacts
|
8
|
+
def index
|
9
|
+
@contacts = Contact.all
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require_dependency "samurai/application_controller"
|
2
|
+
|
3
|
+
module Samurai::Contacts
|
4
|
+
class ContactsController < Samurai::ApplicationController
|
5
|
+
before_action :set_contact, only: [:show, :edit, :update, :destroy]
|
6
|
+
authorize_resource class: Samurai::Contacts::Contact
|
7
|
+
|
8
|
+
# GET /contacts
|
9
|
+
def index
|
10
|
+
@contacts = current_user.contacts
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /contacts/1
|
14
|
+
def show
|
15
|
+
end
|
16
|
+
|
17
|
+
# GET /contacts/new
|
18
|
+
def new
|
19
|
+
@contact = current_user.contacts.build
|
20
|
+
end
|
21
|
+
|
22
|
+
# GET /contacts/1/edit
|
23
|
+
def edit
|
24
|
+
end
|
25
|
+
|
26
|
+
# POST /contacts
|
27
|
+
def create
|
28
|
+
@contact = current_user.contacts.build(contact_params)
|
29
|
+
|
30
|
+
if @contact.save
|
31
|
+
redirect_to [samurai, @contact], notice: 'Contact was successfully created.'
|
32
|
+
else
|
33
|
+
render :new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# PATCH/PUT /contacts/1
|
38
|
+
def update
|
39
|
+
if @contact.update(contact_params)
|
40
|
+
redirect_to [samurai, @contact], notice: 'Contact was successfully updated.'
|
41
|
+
else
|
42
|
+
render :edit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# DELETE /contacts/1
|
47
|
+
def destroy
|
48
|
+
@contact.destroy
|
49
|
+
redirect_to samurai.contacts_url, notice: 'Contact was successfully destroyed.'
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
# Use callbacks to share common setup or constraints between actions.
|
54
|
+
def set_contact
|
55
|
+
@contact = Contact.find(params[:id])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Only allow a trusted parameter "white list" through.
|
59
|
+
def contact_params
|
60
|
+
params.require(:contact).permit(:first_name, :last_name, :email, :company, :phone, :user_id)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'cancan'
|
2
|
+
|
3
|
+
module Samurai
|
4
|
+
module Contacts
|
5
|
+
class AbilityDecorator
|
6
|
+
include CanCan::Ability
|
7
|
+
|
8
|
+
def initialize(user)
|
9
|
+
unless user.admin?
|
10
|
+
can :manage, Samurai::Contacts::Contact, user_id: user.id
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Registers the defined abilities.
|
18
|
+
Samurai::Ability.register_ability(Samurai::Contacts::AbilityDecorator)
|
@@ -0,0 +1,6 @@
|
|
1
|
+
Deface::Override.new(:virtual_path => "layouts/samurai/application",
|
2
|
+
:name => "add_contacts_link_to_nav",
|
3
|
+
:insert_after => "[data-samurai-hook='main_nav']",
|
4
|
+
:partial => "overrides/contacts_link",
|
5
|
+
:namespaced => true,
|
6
|
+
:original => 'f5fe48b6dc6986328e0b873b3ffa1b228dd52a7c')
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%= link_to 'New Contact', samurai.new_contact_path, class: 'pull-right btn btn-primary' %>
|
2
|
+
|
3
|
+
<h2>Listing Contacts</h2>
|
4
|
+
|
5
|
+
<hr>
|
6
|
+
|
7
|
+
<div class="panel panel-primary">
|
8
|
+
<div class="panel-heading">
|
9
|
+
My Contacts
|
10
|
+
</div>
|
11
|
+
<table class="table">
|
12
|
+
<thead>
|
13
|
+
<th>ID</th>
|
14
|
+
<th>First Name</th>
|
15
|
+
<th>Last Name</th>
|
16
|
+
<th>Company</th>
|
17
|
+
<th>Email</th>
|
18
|
+
<th>Phone</th>
|
19
|
+
<th></th>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% @contacts.each do |contact| %>
|
23
|
+
<tr>
|
24
|
+
<td><%= contact.id %></td>
|
25
|
+
<td><%= contact.first_name %></td>
|
26
|
+
<td><%= contact.last_name %></td>
|
27
|
+
<td><%= contact.company %></td>
|
28
|
+
<td><%= contact.email %></td>
|
29
|
+
<td><%= contact.phone %></td>
|
30
|
+
<td>
|
31
|
+
<%= link_to 'Show', [samurai, contact], class: 'btn btn-primary' %>
|
32
|
+
<%= link_to 'Edit', samurai.edit_contact_path(contact), class: 'btn btn-primary' %>
|
33
|
+
<%= link_to 'Destroy', [samurai, contact], class: 'btn btn-primary', method: :delete,
|
34
|
+
data: { confirm: 'Are you sure?' } %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<br>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<% if @contact.errors.any? %>
|
4
|
+
<div id="error_explanation">
|
5
|
+
<h2>
|
6
|
+
<%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:
|
7
|
+
</h2>
|
8
|
+
|
9
|
+
<ul>
|
10
|
+
<% @contact.errors.full_messages.each do |message| %>
|
11
|
+
<li><%= message %></li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<div class="form-group">
|
18
|
+
<%= f.label :first_name, class: "control-label" %>
|
19
|
+
<%= f.text_field :first_name, class: "form-control" %>
|
20
|
+
</div>
|
21
|
+
<div class="form-group">
|
22
|
+
<%= f.label :last_name, class: "control-label" %>
|
23
|
+
<%= f.text_field :last_name, class: "form-control" %>
|
24
|
+
</div>
|
25
|
+
<div class="form-group">
|
26
|
+
<%= f.label :company, class: "control-label" %>
|
27
|
+
<%= f.text_field :company, class: "form-control" %>
|
28
|
+
</div>
|
29
|
+
<div class="form-group">
|
30
|
+
<%= f.label :email, class: "control-label" %>
|
31
|
+
<%= f.email_field :email, class: "form-control" %>
|
32
|
+
</div>
|
33
|
+
<div class="form-group">
|
34
|
+
<%= f.label :phone, class: "control-label" %>
|
35
|
+
<%= f.text_field :phone, class: "form-control" %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h2>Editing Contact</h2>
|
2
|
+
|
3
|
+
<hr>
|
4
|
+
|
5
|
+
<%= form_for([samurai, @contact]) do |f| %>
|
6
|
+
<%= render 'form', f: f %>
|
7
|
+
|
8
|
+
<div class="form-group">
|
9
|
+
<div>
|
10
|
+
<%= f.submit "Update Contact", class: "btn btn-primary" %>
|
11
|
+
<%= link_to 'Back', samurai.contacts_path, class: 'btn btn-default' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%= link_to 'New Contact', samurai.new_contact_path, class: 'pull-right btn btn-primary' %>
|
2
|
+
|
3
|
+
<h2>Listing Contacts</h2>
|
4
|
+
|
5
|
+
<hr>
|
6
|
+
|
7
|
+
<div class="panel panel-primary">
|
8
|
+
<div class="panel-heading">
|
9
|
+
My Contacts
|
10
|
+
</div>
|
11
|
+
<table class="table">
|
12
|
+
<thead>
|
13
|
+
<th>ID</th>
|
14
|
+
<th>First Name</th>
|
15
|
+
<th>Last Name</th>
|
16
|
+
<th>Company</th>
|
17
|
+
<th>Email</th>
|
18
|
+
<th>Phone</th>
|
19
|
+
<th></th>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% @contacts.each do |contact| %>
|
23
|
+
<tr>
|
24
|
+
<td><%= contact.id %></td>
|
25
|
+
<td><%= contact.first_name %></td>
|
26
|
+
<td><%= contact.last_name %></td>
|
27
|
+
<td><%= contact.company %></td>
|
28
|
+
<td><%= contact.email %></td>
|
29
|
+
<td><%= contact.phone %></td>
|
30
|
+
<td>
|
31
|
+
<%= link_to 'Show', [samurai, contact], class: 'btn btn-primary' %>
|
32
|
+
<%= link_to 'Edit', samurai.edit_contact_path(contact), class: 'btn btn-primary' %>
|
33
|
+
<%= link_to 'Destroy', [samurai, contact], class: 'btn btn-primary', method: :delete,
|
34
|
+
data: { confirm: 'Are you sure?' } %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<br>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h2>New Contact</h2>
|
2
|
+
|
3
|
+
<hr>
|
4
|
+
|
5
|
+
<%= form_for([samurai, @contact]) do |f| %>
|
6
|
+
<%= render 'form', f: f %>
|
7
|
+
|
8
|
+
<div class="form-group">
|
9
|
+
<div>
|
10
|
+
<%= f.submit "Create Contact", class: "btn btn-primary" %>
|
11
|
+
<%= link_to 'Back', samurai.contacts_path, class: 'btn btn-default' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<h2><%= @contact.first_name %></h2>
|
2
|
+
|
3
|
+
<hr>
|
4
|
+
|
5
|
+
<div class="row">
|
6
|
+
<div class="col-md-8">
|
7
|
+
<strong>First Name:</strong> <%= @contact.first_name %><br/>
|
8
|
+
<strong>Last Name:</strong> <%= @contact.last_name %><br/>
|
9
|
+
<strong>Company:</strong> <%= @contact.company %><br/>
|
10
|
+
<strong>Email:</strong> <%= @contact.email %><br/>
|
11
|
+
<strong>Phone:</strong> <%= @contact.phone %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<hr>
|
16
|
+
|
17
|
+
<%= link_to 'Edit', samurai.edit_contact_path(@contact), class: "btn btn-primary" %>
|
18
|
+
<%= link_to 'Back', samurai.contacts_path, class: 'btn btn-default' %>
|
19
|
+
<span data-samurai-hook='contacts_show'></span>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="col-md-6">
|
2
|
+
<div class="panel panel-primary">
|
3
|
+
<div class="panel-heading">
|
4
|
+
Last 3 Contacts
|
5
|
+
</div>
|
6
|
+
<table class="table">
|
7
|
+
<thead>
|
8
|
+
<th>ID</th>
|
9
|
+
<th>Name</th>
|
10
|
+
<th>Email</th>
|
11
|
+
<th>Created On</th>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<%- @contacts.each do |contact| %>
|
15
|
+
<tr>
|
16
|
+
<td><%= contact.id %></td>
|
17
|
+
<td><%= contact.first_name %> <%= contact.last_name %></td>
|
18
|
+
<td><%= contact.email %></td>
|
19
|
+
<td><%= contact.created_at.strftime("%d %b. %Y") %></td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</tbody>
|
23
|
+
</table>
|
24
|
+
<div class="panel-body text-center">
|
25
|
+
<%= link_to '...', contacts_path %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateSamuraiContacts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :samurai_contacts_contacts do |t|
|
4
|
+
t.string :first_name
|
5
|
+
t.string :last_name
|
6
|
+
t.string :company
|
7
|
+
t.string :email
|
8
|
+
t.string :phone
|
9
|
+
t.references :user, index: true, foreign_key: :samurai_users
|
10
|
+
|
11
|
+
t.timestamps null: false
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Samurai
|
2
|
+
module Contacts
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
isolate_namespace Samurai::Contacts
|
5
|
+
paths["app/views"] << "app/views/samurai/contacts"
|
6
|
+
|
7
|
+
initializer :append_migrations do |app|
|
8
|
+
unless app.root.to_s.match(root.to_s)
|
9
|
+
config.paths["db/migrate"].expanded.each do |p|
|
10
|
+
app.config.paths["db/migrate"] << p
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
config.to_prepare do
|
16
|
+
Dir.glob(Engine.root.join("app", "decorators", "**", "*_decorator*.rb")) do |c|
|
17
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../..//config/environment.rb", __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../..//db/migrate", __FILE__)]
|
6
|
+
require "rails/test_help"
|
7
|
+
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
|
+
|
12
|
+
# Load support files
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
14
|
+
|
15
|
+
# Load fixtures from the engine
|
16
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
17
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
+
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "files"
|
19
|
+
ActiveSupport::TestCase.fixtures :all
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: samurai_contacts
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thibault Denizet
|
8
|
+
- Lucas Mendelowski
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 4.2.1
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 4.2.1
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: samurai_core
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: deface
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: sqlite3
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description: Core features of SamuraiCRM.
|
71
|
+
email:
|
72
|
+
- bo@samurails.com
|
73
|
+
- mendelowski@gmail.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- MIT-LICENSE
|
79
|
+
- README.rdoc
|
80
|
+
- Rakefile
|
81
|
+
- app/assets/javascripts/samurai/contacts/application.js
|
82
|
+
- app/assets/stylesheets/samurai/contacts/application.css
|
83
|
+
- app/controllers/samurai/contacts/admin/contacts/contacts_controller.rb
|
84
|
+
- app/controllers/samurai/contacts/application_controller.rb
|
85
|
+
- app/controllers/samurai/contacts/contacts_controller.rb
|
86
|
+
- app/decorators/controllers/admin_controller_decorator.rb
|
87
|
+
- app/decorators/controllers/dashboard_controller_decorator.rb
|
88
|
+
- app/decorators/models/ability_decorator.rb
|
89
|
+
- app/decorators/models/user_decorator.rb
|
90
|
+
- app/helpers/samurai/contacts/application_helper.rb
|
91
|
+
- app/models/samurai/contacts/contact.rb
|
92
|
+
- app/overrides/add_contacts_link_to_admin_nav.rb
|
93
|
+
- app/overrides/add_contacts_link_to_nav.rb
|
94
|
+
- app/overrides/add_contacts_list_to_admin_dashboard.rb
|
95
|
+
- app/overrides/add_contacts_list_to_dashboard.rb
|
96
|
+
- app/views/samurai/contacts/admin/contacts/index.html.erb
|
97
|
+
- app/views/samurai/contacts/contacts/_form.html.erb
|
98
|
+
- app/views/samurai/contacts/contacts/edit.html.erb
|
99
|
+
- app/views/samurai/contacts/contacts/index.html.erb
|
100
|
+
- app/views/samurai/contacts/contacts/new.html.erb
|
101
|
+
- app/views/samurai/contacts/contacts/show.html.erb
|
102
|
+
- app/views/samurai/contacts/overrides/_admin_contacts_link.html.erb
|
103
|
+
- app/views/samurai/contacts/overrides/_contacts_link.html.erb
|
104
|
+
- app/views/samurai/contacts/overrides/_contacts_list.html.erb
|
105
|
+
- config/routes.rb
|
106
|
+
- db/migrate/20150418125605_create_samurai_contacts.rb
|
107
|
+
- lib/samurai/contacts.rb
|
108
|
+
- lib/samurai/contacts/engine.rb
|
109
|
+
- lib/samurai/contacts/version.rb
|
110
|
+
- lib/samurai_contacts.rb
|
111
|
+
- lib/tasks/samurai/contacts_tasks.rake
|
112
|
+
- test/integration/navigation_test.rb
|
113
|
+
- test/samurai/contacts_test.rb
|
114
|
+
- test/test_helper.rb
|
115
|
+
homepage: http://samurails.com
|
116
|
+
licenses:
|
117
|
+
- MIT
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.2.2
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: Core features of SamuraiCRM.
|
139
|
+
test_files:
|
140
|
+
- test/integration/navigation_test.rb
|
141
|
+
- test/samurai/contacts_test.rb
|
142
|
+
- test/test_helper.rb
|