Permalink
Browse files

Update project with gemspec command and version number and updated ro…

…utes for the latest refinerycms (still works in < 0.9.7) and license
  • Loading branch information...
1 parent 20c3f90 commit f850f054a829d8a5d073d6c1f7ba7156f819797c @parndt parndt committed Jun 14, 2010
Showing with 112 additions and 52 deletions.
  1. +1 −1 config/routes.rb
  2. +39 −0 lib/gemspec.rb
  3. +12 −1 lib/news.rb
  4. +21 −0 license.md
  5. +39 −50 refinerycms-news.gemspec
View
2 config/routes.rb
@@ -1,7 +1,7 @@
ActionController::Routing::Routes.draw do |map|
map.resources :news_items, :as => :news
- map.namespace(:admin) do |admin|
+ map.namespace(:admin, :path_prefix => (defined?(REFINERY_GEM_VERSION) ? 'admin' : 'refinery')) do |admin|
admin.resources :news_items, :as => :news
end
end
View
39 lib/gemspec.rb
@@ -0,0 +1,39 @@
+#!/usr/bin/env ruby
+require File.expand_path('../news.rb', __FILE__)
+version = Refinery::Portfolio::Version::STRING
+raise "Could not get version so gemspec can not be built" if version.nil?
+files = %w( readme.md license.md )
+%w(app bin config db lib public rails test vendor).each do |dir|
+ files += Dir.glob("#{dir}/**/*") if File.directory?(dir)
+end
+
+gemspec = <<EOF
+Gem::Specification.new do |s|
+ s.name = %q{refinerycms-news}
+ s.version = %q{#{version}}
+ s.description = %q{A really straightforward open source Ruby on Rails news engine designed for integration with RefineryCMS.}
+ s.date = %q{#{Time.now.strftime('%Y-%m-%d')}}
+ s.summary = %q{Ruby on Rails news engine for RefineryCMS.}
+ s.email = %q{info@refinerycms.com}
+ s.homepage = %q{http://refinerycms.com}
+ s.authors = %w(Resolve\\ Digital Philip\\ Arndt David\\ Jones)
+ s.require_paths = %w(lib)
+ s.executables = %w()
+
+ s.files = [
+ '#{files.join("',\n '")}'
+ ]
+ #{"s.test_files = [
+ '#{Dir.glob("test/**/*.rb").join("',\n '")}'
+ ]" if File.directory?("test")}
+end
+EOF
+
+if (save = ARGV.delete('-s'))
+ if File.exist?(file = File.expand_path("../../refinerycms-news.gemspec", __FILE__))
+ File.delete(file)
+ end
+ File.open(file, 'w') { |f| f.puts gemspec }
+else
+ puts gemspec
+end
View
13 lib/news.rb
@@ -1 +1,12 @@
-#empty, but required.
+module Refinery
+ module Portfolio
+ class Version
+ MAJOR = 0
+ MINOR = 9
+ TINY = 7
+ BUILD = 2
+
+ STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
+ end
+ end
+end
View
21 license.md
@@ -0,0 +1,21 @@
+# MIT License
+
+Copyright (c) 2005-2010 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
View
89 refinerycms-news.gemspec
@@ -1,54 +1,43 @@
Gem::Specification.new do |s|
- s.name = %q{refinerycms-news}
- s.version = "0.9.7.1"
+ s.name = %q{refinerycms-news}
+ s.version = %q{0.9.7.2}
+ s.description = %q{A really straightforward open source Ruby on Rails news engine designed for integration with RefineryCMS.}
+ s.date = %q{2010-06-15}
+ s.summary = %q{Ruby on Rails news engine for RefineryCMS.}
+ s.email = %q{info@refinerycms.com}
+ s.homepage = %q{http://refinerycms.com}
+ s.authors = %w(Resolve Digital Philip Arndt David Jones)
+ s.require_paths = %w(lib)
+ s.executables = %w()
- s.authors = ["Resolve Digital", "Philip Arndt", "David Jones"]
- s.date = %q{2010-05-01}
-
- s.description = %q{A really straightforward open source Ruby on Rails news plugin designed for integration with RefineryCMS.}
- s.summary = %q{Ruby on Rails news plugin for RefineryCMS.}
-
- s.email = %q{info@refinerycms.com}
-
- s.homepage = %q{http://refinerycms.com}
- s.rubygems_version = %q{1.3.4}
-
- s.add_dependency('will_paginate', '>= 2.3.11')
-
- s.files = [
- "app",
- "app/controllers",
- "app/controllers/admin",
- "app/controllers/admin/news_items_controller.rb",
- "app/controllers/news_items_controller.rb",
- "app/models",
- "app/models/news_item.rb",
- "app/views",
- "app/views/admin",
- "app/views/admin/news_items",
- "app/views/admin/news_items/_form.html.erb",
- "app/views/admin/news_items/_news_item.html.erb",
- "app/views/admin/news_items/edit.html.erb",
- "app/views/admin/news_items/index.html.erb",
- "app/views/admin/news_items/new.html.erb",
- "app/views/news_items",
- "app/views/news_items/_recent_posts.html.erb",
- "app/views/news_items/index.html.erb",
- "app/views/news_items/index.rss.builder",
- "app/views/news_items/show.html.erb",
- "config",
- "config/locale",
- "config/locale/en.yml",
- "config/routes.rb",
- "generators",
- "generators/news",
- "generators/news/news_generator.rb",
- "generators/news/templates",
- "generators/news/templates/migration.rb",
- "lib",
- "lib/news.rb",
- "rails",
- "rails/init.rb"
+ s.files = [
+ 'readme.md',
+ 'license.md',
+ 'app/controllers',
+ 'app/controllers/admin',
+ 'app/controllers/admin/news_items_controller.rb',
+ 'app/controllers/news_items_controller.rb',
+ 'app/models',
+ 'app/models/news_item.rb',
+ 'app/views',
+ 'app/views/admin',
+ 'app/views/admin/news_items',
+ 'app/views/admin/news_items/_form.html.erb',
+ 'app/views/admin/news_items/_news_item.html.erb',
+ 'app/views/admin/news_items/edit.html.erb',
+ 'app/views/admin/news_items/index.html.erb',
+ 'app/views/admin/news_items/new.html.erb',
+ 'app/views/news_items',
+ 'app/views/news_items/_recent_posts.html.erb',
+ 'app/views/news_items/index.html.erb',
+ 'app/views/news_items/index.rss.builder',
+ 'app/views/news_items/show.html.erb',
+ 'config/locale',
+ 'config/locale/en.yml',
+ 'config/routes.rb',
+ 'lib/gemspec.rb',
+ 'lib/news.rb',
+ 'rails/init.rb'
]
-
+
end

0 comments on commit f850f05

Please sign in to comment.