Skip to content

Commit 18b5140

Browse files
committed
Build Demo / Test Plugin
1 parent 3fd9cec commit 18b5140

File tree

23 files changed

+64
-294
lines changed

23 files changed

+64
-294
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
# Declare your gem's dependencies in cortex-plugins-core.gemspec.
3+
# Declare your gem's dependencies in cortex-plugins-demo.gemspec.
44
# Bundler will treat runtime dependencies like base dependencies, and
55
# development dependencies will be added by default to the :development group.
66
gemspec

Gemfile.lock

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
PATH
22
remote: .
33
specs:
4-
cortex-plugins-core (0.3.1)
4+
cortex-plugins-demo (1.4.2)
55
cells (~> 4.1)
66
cells-haml (~> 0.0.10)
77
cells-rails (~> 0.0.6)
8-
ckeditor (~> 4.2.0)
98
rails (>= 4)
109

1110
GEM
@@ -50,7 +49,7 @@ GEM
5049
tzinfo (~> 1.1)
5150
arel (7.1.4)
5251
builder (3.2.2)
53-
cells (4.1.1)
52+
cells (4.1.3)
5453
tilt (>= 1.4, < 3)
5554
uber (>= 0.0.9)
5655
cells-haml (0.0.10)
@@ -59,13 +58,6 @@ GEM
5958
cells-rails (0.0.6)
6059
actionpack (>= 3.0)
6160
cells (>= 4.1)
62-
ckeditor (4.2.0)
63-
cocaine
64-
orm_adapter (~> 0.5.0)
65-
climate_control (0.0.3)
66-
activesupport (>= 3.0)
67-
cocaine (0.5.8)
68-
climate_control (>= 0.0.3, < 1.0)
6961
concurrent-ruby (1.0.2)
7062
erubis (2.7.0)
7163
globalid (0.3.7)
@@ -86,7 +78,6 @@ GEM
8678
nio4r (1.2.1)
8779
nokogiri (1.6.8.1)
8880
mini_portile2 (~> 2.1.0)
89-
orm_adapter (0.5.0)
9081
rack (2.0.1)
9182
rack-test (0.6.3)
9283
rack (>= 1.0)
@@ -121,7 +112,7 @@ GEM
121112
actionpack (>= 4.0)
122113
activesupport (>= 4.0)
123114
sprockets (>= 3.0.0)
124-
sqlite3 (1.3.11)
115+
sqlite3 (1.3.12)
125116
thor (0.19.1)
126117
thread_safe (0.3.5)
127118
tilt (2.0.5)
@@ -136,7 +127,7 @@ PLATFORMS
136127
ruby
137128

138129
DEPENDENCIES
139-
cortex-plugins-core!
130+
cortex-plugins-demo!
140131
sqlite3
141132

142133
BUNDLED WITH

Rakefile

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ rescue LoadError
55
end
66

77
require 'rdoc/task'
8-
98
RDoc::Task.new(:rdoc) do |rdoc|
109
rdoc.rdoc_dir = 'rdoc'
11-
rdoc.title = 'Cortex::Plugins::Core'
10+
rdoc.title = 'Cortex::Plugins::Demo'
1211
rdoc.options << '--line-numbers'
1312
rdoc.rdoc_files.include('README.md')
1413
rdoc.rdoc_files.include('lib/**/*.rb')
@@ -17,11 +16,8 @@ end
1716
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
1817
load 'rails/tasks/engine.rake'
1918

20-
2119
load 'rails/tasks/statistics.rake'
2220

23-
24-
2521
require 'bundler/gem_tasks'
2622

2723
require 'rake/testtask'
@@ -33,5 +29,4 @@ Rake::TestTask.new(:test) do |t|
3329
t.verbose = false
3430
end
3531

36-
3732
task default: :test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.test-element {
2+
background-color: red;
3+
color: white;
4+
font-size: 21px;
5+
}

app/cells/plugins/core/cell.rb

-7
This file was deleted.

app/cells/plugins/demo/cell.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Plugins
2+
module Demo
3+
class Cell < FieldCell
4+
view_paths << "#{Cortex::Plugins::Demo::Engine.root}/app/cells"
5+
end
6+
end
7+
end
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
%h3
1+
%marquee.test-element
22
This is from a Test Plugin!

app/cells/plugins/core/demo_cell.rb renamed to app/cells/plugins/demo/demo_cell.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Plugins
2-
module Core
3-
class DemoCell < Plugins::Core::Cell
2+
module Demo
3+
class DemoCell < Plugins::Demo::Cell
44
def show
55
render
66
end

bin/rails

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# installed from the root of your application.
44

55
ENGINE_ROOT = File.expand_path('../..', __FILE__)
6-
ENGINE_PATH = File.expand_path('../../lib/cortex/plugins/core/engine', __FILE__)
6+
ENGINE_PATH = File.expand_path('../../lib/cortex/plugins/demo/engine', __FILE__)
77

88
# Set up gems listed in the Gemfile.
99
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

cortex-plugins-test.gemspec renamed to cortex-plugins-demo.gemspec

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
$:.push File.expand_path("../lib", __FILE__)
22

33
# Maintain your gem's version:
4-
require "cortex/plugins/core/version"
4+
require "cortex/plugins/demo/version"
55

66
# Describe your gem and declare its dependencies:
77
Gem::Specification.new do |s|
8-
s.name = "cortex-plugins-test"
9-
s.version = Cortex::Plugins::Core::VERSION
8+
s.name = "cortex-plugins-demo"
9+
s.version = Cortex::Plugins::Demo::VERSION
1010
s.authors = ["CareerBuilder Employer Site & Content Products"]
1111
s.email = ["[email protected]"]
1212

1313
s.summary = %q{A Test / Demo Plugin for Cortex CMS}
14-
s.homepage = "https://github.com/cortex-cms/cortex-plugins-test"
14+
s.homepage = "https://github.com/cortex-cms/cortex-plugins-demo"
1515
s.license = "Apache-2.0"
1616

1717
s.files = Dir["{app,config,db,lib}/**/*", "LICENSE.md", "Rakefile", "README.md"]

lib/cortex/plugins/core.rb

-8
This file was deleted.

lib/cortex/plugins/core/engine.rb

-10
This file was deleted.

lib/cortex/plugins/demo.rb

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require "cortex/plugins/demo/engine"
2+
3+
module Cortex
4+
module Plugins
5+
module Demo
6+
end
7+
end
8+
end

lib/cortex/plugins/demo/engine.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Cortex
2+
module Plugins
3+
module Demo
4+
class Engine < ::Rails::Engine
5+
config.assets.paths << File.expand_path("../../assets/stylesheets/cortex-plugins-demo", __FILE__)
6+
end
7+
end
8+
end
9+
end
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Cortex
22
module Plugins
3-
module Core
4-
VERSION = '0.3.1'
3+
module Demo
4+
VERSION = '1.4.2'
55
end
66
end
77
end

lib/tasks/cortex/core/db.rake

-30
This file was deleted.

0 commit comments

Comments
 (0)