merb-slices 1.0.15 → 1.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,75 +1,67 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "rake_helpers"))
2
-
3
- ##############################################################################
4
- # Package && release
5
- ##############################################################################
6
- RUBY_FORGE_PROJECT = "merb"
7
- PROJECT_URL = "http://merbivore.com"
8
- PROJECT_SUMMARY = "Merb-Slices is a Merb plugin for using and creating application 'slices' which help you modularize your application."
9
- PROJECT_DESCRIPTION = PROJECT_SUMMARY
10
-
11
- GEM_AUTHOR = "Fabien Franzen"
12
- GEM_EMAIL = "info@fabien.be"
13
-
14
- GEM_NAME = "merb-slices"
15
- PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
16
- GEM_VERSION = Merb::VERSION + PKG_BUILD
17
-
18
- RELEASE_NAME = "REL #{GEM_VERSION}"
19
-
20
- require "extlib/tasks/release"
21
-
22
- spec = Gem::Specification.new do |s|
23
- s.rubyforge_project = RUBY_FORGE_PROJECT
24
- s.name = GEM_NAME
25
- s.version = GEM_VERSION
26
- s.platform = Gem::Platform::RUBY
27
- s.has_rdoc = true
28
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
29
- s.summary = PROJECT_SUMMARY
30
- s.description = PROJECT_DESCRIPTION
31
- s.author = GEM_AUTHOR
32
- s.email = GEM_EMAIL
33
- s.homepage = PROJECT_URL
34
- s.add_dependency('merb-core', "~> #{Merb::VERSION}")
35
- s.require_path = 'lib'
36
- s.files = %w(LICENSE README Rakefile Generators TODO) + Dir.glob("{lib,spec}/**/*")
37
- s.bindir = "bin"
38
- s.executables = %w( slice )
39
- end
1
+ require 'rubygems'
2
+ require 'rake'
40
3
 
41
- Rake::GemPackageTask.new(spec) do |pkg|
42
- pkg.gem_spec = spec
43
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require File.expand_path('../../merb-core/lib/merb-core/version', __FILE__)
44
6
 
45
- desc "Install the gem"
46
- task :install do
47
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
48
- end
7
+ # Load this library's version information
8
+ require File.expand_path('../lib/merb-slices/version', __FILE__)
49
9
 
50
- desc "Uninstall the gem"
51
- task :uninstall do
52
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
53
- end
10
+ begin
11
+
12
+ gem 'jeweler', '~> 1.4'
13
+ require 'jeweler'
14
+
15
+ Jeweler::Tasks.new do |gemspec|
16
+
17
+ gemspec.version = Merb::Slices::VERSION
18
+
19
+ gemspec.name = "merb-slices"
20
+ gemspec.description = "Merb plugin that supports reusable application 'slices'."
21
+ gemspec.summary = "Merb plugin for using and creating application 'slices' which help you modularize your application."
22
+
23
+ gemspec.authors = [ "Fabien Franzen" ]
24
+ gemspec.email = "info@fabien.be"
25
+ gemspec.homepage = "http://merbivore.com/"
26
+
27
+ gemspec.files = %w(Generators LICENSE Rakefile README TODO) + Dir['{bin,lib,spec}/**/*']
28
+
29
+ # Runtime dependencies
30
+ gemspec.add_dependency 'merb-core', "~> #{Merb::VERSION}"
31
+
32
+ # Development dependencies
33
+ gemspec.add_development_dependency 'rspec', '>= 1.2.9'
34
+
35
+ # Executable files
36
+ gemspec.executables = 'slice'
54
37
 
55
- desc "Create a gemspec file"
56
- task :gemspec do
57
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
58
- file.puts spec.to_ruby
59
38
  end
39
+
40
+ Jeweler::GemcutterTasks.new
41
+
42
+ rescue LoadError
43
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
60
44
  end
61
45
 
62
- desc "Run all examples (or a specific spec with TASK=xxxx)"
63
- Spec::Rake::SpecTask.new('spec') do |t|
64
- t.spec_opts = ["-cfs"]
65
- t.spec_files = begin
66
- if ENV["TASK"]
67
- ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
68
- else
69
- FileList['spec/**/*_spec.rb']
70
- end
71
- end
46
+ require 'spec/rake/spectask'
47
+ Spec::Rake::SpecTask.new(:spec) do |spec|
48
+ spec.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
49
+ spec.libs << 'lib' << 'spec'
50
+ spec.spec_files = FileList['spec/**/*_spec.rb']
51
+ end
52
+
53
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
54
+ spec.libs << 'lib' << 'spec'
55
+ spec.pattern = 'spec/**/*_spec.rb'
56
+ spec.rcov = true
72
57
  end
73
58
 
74
- desc 'Default: run spec examples'
75
- task :default => 'spec'
59
+ task :default => :spec
60
+
61
+ require 'rake/rdoctask'
62
+ Rake::RDocTask.new do |rdoc|
63
+ rdoc.rdoc_dir = 'rdoc'
64
+ rdoc.title = "test_gem #{Merb::Slices::VERSION}"
65
+ rdoc.rdoc_files.include('README*')
66
+ rdoc.rdoc_files.include('lib/**/*.rb')
67
+ end
@@ -1,53 +1,36 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
-
4
- require 'merb-core'
5
- require 'merb-core/tasks/merb'
6
-
7
- GEM_NAME = "<%= base_name %>"
8
- AUTHOR = "Your Name"
9
- EMAIL = "Your Email"
10
- HOMEPAGE = "http://merbivore.com/"
11
- SUMMARY = "Merb Slice that provides ..."
12
- GEM_VERSION = "<%= Merb::VERSION %>"
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.rubyforge_project = 'merb'
16
- s.name = GEM_NAME
17
- s.version = GEM_VERSION
18
- s.platform = Gem::Platform::RUBY
19
- s.has_rdoc = true
20
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21
- s.summary = SUMMARY
22
- s.description = s.summary
23
- s.author = AUTHOR
24
- s.email = EMAIL
25
- s.homepage = HOMEPAGE
26
- s.add_dependency('merb-slices', '>= <%= Merb::VERSION %>')
27
- s.require_path = 'lib'
28
- s.files = %w(LICENSE README Rakefile TODO application.rb) + Dir.glob("{lib,spec,app,public,stubs,views}/**/*")
29
- end
2
+ require 'rake'
30
3
 
31
- Rake::GemPackageTask.new(spec) do |pkg|
32
- pkg.gem_spec = spec
33
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require 'merb-core/version'
34
6
 
35
- desc "Install the gem"
36
- task :install do
37
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
38
- end
7
+ begin
39
8
 
40
- desc "Uninstall the gem"
41
- task :uninstall do
42
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
43
- end
9
+ require 'jeweler'
10
+
11
+ Jeweler::Tasks.new do |gemspec|
12
+
13
+ gemspec.version = '0.0.0'
14
+
15
+ gemspec.name = "<%= base_name %>"
16
+ gemspec.description = "The description of your slice"
17
+ gemspec.summary = "The summary of your slice"
18
+
19
+ gemspec.authors = [ "Your name" ]
20
+ gemspec.email = "your@email.com"
21
+ gemspec.homepage = "http://example.org/"
22
+
23
+ # Runtime dependencies
24
+ gemspec.add_dependency 'merb-slices', '~> <%= Merb::VERSION %>'
44
25
 
45
- desc "Create a gemspec file"
46
- task :gemspec do
47
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
48
- file.puts spec.to_ruby
49
26
  end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
50
32
  end
33
+
51
34
  <% if testing_framework.to_sym == :rspec %>
52
35
  require 'spec/rake/spectask'
53
36
  require 'merb-core/test/tasks/spectasks'
@@ -1,3 +1,5 @@
1
+ require 'spec/rake/spectask'
2
+
1
3
  namespace :slices do
2
4
  namespace :<%= symbol_name %> do
3
5
 
@@ -1,53 +1,36 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
-
4
- require 'merb-core'
5
- require 'merb-core/tasks/merb'
6
-
7
- GEM_NAME = "<%= base_name %>"
8
- AUTHOR = "Your Name"
9
- EMAIL = "Your Email"
10
- HOMEPAGE = "http://merbivore.com/"
11
- SUMMARY = "Merb Slice that provides ..."
12
- GEM_VERSION = "<%= Merb::VERSION %>"
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.rubyforge_project = 'merb'
16
- s.name = GEM_NAME
17
- s.version = GEM_VERSION
18
- s.platform = Gem::Platform::RUBY
19
- s.has_rdoc = true
20
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21
- s.summary = SUMMARY
22
- s.description = s.summary
23
- s.author = AUTHOR
24
- s.email = EMAIL
25
- s.homepage = HOMEPAGE
26
- s.add_dependency('merb-slices', '>= <%= Merb::VERSION %>')
27
- s.require_path = 'lib'
28
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec,app,public,stubs}/**/*")
29
- end
2
+ require 'rake'
30
3
 
31
- Rake::GemPackageTask.new(spec) do |pkg|
32
- pkg.gem_spec = spec
33
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require 'merb-core/version'
34
6
 
35
- desc "Install the gem"
36
- task :install do
37
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
38
- end
7
+ begin
39
8
 
40
- desc "Uninstall the gem"
41
- task :uninstall do
42
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
43
- end
9
+ require 'jeweler'
10
+
11
+ Jeweler::Tasks.new do |gemspec|
12
+
13
+ gemspec.version = '0.0.0'
14
+
15
+ gemspec.name = "<%= base_name %>"
16
+ gemspec.description = "The description of your slice"
17
+ gemspec.summary = "The summary of your slice"
18
+
19
+ gemspec.authors = [ "Your name" ]
20
+ gemspec.email = "your@email.com"
21
+ gemspec.homepage = "http://example.org/"
22
+
23
+ # Runtime dependencies
24
+ gemspec.add_dependency 'merb-slices', '~> <%= Merb::VERSION %>'
44
25
 
45
- desc "Create a gemspec file"
46
- task :gemspec do
47
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
48
- file.puts spec.to_ruby
49
26
  end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
50
32
  end
33
+
51
34
  <% if testing_framework.to_sym == :rspec %>
52
35
  require 'spec/rake/spectask'
53
36
  require 'merb-core/test/tasks/spectasks'
@@ -2,7 +2,7 @@ if defined?(Merb::Plugins)
2
2
 
3
3
  $:.unshift File.dirname(__FILE__)
4
4
 
5
- dependency 'merb-slices', :immediate => true
5
+ require 'merb-slices'
6
6
  Merb::Plugins.add_rakefiles "<%= base_name %>/merbtasks", "<%= base_name %>/slicetasks", "<%= base_name %>/spectasks"
7
7
 
8
8
  # Register the Slice for the current host application
@@ -76,7 +76,4 @@ if defined?(Merb::Plugins)
76
76
  # Or just call setup_default_structure! to setup a basic Merb MVC structure.
77
77
  <%= module_name %>.setup_default_structure!
78
78
 
79
- # Add dependencies for other <%= module_name %> classes below. Example:
80
- # dependency "<%= base_name %>/other"
81
-
82
79
  end
@@ -1,5 +1,3 @@
1
- require "merb-core/tasks/merb_rake_helper"
2
-
3
1
  desc "Show information on application slices"
4
2
  task :slices => [ "slices:list" ]
5
3
 
@@ -18,17 +16,4 @@ namespace :slices do
18
16
  end
19
17
  end
20
18
 
21
- desc "Install a slice into the local gems dir (GEM=your-slice)"
22
- task :install_as_gem do
23
- if ENV['GEM']
24
- ENV['GEM_DIR'] ||= File.join(Merb.root, 'gems')
25
- options = { :install_dir => ENV['GEM_DIR'],
26
- :cache => true, :ignore_dependencies => true }
27
- options[:version] = ENV['VERSION'] if ENV['VERSION']
28
- Merb::RakeHelper.install_package(ENV['GEM'], options)
29
- else
30
- puts "No slice GEM specified"
31
- end
32
- end
33
-
34
19
  end
@@ -1,8 +1,6 @@
1
1
  module Merb
2
2
  module Slices
3
3
 
4
- VERSION = "0.9.8"
5
-
6
4
  class << self
7
5
 
8
6
  # Retrieve a slice module by name
@@ -0,0 +1,5 @@
1
+ module Merb
2
+ module Slices
3
+ VERSION = '1.1.0.pre'.freeze
4
+ end
5
+ end
data/lib/merb-slices.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'merb-slices/version'
1
2
  require 'merb-slices/module'
2
3
 
3
4
  if defined?(Merb::Plugins)
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Merb::Slices do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Merb::Generators::SliceGenerator do
4
4
 
@@ -1,52 +1,34 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
-
4
- require 'merb-core'
5
- require 'merb-core/tasks/merb'
6
-
7
- GEM_NAME = "full-test-slice"
8
- AUTHOR = "Your Name"
9
- EMAIL = "Your Email"
10
- HOMEPAGE = "http://merbivore.com/"
11
- SUMMARY = "Merb Slice that provides ..."
12
- GEM_VERSION = "0.9.8"
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.rubyforge_project = 'merb'
16
- s.name = GEM_NAME
17
- s.version = GEM_VERSION
18
- s.platform = Gem::Platform::RUBY
19
- s.has_rdoc = true
20
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21
- s.summary = SUMMARY
22
- s.description = s.summary
23
- s.author = AUTHOR
24
- s.email = EMAIL
25
- s.homepage = HOMEPAGE
26
- s.add_dependency('merb-slices', '>= 0.9.8')
27
- s.require_path = 'lib'
28
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec,app,public,stubs}/**/*")
29
- end
2
+ require 'rake'
30
3
 
31
- Rake::GemPackageTask.new(spec) do |pkg|
32
- pkg.gem_spec = spec
33
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require 'merb-core/version'
34
6
 
35
- desc "Install the gem"
36
- task :install do
37
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
38
- end
7
+ begin
39
8
 
40
- desc "Uninstall the gem"
41
- task :uninstall do
42
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
43
- end
9
+ require 'jeweler'
10
+
11
+ Jeweler::Tasks.new do |gemspec|
12
+
13
+ gemspec.version = '0.0.0'
14
+
15
+ gemspec.name = "full-test-slice"
16
+ gemspec.description = "The description of your slice"
17
+ gemspec.summary = "The summary of your slice"
18
+
19
+ gemspec.authors = [ "Your name" ]
20
+ gemspec.email = "your@email.com"
21
+ gemspec.homepage = "http://example.org/"
22
+
23
+ # Runtime dependencies
24
+ gemspec.add_dependency 'merb-slices', "#{Merb::VERSION}"
44
25
 
45
- desc "Create a gemspec file"
46
- task :gemspec do
47
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
48
- file.puts spec.to_ruby
49
26
  end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
50
32
  end
51
33
 
52
34
  require 'spec/rake/spectask'
@@ -1,3 +1,5 @@
1
+ require 'spec/rake/spectask'
2
+
1
3
  namespace :slices do
2
4
  namespace :full_test_slice do
3
5
 
@@ -2,7 +2,7 @@ if defined?(Merb::Plugins)
2
2
 
3
3
  $:.unshift File.dirname(__FILE__)
4
4
 
5
- dependency 'merb-slices', :immediate => true
5
+ require 'merb-slices'
6
6
  Merb::Plugins.add_rakefiles "full-test-slice/merbtasks", "full-test-slice/slicetasks", "full-test-slice/spectasks"
7
7
 
8
8
  # Register the Slice for the current host application
@@ -76,7 +76,4 @@ if defined?(Merb::Plugins)
76
76
  # Or just call setup_default_structure! to setup a basic Merb MVC structure.
77
77
  FullTestSlice.setup_default_structure!
78
78
 
79
- # Add dependencies for other FullTestSlice classes below. Example:
80
- # dependency "full-test-slice/other"
81
-
82
79
  end
@@ -1,43 +1,32 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
-
4
- require 'merb-core'
5
- require 'merb-core/tasks/merb'
6
-
7
- GEM_NAME = "thin-test-slice"
8
- AUTHOR = "Your Name"
9
- EMAIL = "Your Email"
10
- HOMEPAGE = "http://merbivore.com/"
11
- SUMMARY = "Merb Slice that provides ..."
12
- GEM_VERSION = "0.9.8"
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.rubyforge_project = 'merb'
16
- s.name = GEM_NAME
17
- s.version = GEM_VERSION
18
- s.platform = Gem::Platform::RUBY
19
- s.has_rdoc = true
20
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21
- s.summary = SUMMARY
22
- s.description = s.summary
23
- s.author = AUTHOR
24
- s.email = EMAIL
25
- s.homepage = HOMEPAGE
26
- s.add_dependency('merb-slices', '>= 0.9.8')
27
- s.require_path = 'lib'
28
- s.files = %w(LICENSE README Rakefile TODO application.rb) + Dir.glob("{lib,spec,app,public,stubs,views}/**/*")
29
- end
2
+ require 'rake'
30
3
 
31
- Rake::GemPackageTask.new(spec) do |pkg|
32
- pkg.gem_spec = spec
33
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require 'merb-core/version'
34
6
 
35
- desc "Install the gem"
36
- task :install do
37
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
38
- end
7
+ begin
8
+
9
+ require 'jeweler'
10
+
11
+ Jeweler::Tasks.new do |gemspec|
12
+
13
+ gemspec.version = '0.0.0'
39
14
 
40
- desc "Uninstall the gem"
41
- task :uninstall do
42
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
43
- end
15
+ gemspec.name = "thin-test-slice"
16
+ gemspec.description = "The description of your slice"
17
+ gemspec.summary = "The summary of your slice"
18
+
19
+ gemspec.authors = [ "Your name" ]
20
+ gemspec.email = "your@email.com"
21
+ gemspec.homepage = "http://example.org/"
22
+
23
+ # Runtime dependencies
24
+ gemspec.add_dependency 'merb-slices', "#{Merb::VERSION}"
25
+
26
+ end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
32
+ end
@@ -2,7 +2,7 @@ if defined?(Merb::Plugins)
2
2
 
3
3
  $:.unshift File.dirname(__FILE__)
4
4
 
5
- dependency 'merb-slices', :immediate => true
5
+ require 'merb-slices'
6
6
  Merb::Plugins.add_rakefiles "thin-test-slice/merbtasks", "thin-test-slice/slicetasks"
7
7
 
8
8
  # Register the Slice for the current host application
@@ -89,7 +89,4 @@ if defined?(Merb::Plugins)
89
89
  # For a thin slice we just add application.rb, :view and :public locations.
90
90
  ThinTestSlice.setup_default_structure!
91
91
 
92
- # Add dependencies for other ThinTestSlice classes below. Example:
93
- # dependency "thin-test-slice/other"
94
-
95
92
  end
@@ -1,43 +1,32 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
-
4
- require 'merb-core'
5
- require 'merb-core/tasks/merb'
6
-
7
- GEM_NAME = "very-thin-test-slice"
8
- AUTHOR = "Your Name"
9
- EMAIL = "Your Email"
10
- HOMEPAGE = "http://merbivore.com/"
11
- SUMMARY = "Merb Slice that provides ..."
12
- GEM_VERSION = "0.9.8"
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.rubyforge_project = 'merb'
16
- s.name = GEM_NAME
17
- s.version = GEM_VERSION
18
- s.platform = Gem::Platform::RUBY
19
- s.has_rdoc = true
20
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21
- s.summary = SUMMARY
22
- s.description = s.summary
23
- s.author = AUTHOR
24
- s.email = EMAIL
25
- s.homepage = HOMEPAGE
26
- s.add_dependency('merb-slices', '>= 0.9.8')
27
- s.require_path = 'lib'
28
- s.files = %w(LICENSE README Rakefile TODO application.rb) + Dir.glob("{lib,spec,app,public,stubs,views}/**/*")
29
- end
2
+ require 'rake'
30
3
 
31
- Rake::GemPackageTask.new(spec) do |pkg|
32
- pkg.gem_spec = spec
33
- end
4
+ # Assume a typical dev checkout to fetch the current merb-core version
5
+ require 'merb-core/version'
34
6
 
35
- desc "Install the gem"
36
- task :install do
37
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
38
- end
7
+ begin
8
+
9
+ require 'jeweler'
10
+
11
+ Jeweler::Tasks.new do |gemspec|
12
+
13
+ gemspec.version = '0.0.0'
39
14
 
40
- desc "Uninstall the gem"
41
- task :uninstall do
42
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
43
- end
15
+ gemspec.name = "very-thin-test-slice"
16
+ gemspec.description = "The description of your slice"
17
+ gemspec.summary = "The summary of your slice"
18
+
19
+ gemspec.authors = [ "Your name" ]
20
+ gemspec.email = "your@email.com"
21
+ gemspec.homepage = "http://example.org/"
22
+
23
+ # Runtime dependencies
24
+ gemspec.add_dependency 'merb-slices', "#{Merb::VERSION}"
25
+
26
+ end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
32
+ end
@@ -2,7 +2,7 @@ if defined?(Merb::Plugins)
2
2
 
3
3
  $:.unshift File.dirname(__FILE__)
4
4
 
5
- dependency 'merb-slices', :immediate => true
5
+ require 'merb-slices'
6
6
  Merb::Plugins.add_rakefiles "very-thin-test-slice/merbtasks", "very-thin-test-slice/slicetasks"
7
7
 
8
8
  # Register the Slice for the current host application
data/spec/spec.opts ADDED
@@ -0,0 +1,2 @@
1
+ --format specdoc
2
+ --colour
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,20 @@
1
- $:.push File.join(File.dirname(__FILE__), '..', 'lib')
1
+ require "rubygems"
2
2
 
3
- require 'rubygems'
3
+ # Use current merb-core sources if running from a typical dev checkout.
4
+ lib = File.expand_path('../../../merb-core/lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) if File.directory?(lib)
6
+ require 'merb-core'
7
+
8
+ # Use current merb-gen sources if running from a typical dev checkout.
9
+ lib = File.expand_path('../../../merb-gen/lib', __FILE__)
10
+ $LOAD_PATH.unshift(lib) if File.directory?(lib)
4
11
  require 'merb-gen'
5
- require 'merb-slices'
12
+
13
+ # The lib under test
14
+ require "merb-slices"
15
+
16
+ # Satisfies Autotest and anyone else not using the Rake tasks
17
+ require 'spec'
6
18
 
7
19
  require 'generators/base'
8
20
  require 'generators/full'
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
@@ -17,7 +17,7 @@ describe Merb::Generators::ThinSliceGenerator do
17
17
  @generator.invoke!
18
18
  files = Dir[slices_path / 'testing-thin' / '**' / '*'].map do |path|
19
19
  path.relative_path_from(slices_path)
20
- end
20
+ end.sort
21
21
  expected = [
22
22
  "testing-thin/application.rb", "testing-thin/lib", "testing-thin/lib/testing-thin",
23
23
  "testing-thin/lib/testing-thin/merbtasks.rb", "testing-thin/lib/testing-thin/slicetasks.rb",
@@ -28,7 +28,7 @@ describe Merb::Generators::ThinSliceGenerator do
28
28
  "testing-thin/stubs/application.rb", "testing-thin/TODO", "testing-thin/views",
29
29
  "testing-thin/views/layout", "testing-thin/views/layout/testing_thin.html.erb",
30
30
  "testing-thin/views/main", "testing-thin/views/main/index.html.erb"
31
- ]
31
+ ].sort
32
32
  files.should == expected
33
33
  end
34
34
 
@@ -38,4 +38,4 @@ describe Merb::Generators::ThinSliceGenerator do
38
38
 
39
39
  end
40
40
 
41
- end
41
+ end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
@@ -17,7 +17,7 @@ describe Merb::Generators::VeryThinSliceGenerator do
17
17
  @generator.invoke!
18
18
  files = Dir[slices_path / 'testing-very-thin' / '**' / '*'].map do |path|
19
19
  path.relative_path_from(slices_path)
20
- end
20
+ end.sort
21
21
  expected = [
22
22
  "testing-very-thin/application.rb", "testing-very-thin/lib",
23
23
  "testing-very-thin/lib/testing-very-thin",
@@ -26,7 +26,7 @@ describe Merb::Generators::VeryThinSliceGenerator do
26
26
  "testing-very-thin/lib/testing-very-thin.rb",
27
27
  "testing-very-thin/LICENSE", "testing-very-thin/Rakefile",
28
28
  "testing-very-thin/README", "testing-very-thin/TODO"
29
- ]
29
+ ].sort
30
30
  files.should == expected
31
31
  end
32
32
 
@@ -36,4 +36,4 @@ describe Merb::Generators::VeryThinSliceGenerator do
36
36
 
37
37
  end
38
38
 
39
- end
39
+ end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  slices_path = File.dirname(__FILE__) / 'slices'
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-slices
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.1.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabien Franzen
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-04 00:00:00 +00:00
13
- default_executable:
12
+ date: 2010-02-20 00:00:00 +00:00
13
+ default_executable: slice
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: merb-core
@@ -20,35 +20,49 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 1.0.15
23
+ version: 1.1.0.pre
24
24
  version:
25
- description: Merb-Slices is a Merb plugin for using and creating application 'slices' which help you modularize your application.
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.9
34
+ version:
35
+ description: Merb plugin that supports reusable application 'slices'.
26
36
  email: info@fabien.be
27
37
  executables:
28
38
  - slice
29
39
  extensions: []
30
40
 
31
41
  extra_rdoc_files:
32
- - README
33
42
  - LICENSE
43
+ - README
34
44
  - TODO
35
45
  files:
46
+ - Generators
36
47
  - LICENSE
37
48
  - README
38
49
  - Rakefile
39
- - Generators
40
50
  - TODO
51
+ - bin/slice
41
52
  - lib/generators/base.rb
42
53
  - lib/generators/full.rb
54
+ - lib/generators/templates/common/LICENSE
55
+ - lib/generators/templates/common/Rakefile
56
+ - lib/generators/templates/common/TODO
43
57
  - lib/generators/templates/common/application.rb
44
58
  - lib/generators/templates/common/lib/%base_name%/merbtasks.rb
45
59
  - lib/generators/templates/common/lib/%base_name%/slicetasks.rb
46
60
  - lib/generators/templates/common/lib/%base_name%/spectasks.rb
47
- - lib/generators/templates/common/LICENSE
48
61
  - lib/generators/templates/common/public/javascripts/master.js
49
62
  - lib/generators/templates/common/public/stylesheets/master.css
50
- - lib/generators/templates/common/Rakefile
51
- - lib/generators/templates/common/TODO
63
+ - lib/generators/templates/full/README
64
+ - lib/generators/templates/full/Rakefile
65
+ - lib/generators/templates/full/TODO
52
66
  - lib/generators/templates/full/app/controllers/application.rb
53
67
  - lib/generators/templates/full/app/controllers/main.rb
54
68
  - lib/generators/templates/full/app/helpers/application_helper.rb
@@ -57,84 +71,83 @@ files:
57
71
  - lib/generators/templates/full/config/init.rb
58
72
  - lib/generators/templates/full/config/router.rb
59
73
  - lib/generators/templates/full/lib/%base_name%.rb
60
- - lib/generators/templates/full/Rakefile
61
- - lib/generators/templates/full/README
62
74
  - lib/generators/templates/full/spec/%base_name%_spec.rb
63
75
  - lib/generators/templates/full/spec/requests/main_spec.rb
64
76
  - lib/generators/templates/full/spec/spec_helper.rb
65
77
  - lib/generators/templates/full/stubs/app/controllers/application.rb
66
78
  - lib/generators/templates/full/stubs/app/controllers/main.rb
67
- - lib/generators/templates/full/TODO
68
- - lib/generators/templates/thin/lib/%base_name%.rb
69
79
  - lib/generators/templates/thin/README
80
+ - lib/generators/templates/thin/lib/%base_name%.rb
70
81
  - lib/generators/templates/thin/stubs/application.rb
71
82
  - lib/generators/templates/thin/views/layout/%symbol_name%.html.erb
72
83
  - lib/generators/templates/thin/views/main/index.html.erb
73
- - lib/generators/templates/very_thin/lib/%base_name%.rb
74
84
  - lib/generators/templates/very_thin/README
85
+ - lib/generators/templates/very_thin/lib/%base_name%.rb
75
86
  - lib/generators/thin.rb
76
87
  - lib/generators/very_thin.rb
88
+ - lib/merb-slices.rb
77
89
  - lib/merb-slices/controller_mixin.rb
78
90
  - lib/merb-slices/merbtasks.rb
79
91
  - lib/merb-slices/module.rb
80
92
  - lib/merb-slices/module_mixin.rb
81
93
  - lib/merb-slices/router_ext.rb
82
- - lib/merb-slices.rb
94
+ - lib/merb-slices/version.rb
83
95
  - spec/full_slice_generator_spec.rb
84
96
  - spec/full_slice_spec.rb
85
97
  - spec/merb-slice_spec.rb
86
98
  - spec/slice_generator_spec.rb
99
+ - spec/slices/full-test-slice/LICENSE
100
+ - spec/slices/full-test-slice/README
101
+ - spec/slices/full-test-slice/Rakefile
102
+ - spec/slices/full-test-slice/TODO
87
103
  - spec/slices/full-test-slice/app/controllers/application.rb
88
104
  - spec/slices/full-test-slice/app/controllers/main.rb
89
105
  - spec/slices/full-test-slice/app/helpers/application_helper.rb
90
106
  - spec/slices/full-test-slice/app/views/layout/full_test_slice.html.erb
91
107
  - spec/slices/full-test-slice/app/views/main/index.html.erb
92
108
  - spec/slices/full-test-slice/config/init.rb
109
+ - spec/slices/full-test-slice/lib/full-test-slice.rb
93
110
  - spec/slices/full-test-slice/lib/full-test-slice/merbtasks.rb
94
111
  - spec/slices/full-test-slice/lib/full-test-slice/slicetasks.rb
95
112
  - spec/slices/full-test-slice/lib/full-test-slice/spectasks.rb
96
- - spec/slices/full-test-slice/lib/full-test-slice.rb
97
- - spec/slices/full-test-slice/LICENSE
98
113
  - spec/slices/full-test-slice/public/javascripts/master.js
99
114
  - spec/slices/full-test-slice/public/stylesheets/master.css
100
- - spec/slices/full-test-slice/Rakefile
101
- - spec/slices/full-test-slice/README
102
115
  - spec/slices/full-test-slice/stubs/app/controllers/application.rb
103
116
  - spec/slices/full-test-slice/stubs/app/controllers/main.rb
104
- - spec/slices/full-test-slice/TODO
117
+ - spec/slices/thin-test-slice/LICENSE
118
+ - spec/slices/thin-test-slice/README
119
+ - spec/slices/thin-test-slice/Rakefile
120
+ - spec/slices/thin-test-slice/TODO
105
121
  - spec/slices/thin-test-slice/application.rb
122
+ - spec/slices/thin-test-slice/lib/thin-test-slice.rb
106
123
  - spec/slices/thin-test-slice/lib/thin-test-slice/merbtasks.rb
107
124
  - spec/slices/thin-test-slice/lib/thin-test-slice/slicetasks.rb
108
- - spec/slices/thin-test-slice/lib/thin-test-slice.rb
109
- - spec/slices/thin-test-slice/LICENSE
110
125
  - spec/slices/thin-test-slice/public/javascripts/master.js
111
126
  - spec/slices/thin-test-slice/public/stylesheets/master.css
112
- - spec/slices/thin-test-slice/Rakefile
113
- - spec/slices/thin-test-slice/README
114
127
  - spec/slices/thin-test-slice/stubs/application.rb
115
- - spec/slices/thin-test-slice/TODO
116
128
  - spec/slices/thin-test-slice/views/layout/thin_test_slice.html.erb
117
129
  - spec/slices/thin-test-slice/views/main/index.html.erb
118
- - spec/slices/very-thin-test-slice/application.rb
119
- - spec/slices/very-thin-test-slice/lib/very-thin-test-slice/merbtasks.rb
120
- - spec/slices/very-thin-test-slice/lib/very-thin-test-slice/slicetasks.rb
121
- - spec/slices/very-thin-test-slice/lib/very-thin-test-slice.rb
122
130
  - spec/slices/very-thin-test-slice/LICENSE
123
- - spec/slices/very-thin-test-slice/Rakefile
124
131
  - spec/slices/very-thin-test-slice/README
132
+ - spec/slices/very-thin-test-slice/Rakefile
125
133
  - spec/slices/very-thin-test-slice/TODO
134
+ - spec/slices/very-thin-test-slice/application.rb
135
+ - spec/slices/very-thin-test-slice/lib/very-thin-test-slice.rb
136
+ - spec/slices/very-thin-test-slice/lib/very-thin-test-slice/merbtasks.rb
137
+ - spec/slices/very-thin-test-slice/lib/very-thin-test-slice/slicetasks.rb
138
+ - spec/spec.opts
126
139
  - spec/spec_helper.rb
127
140
  - spec/thin_slice_generator_spec.rb
128
141
  - spec/thin_slice_spec.rb
129
142
  - spec/very_thin_slice_generator_spec.rb
130
143
  - spec/very_thin_slice_spec.rb
131
144
  has_rdoc: true
132
- homepage: http://merbivore.com
145
+ homepage: http://merbivore.com/
133
146
  licenses: []
134
147
 
135
148
  post_install_message:
136
- rdoc_options: []
137
-
149
+ rdoc_options:
150
+ - --charset=UTF-8
138
151
  require_paths:
139
152
  - lib
140
153
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -145,16 +158,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
158
  version:
146
159
  required_rubygems_version: !ruby/object:Gem::Requirement
147
160
  requirements:
148
- - - ">="
161
+ - - ">"
149
162
  - !ruby/object:Gem::Version
150
- version: "0"
163
+ version: 1.3.1
151
164
  version:
152
165
  requirements: []
153
166
 
154
- rubyforge_project: merb
167
+ rubyforge_project:
155
168
  rubygems_version: 1.3.5
156
169
  signing_key:
157
170
  specification_version: 3
158
- summary: Merb-Slices is a Merb plugin for using and creating application 'slices' which help you modularize your application.
171
+ summary: Merb plugin for using and creating application 'slices' which help you modularize your application.
159
172
  test_files: []
160
173