omeka-rake 0.1.0

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,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rvmrc ADDED
@@ -0,0 +1,3 @@
1
+ rvm use 1.9.3@omeka-rake
2
+
3
+ bundle install
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ notifications:
5
+ irc: "irc.freenode.org#slab"
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem "rake"
5
+ gem "shoulda"
6
+ gem "rdoc"
7
+ gem "bundler"
8
+ gem "jeweler"
9
+ gem "rspec"
10
+ end
11
+
12
+ group :test do
13
+ gem "rake"
14
+ gem "shoulda"
15
+ gem "rdoc"
16
+ gem "bundler"
17
+ gem "jeweler"
18
+ gem "rspec"
19
+ end
@@ -0,0 +1,44 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ activesupport (3.2.8)
5
+ i18n (~> 0.6)
6
+ multi_json (~> 1.0)
7
+ diff-lcs (1.1.3)
8
+ git (1.2.5)
9
+ i18n (0.6.1)
10
+ jeweler (1.8.4)
11
+ bundler (~> 1.0)
12
+ git (>= 1.2.5)
13
+ rake
14
+ rdoc
15
+ json (1.7.5)
16
+ multi_json (1.3.6)
17
+ rake (0.9.2.2)
18
+ rdoc (3.12)
19
+ json (~> 1.4)
20
+ rspec (2.11.0)
21
+ rspec-core (~> 2.11.0)
22
+ rspec-expectations (~> 2.11.0)
23
+ rspec-mocks (~> 2.11.0)
24
+ rspec-core (2.11.1)
25
+ rspec-expectations (2.11.3)
26
+ diff-lcs (~> 1.1.3)
27
+ rspec-mocks (2.11.3)
28
+ shoulda (3.1.1)
29
+ shoulda-context (~> 1.0)
30
+ shoulda-matchers (~> 1.2)
31
+ shoulda-context (1.0.0)
32
+ shoulda-matchers (1.3.0)
33
+ activesupport (>= 3.0.0)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ bundler
40
+ jeweler
41
+ rake
42
+ rdoc
43
+ rspec
44
+ shoulda
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2012 The Board and Visitors of the University of Virginia
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software distributed
10
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
12
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,32 @@
1
+
2
+ # `omeka-rake`
3
+
4
+ [![Build Status](https://travis-ci.org/erochest/omeka-rake.png)](https://travis-ci.org/erochest/omeka-rake)
5
+
6
+ This is a collection of [Rake][rake] tasks for working with [Omeka][omeka].
7
+
8
+ Currently, this has one class: `SLab::Omeka::Rake::PackageTask`. This builds
9
+ packages using the naming conventions for Omeka plugins. (This means that the
10
+ ZIP file will be named PLUGIN-VERSION.zip, and it will contain a directory
11
+ PLUGIN/.)
12
+
13
+ Here's an example of how to use it:
14
+
15
+ ```ruby
16
+ require 'slab/omeka/rake/package_task'
17
+
18
+ SLab::Omeka::Rake::PackageTask.new('Something') do |pkg|
19
+ # You'll probably want to set the version programmatically.
20
+ pkg.version = '1.0.0'
21
+ pkg.need_tar_gz = true
22
+ pkg.need_zip = true
23
+
24
+ pkg.package_files.include('README.md')
25
+ pkg.package_files.include('plugin.ini')
26
+ pkg.package_files.include('**/*.php')
27
+ end
28
+ ```
29
+
30
+ [rake]: http://rake.rubyforge.org/
31
+ [omeka]: http://omeka.org/
32
+
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "omeka-rake"
18
+ gem.homepage = "http://github.com/erochest/omeka-rake"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{A (very small) collection of Rake tasks for working with Omeka plugins.}
21
+ gem.description = %Q{A (very small) collection of Rake tasks for working with Omeka plugins.}
22
+ gem.email = "err8n@virginia.edu"
23
+ gem.authors = ["Eric Rochester"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ require 'rdoc/task'
36
+ Rake::RDocTask.new do |rdoc|
37
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
38
+
39
+ rdoc.rdoc_dir = 'rdoc'
40
+ rdoc.title = "omeka-rake #{version}"
41
+ rdoc.rdoc_files.include('README*')
42
+ rdoc.rdoc_files.include('lib/**/*.rb')
43
+ end
44
+
45
+ require 'rspec/core/rake_task'
46
+ RSpec::Core::RakeTask.new :spec
47
+
48
+ task :default => :spec
49
+
@@ -0,0 +1,9 @@
1
+
2
+ require 'slab/omeka/rake/package_task'
3
+
4
+ SLab::Omeka::Rake::PackageTask.new('Something') do |pkg|
5
+ pkg.version = '1.0.0'
6
+ pkg.need_tar_gz = true
7
+ pkg.need_zip = true
8
+ end
9
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,42 @@
1
+
2
+ require 'rake/packagetask'
3
+
4
+ module SLab
5
+ module Omeka
6
+ module Rake
7
+
8
+ class PackageTask < ::Rake::PackageTask
9
+
10
+ def package_dir_path
11
+ "#{package_dir}/#{@name}"
12
+ end
13
+
14
+ def package_name
15
+ @name
16
+ end
17
+
18
+ def basename
19
+ @version ? "#{@name}-#{@version}" : @name
20
+ end
21
+
22
+ def tar_bz2_file
23
+ "#{basename}.tar.bz2"
24
+ end
25
+
26
+ def tar_gz_file
27
+ "#{basename}.tar.gz"
28
+ end
29
+
30
+ def tgz_file
31
+ "#{basename}.tgz"
32
+ end
33
+
34
+ def zip_file
35
+ "#{basename}.zip"
36
+ end
37
+
38
+ end
39
+ end
40
+ end
41
+ end
42
+
@@ -0,0 +1,67 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "omeka-rake"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Eric Rochester"]
12
+ s.date = "2012-10-02"
13
+ s.description = "A (very small) collection of Rake tasks for working with Omeka plugins."
14
+ s.email = "err8n@virginia.edu"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rvmrc",
22
+ ".travis.yml",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.md",
27
+ "Rakefile",
28
+ "Rakefile.sample",
29
+ "VERSION",
30
+ "lib/slab/omeka/rake/package_task.rb",
31
+ "omeka-rake.gemspec",
32
+ "spec/omeka_package_task_spec.rb"
33
+ ]
34
+ s.homepage = "http://github.com/erochest/omeka-rake"
35
+ s.licenses = ["MIT"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = "1.8.24"
38
+ s.summary = "A (very small) collection of Rake tasks for working with Omeka plugins."
39
+
40
+ if s.respond_to? :specification_version then
41
+ s.specification_version = 3
42
+
43
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
+ s.add_development_dependency(%q<rake>, [">= 0"])
45
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
46
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
47
+ s.add_development_dependency(%q<bundler>, [">= 0"])
48
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
49
+ s.add_development_dependency(%q<rspec>, [">= 0"])
50
+ else
51
+ s.add_dependency(%q<rake>, [">= 0"])
52
+ s.add_dependency(%q<shoulda>, [">= 0"])
53
+ s.add_dependency(%q<rdoc>, [">= 0"])
54
+ s.add_dependency(%q<bundler>, [">= 0"])
55
+ s.add_dependency(%q<jeweler>, [">= 0"])
56
+ s.add_dependency(%q<rspec>, [">= 0"])
57
+ end
58
+ else
59
+ s.add_dependency(%q<rake>, [">= 0"])
60
+ s.add_dependency(%q<shoulda>, [">= 0"])
61
+ s.add_dependency(%q<rdoc>, [">= 0"])
62
+ s.add_dependency(%q<bundler>, [">= 0"])
63
+ s.add_dependency(%q<jeweler>, [">= 0"])
64
+ s.add_dependency(%q<rspec>, [">= 0"])
65
+ end
66
+ end
67
+
@@ -0,0 +1,37 @@
1
+
2
+ require 'slab/omeka/rake/package_task'
3
+
4
+ module SLab
5
+ module Omeka
6
+ module Rake
7
+
8
+ describe PackageTask do
9
+ let(:task) { PackageTask.new('Name', '1.2.3') }
10
+
11
+ it 'should not include the version in the package directory path.' do
12
+ task.package_dir_path.should_not match(/1\.2\.3/)
13
+ end
14
+
15
+ it 'should not include the version in the package name.' do
16
+ task.package_name.should_not match(/1\.2\.3/)
17
+ end
18
+
19
+ it "should include the version in the basename if it's available." do
20
+ task.basename.should match(/1\.2\.3/)
21
+ end
22
+
23
+ it "should not include the version in the basename if it's not given." do
24
+ t2 = PackageTask.new('Name', :noversion)
25
+ t2.basename.should eq('Name')
26
+ end
27
+
28
+ it 'should include the version in the zip file name.' do
29
+ task.zip_file.should match(/1\.2\.3/)
30
+ end
31
+ end
32
+
33
+ end
34
+ end
35
+ end
36
+
37
+
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omeka-rake
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Eric Rochester
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: shoulda
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rdoc
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: bundler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: jeweler
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: A (very small) collection of Rake tasks for working with Omeka plugins.
111
+ email: err8n@virginia.edu
112
+ executables: []
113
+ extensions: []
114
+ extra_rdoc_files:
115
+ - LICENSE.txt
116
+ - README.md
117
+ files:
118
+ - .document
119
+ - .rvmrc
120
+ - .travis.yml
121
+ - Gemfile
122
+ - Gemfile.lock
123
+ - LICENSE.txt
124
+ - README.md
125
+ - Rakefile
126
+ - Rakefile.sample
127
+ - VERSION
128
+ - lib/slab/omeka/rake/package_task.rb
129
+ - omeka-rake.gemspec
130
+ - spec/omeka_package_task_spec.rb
131
+ homepage: http://github.com/erochest/omeka-rake
132
+ licenses:
133
+ - MIT
134
+ post_install_message:
135
+ rdoc_options: []
136
+ require_paths:
137
+ - lib
138
+ required_ruby_version: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ segments:
145
+ - 0
146
+ hash: -3424111748771312012
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubyforge_project:
155
+ rubygems_version: 1.8.24
156
+ signing_key:
157
+ specification_version: 3
158
+ summary: A (very small) collection of Rake tasks for working with Omeka plugins.
159
+ test_files: []