portfolio 0.9 → 0.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.
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ PORTFOLIO_ROOT = File.expand_path(File.dirname(__FILE__) << "/..")
4
+ RAILS_ROOT = ARGV.first unless defined? RAILS_ROOT
5
+ unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0
6
+ dirs = [['db', 'migrate'], ['public', 'stylesheets'], ['public', 'javascripts']]
7
+ dirs.each do |dir|
8
+ FileUtils::makedirs File.join(RAILS_ROOT, dir)
9
+ end
10
+
11
+ copies = [
12
+ {:from => ["db", "migrate"],:to => ["db", "migrate"],:filename => "20090917224823_create_portfolio_structure.rb"},
13
+ {:from => ["public", "stylesheets"],:to => ["public", "stylesheets"],:filename => "portfolio.css"},
14
+ {:from => ["public", "javascripts"],:to => ["public", "javascripts"],:filename => "portfolio.js"}
15
+ ]
16
+ copies.each do |copy|
17
+ copy_to = File.join(RAILS_ROOT, copy[:to], copy[:filename])
18
+ copy_from = File.join(PORTFOLIO_ROOT, copy[:from], copy[:filename])
19
+ unless File.exists?(copy_to)
20
+ FileUtils::copy_file copy_from, copy_to
21
+ else
22
+ puts "'#{File.join copy[:to], copy[:filename]}' already existed in your application so your existing file was not overwritten."
23
+ end
24
+ end
25
+
26
+ puts "---------"
27
+ puts "Copied all portfolio files."
28
+ puts "Now, run rake db:migrate and then rake images:regenerate"
29
+ else
30
+ puts "Please specify the path of the project that you want to use the portfolio with, i.e. portfolio-install /path/to/project"
31
+ end
data/lib/portfolio.rb ADDED
@@ -0,0 +1 @@
1
+ # empty as yet
@@ -0,0 +1,7 @@
1
+ namespace :portfolio do
2
+ desc "Install extra files from the portfolio plugin"
3
+
4
+ task :install do
5
+ puts `ruby #{File.expand_path(File.dirname(__FILE__) << '/../..')}/bin/portfolio-install #{RAILS_ROOT}`
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portfolio
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.9"
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Resolve Digital
@@ -11,13 +11,13 @@ bindir: bin
11
11
  cert_chain: []
12
12
 
13
13
  date: 2009-10-08 00:00:00 +13:00
14
- default_executable:
14
+ default_executable: portfolio-install
15
15
  dependencies: []
16
16
 
17
17
  description: A really straightforward open source Ruby on Rails portfolio plugin designed for integration with RefineryCMS.
18
18
  email: info@refinerycms.com
19
- executables: []
20
-
19
+ executables:
20
+ - portfolio-install
21
21
  extensions: []
22
22
 
23
23
  extra_rdoc_files:
@@ -39,11 +39,12 @@ files:
39
39
  - app/views/admin/portfolio_entries/new.html.erb
40
40
  - app/views/portfolio/empty.html.erb
41
41
  - app/views/portfolio/show.html.erb
42
+ - bin/portfolio-install
42
43
  - config/routes.rb
43
44
  - db/migrate/20090917224823_create_portfolio_structure.rb
44
45
  - init.rb
45
- - lib/tasks/tasks.rake
46
- - portfolio.gemspec
46
+ - lib/portfolio.rb
47
+ - lib/tasks/portfolio.rake
47
48
  - public/javascripts/portfolio.js
48
49
  - public/stylesheets/portfolio.css
49
50
  has_rdoc: true
data/lib/tasks/tasks.rake DELETED
@@ -1,12 +0,0 @@
1
- namespace :portfolio do
2
- desc "Install extra files from the portfolio plugin"
3
-
4
- task :install do
5
- plugin_root = File.join(File.dirname(__FILE__), '../../')
6
- FileUtils::copy_file File.join(plugin_root, 'db', 'migrate', '20090917224823_create_portfolio_structure.rb'), File.join(RAILS_ROOT, 'db', 'migrate', '20090917224823_create_portfolio_structure.rb')
7
- FileUtils::copy_file File.join(plugin_root, 'public', 'stylesheets', 'portfolio.css'), File.join(RAILS_ROOT, 'public', 'stylesheets', 'portfolio.css')
8
- FileUtils::copy_file File.join(plugin_root, 'public', 'javascripts', 'portfolio.js'), File.join(RAILS_ROOT, 'public', 'javascripts', 'portfolio.js')
9
- puts "Copied database migration, stylesheet and javascript files."
10
- puts "Now, run rake db:migrate and then rake images:regenerate"
11
- end
12
- end
data/portfolio.gemspec DELETED
@@ -1,18 +0,0 @@
1
- Gem::Specification.new do |s|
2
-
3
- s.name = %q{portfolio}
4
- s.version = "0.9"
5
-
6
- s.authors = ["Resolve Digital", "Philip Arndt"]
7
- s.date = %q{2009-10-08}
8
-
9
- s.description = %q{A really straightforward open source Ruby on Rails portfolio plugin designed for integration with RefineryCMS.}
10
- s.summary = %q{Ruby on Rails portfolio plugin for RefineryCMS.}
11
-
12
- s.email = %q{info@refinerycms.com}
13
- s.extra_rdoc_files = ["README", "CONTRIBUTORS", "LICENSE"]
14
- s.files = ["CONTRIBUTORS","LICENSE","README","app","app/controllers","app/controllers/admin","app/controllers/admin/portfolio_entries_controller.rb","app/controllers/portfolio_controller.rb","app/models","app/models/portfolio_entry.rb","app/views","app/views/admin","app/views/admin/portfolio_entries","app/views/admin/portfolio_entries/_form.html.erb","app/views/admin/portfolio_entries/_list.html.erb","app/views/admin/portfolio_entries/_sortable_list.html.erb","app/views/admin/portfolio_entries/edit.html.erb","app/views/admin/portfolio_entries/index.html.erb","app/views/admin/portfolio_entries/new.html.erb","app/views/portfolio","app/views/portfolio/empty.html.erb","app/views/portfolio/show.html.erb","config","config/routes.rb","db","db/migrate","db/migrate/20090917224823_create_portfolio_structure.rb","init.rb","lib","lib/tasks","lib/tasks/tasks.rake","portfolio.gemspec","public","public/javascripts","public/javascripts/portfolio.js","public/stylesheets","public/stylesheets/portfolio.css"]
15
- s.homepage = %q{http://refinerycms.com}
16
- s.rubygems_version = %q{1.3.4}
17
-
18
- end