refinerycms-base 0.9.9.1
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.
- data/db/migrate/20100913234706_create_refinerycms_core_schema.rb +23 -0
- data/db/migrate/20101217113424_add_locale_to_slugs.rb +13 -0
- data/lib/base/refinery.rb +42 -0
- data/lib/gemspec.rb +31 -0
- data/lib/generators/refinerycms_base_generator.rb +8 -0
- data/lib/refinery/version.rb +16 -0
- data/lib/refinerycms-base.rb +36 -0
- data/license.md +21 -0
- data/refinerycms-base.gemspec +34 -0
- metadata +67 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
class CreateRefinerycmsCoreSchema < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table ::Slug.table_name, :force => true do |t|
|
4
|
+
t.string "name"
|
5
|
+
t.integer "sluggable_id"
|
6
|
+
t.integer "sequence", :default => 1, :null => false
|
7
|
+
t.string "sluggable_type", :limit => 40
|
8
|
+
t.string "scope", :limit => 40
|
9
|
+
t.datetime "created_at"
|
10
|
+
end
|
11
|
+
|
12
|
+
add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_name_sluggable_type_scope_and_sequence", :unique => true
|
13
|
+
add_index ::Slug.table_name, ["sluggable_id"], :name => "index_#{::Slug.table_name}_on_sluggable_id"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
[::Slug].reject{|m|
|
18
|
+
!(defined?(m) and m.respond_to?(:table_name))
|
19
|
+
}.each do |model|
|
20
|
+
drop_table model.table_name
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rbconfig'
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
|
5
|
+
WINDOWS = !!(RbConfig::CONFIG['host_os'] =~ %r!(msdos|mswin|djgpp|mingw)!) unless defined? WINDOWS
|
6
|
+
|
7
|
+
autoload :Version, File.expand_path('../../refinery/version', __FILE__)
|
8
|
+
|
9
|
+
class << self
|
10
|
+
attr_accessor :base_cache_key, :gems, :rescue_not_found, :roots, :s3_backend
|
11
|
+
|
12
|
+
def base_cache_key
|
13
|
+
@base_cache_key ||= :refinery
|
14
|
+
end
|
15
|
+
|
16
|
+
def engines
|
17
|
+
@engines ||= []
|
18
|
+
end
|
19
|
+
|
20
|
+
def rescue_not_found
|
21
|
+
!!@rescue_not_found
|
22
|
+
end
|
23
|
+
|
24
|
+
def roots(engine_name = nil)
|
25
|
+
if engine_name.nil?
|
26
|
+
@roots ||= self.engines.map {|engine| "Refinery::#{engine.camelize}".constantize.root }
|
27
|
+
else
|
28
|
+
unless (engine_name = self.engines.detect{|engine| engine.to_s == engine_name.to_s}).nil?
|
29
|
+
"Refinery::#{engine_name.camelize}".constantize.root
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def s3_backend
|
35
|
+
@s3_backend ||= false
|
36
|
+
end
|
37
|
+
|
38
|
+
def version
|
39
|
+
::Refinery::Version.to_s
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/gemspec.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require File.expand_path('../base/refinery', __FILE__)
|
3
|
+
gempath = Pathname.new(File.expand_path('../../', __FILE__))
|
4
|
+
|
5
|
+
gemspec = <<EOF
|
6
|
+
# DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
|
7
|
+
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.name = %q{#{gemname = 'refinerycms-base'}}
|
10
|
+
s.version = %q{#{::Refinery.version}}
|
11
|
+
s.summary = %q{Base engine for Refinery CMS}
|
12
|
+
s.description = %q{The basic base for Refinery CMS Refinery CMS}
|
13
|
+
s.date = %q{#{Time.now.strftime('%Y-%m-%d')}}
|
14
|
+
s.email = %q{info@refinerycms.com}
|
15
|
+
s.homepage = %q{http://refinerycms.com}
|
16
|
+
s.rubyforge_project = %q{refinerycms}
|
17
|
+
s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
|
18
|
+
s.license = %q{MIT}
|
19
|
+
s.require_paths = %w(lib)
|
20
|
+
s.executables = %w(#{Pathname.glob(gempath.join('bin/*')).map{|d| d.relative_path_from(gempath)}.sort.join(" ")})
|
21
|
+
|
22
|
+
s.files = [
|
23
|
+
'#{%w( **/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(gempath.join(file)) }.flatten.reject{|f|
|
24
|
+
!f.exist? or f.to_s =~ /\.gem$/ or (f.directory? and f.children.empty?)
|
25
|
+
}.map{|d| d.relative_path_from(gempath)}.uniq.sort.join("',\n '")}'
|
26
|
+
]
|
27
|
+
end
|
28
|
+
EOF
|
29
|
+
|
30
|
+
(gemfile = gempath.join("#{gemname}.gemspec")).open('w') {|f| f.puts(gemspec)}
|
31
|
+
puts `cd #{gempath} && gem build #{gemfile}` if ARGV.any?{|a| a == "BUILD=true"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
unless defined? ::Rails
|
2
|
+
require 'rails'
|
3
|
+
require 'action_controller/railtie'
|
4
|
+
end
|
5
|
+
require File.expand_path('../base/refinery', __FILE__)
|
6
|
+
|
7
|
+
module Refinery
|
8
|
+
|
9
|
+
module Base
|
10
|
+
class << self
|
11
|
+
attr_accessor :root
|
12
|
+
def root
|
13
|
+
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class Engine < ::Rails::Engine
|
18
|
+
|
19
|
+
config.autoload_paths += %W( #{config.root}/lib )
|
20
|
+
|
21
|
+
config.after_initialize do
|
22
|
+
::Refinery::Plugin.register do |plugin|
|
23
|
+
plugin.name = "refinerycms_base"
|
24
|
+
plugin.class_name ="RefineryBaseEngine"
|
25
|
+
plugin.version = ::Refinery.version
|
26
|
+
plugin.hide_from_menu = true
|
27
|
+
plugin.always_allow_access = true
|
28
|
+
plugin.menu_match = /(refinery|admin)\/(refinery_base)$/
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
::Refinery.engines << "base"
|
data/license.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2005-2010 [Resolve Digital](http://www.resolvedigital.com)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{refinerycms-base}
|
5
|
+
s.version = %q{0.9.9.1}
|
6
|
+
s.summary = %q{Base engine for Refinery CMS}
|
7
|
+
s.description = %q{The basic base for Refinery CMS Refinery CMS}
|
8
|
+
s.date = %q{2011-02-15}
|
9
|
+
s.email = %q{info@refinerycms.com}
|
10
|
+
s.homepage = %q{http://refinerycms.com}
|
11
|
+
s.rubyforge_project = %q{refinerycms}
|
12
|
+
s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
|
13
|
+
s.license = %q{MIT}
|
14
|
+
s.require_paths = %w(lib)
|
15
|
+
s.executables = %w()
|
16
|
+
|
17
|
+
s.files = [
|
18
|
+
'db',
|
19
|
+
'db/migrate',
|
20
|
+
'db/migrate/20100913234706_create_refinerycms_core_schema.rb',
|
21
|
+
'db/migrate/20101217113424_add_locale_to_slugs.rb',
|
22
|
+
'lib',
|
23
|
+
'lib/base',
|
24
|
+
'lib/base/refinery.rb',
|
25
|
+
'lib/gemspec.rb',
|
26
|
+
'lib/generators',
|
27
|
+
'lib/generators/refinerycms_base_generator.rb',
|
28
|
+
'lib/refinery',
|
29
|
+
'lib/refinery/version.rb',
|
30
|
+
'lib/refinerycms-base.rb',
|
31
|
+
'license.md',
|
32
|
+
'refinerycms-base.gemspec'
|
33
|
+
]
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: refinerycms-base
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.9.9.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Resolve Digital
|
9
|
+
- Philip Arndt
|
10
|
+
- David Jones
|
11
|
+
- Steven Heidel
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
|
16
|
+
date: 2011-02-15 00:00:00 +13:00
|
17
|
+
default_executable:
|
18
|
+
dependencies: []
|
19
|
+
|
20
|
+
description: The basic base for Refinery CMS Refinery CMS
|
21
|
+
email: info@refinerycms.com
|
22
|
+
executables: []
|
23
|
+
|
24
|
+
extensions: []
|
25
|
+
|
26
|
+
extra_rdoc_files: []
|
27
|
+
|
28
|
+
files:
|
29
|
+
- db/migrate/20100913234706_create_refinerycms_core_schema.rb
|
30
|
+
- db/migrate/20101217113424_add_locale_to_slugs.rb
|
31
|
+
- lib/base/refinery.rb
|
32
|
+
- lib/gemspec.rb
|
33
|
+
- lib/generators/refinerycms_base_generator.rb
|
34
|
+
- lib/refinery/version.rb
|
35
|
+
- lib/refinerycms-base.rb
|
36
|
+
- license.md
|
37
|
+
- refinerycms-base.gemspec
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: http://refinerycms.com
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
requirements: []
|
60
|
+
|
61
|
+
rubyforge_project: refinerycms
|
62
|
+
rubygems_version: 1.5.2
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: Base engine for Refinery CMS
|
66
|
+
test_files: []
|
67
|
+
|