From 747371df1025b053a784f12988355baacdf6856f Mon Sep 17 00:00:00 2001 From: Marcin Ruszkiewicz Date: Wed, 2 Oct 2019 22:49:08 +0200 Subject: [PATCH] update to use modern ruby fix for travis update ruby versions on travis, skip unworkable rubies for rails 6.0 apparently you need development gems, huh --- .gitignore | 7 ++ .rspec | 1 + .travis.yml | 31 +++---- Appraisals | 11 +++ bin/zapata | 34 +------ gemfiles/5.2.gemfile | 12 +++ gemfiles/6.0.gemfile | 12 +++ lib/zapata.rb | 10 +- lib/zapata/cli.rb | 15 +++ lib/zapata/primitive/defs.rb | 2 +- lib/zapata/primitive/klass.rb | 2 +- lib/zapata/primitive/sklass.rb | 2 +- lib/zapata/printer.rb | 1 - spec/array_spec.rb | 2 - spec/definition_spec.rb | 2 - spec/generation_spec.rb | 36 -------- spec/hash_spec.rb | 4 +- spec/klass_types_spec.rb | 2 - spec/send_spec.rb | 2 - spec/simple_types_spec.rb | 2 - spec/spec_helper.rb | 91 ++++--------------- spec/support/rails_test_app/.gitignore | 16 ---- spec/support/rails_test_app/.rspec | 3 - spec/support/rails_test_app/Gemfile | 48 ---------- .../spec/models/test_hash_spec.rb | 12 +-- .../rails_test_app/test/controllers/.keep | 0 .../rails_test_app/test/fixtures/.keep | 0 .../support/rails_test_app/test/helpers/.keep | 0 .../rails_test_app/test/integration/.keep | 0 .../support/rails_test_app/test/mailers/.keep | 0 spec/support/rails_test_app/test/models/.keep | 0 .../rails_test_app/test/test_helper.rb | 13 --- .../vendor/assets/javascripts/.keep | 0 .../vendor/assets/stylesheets/.keep | 0 zapata.gemspec | 30 +++--- 35 files changed, 120 insertions(+), 283 deletions(-) create mode 100644 Appraisals create mode 100644 gemfiles/5.2.gemfile create mode 100644 gemfiles/6.0.gemfile create mode 100644 lib/zapata/cli.rb delete mode 100644 spec/support/rails_test_app/.gitignore delete mode 100644 spec/support/rails_test_app/.rspec delete mode 100644 spec/support/rails_test_app/Gemfile delete mode 100644 spec/support/rails_test_app/test/controllers/.keep delete mode 100644 spec/support/rails_test_app/test/fixtures/.keep delete mode 100644 spec/support/rails_test_app/test/helpers/.keep delete mode 100644 spec/support/rails_test_app/test/integration/.keep delete mode 100644 spec/support/rails_test_app/test/mailers/.keep delete mode 100644 spec/support/rails_test_app/test/models/.keep delete mode 100644 spec/support/rails_test_app/test/test_helper.rb delete mode 100644 spec/support/rails_test_app/vendor/assets/javascripts/.keep delete mode 100644 spec/support/rails_test_app/vendor/assets/stylesheets/.keep diff --git a/.gitignore b/.gitignore index e2ca30e..430fb06 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,10 @@ *.o *.a mkmf.log + +.rspec_status +gemfiles/*.lock +spec/support/rails_test_app/db/*.sqlite3 +spec/support/rails_test_app/db/*.sqlite3-journal +spec/support/rails_test_app/log/*.log +spec/support/rails_test_app/tmp/ diff --git a/.rspec b/.rspec index 0d786ba..bd5962f 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1,4 @@ --color --warnings --require spec_helper +--pattern "spec/*_spec.rb" \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index e1efaed..a0e6200 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,16 @@ language: ruby - -bundler_args: --without development - script: script/test -gemfile: spec/support/rails_test_app/Gemfile - rvm: - - 2.1.0 - - ruby-head - - jruby-head - - rbx - + - 2.3.8 + - 2.4.7 + - 2.5.6 + - 2.6.4 +gemfile: + - gemfiles/5.2.gemfile + - gemfiles/6.0.gemfile matrix: - allow_failures: - - rvm: 2.0.0 - - rvm: ruby-head - - rvm: jruby-head - - rvm: rbx - -branches: - only: - - master + exclude: + - rvm: 2.3.8 + gemfile: gemfiles/6.0.gemfile + - rvm: 2.4.7 + gemfile: gemfiles/6.0.gemfile \ No newline at end of file diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..5f3f097 --- /dev/null +++ b/Appraisals @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +appraise '5.2' do + gem 'rails', '~> 5.2.0' + gem 'sqlite3' +end + +appraise '6.0' do + gem 'rails', '~> 6.0.0' + gem 'sqlite3' +end diff --git a/bin/zapata b/bin/zapata index 7e52b06..b5bef70 100755 --- a/bin/zapata +++ b/bin/zapata @@ -1,32 +1,8 @@ #!/usr/bin/env ruby -lib = File.expand_path('../lib', __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require_relative '../lib/zapata' +require 'rubygems' +require 'bundler/setup' +require 'zapata' +require 'zapata/cli' -description_of_generate = "'zapata generate ' - -s, --single option to skip app/models analysis" - -slop = Slop.new(help: true, banner: true) do - banner('Usage: zapata [options]') - on :v, :version, 'Print version.' do - puts "Your version is #{Zapata::VERSION}" - end - - command('generate', description: description_of_generate) do - on(:s, :single, "Does not analyze 'app/models'", banner: true) - - run do |opts, args| - Zapata::Revolutionist.generate_with_friendly_output(args, opts) - end - end - - run do |opts, args| - if args.present? - Zapata::Revolutionist.generate_with_friendly_output(args, opts) - end - end -end - -puts slop.help if ARGV.empty? -slop.parse +Zapata::CLI.start(ARGV) diff --git a/gemfiles/5.2.gemfile b/gemfiles/5.2.gemfile new file mode 100644 index 0000000..7661104 --- /dev/null +++ b/gemfiles/5.2.gemfile @@ -0,0 +1,12 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 5.2.0" +gem "sqlite3" + +group :test do + gem "coveralls", require: false +end + +gemspec path: "../" diff --git a/gemfiles/6.0.gemfile b/gemfiles/6.0.gemfile new file mode 100644 index 0000000..6986630 --- /dev/null +++ b/gemfiles/6.0.gemfile @@ -0,0 +1,12 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 6.0.0" +gem "sqlite3" + +group :test do + gem "coveralls", require: false +end + +gemspec path: "../" diff --git a/lib/zapata.rb b/lib/zapata.rb index f3f6255..e181d20 100644 --- a/lib/zapata.rb +++ b/lib/zapata.rb @@ -6,10 +6,10 @@ require 'open3' require 'rspec' require 'memoist' -require 'slop' require_rel 'zapata/core' require_rel 'zapata/predictor' +require_rel 'zapata/primitive/base' require_rel 'zapata/primitive' require_rel 'zapata/rzpec' require_relative 'zapata/analyst' @@ -23,14 +23,12 @@ class Revolutionist class << self attr_accessor :analysis, :analysis_as_array - def generate_with_friendly_output(args, opts) - file = args.shift - spec_filename = Zapata::Revolutionist.generate(file, - single: single?(opts, args)) + def generate_with_friendly_output(filename:, single: false) + spec_filename = Zapata::Revolutionist.generate(filename: filename, single: single) puts "Its done, comrades. File #{spec_filename} was generated." end - def generate(filename, single: false) + def generate(filename:, single: false) dirs = single ? [] : %w(app/models) file_list = Core::Collector.expand_dirs_to_files(dirs) new(file_list).generate_rspec_for(filename, spec_filename(filename)) diff --git a/lib/zapata/cli.rb b/lib/zapata/cli.rb new file mode 100644 index 0000000..8604681 --- /dev/null +++ b/lib/zapata/cli.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'thor' +require_relative 'version' + +module Zapata + class CLI < Thor + + desc 'generate FILENAME', 'generate spec file for model' + option :single, type: :boolean, desc: 'skip app/models analysis', aliases: :s + def generate(filename) + Zapata::Revolutionist.generate_with_friendly_output(filename: filename, single: options[:single]) + end + end +end diff --git a/lib/zapata/primitive/defs.rb b/lib/zapata/primitive/defs.rb index 9f99823..b3e0549 100644 --- a/lib/zapata/primitive/defs.rb +++ b/lib/zapata/primitive/defs.rb @@ -19,7 +19,7 @@ def public? end def node - receiver, name, args, body = @code.to_a + _, name, args, body = @code.to_a type = @code.type OpenStruct.new(type: type, name: name, args: args, body: body) end diff --git a/lib/zapata/primitive/klass.rb b/lib/zapata/primitive/klass.rb index 3dfae17..55d0bcd 100644 --- a/lib/zapata/primitive/klass.rb +++ b/lib/zapata/primitive/klass.rb @@ -15,7 +15,7 @@ def parent_modul_names end def node - const, inherited_from_klass, body = @code.to_a + const, _, body = @code.to_a immediate_modul, klass = const.to_a chain = parent_modul_names + [immediate_modul, klass] name = chain.compact.join('::') diff --git a/lib/zapata/primitive/sklass.rb b/lib/zapata/primitive/sklass.rb index 9f270ee..40cdb06 100644 --- a/lib/zapata/primitive/sklass.rb +++ b/lib/zapata/primitive/sklass.rb @@ -10,7 +10,7 @@ def initialize(code) end def node - receiver_self, body = @code.to_a + _, body = @code.to_a type = @code.type OpenStruct.new(type: type, body: body) diff --git a/lib/zapata/printer.rb b/lib/zapata/printer.rb index 3d39107..9008e16 100644 --- a/lib/zapata/printer.rb +++ b/lib/zapata/printer.rb @@ -86,7 +86,6 @@ def hash(given) values = unnested.map do |key, val| print_hash_pair(key, val, all_keys_symbols?(unnested)) end - "{ #{values.join(', ')} }" end diff --git a/spec/array_spec.rb b/spec/array_spec.rb index 1439453..156c63a 100644 --- a/spec/array_spec.rb +++ b/spec/array_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do before(:all) do @generated = exec_generation('app/models/test_array.rb') diff --git a/spec/definition_spec.rb b/spec/definition_spec.rb index a19b4f1..5c12ecb 100644 --- a/spec/definition_spec.rb +++ b/spec/definition_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do before(:all) do @generated = exec_generation('app/models/test_definition.rb') diff --git a/spec/generation_spec.rb b/spec/generation_spec.rb index 84334e1..4764166 100644 --- a/spec/generation_spec.rb +++ b/spec/generation_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do describe '#generate_with_friendly_output' do let(:file_name) { 'app/models/test_array.rb' } @@ -20,39 +18,5 @@ end end end - - context 'without the generate command' do - context 'with single (-s) specified' do - it 'returns a single file generation message' do - output = execution_output("cd #{RAILS_TEST_APP_DIR} && bundle exec zapata #{file_name} -s") - expect(output.count).to eq 1 - expect(output.first).to eq "Its done, comrades. File spec/models/test_array_spec.rb was generated.\n" - end - end - - context 'with single (--single) specified' do - it 'returns a single file generation message' do - output = execution_output("cd #{RAILS_TEST_APP_DIR} && bundle exec zapata #{file_name} --single") - expect(output.count).to eq 1 - expect(output.first).to eq "Its done, comrades. File spec/models/test_array_spec.rb was generated.\n" - end - end - - context 'with no single specified' do - it 'returns multiple file generation messages' do - output = execution_output("cd #{RAILS_TEST_APP_DIR} && bundle exec zapata #{file_name}") - expect(output.count).to be > 1 - end - end - end - - def execution_output(command) - stdout = Bundler.with_clean_env do - Open3.pipeline_r( - command - ) - end - stdout.first.readlines - end end end diff --git a/spec/hash_spec.rb b/spec/hash_spec.rb index 84b2aff..7482b93 100644 --- a/spec/hash_spec.rb +++ b/spec/hash_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do before(:all) do @generated = exec_generation('app/models/test_hash.rb') @@ -37,7 +35,7 @@ it '#test_keys_are_symbols' do has_block('#test_keys_are_symbols', %{ - expect(test_hash.test_keys_are_symbols({ this: 'should', be: 'pretty' })).to eq({ this: 'should', be: 'pretty' }) + expect(test_hash.test_keys_are_symbols({ this: 'should', be: 'pretty' })).to eq({ be: 'pretty', this: 'should' }) }) end end diff --git a/spec/klass_types_spec.rb b/spec/klass_types_spec.rb index 7c7364f..7d55eda 100644 --- a/spec/klass_types_spec.rb +++ b/spec/klass_types_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do context 'it should work with' do it 'bare module' do diff --git a/spec/send_spec.rb b/spec/send_spec.rb index 97eb3e7..c8733b5 100644 --- a/spec/send_spec.rb +++ b/spec/send_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do before(:all) do @generated = exec_generation('app/models/test_send.rb') diff --git a/spec/simple_types_spec.rb b/spec/simple_types_spec.rb index f1e44d1..7bfa50c 100644 --- a/spec/simple_types_spec.rb +++ b/spec/simple_types_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Zapata::Revolutionist do context 'it should work with' do it 'ints' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c1cc503..ce5ffaf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,86 +3,27 @@ require 'zapata' -# This file was generated by the `rspec --init` command. Conventionally, all -# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause this -# file to always be loaded, without a need to explicitly require it in any files. -# -# Given that it is always loaded, you are encouraged to keep this file as -# light-weight as possible. Requiring heavyweight dependencies from this file -# will add to the boot time of your test suite on EVERY test run, even for an -# individual file that may not need all of that loaded. Instead, make a -# separate helper file that requires this one and then use it only in the specs -# that actually need it. -# -# The `.rspec` file also contains a few flags that are not defaults but that -# users commonly want. -# -# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| - # The settings below are suggested to provide a good initial experience - # with RSpec, but feel free to customize to your heart's content. - # # These two settings work together to allow you to limit a spec run - # # to individual examples or groups you care about by tagging them with - # # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # # get run. - # config.filter_run :focus - # config.run_all_when_everything_filtered = true - # - # # Many RSpec users commonly either run the entire suite or an individual - # # file, and it's useful to allow more verbose output when running an - # # individual spec file. - # if config.files_to_run.one? - # # Use the documentation formatter for detailed output, - # # unless a formatter has already been configured - # # (e.g. via a command-line flag). - # config.default_formatter = 'doc' - # end - # - # # Print the 10 slowest examples and example groups at the - # # end of the spec run, to help surface which specs are running - # # particularly slow. - # config.profile_examples = 10 - # - # # Run specs in random order to surface order dependencies. If you find an - # # order dependency and want to debug it, you can fix the order by providing - # # the seed, which is printed after each run. - # # --seed 1234 - # config.order = :random - # - # # Seed global randomization in this process using the `--seed` CLI option. - # # Setting this allows you to use `--seed` to deterministically reproduce - # # test failures related to randomization by passing the same `--seed` value - # # as the one that triggered the failure. - # Kernel.srand config.seed - # - # # rspec-expectations config goes here. You can use an alternate - # # assertion/expectation library such as wrong or the stdlib/minitest - # # assertions if you prefer. - # config.expect_with :rspec do |expectations| - # # Enable only the newer, non-monkey-patching expect syntax. - # # For more details, see: - # # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax - # expectations.syntax = :expect - # end - # - # # rspec-mocks config goes here. You can use an alternate test double - # # library (such as bogus or mocha) by changing the `mock_with` option here. - # config.mock_with :rspec do |mocks| - # # Enable only the newer, non-monkey-patching expect syntax. - # # For more details, see: - # # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # mocks.syntax = :expect - # - # # Prevents you from mocking or stubbing a method that does not exist on - # # a real object. This is generally recommended. - # mocks.verify_partial_doubles = true - # end + # Enable flags like --only-failures and --next-failure + config.example_status_persistence_file_path = '.rspec_status' + + config.expect_with :rspec do |c| + c.syntax = :expect + end end # Helper methods RAILS_TEST_APP_DIR = "#{Dir.pwd}/spec/support/rails_test_app".freeze +def execution_output(command) + stdout = Bundler.with_clean_env do + Open3.pipeline_r( + command + ) + end + stdout.first.readlines +end + def clean(string) string.split(/\n/).map(&:strip).join("\n") end @@ -96,7 +37,7 @@ def expected(code) end def exec_generation(generate_for) - stdin, stdout, stderr = Bundler.with_clean_env do + _, stdout, stderr = Bundler.with_clean_env do Open3.popen3( "cd #{RAILS_TEST_APP_DIR} && bundle exec zapata generate #{generate_for} -s" ) diff --git a/spec/support/rails_test_app/.gitignore b/spec/support/rails_test_app/.gitignore deleted file mode 100644 index 6a502e9..0000000 --- a/spec/support/rails_test_app/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - -# Ignore all logfiles and tempfiles. -/log/*.log -/tmp diff --git a/spec/support/rails_test_app/.rspec b/spec/support/rails_test_app/.rspec deleted file mode 100644 index 0d786ba..0000000 --- a/spec/support/rails_test_app/.rspec +++ /dev/null @@ -1,3 +0,0 @@ ---color ---warnings ---require spec_helper diff --git a/spec/support/rails_test_app/Gemfile b/spec/support/rails_test_app/Gemfile deleted file mode 100644 index b4ab8e0..0000000 --- a/spec/support/rails_test_app/Gemfile +++ /dev/null @@ -1,48 +0,0 @@ -source 'https://rubygems.org' - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.1.1' -# Use sqlite3 as the database for Active Record -gem 'sqlite3' -# Use SCSS for stylesheets -gem 'sass-rails', '~> 4.0.3' -# Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 1.3.0' -# Use CoffeeScript for .js.coffee assets and views -gem 'coffee-rails', '~> 4.0.0' -# See https://github.com/sstephenson/execjs#readme for more supported runtimes -# gem 'therubyracer', platforms: :ruby - -# Use jquery as the JavaScript library -gem 'jquery-rails' -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -gem 'jbuilder', '~> 2.0' -# bundle exec rake doc:rails generates the API under doc/api. -gem 'sdoc', '~> 0.4.0', group: :doc - -group :development, :test do - gem 'rspec-rails' -end - -group :test do - gem 'coveralls', require: false -end - -# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring -gem 'spring', group: :development - -gem 'zapata', path: File.expand_path('../../../..', __FILE__) - -# Use ActiveModel has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use unicorn as the app server -# gem 'unicorn' - -# Use Capistrano for deployment -# gem 'capistrano-rails', group: :development - -# Use debugger -# gem 'debugger', group: [:development, :test] diff --git a/spec/support/rails_test_app/spec/models/test_hash_spec.rb b/spec/support/rails_test_app/spec/models/test_hash_spec.rb index 25e3db4..dce9e33 100644 --- a/spec/support/rails_test_app/spec/models/test_hash_spec.rb +++ b/spec/support/rails_test_app/spec/models/test_hash_spec.rb @@ -6,26 +6,26 @@ end it '#test_in_arg' do - expect(test_hash.test_in_arg(1 => :one, TestHash => 2.718)).to eq(1 => :one, TestHash => 2.718) + expect(test_hash.test_in_arg({ 1 => :one, TestHash => 2.718 })).to eq({ 1 => :one, TestHash => 2.718 }) end it '#test_nested_one_level' do - expect(test_hash.test_nested_one_level(first_level: { 1 => :one, TestHash => 2.718 })).to eq(first_level: { 1 => :one, TestHash => 2.718 }) + expect(test_hash.test_nested_one_level({ first_level: { 1 => :one, TestHash => 2.718 } })).to eq({ first_level: { 1 => :one, TestHash => 2.718 } }) end it '#test_nested_two_levels' do - expect(test_hash.test_nested_two_levels(second_level: { first_level: { 1 => :one, TestHash => 2.718 } })).to eq(second_level: { first_level: { 1 => :one, TestHash => 2.718 } }) + expect(test_hash.test_nested_two_levels({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } })).to eq({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } }) end it '#test_nested_three_levels' do - expect(test_hash.test_nested_three_levels(third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } })).to eq(third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } }) + expect(test_hash.test_nested_three_levels({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } })).to eq({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } }) end it '#test_key_as_another_hash' do - expect(test_hash.test_key_as_another_hash({ 1 => :one, TestHash => 2.718 } => :ratm)).to eq({ 1 => :one, TestHash => 2.718 } => :ratm) + expect(test_hash.test_key_as_another_hash({ { 1 => :one, TestHash => 2.718 } => :ratm })).to eq({ { 1 => :one, TestHash => 2.718 } => :ratm }) end it '#test_keys_are_symbols' do - expect(test_hash.test_keys_are_symbols(this: 'should', be: 'pretty')).to eq(this: 'should', be: 'pretty') + expect(test_hash.test_keys_are_symbols({ this: 'should', be: 'pretty' })).to eq({ be: 'pretty', this: 'should' }) end end diff --git a/spec/support/rails_test_app/test/controllers/.keep b/spec/support/rails_test_app/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/fixtures/.keep b/spec/support/rails_test_app/test/fixtures/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/helpers/.keep b/spec/support/rails_test_app/test/helpers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/integration/.keep b/spec/support/rails_test_app/test/integration/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/mailers/.keep b/spec/support/rails_test_app/test/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/models/.keep b/spec/support/rails_test_app/test/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/test/test_helper.rb b/spec/support/rails_test_app/test/test_helper.rb deleted file mode 100644 index bf95f81..0000000 --- a/spec/support/rails_test_app/test/test_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - # - # Note: You'll currently still have to declare fixtures explicitly in integration tests - # -- they do not yet inherit this setting - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/spec/support/rails_test_app/vendor/assets/javascripts/.keep b/spec/support/rails_test_app/vendor/assets/javascripts/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/support/rails_test_app/vendor/assets/stylesheets/.keep b/spec/support/rails_test_app/vendor/assets/stylesheets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/zapata.gemspec b/zapata.gemspec index 0031080..1a47924 100644 --- a/zapata.gemspec +++ b/zapata.gemspec @@ -1,4 +1,3 @@ -# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'zapata/version' @@ -12,25 +11,26 @@ Gem::Specification.new do |spec| spec.description = 'Who has time to write tests? This is a revolutional tool to make them write themselves.' spec.homepage = 'https://github.com/Nedomas/zapata' spec.license = 'MIT' - spec.required_ruby_version = '~> 2.0' spec.files = `git ls-files -z`.split("\x0") spec.executables = ['zapata'] spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] - spec.add_runtime_dependency 'parser', '~> 2.3.0.0' - spec.add_runtime_dependency 'unparser', '0.2.5' - spec.add_runtime_dependency 'andand', '~> 1.3.3' - spec.add_runtime_dependency 'rails', '>= 3.0.0' - spec.add_runtime_dependency 'slop', '~> 3.4' - spec.add_runtime_dependency 'rspec-rails' - spec.add_runtime_dependency 'require_all', '~> 1.3' - spec.add_runtime_dependency 'file-temp', '~> 1.2' - spec.add_runtime_dependency 'rspec' + spec.add_runtime_dependency 'andand' + spec.add_runtime_dependency 'file-temp' spec.add_runtime_dependency 'memoist' - spec.add_development_dependency 'pry', '~> 0.9' - spec.add_development_dependency 'pry-stack_explorer', '~> 0.4' - spec.add_development_dependency 'bundler', '~> 1.6' - spec.add_development_dependency 'rake', '~> 10.0' + spec.add_runtime_dependency 'parser' + spec.add_runtime_dependency 'rails' + spec.add_runtime_dependency 'require_all' + spec.add_runtime_dependency 'rspec' + spec.add_runtime_dependency 'rspec-rails' + spec.add_runtime_dependency 'thor' + spec.add_runtime_dependency 'unparser' + + spec.add_development_dependency 'appraisal' + spec.add_development_dependency 'pry' + spec.add_development_dependency 'pry-stack_explorer' + spec.add_development_dependency 'rake' + spec.add_development_dependency 'sqlite3' end