Sha256: d58a13182935915ee12c1f520d95036f1583bc19b370516b025a3a6eafdf57e9

Contents?: true

Size: 907 Bytes

Versions: 48

Compression:

Stored size: 907 Bytes

Contents

require 'pageflow/version'

module Pageflow
  module Dummy
    class App
      def generate
        ENV['RAILS_ROOT'] = File.expand_path(directory)

        if File.exist?(directory)
          puts("Dummy directory #{directory} exists.")
        else
          system("bundle exec rails new #{directory} " \
                 "--template #{template_path} #{rails_new_options}")
        end

        require(File.join(ENV['RAILS_ROOT'], 'config', 'environment'))
        require('pageflow/dummy/config/pageflow')
      end

      def directory
        require 'rails/version'
        File.join('spec', 'dummy', "rails-#{Rails::VERSION::STRING}-pageflow-#{Pageflow::VERSION}")
      end

      def template_path
        File.expand_path(File.join('..', 'rails_template.rb'), __FILE__)
      end

      def rails_new_options
        '--skip-test-unit --skip-bundle --database=mysql'
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
pageflow-support-14.5.2 pageflow/dummy/app.rb
pageflow-support-15.3.0 pageflow/dummy/app.rb
pageflow-support-15.2.2 pageflow/dummy/app.rb
pageflow-support-15.2.1 pageflow/dummy/app.rb
pageflow-support-15.2.0 pageflow/dummy/app.rb
pageflow-support-15.1.2 pageflow/dummy/app.rb
pageflow-support-15.1.1 pageflow/dummy/app.rb
pageflow-support-15.1.0 pageflow/dummy/app.rb
pageflow-support-15.1.0.rc0 pageflow/dummy/app.rb
pageflow-support-15.1.0.beta6 pageflow/dummy/app.rb
pageflow-support-15.1.0.beta5 pageflow/dummy/app.rb
pageflow-support-15.1.0.beta4 pageflow/dummy/app.rb
pageflow-support-15.1.0.beta2 pageflow/dummy/app.rb
pageflow-support-15.1.0.beta1 pageflow/dummy/app.rb
pageflow-support-15.0.2 pageflow/dummy/app.rb
pageflow-support-15.0.1 pageflow/dummy/app.rb
pageflow-support-15.0.0 pageflow/dummy/app.rb
pageflow-support-14.5.1 pageflow/dummy/app.rb
pageflow-support-14.5.0 pageflow/dummy/app.rb
pageflow-support-15.0.0.rc2 pageflow/dummy/app.rb