ore 0.9.4 → 0.10.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.
- data/ChangeLog.md +22 -3
- data/README.md +12 -22
- data/Rakefile +1 -1
- data/bin/mine +1 -2
- data/bin/ore +1 -2
- data/data/ore/templates/mini_test/template.yml +3 -0
- data/data/ore/templates/mini_test/test/helper.rb.erb +26 -0
- data/data/ore/templates/mini_test/test/test_[name].rb.erb +12 -0
- data/data/ore/templates/rspec/template.yml +1 -0
- data/data/ore/templates/test_unit/template.yml +1 -0
- data/gemspec.yml +2 -3
- data/lib/ore/cli.rb +13 -0
- data/lib/ore/generator.rb +11 -16
- data/lib/ore/template/template.rb +1 -1
- data/lib/ore/version.rb +4 -0
- data/spec/generator_spec.rb +37 -57
- metadata +10 -10
- data/data/ore/templates/gem_test/.gemtest +0 -0
- data/data/ore/templates/jeweler_tasks/_tasks.erb +0 -13
- data/data/ore/templates/jeweler_tasks/template.yml +0 -6
- data/data/ore/templates/rvmrc/.rvmrc.erb +0 -1
    
        data/ChangeLog.md
    CHANGED
    
    | @@ -1,3 +1,21 @@ | |
| 1 | 
            +
            ### 0.10.0 / 2012-10-14
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * Require thor ~> 0.15.
         | 
| 4 | 
            +
            * Strip the `ore-` prefix from the template name in {Ore::Template.register}.
         | 
| 5 | 
            +
            * Allow {Ore::Generator#disable_template} to disable templates that are not
         | 
| 6 | 
            +
              installed.
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            #### Templates
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            * Added the [mini_test] template.
         | 
| 11 | 
            +
            * Moved the `rvmrc` template out into the [rvm] template.
         | 
| 12 | 
            +
            * Moved the `jeweler_tasks` template out into the [jeweler] template.
         | 
| 13 | 
            +
            * Removed the `gem_test` template.
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            #### CLI
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            * Added a `--version` option to the `ore` command.
         | 
| 18 | 
            +
             | 
| 1 19 | 
             
            ### 0.9.4 / 2012-07-23
         | 
| 2 20 |  | 
| 3 21 | 
             
            * Do not initialize the repository, if .git or .hg directories already exist.
         | 
| @@ -337,13 +355,14 @@ | |
| 337 355 | 
             
            [gemspec]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/gemspec
         | 
| 338 356 | 
             
            [gemspec_yml]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/gemspec_yml
         | 
| 339 357 | 
             
            [gem\_package\_task]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/gem_package_task
         | 
| 340 | 
            -
            [gem_test]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/gem_test
         | 
| 341 358 | 
             
            [git]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/git
         | 
| 342 359 | 
             
            [hg]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/hg
         | 
| 343 | 
            -
            [jeweler_tasks]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/jeweler_tasks
         | 
| 344 360 | 
             
            [rdoc]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/rdoc
         | 
| 345 361 | 
             
            [rspec]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/rspec
         | 
| 346 362 | 
             
            [rubygems_tasks]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/rubygems_tasks
         | 
| 347 | 
            -
            [rvmrc]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/rvmrc
         | 
| 348 363 | 
             
            [test_unit]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/test_unit
         | 
| 364 | 
            +
            [mini_test]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/mini_test
         | 
| 349 365 | 
             
            [yard]: https://github.com/ruby-ore/ore/tree/master/data/ore/templates/yard
         | 
| 366 | 
            +
             | 
| 367 | 
            +
            [rvm]: https://github.com/ruby-ore/rvm
         | 
| 368 | 
            +
            [jeweler_tasks]: https://github.com/ruby-ore/jeweler_tasks
         | 
    
        data/README.md
    CHANGED
    
    | @@ -28,13 +28,9 @@ Ore generates a pure-Ruby gemspec by default. Ore can also generate a | |
| 28 28 | 
             
            ### Tasks
         | 
| 29 29 |  | 
| 30 30 | 
             
            Ore supports generating projects using [Gem::Tasks][rubygems_tasks],
         | 
| 31 | 
            -
            [Bundler::GemHelper][bundler] | 
| 32 | 
            -
            [Gem::PackageTask][gem_package_task].
         | 
| 31 | 
            +
            [Bundler::GemHelper][bundler] and even [Gem::PackageTask][gem_package_task].
         | 
| 33 32 |  | 
| 34 | 
            -
                $ mine my-project [--rubygems-tasks |
         | 
| 35 | 
            -
                                   --bundler-tasks  |
         | 
| 36 | 
            -
                                   --jeweler-tasks  |
         | 
| 37 | 
            -
                                   --gem-package-task]
         | 
| 33 | 
            +
                $ mine my-project [--rubygems-tasks | --bundler-tasks  | --gem-package-task]
         | 
| 38 34 |  | 
| 39 35 | 
             
            ### Bundler
         | 
| 40 36 |  | 
| @@ -42,12 +38,6 @@ Ore can also generate a [Bundler][bundler] project. | |
| 42 38 |  | 
| 43 39 | 
             
                $ mine my-project --bundler
         | 
| 44 40 |  | 
| 45 | 
            -
            ### RVM
         | 
| 46 | 
            -
             | 
| 47 | 
            -
            Ore also includes an [.rvmrc] template.
         | 
| 48 | 
            -
             | 
| 49 | 
            -
                $ mine my-project --rvmrc
         | 
| 50 | 
            -
             | 
| 51 41 | 
             
            ### Markup
         | 
| 52 42 |  | 
| 53 43 | 
             
            Ore supports [RDoc][rdoc], [Markdown][markdown] and [Textile][textile] markup.
         | 
| @@ -63,20 +53,21 @@ documentation. | |
| 63 53 |  | 
| 64 54 | 
             
            ### Testing
         | 
| 65 55 |  | 
| 66 | 
            -
            Ore supports generating [RSpec][rspec]  | 
| 56 | 
            +
            Ore supports generating [RSpec][rspec], [MiniTest][mini_test] or
         | 
| 57 | 
            +
            [Test::Unit][test_unit] tests.
         | 
| 67 58 |  | 
| 68 | 
            -
                $ mine my-project [--test-unit | --rspec]
         | 
| 59 | 
            +
                $ mine my-project [--test-unit | --mini-test | --rspec]
         | 
| 69 60 |  | 
| 70 61 | 
             
            ### Custom Templates
         | 
| 71 62 |  | 
| 72 63 | 
             
            Additional templates can also be installed from Git:
         | 
| 73 64 |  | 
| 74 | 
            -
                $ ore install git://github.com/ruby-ore/ | 
| 75 | 
            -
                $ mine my-project -- | 
| 65 | 
            +
                $ ore install git://github.com/ruby-ore/rbenv.git
         | 
| 66 | 
            +
                $ mine my-project --rbenv
         | 
| 76 67 |  | 
| 77 68 | 
             
            ## Requirements
         | 
| 78 69 |  | 
| 79 | 
            -
            * [thor]( | 
| 70 | 
            +
            * [thor](https://github.com/wycats/thor#readme) ~> 0.15
         | 
| 80 71 |  | 
| 81 72 | 
             
            ## Install
         | 
| 82 73 |  | 
| @@ -94,7 +85,7 @@ Generate a new customized project: | |
| 94 85 |  | 
| 95 86 | 
             
            Generate a new project using previously installed templates:
         | 
| 96 87 |  | 
| 97 | 
            -
                $ mine my_project --bundler --rspec --yard --templates  | 
| 88 | 
            +
                $ mine my_project --bundler --rspec --yard --templates rbenv
         | 
| 98 89 |  | 
| 99 90 | 
             
            Set your github username, so `mine` can generate GitHub project URLs:
         | 
| 100 91 |  | 
| @@ -103,7 +94,7 @@ Set your github username, so `mine` can generate GitHub project URLs: | |
| 103 94 |  | 
| 104 95 | 
             
            Install a custom template:
         | 
| 105 96 |  | 
| 106 | 
            -
                $ ore install git://github.com/ruby-ore/ | 
| 97 | 
            +
                $ ore install git://github.com/ruby-ore/rbenv.git
         | 
| 107 98 |  | 
| 108 99 | 
             
            List installed templates:
         | 
| 109 100 |  | 
| @@ -111,7 +102,7 @@ List installed templates: | |
| 111 102 |  | 
| 112 103 | 
             
            Remove a previously installed template:
         | 
| 113 104 |  | 
| 114 | 
            -
                $ ore remove  | 
| 105 | 
            +
                $ ore remove rbenv
         | 
| 115 106 |  | 
| 116 107 | 
             
            Add default generator options to `~/.ore/options.yml`:
         | 
| 117 108 |  | 
| @@ -136,12 +127,11 @@ See {file:LICENSE.txt} for license information. | |
| 136 127 | 
             
            [gemspec.yml]: https://github.com/ruby-ore/ore/blob/master/gemspec.yml
         | 
| 137 128 | 
             
            [rubygems_tasks]: https://github.com/postmodern/rubygems-tasks#readme
         | 
| 138 129 | 
             
            [bundler]: http://gembundler.com/
         | 
| 139 | 
            -
            [jeweler]: https://github.com/technicalpickles/jeweler#readme
         | 
| 140 130 | 
             
            [gem_package_task]: http://rubygems.rubyforge.org/rubygems-update/Gem/PackageTask.html
         | 
| 141 | 
            -
            [.rvmrc]: https://rvm.io/workflow/rvmrc/#project
         | 
| 142 131 | 
             
            [rdoc]: http://rdoc.rubyforge.org/
         | 
| 143 132 | 
             
            [markdown]: http://daringfireball.net/projects/markdown/
         | 
| 144 133 | 
             
            [textile]: http://textile.sitemonks.com/
         | 
| 145 134 | 
             
            [yard]: http://yardoc.org/
         | 
| 146 135 | 
             
            [rspec]: http://rspec.info/
         | 
| 147 136 | 
             
            [test_unit]: http://test-unit.rubyforge.org/
         | 
| 137 | 
            +
            [mini_test]: https://github.com/seattlerb/minitest#readme
         | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/bin/mine
    CHANGED
    
    
    
        data/bin/ore
    CHANGED
    
    
| @@ -0,0 +1,26 @@ | |
| 1 | 
            +
            require 'rubygems'
         | 
| 2 | 
            +
            <%- if bundler? -%>
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            begin
         | 
| 5 | 
            +
              require 'bundler'
         | 
| 6 | 
            +
            rescue LoadError => e
         | 
| 7 | 
            +
              STDERR.puts e.message
         | 
| 8 | 
            +
              STDERR.puts "Run `gem install bundler` to install Bundler."
         | 
| 9 | 
            +
              exit e.status_code
         | 
| 10 | 
            +
            end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            begin
         | 
| 13 | 
            +
              Bundler.setup(:default, :development, :test)
         | 
| 14 | 
            +
            rescue Bundler::BundlerError => e
         | 
| 15 | 
            +
              STDERR.puts e.message
         | 
| 16 | 
            +
              STDERR.puts "Run `bundle install` to install missing gems."
         | 
| 17 | 
            +
              exit e.status_code
         | 
| 18 | 
            +
            end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            <%- end -%>
         | 
| 21 | 
            +
            require 'minitest/unit'
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            class MiniTest::Unit::TestCase
         | 
| 24 | 
            +
            end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            MiniTest::Unit.autorun
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require 'helper'
         | 
| 2 | 
            +
            require '<%= @namespace_path %>'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            class Test<%= @namespace %> < MiniTest::Unit::TestCase
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              def test_version
         | 
| 7 | 
            +
                version = <%= @namespace %>.const_get('VERSION')
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                assert(!version.empty?, 'should have a VERSION constant')
         | 
| 10 | 
            +
              end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            end
         | 
    
        data/gemspec.yml
    CHANGED
    
    | @@ -1,5 +1,4 @@ | |
| 1 1 | 
             
            name: ore
         | 
| 2 | 
            -
            version: 0.9.4
         | 
| 3 2 | 
             
            summary: Mine beautiful RubyGems from Ore
         | 
| 4 3 | 
             
            description:
         | 
| 5 4 | 
             
              Ore is a flexible Ruby project generator. Unlike other Ruby project
         | 
| @@ -27,9 +26,9 @@ post_install_message: | | |
| 27 26 | 
             
              **************************************************************************
         | 
| 28 27 |  | 
| 29 28 | 
             
            dependencies:
         | 
| 30 | 
            -
              thor: ~> 0. | 
| 29 | 
            +
              thor: ~> 0.15
         | 
| 31 30 |  | 
| 32 31 | 
             
            development_dependencies:
         | 
| 33 32 | 
             
              rubygems-tasks: ~> 0.2
         | 
| 34 33 | 
             
              rspec: ~> 2.4
         | 
| 35 | 
            -
              yard: ~> 0. | 
| 34 | 
            +
              yard: ~> 0.8
         | 
    
        data/lib/ore/cli.rb
    CHANGED
    
    | @@ -1,4 +1,5 @@ | |
| 1 1 | 
             
            require 'ore/config'
         | 
| 2 | 
            +
            require 'ore/version'
         | 
| 2 3 |  | 
| 3 4 | 
             
            require 'thor'
         | 
| 4 5 | 
             
            require 'fileutils'
         | 
| @@ -11,6 +12,9 @@ module Ore | |
| 11 12 | 
             
                map '-u' => :update
         | 
| 12 13 | 
             
                map '-r' => :remove
         | 
| 13 14 |  | 
| 15 | 
            +
                # add a --version option
         | 
| 16 | 
            +
                map '--version' => :version
         | 
| 17 | 
            +
             | 
| 14 18 | 
             
                desc 'list', 'List installed Ore templates'
         | 
| 15 19 |  | 
| 16 20 | 
             
                #
         | 
| @@ -86,5 +90,14 @@ module Ore | |
| 86 90 | 
             
                  FileUtils.rm_rf(path)
         | 
| 87 91 | 
             
                end
         | 
| 88 92 |  | 
| 93 | 
            +
                desc 'version', 'Prints the version'
         | 
| 94 | 
            +
             | 
| 95 | 
            +
                #
         | 
| 96 | 
            +
                # Prints {Ore::VERSION}.
         | 
| 97 | 
            +
                #
         | 
| 98 | 
            +
                def version
         | 
| 99 | 
            +
                  puts "ore #{Ore::VERSION}"
         | 
| 100 | 
            +
                end
         | 
| 101 | 
            +
             | 
| 89 102 | 
             
              end
         | 
| 90 103 | 
             
            end
         | 
    
        data/lib/ore/generator.rb
    CHANGED
    
    | @@ -157,15 +157,13 @@ module Ore | |
| 157 157 |  | 
| 158 158 | 
             
                  return false if @disabled_templates.include?(name)
         | 
| 159 159 |  | 
| 160 | 
            -
                   | 
| 161 | 
            -
                     | 
| 162 | 
            -
                    exit -1
         | 
| 163 | 
            -
                  end
         | 
| 160 | 
            +
                  if (template_dir = Template.templates[name])
         | 
| 161 | 
            +
                    source_paths.delete(template_dir)
         | 
| 164 162 |  | 
| 165 | 
            -
             | 
| 163 | 
            +
                    @templates.delete_if { |template| template.path == template_dir }
         | 
| 164 | 
            +
                    @enabled_templates.delete(name)
         | 
| 165 | 
            +
                  end
         | 
| 166 166 |  | 
| 167 | 
            -
                  @templates.delete_if { |template| template.path == template_dir }
         | 
| 168 | 
            -
                  @enabled_templates.delete(name)
         | 
| 169 167 | 
             
                  @disabled_templates << name
         | 
| 170 168 | 
             
                  return true
         | 
| 171 169 | 
             
                end
         | 
| @@ -211,11 +209,11 @@ module Ore | |
| 211 209 | 
             
                  @project_dir = File.basename(@root)
         | 
| 212 210 | 
             
                  @name        = (options.name || @project_dir)
         | 
| 213 211 |  | 
| 214 | 
            -
                  @scm = if | 
| 212 | 
            +
                  @scm = if    File.directory?(File.join(@root,'.git')) then :git
         | 
| 215 213 | 
             
                         elsif File.directory?(File.join(@root,'.hg'))  then :hg
         | 
| 216 214 | 
             
                         elsif File.directory?(File.join(@root,'.svn')) then :svn
         | 
| 217 | 
            -
                         elsif options.hg? | 
| 218 | 
            -
                         elsif options.git? | 
| 215 | 
            +
                         elsif options.hg?                              then :hg
         | 
| 216 | 
            +
                         elsif options.git?                             then :git
         | 
| 219 217 | 
             
                         end
         | 
| 220 218 |  | 
| 221 219 | 
             
                  case @scm
         | 
| @@ -264,12 +262,9 @@ module Ore | |
| 264 262 | 
             
                                   "https://#{@uri.host}#{@uri.path}/issues"
         | 
| 265 263 | 
             
                                 end
         | 
| 266 264 |  | 
| 267 | 
            -
                  @markup, @markup_ext = if | 
| 268 | 
            -
             | 
| 269 | 
            -
                                          | 
| 270 | 
            -
                                           [:textile, 'tt']
         | 
| 271 | 
            -
                                         else
         | 
| 272 | 
            -
                                           [:rdoc, 'rdoc']
         | 
| 265 | 
            +
                  @markup, @markup_ext = if    options.markdown? then [:markdown, 'md']
         | 
| 266 | 
            +
                                         elsif options.textile?  then [:textile, 'tt']
         | 
| 267 | 
            +
                                         else                         [:rdoc, 'rdoc']
         | 
| 273 268 | 
             
                                         end
         | 
| 274 269 |  | 
| 275 270 | 
             
                  @date  = Date.today
         | 
    
        data/lib/ore/version.rb
    ADDED
    
    
    
        data/spec/generator_spec.rb
    CHANGED
    
    | @@ -203,18 +203,6 @@ describe Generator do | |
| 203 203 | 
             
                end
         | 
| 204 204 | 
             
              end
         | 
| 205 205 |  | 
| 206 | 
            -
              context "gem test" do
         | 
| 207 | 
            -
                let(:name) { 'gem_test_project' }
         | 
| 208 | 
            -
             | 
| 209 | 
            -
                before(:all) do
         | 
| 210 | 
            -
                  generate!(name, :gem_test => true)
         | 
| 211 | 
            -
                end
         | 
| 212 | 
            -
             | 
| 213 | 
            -
                it "should add a .gemtest file" do
         | 
| 214 | 
            -
                  @path.should have_file('.gemtest')
         | 
| 215 | 
            -
                end
         | 
| 216 | 
            -
              end
         | 
| 217 | 
            -
             | 
| 218 206 | 
             
              context "bundler" do
         | 
| 219 207 | 
             
                let(:name) { 'bundled_project' }
         | 
| 220 208 |  | 
| @@ -407,6 +395,10 @@ gemspec | |
| 407 395 | 
             
                  generate!(name, :test_unit => true)
         | 
| 408 396 | 
             
                end
         | 
| 409 397 |  | 
| 398 | 
            +
                it "should disable the mini_test template" do
         | 
| 399 | 
            +
                  @generator.disabled_templates.should include(:mini_test)
         | 
| 400 | 
            +
                end
         | 
| 401 | 
            +
             | 
| 410 402 | 
             
                it "should disable the rspec template" do
         | 
| 411 403 | 
             
                  @generator.disabled_templates.should include(:rspec)
         | 
| 412 404 | 
             
                end
         | 
| @@ -420,7 +412,35 @@ gemspec | |
| 420 412 | 
             
                end
         | 
| 421 413 |  | 
| 422 414 | 
             
                it "should add a single test_*.rb file" do
         | 
| 423 | 
            -
                  @path.should have_file('test', | 
| 415 | 
            +
                  @path.should have_file('test',"test_#{name}.rb")
         | 
| 416 | 
            +
                end
         | 
| 417 | 
            +
              end
         | 
| 418 | 
            +
             | 
| 419 | 
            +
              context "mini_test" do
         | 
| 420 | 
            +
                let(:name) { 'mini_test_project' }
         | 
| 421 | 
            +
             | 
| 422 | 
            +
                before(:all) do
         | 
| 423 | 
            +
                  generate!(name, :mini_test => true)
         | 
| 424 | 
            +
                end
         | 
| 425 | 
            +
             | 
| 426 | 
            +
                it "should disable the test_unit template" do
         | 
| 427 | 
            +
                  @generator.disabled_templates.should include(:test_unit)
         | 
| 428 | 
            +
                end
         | 
| 429 | 
            +
             | 
| 430 | 
            +
                it "should disable the rspec template" do
         | 
| 431 | 
            +
                  @generator.disabled_templates.should include(:rspec)
         | 
| 432 | 
            +
                end
         | 
| 433 | 
            +
             | 
| 434 | 
            +
                it "should create the test/ directory" do
         | 
| 435 | 
            +
                  @path.should have_directory('test')
         | 
| 436 | 
            +
                end
         | 
| 437 | 
            +
             | 
| 438 | 
            +
                it "should create the test/helper.rb file" do
         | 
| 439 | 
            +
                  @path.should have_file('test','helper.rb')
         | 
| 440 | 
            +
                end
         | 
| 441 | 
            +
             | 
| 442 | 
            +
                it "should add a single test_*.rb file" do
         | 
| 443 | 
            +
                  @path.should have_file('test',"test_#{name}.rb")
         | 
| 424 444 | 
             
                end
         | 
| 425 445 | 
             
              end
         | 
| 426 446 |  | 
| @@ -435,6 +455,10 @@ gemspec | |
| 435 455 | 
             
                  @generator.disabled_templates.should include(:test_unit)
         | 
| 436 456 | 
             
                end
         | 
| 437 457 |  | 
| 458 | 
            +
                it "should disable the mini_test template" do
         | 
| 459 | 
            +
                  @generator.disabled_templates.should include(:mini_test)
         | 
| 460 | 
            +
                end
         | 
| 461 | 
            +
             | 
| 438 462 | 
             
                it "should not create the test/ directory" do
         | 
| 439 463 | 
             
                  @path.should_not have_directory('test')
         | 
| 440 464 | 
             
                end
         | 
| @@ -472,38 +496,6 @@ gemspec | |
| 472 496 | 
             
                end
         | 
| 473 497 | 
             
              end
         | 
| 474 498 |  | 
| 475 | 
            -
              context "jeweler tasks" do
         | 
| 476 | 
            -
                let(:name) { 'jewelery_project' }
         | 
| 477 | 
            -
             | 
| 478 | 
            -
                before(:all) do
         | 
| 479 | 
            -
                  generate!(name, :jeweler_tasks => true)
         | 
| 480 | 
            -
                end
         | 
| 481 | 
            -
             | 
| 482 | 
            -
                it "should disable the rubygems_tasks template" do
         | 
| 483 | 
            -
                  @generator.disabled_templates.should include(:rubygems_tasks)
         | 
| 484 | 
            -
                end
         | 
| 485 | 
            -
             | 
| 486 | 
            -
                it "should disable the bundler_tasks template" do
         | 
| 487 | 
            -
                  @generator.disabled_templates.should include(:bundler_tasks)
         | 
| 488 | 
            -
                end
         | 
| 489 | 
            -
             | 
| 490 | 
            -
                it "should add 'jeweler' as a development dependency" do
         | 
| 491 | 
            -
                  @gemspec.should have_development_dependency('jeweler')
         | 
| 492 | 
            -
                end
         | 
| 493 | 
            -
              end
         | 
| 494 | 
            -
             | 
| 495 | 
            -
              context "jeweler tasks with bundler" do
         | 
| 496 | 
            -
                let(:name) { 'bundled_jewelery_project' }
         | 
| 497 | 
            -
             | 
| 498 | 
            -
                before(:all) do
         | 
| 499 | 
            -
                  generate!(name, :bundler => true, :jeweler_tasks => true)
         | 
| 500 | 
            -
                end
         | 
| 501 | 
            -
             | 
| 502 | 
            -
                it "should add 'jeweler' as a development dependency" do
         | 
| 503 | 
            -
                  @gemspec.should have_development_dependency('jeweler')
         | 
| 504 | 
            -
                end
         | 
| 505 | 
            -
              end
         | 
| 506 | 
            -
             | 
| 507 499 | 
             
              context "rubygems-tasks" do
         | 
| 508 500 | 
             
                let(:name) { 'rubygems_tasks_project' }
         | 
| 509 501 |  | 
| @@ -511,10 +503,6 @@ gemspec | |
| 511 503 | 
             
                  generate!(name, :rubygems_tasks => true)
         | 
| 512 504 | 
             
                end
         | 
| 513 505 |  | 
| 514 | 
            -
                it "should disable the jeweler_tasks template" do
         | 
| 515 | 
            -
                  @generator.disabled_templates.should include(:jeweler_tasks)
         | 
| 516 | 
            -
                end
         | 
| 517 | 
            -
             | 
| 518 506 | 
             
                it "should disable the bundler_tasks template" do
         | 
| 519 507 | 
             
                  @generator.disabled_templates.should include(:bundler_tasks)
         | 
| 520 508 | 
             
                end
         | 
| @@ -543,10 +531,6 @@ gemspec | |
| 543 531 | 
             
                  generate!(name, :bundler_tasks => true)
         | 
| 544 532 | 
             
                end
         | 
| 545 533 |  | 
| 546 | 
            -
                it "should disable the jeweler_tasks template" do
         | 
| 547 | 
            -
                  @generator.disabled_templates.should include(:jeweler_tasks)
         | 
| 548 | 
            -
                end
         | 
| 549 | 
            -
             | 
| 550 534 | 
             
                it "should disable the rubygems_tasks template" do
         | 
| 551 535 | 
             
                  @generator.disabled_templates.should include(:rubygems_tasks)
         | 
| 552 536 | 
             
                end
         | 
| @@ -567,10 +551,6 @@ gemspec | |
| 567 551 | 
             
                  @generator.disabled_templates.should include(:rubygems_tasks)
         | 
| 568 552 | 
             
                end
         | 
| 569 553 |  | 
| 570 | 
            -
                it "should disable the jeweler_tasks template" do
         | 
| 571 | 
            -
                  @generator.disabled_templates.should include(:jeweler_tasks)
         | 
| 572 | 
            -
                end
         | 
| 573 | 
            -
             | 
| 574 554 | 
             
                it "should disable the bundler_tasks template" do
         | 
| 575 555 | 
             
                  @generator.disabled_templates.should include(:bundler_tasks)
         | 
| 576 556 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ore
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.10.0
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2012- | 
| 12 | 
            +
            date: 2012-10-15 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: thor
         | 
| @@ -18,7 +18,7 @@ dependencies: | |
| 18 18 | 
             
                requirements:
         | 
| 19 19 | 
             
                - - ~>
         | 
| 20 20 | 
             
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            -
                    version: '0. | 
| 21 | 
            +
                    version: '0.15'
         | 
| 22 22 | 
             
              type: :runtime
         | 
| 23 23 | 
             
              prerelease: false
         | 
| 24 24 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -26,7 +26,7 @@ dependencies: | |
| 26 26 | 
             
                requirements:
         | 
| 27 27 | 
             
                - - ~>
         | 
| 28 28 | 
             
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            -
                    version: '0. | 
| 29 | 
            +
                    version: '0.15'
         | 
| 30 30 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 31 31 | 
             
              name: rubygems-tasks
         | 
| 32 32 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -66,7 +66,7 @@ dependencies: | |
| 66 66 | 
             
                requirements:
         | 
| 67 67 | 
             
                - - ~>
         | 
| 68 68 | 
             
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            -
                    version: '0. | 
| 69 | 
            +
                    version: '0.8'
         | 
| 70 70 | 
             
              type: :development
         | 
| 71 71 | 
             
              prerelease: false
         | 
| 72 72 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -74,7 +74,7 @@ dependencies: | |
| 74 74 | 
             
                requirements:
         | 
| 75 75 | 
             
                - - ~>
         | 
| 76 76 | 
             
                  - !ruby/object:Gem::Version
         | 
| 77 | 
            -
                    version: '0. | 
| 77 | 
            +
                    version: '0.8'
         | 
| 78 78 | 
             
            description: Ore is a flexible Ruby project generator. Unlike other Ruby project generators,
         | 
| 79 79 | 
             
              Ore provides many builtin templates and allows custom templates to be installed
         | 
| 80 80 | 
             
              from Git repositories.
         | 
| @@ -119,7 +119,6 @@ files: | |
| 119 119 | 
             
            - data/ore/templates/bundler_tasks/template.yml
         | 
| 120 120 | 
             
            - data/ore/templates/gem_package_task/_tasks.erb
         | 
| 121 121 | 
             
            - data/ore/templates/gem_package_task/template.yml
         | 
| 122 | 
            -
            - data/ore/templates/gem_test/.gemtest
         | 
| 123 122 | 
             
            - data/ore/templates/gemspec/[name].gemspec.erb
         | 
| 124 123 | 
             
            - data/ore/templates/gemspec/template.yml
         | 
| 125 124 | 
             
            - data/ore/templates/gemspec_yml/[name].gemspec.erb
         | 
| @@ -129,8 +128,9 @@ files: | |
| 129 128 | 
             
            - data/ore/templates/git/template.yml
         | 
| 130 129 | 
             
            - data/ore/templates/hg/.hgignore.erb
         | 
| 131 130 | 
             
            - data/ore/templates/hg/template.yml
         | 
| 132 | 
            -
            - data/ore/templates/ | 
| 133 | 
            -
            - data/ore/templates/ | 
| 131 | 
            +
            - data/ore/templates/mini_test/template.yml
         | 
| 132 | 
            +
            - data/ore/templates/mini_test/test/helper.rb.erb
         | 
| 133 | 
            +
            - data/ore/templates/mini_test/test/test_[name].rb.erb
         | 
| 134 134 | 
             
            - data/ore/templates/rdoc/.document
         | 
| 135 135 | 
             
            - data/ore/templates/rdoc/_tasks.erb
         | 
| 136 136 | 
             
            - data/ore/templates/rdoc/template.yml
         | 
| @@ -141,7 +141,6 @@ files: | |
| 141 141 | 
             
            - data/ore/templates/rspec/template.yml
         | 
| 142 142 | 
             
            - data/ore/templates/rubygems_tasks/_tasks.erb
         | 
| 143 143 | 
             
            - data/ore/templates/rubygems_tasks/template.yml
         | 
| 144 | 
            -
            - data/ore/templates/rvmrc/.rvmrc.erb
         | 
| 145 144 | 
             
            - data/ore/templates/test_unit/_tasks.erb
         | 
| 146 145 | 
             
            - data/ore/templates/test_unit/template.yml
         | 
| 147 146 | 
             
            - data/ore/templates/test_unit/test/helper.rb.erb
         | 
| @@ -166,6 +165,7 @@ files: | |
| 166 165 | 
             
            - lib/ore/template/helpers.rb
         | 
| 167 166 | 
             
            - lib/ore/template/interpolations.rb
         | 
| 168 167 | 
             
            - lib/ore/template/template.rb
         | 
| 168 | 
            +
            - lib/ore/version.rb
         | 
| 169 169 | 
             
            - ore.gemspec
         | 
| 170 170 | 
             
            - spec/gemspec_examples.rb
         | 
| 171 171 | 
             
            - spec/generator_spec.rb
         | 
| 
            File without changes
         | 
| @@ -1,13 +0,0 @@ | |
| 1 | 
            -
            <%- if bundler? -%>
         | 
| 2 | 
            -
            require 'jeweler'
         | 
| 3 | 
            -
            Jeweler::Tasks.new(Gem::Specification.load('<%= @name %>.gemspec'))
         | 
| 4 | 
            -
            <%- else -%>
         | 
| 5 | 
            -
            begin
         | 
| 6 | 
            -
              gem 'jeweler', '<%= @development_dependencies['jeweler'] %>'
         | 
| 7 | 
            -
              require 'jeweler'
         | 
| 8 | 
            -
             | 
| 9 | 
            -
              Jeweler::Tasks.new(Gem::Specification.load('<%= @name %>.gemspec'))
         | 
| 10 | 
            -
            rescue LoadError
         | 
| 11 | 
            -
              warn 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
         | 
| 12 | 
            -
            end
         | 
| 13 | 
            -
            <%- end -%>
         | 
| @@ -1 +0,0 @@ | |
| 1 | 
            -
            rvm use --create @<%= @name %>
         |