bcms_settings 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,36 +1,6 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.0.11'
4
-
5
- # Bundle edge Rails instead:
6
- # gem 'rails', :git => 'git://github.com/rails/rails.git'
1
+ source "http://rubygems.org"
7
2
 
3
+ gemspec
8
4
  gem 'sqlite3'
9
5
 
10
- # Use unicorn as the web server
11
- # gem 'unicorn'
12
-
13
- # Deploy with Capistrano
14
- # gem 'capistrano'
15
-
16
- # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
17
- # gem 'ruby-debug'
18
- # gem 'ruby-debug19', :require => 'ruby-debug'
19
-
20
- # Bundle the extra gems:
21
- # gem 'bj'
22
- # gem 'nokogiri'
23
- # gem 'sqlite3-ruby', :require => 'sqlite3'
24
- # gem 'aws-s3', :require => 'aws/s3'
25
-
26
- # Bundle gems for the local environment. Make sure to
27
- # put test-only gems in this group so their generators
28
- # and rake tasks are available in development mode:
29
- # group :development, :test do
30
- # gem 'webrat'
31
- # end
32
- gem "mysql2", '0.2.18'
33
- #gem "mocha"
34
- gem "mocha", :group => :test, :require=>false
35
-
36
- gemspec
6
+ gem 'mocha', :group=>:development
@@ -0,0 +1,15 @@
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 vendor/assets/javascripts of plugins, if any, 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
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,13 @@
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,4 @@
1
+ module BcmsSettings
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module BcmsSettings
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ BcmsSettings::Engine.routes.draw do
2
+ end
@@ -1,2 +1,4 @@
1
- require 'bcms_settings/engine'
2
- require 'bcms_settings/routes'
1
+ require "bcms_settings/engine"
2
+
3
+ module BcmsSettings
4
+ end
@@ -13,6 +13,8 @@ class CmsModule < ActiveRecord::Base
13
13
 
14
14
  serialize :settings
15
15
 
16
+ attr_accessible :name, :settings, :cms_managed
17
+
16
18
  scope :managed, :conditions => {:cms_managed => true},
17
19
  :select => 'name'
18
20
  end
@@ -4,6 +4,8 @@ module BcmsSettings
4
4
  class Engine < Rails::Engine
5
5
  include Cms::Module
6
6
 
7
+ isolate_namespace BcmsSettings
8
+
7
9
  initializer 'bcms_settings', :after=>'disable_dependency_loading' do
8
10
  require 'bcms_settings/cms/settings'
9
11
  Cms::Settings.synchronize
@@ -1,3 +1,3 @@
1
1
  module BcmsSettings
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -1,10 +1,9 @@
1
1
  require 'cms/module_installation'
2
2
 
3
3
  class BcmsSettings::InstallGenerator < Cms::ModuleInstallation
4
- add_migrations_directory_to_source_root __FILE__
5
4
 
6
- # Add migrations to be copied, by uncommenting the following file and editing as needed.
7
- copy_migration_file '20101129011429_create_cms_modules.rb'
8
-
5
+ def copy_migrations
6
+ rake 'bcms_settings:install:migrations'
7
+ end
9
8
 
10
9
  end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :bcms_settings do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class BcmsSettingsTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, BcmsSettings
6
+ end
7
+ end
@@ -1,13 +1,15 @@
1
+ # Configure Rails Environment
1
2
  ENV["RAILS_ENV"] = "test"
2
- require File.expand_path('../../config/environment', __FILE__)
3
- require 'rails/test_help'
4
3
 
5
- class ActiveSupport::TestCase
6
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7
- #
8
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
- # -- they do not yet inherit this setting
10
- fixtures :all
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
11
6
 
12
- # Add more helper methods to be used by all tests here...
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
13
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcms_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-06 00:00:00.000000000Z
12
+ date: 2012-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: browsercms
16
- requirement: &70258854205240 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - <
20
20
  - !ruby/object:Gem::Version
21
- version: 3.3.0
21
+ version: 3.6.0
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: 3.5.0.rc3
22
25
  type: :runtime
23
26
  prerelease: false
24
- version_requirements: *70258854205240
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: 3.6.0
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: 3.5.0.rc3
25
36
  description: A configuration module for BrowserCMS. Provides a global persisted key
26
37
  value store that can be used to keep configuration key value pairs
27
38
  email: github@browsermedia.com
@@ -30,33 +41,29 @@ extensions: []
30
41
  extra_rdoc_files:
31
42
  - README.markdown
32
43
  files:
33
- - .gitignore
34
- - CHANGELOG
35
- - COPYRIGHT.txt
36
- - GPL.txt
37
- - Gemfile
38
- - LICENSE.txt
39
- - README.markdown
40
- - Rakefile
41
- - app/views/layouts/templates/default.html.erb
42
- - bcms_settings.gemspec
44
+ - app/assets/javascripts/bcms_settings/application.js
45
+ - app/assets/stylesheets/bcms_settings/application.css
46
+ - app/controllers/bcms_settings/application_controller.rb
47
+ - app/helpers/bcms_settings/application_helper.rb
48
+ - config/routes.rb
43
49
  - db/migrate/20101129011429_create_cms_modules.rb
44
- - doc/README_FOR_APP
45
- - lib/bcms_settings.rb
46
50
  - lib/bcms_settings/cms/settings.rb
47
51
  - lib/bcms_settings/cms_module.rb
48
52
  - lib/bcms_settings/engine.rb
49
- - lib/bcms_settings/routes.rb
50
53
  - lib/bcms_settings/version.rb
51
- - lib/generators/bcms_settings/install/USAGE
54
+ - lib/bcms_settings.rb
52
55
  - lib/generators/bcms_settings/install/install_generator.rb
53
- - lib/tasks/.gitkeep
54
- - public/stylesheets/.gitkeep
55
- - test/performance/browsing_test.rb
56
+ - lib/generators/bcms_settings/install/USAGE
57
+ - lib/tasks/bcms_settings_tasks.rake
58
+ - README.markdown
59
+ - Gemfile
60
+ - LICENSE.txt
61
+ - COPYRIGHT.txt
62
+ - GPL.txt
63
+ - test/bcms_settings_test.rb
56
64
  - test/test_helper.rb
57
65
  - test/unit/cms_module_test.rb
58
66
  - test/unit/lib/cms/settings_test.rb
59
- - vendor/plugins/.gitkeep
60
67
  homepage: https://github.com/browsermedia/bcms_settings
61
68
  licenses: []
62
69
  post_install_message:
@@ -72,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
79
  version: '0'
73
80
  segments:
74
81
  - 0
75
- hash: -4475640192976774933
82
+ hash: -1499760955323230719
76
83
  required_rubygems_version: !ruby/object:Gem::Requirement
77
84
  none: false
78
85
  requirements:
@@ -81,15 +88,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
88
  version: '0'
82
89
  segments:
83
90
  - 0
84
- hash: -4475640192976774933
91
+ hash: -1499760955323230719
85
92
  requirements: []
86
93
  rubyforge_project: bcms_settings
87
- rubygems_version: 1.8.10
94
+ rubygems_version: 1.8.24
88
95
  signing_key:
89
96
  specification_version: 3
90
97
  summary: Global settings storage for BrowserCMS
91
98
  test_files:
92
- - test/performance/browsing_test.rb
99
+ - test/bcms_settings_test.rb
93
100
  - test/test_helper.rb
94
101
  - test/unit/cms_module_test.rb
95
102
  - test/unit/lib/cms/settings_test.rb
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- coverage/**/*
2
- .DS_Store
3
- log/*.log
4
- tmp/**/*
5
- db/*.sqlite3
6
- db/schema.rb
7
- *.gem
8
- .dotest
9
- tmp/restart.txt
10
- public/cache
11
- .idea/*
12
- Gemfile.lock
data/CHANGELOG DELETED
@@ -1,11 +0,0 @@
1
- *0.0.3 (Nov 29, 2010)*
2
-
3
- * Added tests for CmsModuleProxy
4
- * Added README
5
- * Cms::Settings.synchronize ignores bcms_settings
6
- * Cms::Settings.register checks if cms_modules extist before attempting to register a module
7
-
8
-
9
- *0.0.2 (Nov 28, 2010)*
10
-
11
- * Initial release
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
- require 'rake'
6
-
7
- BcmsSettings::Application.load_tasks
8
-
9
- # Otherwise, this enabled Bundler to build your gem
10
- require 'bundler'
11
- Bundler::GemHelper.install_tasks
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
5
- <title><%= page_title %></title>
6
- <%= yield :html_head %>
7
- </head>
8
- <body style="margin: 0; padding: 0; text-align: center;">
9
- <%= cms_toolbar %>
10
- <div id="wrapper" style="width: 700px; margin: 0 auto; text-align: left; padding: 30px">
11
- Breadcrumbs: <%= render_breadcrumbs %>
12
- Main Menu: <%= render_menu %>
13
- <h1><%= page_title %></h1>
14
- <%= container :main %>
15
- </div>
16
- </body>
17
- </html>
@@ -1,40 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "bcms_settings/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = %q{bcms_settings}
7
- s.version = BcmsSettings::VERSION
8
- s.authors = ["BrowserMedia"]
9
- s.email = %q{github@browsermedia.com}
10
- s.homepage = %q{https://github.com/browsermedia/bcms_settings}
11
- s.description = %q{A configuration module for BrowserCMS. Provides a global persisted key value store that can be used to keep configuration key value pairs}
12
- s.summary = %q{Global settings storage for BrowserCMS}
13
- s.extra_rdoc_files = [
14
- "README.markdown"
15
- ]
16
- s.rdoc_options = ["--charset=UTF-8"]
17
-
18
- s.rubyforge_project = "bcms_settings"
19
-
20
- s.files = `git ls-files`.split("\n")
21
- # Exclude files required for the 'dummy' Rails app
22
- s.files -= Dir['config/**/*', 'public/**/*', 'config.ru',
23
- 'db/migrate/*browsercms*',
24
- 'db/seeds.rb',
25
- 'script/**/*',
26
- 'app/controllers/application_controller.rb',
27
- 'app/helpers/application_helper.rb',
28
- 'app/layouts/templates/**/*'
29
-
30
- ]
31
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
32
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
33
- s.require_paths = ["lib"]
34
-
35
- s.add_dependency(%q<browsercms>, ["~> 3.3.0"])
36
- end
37
-
38
-
39
-
40
-
@@ -1,2 +0,0 @@
1
- Use this README file to introduce your application and point to useful places in the API for learning more.
2
- Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -1,9 +0,0 @@
1
- module Cms::Routes
2
- def routes_for_bcms_settings
3
- namespace(:cms) do
4
- # No routes for this module.
5
- end
6
- end
7
- end
8
-
9
-
File without changes
File without changes
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
- require 'rails/performance_test_help'
3
-
4
- # Profiling results for each test method are written to tmp/performance.
5
- class BrowsingTest < ActionDispatch::PerformanceTest
6
- def test_homepage
7
- get '/'
8
- end
9
- end
File without changes