editorial_logic 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -6
- data/Rakefile +2 -7
- data/VERSION +1 -1
- data/app/models/managed_content.rb +2 -2
- data/config/environments/test.rb +2 -3
- data/config/initializers/metric_fu.rb +2 -2
- data/config/mongoid.yml +0 -12
- data/editorial_logic.gemspec +5 -11
- data/features/manage_articles_content.feature +3 -4
- data/features/manage_faq_content.feature +1 -1
- data/features/manage_glossary_content.feature +1 -1
- metadata +14 -29
- data/config/environments/development.rb +0 -11
- data/config/environments/production.rb +0 -9
- data/config/locales/en.yml +0 -5
data/Gemfile
CHANGED
@@ -2,13 +2,12 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'bson_ext'
|
4
4
|
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
5
|
-
gem 'ckeditor'
|
5
|
+
gem 'ckeditor'
|
6
6
|
gem 'fastercsv'
|
7
7
|
gem 'mongoid'
|
8
|
-
gem 'rails'
|
9
|
-
gem 'scaffold_logic'
|
8
|
+
gem 'rails', '3.0.10'
|
9
|
+
gem 'scaffold_logic'
|
10
10
|
gem 'stringex'
|
11
|
-
gem 'SystemTimer'
|
12
11
|
gem 'tanker'
|
13
12
|
|
14
13
|
group :development do
|
@@ -22,8 +21,6 @@ group :test do
|
|
22
21
|
gem 'faker'
|
23
22
|
gem 'launchy'
|
24
23
|
gem 'machinist_mongo', :require => 'machinist/mongoid'
|
25
|
-
gem 'metric_fu'
|
26
24
|
gem 'mocha'
|
27
|
-
gem 'rcov'
|
28
25
|
gem 'rspec-rails'
|
29
26
|
end
|
data/Rakefile
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
require 'metric_fu'
|
1
|
+
require 'metric_fu' if Object.const_defined? 'MetricFu'
|
2
2
|
require 'rubygems'
|
3
3
|
require 'rake'
|
4
4
|
require File.expand_path('../config/application', __FILE__)
|
5
|
-
|
6
5
|
EditorialLogic::Application.load_tasks
|
7
|
-
|
8
6
|
begin
|
9
7
|
require 'jeweler'
|
10
8
|
Jeweler::Tasks.new do |gem|
|
@@ -15,17 +13,14 @@ begin
|
|
15
13
|
gem.homepage = "http://github.com/ivanoblomov/editorial_logic"
|
16
14
|
gem.authors = ["Bantik"]
|
17
15
|
gem.add_development_dependency "rspec", ">= 1.2.9"
|
18
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
16
|
end
|
20
17
|
Jeweler::GemcutterTasks.new
|
21
18
|
rescue LoadError
|
22
19
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
23
20
|
end
|
24
|
-
|
25
|
-
require 'rake/rdoctask'
|
21
|
+
require 'rdoc/task'
|
26
22
|
Rake::RDocTask.new do |rdoc|
|
27
23
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
28
|
-
|
29
24
|
rdoc.rdoc_dir = 'rdoc'
|
30
25
|
rdoc.title = "editorial_logic #{version}"
|
31
26
|
rdoc.rdoc_files.include('README*')
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.4
|
@@ -55,8 +55,8 @@ class ManagedContent
|
|
55
55
|
indexes :summary
|
56
56
|
end
|
57
57
|
|
58
|
-
after_destroy :delete_tank_indexes
|
59
|
-
after_save :update_tank_indexes
|
58
|
+
after_destroy :delete_tank_indexes unless Rails.application.config.tanker_disabled
|
59
|
+
after_save :update_tank_indexes unless Rails.application.config.tanker_disabled
|
60
60
|
|
61
61
|
# Validations ====================================================================================
|
62
62
|
class ContentPresenceValidator < ActiveModel::EachValidator
|
data/config/environments/test.rb
CHANGED
@@ -7,7 +7,6 @@ EditorialLogic::Application.configure do
|
|
7
7
|
config.action_controller.allow_forgery_protection = false
|
8
8
|
config.action_mailer.delivery_method = :test
|
9
9
|
config.active_support.deprecation = :stderr
|
10
|
-
#
|
11
|
-
config.
|
12
|
-
config.tanker_pagination_backend = :kaminari
|
10
|
+
# custom
|
11
|
+
config.tanker_disabled = true
|
13
12
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
if Rails.env.test?
|
1
|
+
if Rails.env.test? && Object.const_defined?('MetricFu')
|
2
2
|
require 'metric_fu'
|
3
3
|
MetricFu::Configuration.run do |config|
|
4
4
|
config.metrics = [:churn, :saikuro, :stats, :flog, :flay]
|
5
5
|
config.graphs = [:flog, :flay, :stats]
|
6
6
|
config.rcov[:test_files] = ['spec/**/*_spec.rb']
|
7
|
-
config.rcov[:rcov_opts] << '-Ispec'
|
7
|
+
config.rcov[:rcov_opts] << '-Ispec'
|
8
8
|
end
|
9
9
|
end
|
data/config/mongoid.yml
CHANGED
@@ -1,17 +1,5 @@
|
|
1
1
|
defaults: &defaults
|
2
2
|
host: localhost
|
3
|
-
autocreate_indexes: false
|
4
|
-
allow_dynamic_fields: false
|
5
|
-
include_root_in_json: false
|
6
|
-
parameterize_keys: true
|
7
|
-
persist_in_safe_mode: false
|
8
|
-
raise_not_found_error: true
|
9
|
-
reconnect_time: 3
|
10
|
-
skip_version_check: true
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *defaults
|
14
|
-
database: editorial_logic_development
|
15
3
|
|
16
4
|
test:
|
17
5
|
<<: *defaults
|
data/editorial_logic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "editorial_logic"
|
8
|
-
s.version = "1.4.
|
8
|
+
s.version = "1.4.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bantik"]
|
12
|
-
s.date = "2011-11-
|
12
|
+
s.date = "2011-11-30"
|
13
13
|
s.description = "An engine for enabling managed content, including articles, blogs, FAQs and glossaries."
|
14
14
|
s.email = "corey@seologic.com"
|
15
15
|
s.files = [
|
@@ -69,13 +69,10 @@ Gem::Specification.new do |s|
|
|
69
69
|
"config/boot.rb",
|
70
70
|
"config/cucumber.yml",
|
71
71
|
"config/environment.rb",
|
72
|
-
"config/environments/development.rb",
|
73
|
-
"config/environments/production.rb",
|
74
72
|
"config/environments/test.rb",
|
75
73
|
"config/initializers/metric_fu.rb",
|
76
74
|
"config/initializers/secret_token.rb",
|
77
75
|
"config/initializers/session_store.rb",
|
78
|
-
"config/locales/en.yml",
|
79
76
|
"config/mongoid.yml",
|
80
77
|
"config/routes.rb",
|
81
78
|
"editorial_logic.gemspec",
|
@@ -128,10 +125,9 @@ Gem::Specification.new do |s|
|
|
128
125
|
s.add_runtime_dependency(%q<ckeditor>, [">= 0"])
|
129
126
|
s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
|
130
127
|
s.add_runtime_dependency(%q<mongoid>, [">= 0"])
|
131
|
-
s.add_runtime_dependency(%q<rails>, ["
|
128
|
+
s.add_runtime_dependency(%q<rails>, ["= 3.0.10"])
|
132
129
|
s.add_runtime_dependency(%q<scaffold_logic>, [">= 0"])
|
133
130
|
s.add_runtime_dependency(%q<stringex>, [">= 0"])
|
134
|
-
s.add_runtime_dependency(%q<SystemTimer>, [">= 0"])
|
135
131
|
s.add_runtime_dependency(%q<tanker>, [">= 0"])
|
136
132
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
137
133
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
@@ -141,10 +137,9 @@ Gem::Specification.new do |s|
|
|
141
137
|
s.add_dependency(%q<ckeditor>, [">= 0"])
|
142
138
|
s.add_dependency(%q<fastercsv>, [">= 0"])
|
143
139
|
s.add_dependency(%q<mongoid>, [">= 0"])
|
144
|
-
s.add_dependency(%q<rails>, ["
|
140
|
+
s.add_dependency(%q<rails>, ["= 3.0.10"])
|
145
141
|
s.add_dependency(%q<scaffold_logic>, [">= 0"])
|
146
142
|
s.add_dependency(%q<stringex>, [">= 0"])
|
147
|
-
s.add_dependency(%q<SystemTimer>, [">= 0"])
|
148
143
|
s.add_dependency(%q<tanker>, [">= 0"])
|
149
144
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
150
145
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
@@ -155,10 +150,9 @@ Gem::Specification.new do |s|
|
|
155
150
|
s.add_dependency(%q<ckeditor>, [">= 0"])
|
156
151
|
s.add_dependency(%q<fastercsv>, [">= 0"])
|
157
152
|
s.add_dependency(%q<mongoid>, [">= 0"])
|
158
|
-
s.add_dependency(%q<rails>, ["
|
153
|
+
s.add_dependency(%q<rails>, ["= 3.0.10"])
|
159
154
|
s.add_dependency(%q<scaffold_logic>, [">= 0"])
|
160
155
|
s.add_dependency(%q<stringex>, [">= 0"])
|
161
|
-
s.add_dependency(%q<SystemTimer>, [">= 0"])
|
162
156
|
s.add_dependency(%q<tanker>, [">= 0"])
|
163
157
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
164
158
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
@@ -3,14 +3,13 @@ Feature: Manage Articles Content
|
|
3
3
|
As an admin
|
4
4
|
I want to create, edit, and delete articles
|
5
5
|
|
6
|
-
@focus
|
7
6
|
Scenario: Add Content to a Publication
|
8
7
|
Given I have no publications
|
9
8
|
Given I have a publication named "My Articles" with "Articles" content
|
10
9
|
When I visit "My Articles"
|
11
10
|
And I follow "Add Content"
|
12
11
|
And I fill in "managed_content_headline" with "My Great Article"
|
13
|
-
And I fill in "
|
12
|
+
And I fill in "managed_content_content" with "Here it is."
|
14
13
|
And I press "Save"
|
15
14
|
Then I should see "Publication Details"
|
16
15
|
And I should see "My Great Article"
|
@@ -99,7 +98,7 @@ Feature: Manage Articles Content
|
|
99
98
|
Then I should see "Article Sections"
|
100
99
|
And I follow "Add a Section"
|
101
100
|
And I fill in "section_headline" with "Introduction"
|
102
|
-
And I fill in "
|
101
|
+
And I fill in "section_content" with "This is my intro."
|
103
102
|
And I press "Save"
|
104
103
|
Then I should see "Article Details"
|
105
104
|
And I should see "Introduction"
|
@@ -115,7 +114,7 @@ Feature: Manage Articles Content
|
|
115
114
|
Then I should see "Article Sections"
|
116
115
|
And I follow "Add a Section"
|
117
116
|
And I fill in "section_headline" with "Introduction"
|
118
|
-
And I fill in "
|
117
|
+
And I fill in "section_content" with "This is my intro."
|
119
118
|
And I press "Save"
|
120
119
|
Then I should see "Article Details"
|
121
120
|
And I should see "Introduction"
|
@@ -9,7 +9,7 @@ Feature: Manage FAQ Content
|
|
9
9
|
When I visit "FAQ"
|
10
10
|
And I follow "Add Content"
|
11
11
|
And I fill in "managed_content_headline" with "What is the answer?"
|
12
|
-
And I fill in "
|
12
|
+
And I fill in "managed_content_content" with "Here it is."
|
13
13
|
And I press "Save"
|
14
14
|
Then I should see "Publication Details"
|
15
15
|
And I should see "What is the answer?"
|
@@ -9,7 +9,7 @@ Feature: Manage Glossary Content
|
|
9
9
|
When I visit "Glossary of Technical Terms"
|
10
10
|
And I follow "Add Content"
|
11
11
|
And I fill in "managed_content_headline" with "Foo"
|
12
|
-
And I fill in "
|
12
|
+
And I fill in "managed_content_content" with "Something arbitrary."
|
13
13
|
And I press "Save"
|
14
14
|
Then I should see "Publication Details"
|
15
15
|
And I should see "Foo"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editorial_logic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 4
|
10
|
+
version: 1.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bantik
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
18
|
+
date: 2011-11-30 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bson_ext
|
@@ -93,12 +93,14 @@ dependencies:
|
|
93
93
|
requirement: &id006 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
|
-
- - "
|
96
|
+
- - "="
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
hash:
|
98
|
+
hash: 19
|
99
99
|
segments:
|
100
|
+
- 3
|
100
101
|
- 0
|
101
|
-
|
102
|
+
- 10
|
103
|
+
version: 3.0.10
|
102
104
|
type: :runtime
|
103
105
|
version_requirements: *id006
|
104
106
|
- !ruby/object:Gem::Dependency
|
@@ -130,7 +132,7 @@ dependencies:
|
|
130
132
|
type: :runtime
|
131
133
|
version_requirements: *id008
|
132
134
|
- !ruby/object:Gem::Dependency
|
133
|
-
name:
|
135
|
+
name: tanker
|
134
136
|
prerelease: false
|
135
137
|
requirement: &id009 !ruby/object:Gem::Requirement
|
136
138
|
none: false
|
@@ -143,24 +145,10 @@ dependencies:
|
|
143
145
|
version: "0"
|
144
146
|
type: :runtime
|
145
147
|
version_requirements: *id009
|
146
|
-
- !ruby/object:Gem::Dependency
|
147
|
-
name: tanker
|
148
|
-
prerelease: false
|
149
|
-
requirement: &id010 !ruby/object:Gem::Requirement
|
150
|
-
none: false
|
151
|
-
requirements:
|
152
|
-
- - ">="
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
hash: 3
|
155
|
-
segments:
|
156
|
-
- 0
|
157
|
-
version: "0"
|
158
|
-
type: :runtime
|
159
|
-
version_requirements: *id010
|
160
148
|
- !ruby/object:Gem::Dependency
|
161
149
|
name: jeweler
|
162
150
|
prerelease: false
|
163
|
-
requirement: &
|
151
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
164
152
|
none: false
|
165
153
|
requirements:
|
166
154
|
- - ">="
|
@@ -170,11 +158,11 @@ dependencies:
|
|
170
158
|
- 0
|
171
159
|
version: "0"
|
172
160
|
type: :development
|
173
|
-
version_requirements: *
|
161
|
+
version_requirements: *id010
|
174
162
|
- !ruby/object:Gem::Dependency
|
175
163
|
name: rspec
|
176
164
|
prerelease: false
|
177
|
-
requirement: &
|
165
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
178
166
|
none: false
|
179
167
|
requirements:
|
180
168
|
- - ">="
|
@@ -186,7 +174,7 @@ dependencies:
|
|
186
174
|
- 9
|
187
175
|
version: 1.2.9
|
188
176
|
type: :development
|
189
|
-
version_requirements: *
|
177
|
+
version_requirements: *id011
|
190
178
|
description: An engine for enabling managed content, including articles, blogs, FAQs and glossaries.
|
191
179
|
email: corey@seologic.com
|
192
180
|
executables: []
|
@@ -252,13 +240,10 @@ files:
|
|
252
240
|
- config/boot.rb
|
253
241
|
- config/cucumber.yml
|
254
242
|
- config/environment.rb
|
255
|
-
- config/environments/development.rb
|
256
|
-
- config/environments/production.rb
|
257
243
|
- config/environments/test.rb
|
258
244
|
- config/initializers/metric_fu.rb
|
259
245
|
- config/initializers/secret_token.rb
|
260
246
|
- config/initializers/session_store.rb
|
261
|
-
- config/locales/en.yml
|
262
247
|
- config/mongoid.yml
|
263
248
|
- config/routes.rb
|
264
249
|
- editorial_logic.gemspec
|
@@ -1,11 +0,0 @@
|
|
1
|
-
EditorialLogic::Application.configure do
|
2
|
-
config.cache_classes = false
|
3
|
-
config.whiny_nils = true
|
4
|
-
config.consider_all_requests_local = true
|
5
|
-
config.action_controller.perform_caching = false
|
6
|
-
config.action_mailer.raise_delivery_errors = false
|
7
|
-
config.active_support.deprecation = :log
|
8
|
-
config.action_dispatch.best_standards_support = :builtin
|
9
|
-
# Custom settings
|
10
|
-
config.feature_results_path = "#{Rails.root}/tmp/feature_results.txt"
|
11
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
EditorialLogic::Application.configure do
|
2
|
-
config.cache_classes = true
|
3
|
-
config.consider_all_requests_local = false
|
4
|
-
config.action_controller.perform_caching = true
|
5
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
6
|
-
config.serve_static_assets = false
|
7
|
-
config.i18n.fallbacks = true
|
8
|
-
config.active_support.deprecation = :notify
|
9
|
-
end
|