outpost-secretary 0.1.0
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/.gitignore +17 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +15 -0
- data/MIT-LICENSE +22 -0
- data/README.md +52 -0
- data/Rakefile +14 -0
- data/app/assets/stylesheets/outpost/secretary.css.scss +2 -0
- data/app/assets/stylesheets/outpost/secretary/columns.css.scss +17 -0
- data/app/assets/stylesheets/outpost/secretary/diff.css.scss +61 -0
- data/app/controllers/concerns/outpost/secretary/user_injection.rb +19 -0
- data/app/controllers/outpost/versions_controller.rb +94 -0
- data/app/views/outpost/versions/_header.html.erb +1 -0
- data/app/views/outpost/versions/index.html.erb +28 -0
- data/app/views/outpost/versions/show.html.erb +11 -0
- data/circle.yml +7 -0
- data/config/routes.rb +5 -0
- data/lib/outpost/secretary.rb +7 -0
- data/lib/outpost/secretary/engine.rb +22 -0
- data/lib/outpost/secretary/version.rb +5 -0
- data/outpost-secretary.gemspec +24 -0
- data/spec/controllers/user_injection_spec.rb +0 -0
- data/spec/controllers/versions_controller_spec.rb +51 -0
- data/spec/factories.rb +14 -0
- data/spec/internal/app/controllers/outpost/posts_controller.rb +6 -0
- data/spec/internal/app/models/post.rb +4 -0
- data/spec/internal/app/models/user.rb +12 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +8 -0
- data/spec/internal/db/schema.rb +27 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/spec_helper.rb +25 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d6e4760ffad7d6da2adda0ae3e7e01f383bfb948
|
4
|
+
data.tar.gz: 4bae09801eab3779b487f5f3e85f9959cff5bed2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 33b9ed5eb3bba9d81a397791c6162dca928bff178bec8660bf697cba9bc0efb2ab0ca970ac11b3a2afa0134102736a9d84b314b64f640b1022987830f14ac2a9
|
7
|
+
data.tar.gz: 35080cee2fbe7f9102c3aa0f174b2b567f7899d8c19bb575fda032fe3f1230e7668606a4af2bf9efe1870dd6a95a0e4e8c1ea2ff1acdb2d6199533c0eeb90146
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :test do
|
4
|
+
gem 'outpost-cms', github: "SCPR/outpost"
|
5
|
+
gem 'secretary-rails'
|
6
|
+
gem 'kaminari'
|
7
|
+
gem 'activerecord'
|
8
|
+
gem 'actionpack'
|
9
|
+
gem "sqlite3", "~> 1.3"
|
10
|
+
gem 'combustion', github: "pat/combustion"
|
11
|
+
gem "rspec-rails", "~> 2.13.1"
|
12
|
+
gem "factory_girl", "~> 4.2"
|
13
|
+
end
|
14
|
+
|
15
|
+
gemspec
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Southern California Public Radio
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Outpost/Secretary
|
2
|
+
|
3
|
+
[secretary-rails](http://rubygems.org/gems/secretary-rails) integration with Outpost.
|
4
|
+
Provides views and controller for Outpost.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'outpost-secretary'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install outpost-secretary
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
If you already have secretary-rails installed and configured, then all you need to do is add this to your routes about the "outpost" namespace (the "secretary" name is hardcoded and not optional):
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# ...
|
26
|
+
mount Outpost::Secretary::Engine, at: "outpost", as: "secretary"
|
27
|
+
|
28
|
+
namespace :outpost do
|
29
|
+
#...
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
And add the stylesheet to your outpost/application.css:
|
34
|
+
|
35
|
+
```scss
|
36
|
+
@import 'outpost/secretary';
|
37
|
+
```
|
38
|
+
|
39
|
+
Finally, be sure to add `logged_user_id` to your Strong Parameters where necessary.
|
40
|
+
|
41
|
+
If Secretary isn't yet installed, check out the [secretary-rails documentation](https://github.com/SCPR/secretary-rails) for instructions.
|
42
|
+
|
43
|
+
## Todo
|
44
|
+
* Needs more tests
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
1. Fork it
|
49
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
50
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
51
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
52
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
RAKED = true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rdoc/task'
|
6
|
+
require 'rspec/core/rake_task'
|
7
|
+
require 'combustion'
|
8
|
+
|
9
|
+
Bundler.require :default, :test
|
10
|
+
Combustion.initialize! :active_record, :action_controller, :action_view
|
11
|
+
Combustion::Application.load_tasks
|
12
|
+
|
13
|
+
RSpec::Core::RakeTask.new(:test)
|
14
|
+
task default: :test
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.diff {
|
2
|
+
overflow:auto;
|
3
|
+
|
4
|
+
ul {
|
5
|
+
background:#fff;
|
6
|
+
overflow:auto;
|
7
|
+
font-size:13px;
|
8
|
+
list-style:none;
|
9
|
+
margin:0;
|
10
|
+
padding:0;
|
11
|
+
display:table;
|
12
|
+
width:100%;
|
13
|
+
}
|
14
|
+
del, ins {
|
15
|
+
display:block;
|
16
|
+
text-decoration:none;
|
17
|
+
}
|
18
|
+
|
19
|
+
li {
|
20
|
+
padding:0;
|
21
|
+
display:table-row;
|
22
|
+
margin: 0;
|
23
|
+
height:1em;
|
24
|
+
|
25
|
+
&.ins {
|
26
|
+
background:#dfd; color:#080
|
27
|
+
}
|
28
|
+
|
29
|
+
&.del {
|
30
|
+
background:#fee;
|
31
|
+
color:#b00
|
32
|
+
}
|
33
|
+
|
34
|
+
&:hover {
|
35
|
+
background:#ffc
|
36
|
+
}
|
37
|
+
|
38
|
+
&.diff-comment {
|
39
|
+
display: none;
|
40
|
+
}
|
41
|
+
|
42
|
+
&.diff-block-info {
|
43
|
+
background: none repeat scroll 0 0 gray;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.del, .ins, span {
|
48
|
+
white-space:pre-wrap;
|
49
|
+
font-family:courier;
|
50
|
+
}
|
51
|
+
|
52
|
+
.del strong {
|
53
|
+
font-weight:normal;
|
54
|
+
background:#fcc;
|
55
|
+
}
|
56
|
+
|
57
|
+
.ins strong {
|
58
|
+
font-weight:normal;
|
59
|
+
background:#9f9;
|
60
|
+
}
|
61
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Outpost
|
2
|
+
module Secretary
|
3
|
+
module UserInjection
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
before_filter :add_user_id_to_params, only: [:create, :update]
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def add_user_id_to_params
|
13
|
+
if model.has_secretary?
|
14
|
+
params[model.singular_route_key].merge!(logged_user_id: current_user.id)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
class Outpost::VersionsController < Outpost::BaseController
|
2
|
+
include Outpost::Controller::Ordering
|
3
|
+
|
4
|
+
self.model = Secretary::Version
|
5
|
+
|
6
|
+
define_list do |l|
|
7
|
+
l.default_order_attribute = "created_at"
|
8
|
+
l.default_order_direction = Outpost::DESCENDING
|
9
|
+
l.per_page = 10
|
10
|
+
|
11
|
+
l.column :user, display: ->(r) { r.user.try(:to_title) || "System" }
|
12
|
+
l.column :description
|
13
|
+
l.column :versioned,
|
14
|
+
:header => "Object",
|
15
|
+
:display => ->(r) { r.versioned.simple_title }
|
16
|
+
|
17
|
+
l.column :version_number, header: "Version"
|
18
|
+
l.column :created_at, header: "Timestamp"
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
before_filter :set_order_and_direction, only: [:index, :show, :activity]
|
23
|
+
before_filter :get_object, only: [:index, :show]
|
24
|
+
before_filter :authorize_resource, only: [:index, :show]
|
25
|
+
before_filter :extend_breadcrumbs_for_object, only: [:index, :show]
|
26
|
+
|
27
|
+
|
28
|
+
#--------------
|
29
|
+
# See all activity
|
30
|
+
def activity
|
31
|
+
breadcrumb "Activity"
|
32
|
+
|
33
|
+
@versions = Secretary::Version.order(order)
|
34
|
+
.page(params[:page]).per(list.per_page)
|
35
|
+
|
36
|
+
render :index
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
#--------------
|
41
|
+
# See activity for a single object
|
42
|
+
def index
|
43
|
+
breadcrumb "History"
|
44
|
+
|
45
|
+
@versions = @object.versions.order(order)
|
46
|
+
.page(params[:page]).per(list.per_page)
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
#--------------
|
51
|
+
# Compare a version to its previous version
|
52
|
+
def show
|
53
|
+
@version = @object.versions.find_by_version_number!(params[:version_number])
|
54
|
+
|
55
|
+
breadcrumb "History",
|
56
|
+
secretary.history_path(@object.class.route_key, @object.id),
|
57
|
+
@version.to_title
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
# Override this from Outpost to get around kaminari bug:
|
64
|
+
# https://github.com/amatsuda/kaminari/issues/457
|
65
|
+
def route_proxy
|
66
|
+
secretary
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
def set_order_and_direction
|
71
|
+
@order_attribute = "created_at"
|
72
|
+
@order_direction = Outpost::DESCENDING
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
def get_object
|
77
|
+
klass = Outpost::Helpers::Naming.to_class(params[:resources])
|
78
|
+
redirect_to outpost.root_path if !klass.has_secretary?
|
79
|
+
@object = klass.find(params[:resource_id])
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
def authorize_resource
|
84
|
+
authorize(@object.class)
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
def extend_breadcrumbs_for_object
|
89
|
+
breadcrumb @object.class.name.titleize.pluralize,
|
90
|
+
@object.class.admin_index_path
|
91
|
+
|
92
|
+
breadcrumb @object.simple_title, @object.admin_edit_path
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= link_to("Edit this #{object.class.name.titleize}", object.admin_edit_path, class: "btn btn-primary pull-right") if object.present? %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% if @object %>
|
2
|
+
<%= render 'header', page_title: content_for(:page_title), object: @object %>
|
3
|
+
<% add_to_page_title @object.simple_title %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% add_to_page_title "History" %>
|
7
|
+
|
8
|
+
<%= list_table @versions, model do %>
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<%= render "outpost/shared/headers", list: list %>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody class="list">
|
15
|
+
<% @versions.each do |version| %>
|
16
|
+
<% record = version.versioned %>
|
17
|
+
<tr class="versions">
|
18
|
+
<td class="column-manage">
|
19
|
+
<%= guard record.class do %>
|
20
|
+
<%= link_to "View", secretary.version_path(resources: record.class.route_key, resource_id: record.id, version_number: version.version_number), class: "btn" %>
|
21
|
+
<% end %>
|
22
|
+
</td>
|
23
|
+
|
24
|
+
<%= render "outpost/shared/columns", list: list, record: version %>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% add_to_page_title @version.to_title, "History" %>
|
2
|
+
|
3
|
+
<%= render 'header', page_title: content_for(:page_title), object: @object %>
|
4
|
+
|
5
|
+
<% @version.attribute_diffs.each do |attribute, diff| %>
|
6
|
+
<h4><%= attribute.titleize %></h4>
|
7
|
+
<div class="well">
|
8
|
+
<%= diff.to_s(:html).html_safe %>
|
9
|
+
</div>
|
10
|
+
<hr />
|
11
|
+
<% end %>
|
data/circle.yml
ADDED
data/config/routes.rb
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
Outpost::Secretary::Engine.routes.draw do
|
2
|
+
get "/activity" => "outpost/versions#activity", as: :activity
|
3
|
+
get "/:resources/:resource_id/history" => "outpost/versions#index", as: :history
|
4
|
+
get "/:resources/:resource_id/history/:version_number" => "outpost/versions#show", as: :version
|
5
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Outpost
|
2
|
+
module Secretary
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
# This is necessary to support rails 3, which doesn't autoload
|
5
|
+
# the concerns directory
|
6
|
+
config.autoload_paths << File.expand_path(
|
7
|
+
"../../../../app/controllers/concerns", __FILE__)
|
8
|
+
|
9
|
+
config.to_prepare do
|
10
|
+
# Make versions an outpost model so it can be represented in Outpost.
|
11
|
+
::Secretary::Version.instance_eval do
|
12
|
+
outpost_model
|
13
|
+
end
|
14
|
+
|
15
|
+
# Add user injection callback to resource controller.
|
16
|
+
Outpost::ResourceController.instance_eval do
|
17
|
+
include Outpost::Secretary::UserInjection
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'outpost/secretary/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "outpost-secretary"
|
8
|
+
spec.version = Outpost::Secretary::VERSION
|
9
|
+
spec.authors = ["Bryan Ricker"]
|
10
|
+
spec.email = ["bricker88@gmail.com"]
|
11
|
+
spec.description = "secretary-rails integration with Outpost."
|
12
|
+
spec.summary = "Provides views and controllers for" \
|
13
|
+
"secretary-rails integration with Outpost."
|
14
|
+
spec.homepage = "https://github.com/SCPR/outpost-secretary"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "outpost-cms", ['>= 0.0.1', "< 1"]
|
23
|
+
spec.add_dependency "secretary-rails", ['>= 1.0.0', "< 2"]
|
24
|
+
end
|
File without changes
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Outpost::VersionsController do
|
4
|
+
routes { Outpost::Secretary::Engine.routes }
|
5
|
+
render_views
|
6
|
+
|
7
|
+
before :each do
|
8
|
+
@user = create :user
|
9
|
+
controller.stub(:current_user) { @user }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "GET /activity" do
|
13
|
+
it "lists all recent activity" do
|
14
|
+
post1 = create :post
|
15
|
+
post2 = create :post
|
16
|
+
post3 = create :post
|
17
|
+
|
18
|
+
get :activity
|
19
|
+
versions = assigns(:versions)
|
20
|
+
|
21
|
+
versions.should include post3.versions.first
|
22
|
+
versions.should include post2.versions.first
|
23
|
+
versions.should include post1.versions.first
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
describe "GET /index" do
|
29
|
+
it "lists activity for a record" do
|
30
|
+
post1 = create :post
|
31
|
+
post2 = create :post
|
32
|
+
|
33
|
+
get :index, resources: "posts", resource_id: post1.id
|
34
|
+
assigns(:versions).should eq post1.versions.to_a
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "GET /show" do
|
39
|
+
it "gets the requested version" do
|
40
|
+
post = create :post
|
41
|
+
|
42
|
+
get :show, {
|
43
|
+
:resources => "posts",
|
44
|
+
:resource_id => post.id,
|
45
|
+
:version_number => 1
|
46
|
+
}
|
47
|
+
|
48
|
+
assigns(:version).should eq post.versions.first
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/spec/factories.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :user do
|
3
|
+
name "Bryan"
|
4
|
+
sequence(:username) { |n| "bricker-#{n}" }
|
5
|
+
sequence(:email) { |n| "bricker-#{n}@scpr.org" }
|
6
|
+
password "secret"
|
7
|
+
password_confirmation { password }
|
8
|
+
end
|
9
|
+
|
10
|
+
factory :post do
|
11
|
+
headline "Post"
|
12
|
+
body "Post Body"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class User < ActiveRecord::Base
|
2
|
+
include Outpost::Model::Authentication
|
3
|
+
|
4
|
+
# TODO These methods are hacks because outpost has authorization hardcoded in.
|
5
|
+
def can_manage?(*)
|
6
|
+
true
|
7
|
+
end
|
8
|
+
|
9
|
+
def allowed_resources
|
10
|
+
Outpost.config.registered_models
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
ActiveRecord::Schema.define do
|
2
|
+
create_table :users, force: true do |t|
|
3
|
+
t.string :name
|
4
|
+
t.string :username
|
5
|
+
t.string :email
|
6
|
+
t.string :password_digest
|
7
|
+
t.boolean :is_superuser
|
8
|
+
t.datetime :last_login
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
|
12
|
+
create_table :posts, force: true do |t|
|
13
|
+
t.string :headline
|
14
|
+
t.text :body
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
|
18
|
+
create_table :versions, force: true do |t|
|
19
|
+
t.integer :version_number
|
20
|
+
t.string :versioned_type
|
21
|
+
t.integer :versioned_id
|
22
|
+
t.integer :user_id
|
23
|
+
t.text :description
|
24
|
+
t.text :object_changes
|
25
|
+
t.datetime :created_at
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
*.log
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'combustion'
|
2
|
+
|
3
|
+
unless defined?(RAKED)
|
4
|
+
Bundler.require :default, :test
|
5
|
+
Combustion.initialize! :active_record, :action_controller, :action_view
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'rspec/rails'
|
9
|
+
require 'factory_girl'
|
10
|
+
load 'factories.rb'
|
11
|
+
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
13
|
+
|
14
|
+
|
15
|
+
Dir[File.expand_path("spec/support/**/*.rb")].each { |f| require f }
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.include FactoryGirl::Syntax::Methods
|
19
|
+
|
20
|
+
config.mock_with :rspec
|
21
|
+
config.order = "random"
|
22
|
+
config.infer_base_class_for_anonymous_controllers = false
|
23
|
+
config.filter_run focus: true
|
24
|
+
config.run_all_when_everything_filtered = true
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: outpost-secretary
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bryan Ricker
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: outpost-cms
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.1
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.0.1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: secretary-rails
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 1.0.0
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.0.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2'
|
53
|
+
description: secretary-rails integration with Outpost.
|
54
|
+
email:
|
55
|
+
- bricker88@gmail.com
|
56
|
+
executables: []
|
57
|
+
extensions: []
|
58
|
+
extra_rdoc_files: []
|
59
|
+
files:
|
60
|
+
- ".gitignore"
|
61
|
+
- CHANGELOG.md
|
62
|
+
- Gemfile
|
63
|
+
- MIT-LICENSE
|
64
|
+
- README.md
|
65
|
+
- Rakefile
|
66
|
+
- app/assets/stylesheets/outpost/secretary.css.scss
|
67
|
+
- app/assets/stylesheets/outpost/secretary/columns.css.scss
|
68
|
+
- app/assets/stylesheets/outpost/secretary/diff.css.scss
|
69
|
+
- app/controllers/concerns/outpost/secretary/user_injection.rb
|
70
|
+
- app/controllers/outpost/versions_controller.rb
|
71
|
+
- app/views/outpost/versions/_header.html.erb
|
72
|
+
- app/views/outpost/versions/index.html.erb
|
73
|
+
- app/views/outpost/versions/show.html.erb
|
74
|
+
- circle.yml
|
75
|
+
- config/routes.rb
|
76
|
+
- lib/outpost/secretary.rb
|
77
|
+
- lib/outpost/secretary/engine.rb
|
78
|
+
- lib/outpost/secretary/version.rb
|
79
|
+
- outpost-secretary.gemspec
|
80
|
+
- spec/controllers/user_injection_spec.rb
|
81
|
+
- spec/controllers/versions_controller_spec.rb
|
82
|
+
- spec/factories.rb
|
83
|
+
- spec/internal/app/controllers/outpost/posts_controller.rb
|
84
|
+
- spec/internal/app/models/post.rb
|
85
|
+
- spec/internal/app/models/user.rb
|
86
|
+
- spec/internal/config/database.yml
|
87
|
+
- spec/internal/config/routes.rb
|
88
|
+
- spec/internal/db/schema.rb
|
89
|
+
- spec/internal/log/.gitignore
|
90
|
+
- spec/spec_helper.rb
|
91
|
+
homepage: https://github.com/SCPR/outpost-secretary
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
requirements: []
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 2.2.2
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
114
|
+
summary: Provides views and controllers forsecretary-rails integration with Outpost.
|
115
|
+
test_files:
|
116
|
+
- spec/controllers/user_injection_spec.rb
|
117
|
+
- spec/controllers/versions_controller_spec.rb
|
118
|
+
- spec/factories.rb
|
119
|
+
- spec/internal/app/controllers/outpost/posts_controller.rb
|
120
|
+
- spec/internal/app/models/post.rb
|
121
|
+
- spec/internal/app/models/user.rb
|
122
|
+
- spec/internal/config/database.yml
|
123
|
+
- spec/internal/config/routes.rb
|
124
|
+
- spec/internal/db/schema.rb
|
125
|
+
- spec/internal/log/.gitignore
|
126
|
+
- spec/spec_helper.rb
|