scoby 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4cfe86972fad5cdee13dfb639404cfe07cad4fb1
4
+ data.tar.gz: 851edaf8c5f564bc72400f0a5b0a571cd3ce13cc
5
+ SHA512:
6
+ metadata.gz: e3ece270171df3f96c1b41d5d0d3d0f4902291e5cb7d7a0e733bf96b87983a42d8beb8ff905a5d6f9a4b8482c8c8bb72095a27b152c36f9c21f322fd05622ad8
7
+ data.tar.gz: 5d03f4f4266b938efeedd2683b58c1817c045d02d609ce327bd8bc727e8f3bafca765457c187be44881289211aaf75874401bb7424ae740c661ce5c241d64093
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.3.0
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,127 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ scoby (0.0.1)
5
+ bundler (~> 1.3)
6
+ rails (~> 4.2.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.6)
12
+ actionpack (= 4.2.6)
13
+ actionview (= 4.2.6)
14
+ activejob (= 4.2.6)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.6)
18
+ actionview (= 4.2.6)
19
+ activesupport (= 4.2.6)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.6)
25
+ activesupport (= 4.2.6)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
+ activejob (4.2.6)
31
+ activesupport (= 4.2.6)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.6)
34
+ activesupport (= 4.2.6)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.6)
37
+ activemodel (= 4.2.6)
38
+ activesupport (= 4.2.6)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.6)
41
+ i18n (~> 0.7)
42
+ json (~> 1.7, >= 1.7.7)
43
+ minitest (~> 5.1)
44
+ thread_safe (~> 0.3, >= 0.3.4)
45
+ tzinfo (~> 1.1)
46
+ arel (6.0.3)
47
+ builder (3.2.2)
48
+ concurrent-ruby (1.0.1)
49
+ diff-lcs (1.2.5)
50
+ erubis (2.7.0)
51
+ globalid (0.3.6)
52
+ activesupport (>= 4.1.0)
53
+ i18n (0.7.0)
54
+ json (1.8.3)
55
+ loofah (2.0.3)
56
+ nokogiri (>= 1.5.9)
57
+ mail (2.6.4)
58
+ mime-types (>= 1.16, < 4)
59
+ mime-types (3.0)
60
+ mime-types-data (~> 3.2015)
61
+ mime-types-data (3.2016.0221)
62
+ mini_portile2 (2.0.0)
63
+ minitest (5.8.4)
64
+ nokogiri (1.6.7.2)
65
+ mini_portile2 (~> 2.0.0.rc2)
66
+ rack (1.6.4)
67
+ rack-test (0.6.3)
68
+ rack (>= 1.0)
69
+ rails (4.2.6)
70
+ actionmailer (= 4.2.6)
71
+ actionpack (= 4.2.6)
72
+ actionview (= 4.2.6)
73
+ activejob (= 4.2.6)
74
+ activemodel (= 4.2.6)
75
+ activerecord (= 4.2.6)
76
+ activesupport (= 4.2.6)
77
+ bundler (>= 1.3.0, < 2.0)
78
+ railties (= 4.2.6)
79
+ sprockets-rails
80
+ rails-deprecated_sanitizer (1.0.3)
81
+ activesupport (>= 4.2.0.alpha)
82
+ rails-dom-testing (1.0.7)
83
+ activesupport (>= 4.2.0.beta, < 5.0)
84
+ nokogiri (~> 1.6.0)
85
+ rails-deprecated_sanitizer (>= 1.0.1)
86
+ rails-html-sanitizer (1.0.3)
87
+ loofah (~> 2.0)
88
+ railties (4.2.6)
89
+ actionpack (= 4.2.6)
90
+ activesupport (= 4.2.6)
91
+ rake (>= 0.8.7)
92
+ thor (>= 0.18.1, < 2.0)
93
+ rake (11.1.2)
94
+ rspec (3.4.0)
95
+ rspec-core (~> 3.4.0)
96
+ rspec-expectations (~> 3.4.0)
97
+ rspec-mocks (~> 3.4.0)
98
+ rspec-core (3.4.4)
99
+ rspec-support (~> 3.4.0)
100
+ rspec-expectations (3.4.0)
101
+ diff-lcs (>= 1.2.0, < 2.0)
102
+ rspec-support (~> 3.4.0)
103
+ rspec-mocks (3.4.1)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.4.0)
106
+ rspec-support (3.4.1)
107
+ sprockets (3.6.0)
108
+ concurrent-ruby (~> 1.0)
109
+ rack (> 1, < 3)
110
+ sprockets-rails (3.0.4)
111
+ actionpack (>= 4.0)
112
+ activesupport (>= 4.0)
113
+ sprockets (>= 3.0.0)
114
+ thor (0.19.1)
115
+ thread_safe (0.3.5)
116
+ tzinfo (1.2.2)
117
+ thread_safe (~> 0.1)
118
+
119
+ PLATFORMS
120
+ ruby
121
+
122
+ DEPENDENCIES
123
+ scoby!
124
+ rspec (~> 3.2)
125
+
126
+ BUNDLED WITH
127
+ 1.11.2
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Scoby
2
+ Scoby is a tool for quickly generating a Rails application preconfigured with
3
+ the tools commonly used by Brickbutton. It owes a _huge_ debt to thoughtbot's
4
+ [Suspenders](https://github.com/thoughtbot/suspenders).
5
+
6
+ ## Installation
7
+
8
+ First install Scoby:
9
+
10
+ gem install scoby
11
+
12
+ Then run:
13
+
14
+ scoby projectname
15
+
16
+ This will create a Rails app in `projectname` using the latest version of Rails.
data/bin/scoby ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
5
+ $LOAD_PATH << source_path
6
+
7
+ require 'scoby'
8
+
9
+ if ARGV.empty?
10
+ puts "Please provide a path for the new application"
11
+ puts
12
+ puts "See --help for more info"
13
+ exit 0
14
+ elsif ['-v', '--version'].include? ARGV[0]
15
+ puts Scoby::VERSION
16
+ exit 0
17
+ end
18
+
19
+ templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
20
+ Scoby::AppGenerator.source_root templates_root
21
+ Scoby::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
22
+
23
+ Scoby::AppGenerator.start
@@ -0,0 +1,33 @@
1
+ module Scoby
2
+ module Actions
3
+ def replace_in_file(relative_path, find, replace)
4
+ path = File.join(destination_root, relative_path)
5
+ contents = IO.read(path)
6
+ unless contents.gsub!(find, replace)
7
+ raise "#{find.inspect} not found in #{relative_path}"
8
+ end
9
+ File.open(path, "w") { |file| file.write(contents) }
10
+ end
11
+
12
+ def action_mailer_host(rails_env, host)
13
+ config = "config.action_mailer.default_url_options = { host: #{host} }"
14
+ configure_environment(rails_env, config)
15
+ end
16
+
17
+ def configure_application_file(config)
18
+ inject_into_file(
19
+ "config/application.rb",
20
+ "\n\n #{config}",
21
+ before: "\n end"
22
+ )
23
+ end
24
+
25
+ def configure_environment(rails_env, config)
26
+ inject_into_file(
27
+ "config/environments/#{rails_env}.rb",
28
+ "\n\n #{config}",
29
+ before: "\nend"
30
+ )
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,106 @@
1
+ require "forwardable"
2
+
3
+ module Scoby
4
+ class AppBuilder < Rails::AppBuilder
5
+ include Scoby::Actions
6
+ extend Forwardable
7
+
8
+ def gemfile
9
+ template "Gemfile.erb", "Gemfile"
10
+ end
11
+
12
+ def set_ruby_to_version_being_used
13
+ create_file '.ruby-version', "#{Scoby::RUBY_VERSION}\n"
14
+ end
15
+
16
+ def create_templates_directory
17
+ directory 'app/views', 'app/templates'
18
+ end
19
+
20
+ def remove_layout_from_views
21
+ remove_dir 'app/views/layouts'
22
+ end
23
+
24
+ def support_templates_and_views_in_application_rb
25
+ inject_into_file "config/application.rb", after: "config.active_record.raise_in_transactional_callbacks = true\n" do
26
+ <<-RUBY
27
+
28
+ # Support /app/view .rb classes and /app/templates files.
29
+ config.autoload_paths << (Rails.root + "app/views/concerns").to_s
30
+ config.autoload_paths << (Rails.root + "app/views").to_s
31
+ config.to_prepare do
32
+ ApplicationController.send(:append_view_path, Rails.root.join("app", "templates"))
33
+ end
34
+ RUBY
35
+ end
36
+ end
37
+
38
+ def configure_generators
39
+ inject_into_file "config/application.rb", after: "config.active_record.raise_in_transactional_callbacks = true\n" do
40
+ <<-RUBY
41
+
42
+ # Don't generate helpers, assets, and view specs by default.
43
+ config.generators do |generate|
44
+ generate.helper false
45
+ generate.assets false
46
+ generate.erb false
47
+ generate.view_specs false
48
+ generate.test_framework :rspec
49
+ end
50
+ RUBY
51
+ end
52
+ end
53
+
54
+ def setup_factory_girl_for_rspec
55
+ copy_file 'factory_girl_rspec.rb', 'spec/support/factory_girl.rb'
56
+ end
57
+
58
+ def generate_rspec
59
+ generate 'rspec:install'
60
+ end
61
+
62
+ def configure_rspec
63
+ remove_file "spec/rails_helper.rb"
64
+ remove_file "spec/spec_helper.rb"
65
+ copy_file "rails_helper.rb", "spec/rails_helper.rb"
66
+ copy_file "spec_helper.rb", "spec/spec_helper.rb"
67
+ end
68
+
69
+ def configure_database_cleaner_in_specs
70
+ copy_file 'database_cleaner_rspec.rb', 'spec/support/database_cleaner.rb'
71
+ end
72
+
73
+ def configure_shoulda_matchers_in_specs
74
+ copy_file(
75
+ "shoulda_matchers_rspec.rb",
76
+ "spec/support/shoulda_matchers.rb"
77
+ )
78
+ end
79
+
80
+ def configure_action_mailer_in_specs
81
+ copy_file 'action_mailer_rspec.rb', 'spec/support/action_mailer.rb'
82
+ end
83
+
84
+ def configure_simple_cov_in_specs
85
+ copy_file 'simple_cov_rspec.rb', 'spec/support/simple_cov.rb'
86
+ end
87
+
88
+ def setup_default_rspec_directories
89
+ [
90
+ 'spec/cassettes',
91
+ 'spec/controllers',
92
+ 'spec/factories',
93
+ 'spec/lib',
94
+ 'spec/models',
95
+ 'spec/routing',
96
+ 'spec/views'
97
+ ].each do |dir|
98
+ empty_directory_with_keep_file dir
99
+ end
100
+ end
101
+
102
+ def copy_dotfiles
103
+ directory("dotfiles", ".")
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,94 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/rails/app/app_generator'
3
+
4
+ module Scoby
5
+ class AppGenerator < Rails::Generators::AppGenerator
6
+ class_option :database, type: :string, aliases: "-d", default: "postgresql",
7
+ desc: "Configure for selected database (options: #{DATABASES.join("/")})"
8
+
9
+ class_option :heroku, type: :boolean, aliases: "-H", default: false,
10
+ desc: "Create staging and production Heroku apps"
11
+
12
+ class_option :heroku_flags, type: :string, default: "",
13
+ desc: "Set extra Heroku flags"
14
+
15
+ class_option :github, type: :string, aliases: "-G", default: nil,
16
+ desc: "Create Github repository and add remote origin pointed to repo"
17
+
18
+ class_option :skip_test_unit, type: :boolean, aliases: "-T", default: true,
19
+ desc: "Skip Test::Unit files"
20
+
21
+ class_option :skip_turbolinks, type: :boolean, default: true,
22
+ desc: "Skip turbolinks gem"
23
+
24
+ class_option :skip_bundle, type: :boolean, aliases: "-B", default: true,
25
+ desc: "Don't run bundle install"
26
+
27
+ def finish_template
28
+ invoke :scoby_customization
29
+ super
30
+ end
31
+
32
+ def scoby_customization
33
+ invoke :customize_gemfile
34
+ invoke :setup_template_view_structure
35
+ invoke :configure_generators
36
+ invoke :setup_test_environment
37
+ invoke :setup_dotfiles
38
+ invoke :outro
39
+ end
40
+
41
+ def customize_gemfile
42
+ build :set_ruby_to_version_being_used
43
+ bundle_command 'install'
44
+ end
45
+
46
+ def setup_template_view_structure
47
+ say "Setting up template/view structure"
48
+ build :create_templates_directory
49
+ build :remove_layout_from_views
50
+ build :support_templates_and_views_in_application_rb
51
+ end
52
+
53
+ def configure_generators
54
+ say "Configuring generators"
55
+ build :configure_generators
56
+ end
57
+
58
+ def setup_test_environment
59
+ say "Setting up test environment"
60
+ build :setup_factory_girl_for_rspec
61
+ build :generate_rspec
62
+ build :configure_rspec
63
+ build :configure_database_cleaner_in_specs
64
+ build :configure_shoulda_matchers_in_specs
65
+ build :configure_action_mailer_in_specs
66
+ build :configure_simple_cov_in_specs
67
+ build :setup_default_rspec_directories
68
+ end
69
+
70
+ # def setup_react
71
+ # say "Setting up React"
72
+ # # TODO
73
+ # end
74
+
75
+ # def setup_flux? redux?
76
+ # say "Setting up React"
77
+ # # TODO
78
+ # end
79
+
80
+ def setup_dotfiles
81
+ build :copy_dotfiles
82
+ end
83
+
84
+ def outro
85
+ say "G8! You're primed and ready to go!"
86
+ end
87
+
88
+ protected
89
+
90
+ def get_builder_class
91
+ Scoby::AppBuilder
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,5 @@
1
+ module Scoby
2
+ RAILS_VERSION = "~> 4.2.6"
3
+ RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
+ VERSION = "0.0.1"
5
+ end
data/lib/scoby.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'scoby/version'
2
+ require 'scoby/generators/app_generator'
3
+ require 'scoby/actions'
4
+ # require "suspenders/adapters/heroku"
5
+ require 'scoby/app_builder'
data/scoby.gemspec ADDED
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'scoby/version'
4
+ require 'date'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.required_ruby_version = ">= #{Scoby::RUBY_VERSION}"
8
+ s.authors = ["Brickbutton Engineering"]
9
+ s.date = Date.today.strftime('%Y-%m-%d')
10
+
11
+ s.description = <<-HERE
12
+ Scoby is a tool for quickly generating a Rails application preconfigured with
13
+ the tools commonly used by Brickbutton. It owes a huge debt to thoughtbot's
14
+ Suspenders.
15
+ HERE
16
+
17
+ s.email = 'brickbutton@aol.com'
18
+ s.executables = ['scoby']
19
+ s.extra_rdoc_files = %w[README.md]
20
+ s.files = `git ls-files`.split("\n")
21
+ s.homepage = 'https://github.com/brickbutton/scoby'
22
+ s.license = 'MIT'
23
+ s.name = 'scoby'
24
+ s.rdoc_options = ['--charset=UTF-8']
25
+ s.require_paths = ['lib']
26
+ s.summary = "Generate a Rails app using Brickbutton's best practices."
27
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
+ s.version = Scoby::VERSION
29
+
30
+ s.add_dependency 'bundler', '~> 1.3'
31
+ s.add_dependency 'rails', Scoby::RAILS_VERSION
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.2'
34
+ end
@@ -0,0 +1,88 @@
1
+ source "https://rubygems.org"
2
+
3
+ ruby "<%= Scoby::RUBY_VERSION %>"
4
+
5
+ # Rails
6
+ gem "rails", "<%= Scoby::RAILS_VERSION %>"
7
+
8
+ # Database
9
+ gem "pg", "~> 0.18.4"
10
+
11
+ # SCSS for stylesheets
12
+ gem "sass-rails", "~> 5.0"
13
+
14
+ # Uglifier to compress JavaScript
15
+ gem "uglifier", "~> 2.7.2"
16
+
17
+ # jQuery
18
+ gem "jquery-rails", "~> 4.1.1"
19
+
20
+ # Underscore
21
+ gem "underscore-rails", "~> 1.8.3"
22
+
23
+ # React
24
+ # Server-side rendering
25
+ gem "therubyracer", "~> 0.12.2", platforms: :ruby
26
+ gem "react-rails", "~> 1.6.2"
27
+
28
+ # JSON templating
29
+ gem "jbuilder", "~> 2.4.1"
30
+
31
+ group :development do
32
+ # Annotate models
33
+ gem "annotate"
34
+ end
35
+
36
+ group :test do
37
+ gem "shoulda-matchers"
38
+ gem "database_cleaner"
39
+ gem "spring-commands-rspec"
40
+ gem "recursive-open-struct", "~> 1.0"
41
+
42
+ # Record and store external service calls for faster testing.
43
+ gem "webmock"
44
+ gem "vcr"
45
+
46
+ # Test formating and print instant-fail
47
+ gem "fuubar"
48
+
49
+ # Factories
50
+ gem "factory_girl_rails"
51
+ gem "faker"
52
+
53
+ # Test code coverage.
54
+ gem "simplecov", "~> 0.11", require: false
55
+ end
56
+
57
+ group :development, :test do
58
+ # Rspec for testing
59
+ gem "rspec-rails"
60
+
61
+ # Manage environment variables locally using a `.env` file.
62
+ gem "dotenv-rails", "~> 2.1.0"
63
+
64
+ # Keep application running in the background.
65
+ gem "spring"
66
+
67
+ # Call "byebug" anywhere to stop execution and get a debugger console.
68
+ gem "byebug"
69
+
70
+ # Time stubbing for testing time-dependent code.
71
+ gem "timecop", "~> 0.8"
72
+
73
+ # Enforce code style guidelines
74
+ gem "rubocop", "~> 0.39.0", require: false
75
+ gem "pronto"
76
+ gem "pronto-rubocop", require: false
77
+
78
+ gem "brakeman", "~> 3.2", require: false
79
+ gem "pronto-brakeman", require: false
80
+ end
81
+
82
+ group :production do
83
+ # App server
84
+ gem "puma", "~> 3.1.1"
85
+
86
+ # Heroku logging and assets
87
+ gem "rails_12factor", "~> 0.0.3"
88
+ end
@@ -0,0 +1,5 @@
1
+ RSpec.configure do |config|
2
+ config.before(:each) do
3
+ ActionMailer::Base.deliveries.clear
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.strategy = :transaction
4
+ DatabaseCleaner.clean_with(:truncation)
5
+ end
6
+
7
+ config.around(:each) do |example|
8
+ DatabaseCleaner.cleaning do
9
+ example.run
10
+ end
11
+ end
12
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include FactoryGirl::Syntax::Methods
3
+ end
@@ -0,0 +1,59 @@
1
+ # This file is copied to spec/ when you run "rails generate rspec:install"
2
+ ENV["RAILS_ENV"] ||= "test"
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ # Prevent database truncation if the environment is production
5
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
6
+ require "spec_helper"
7
+ require "rspec/rails"
8
+
9
+ # Requires supporting ruby files with custom matchers and macros, etc, in
10
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
11
+ # run as spec files by default. This means that files in spec/support that end
12
+ # in _spec.rb will both be required and run as specs, causing the specs to be
13
+ # run twice. It is recommended that you do not name files matching this glob to
14
+ # end with _spec.rb. You can configure this pattern with the --pattern
15
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
16
+ #
17
+ # The following line is provided for convenience purposes. It has the downside
18
+ # of increasing the boot-up time by auto-requiring all files in the support
19
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
20
+ # require only the support files necessary.
21
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
22
+
23
+ # Checks for pending migration and applies them before tests are run.
24
+ # If you are not using ActiveRecord, you can remove this line.
25
+ ActiveRecord::Migration.maintain_test_schema!
26
+
27
+ RSpec.configure do |config|
28
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
29
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
30
+
31
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
32
+ # examples within a transaction, remove the following line or assign false
33
+ # instead of true.
34
+ config.use_transactional_fixtures = true
35
+
36
+ # RSpec Rails can automatically mix in different behaviours to your tests
37
+ # based on their file location, for example enabling you to call `get` and
38
+ # `post` in specs under `spec/controllers`.
39
+ #
40
+ # You can disable this behaviour by removing the line below, and instead
41
+ # explicitly tag your specs with their type, e.g.:
42
+ #
43
+ # RSpec.describe UsersController do
44
+ # # ...
45
+ # end
46
+ #
47
+ # The different available types are documented in the features, such as in
48
+ # https://relishapp.com/rspec/rspec-rails/docs
49
+ config.infer_spec_type_from_file_location!
50
+
51
+ # Filter lines from Rails gems in backtraces.
52
+ config.filter_rails_from_backtrace!
53
+ # arbitrary gems may also be filtered via:
54
+ # config.filter_gems_from_backtrace("gem name")
55
+
56
+ # Make sure the minimum coverage for our specs remains above this percentage.
57
+ # Only run this check if running the entire suite.
58
+ SimpleCov.minimum_coverage(80) unless config.files_to_run.one?
59
+ end
@@ -0,0 +1,6 @@
1
+ Shoulda::Matchers.configure do |config|
2
+ config.integrate do |with|
3
+ with.test_framework :rspec
4
+ with.library :rails
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ SimpleCov.minimum_coverage(80) unless config.files_to_run.one?
3
+ end
@@ -0,0 +1,37 @@
1
+ require "vcr"
2
+ require "simplecov"
3
+
4
+ # If running tests on CircleCI, save the results to CircleCI's artifacts directory.
5
+ if ENV["CIRCLE_ARTIFACTS"]
6
+ dir = File.join(ENV["CIRCLE_ARTIFACTS"], "coverage")
7
+ SimpleCov.coverage_dir(dir)
8
+ end
9
+
10
+ SimpleCov.start "rails" do
11
+ add_group "Views", "app/views"
12
+ end
13
+
14
+ RSpec.configure do |config|
15
+ config.expect_with :rspec do |expectations|
16
+ # This option will default to `true` in RSpec 4. It makes the `description`
17
+ # and `failure_message` of custom matchers include text for helper methods
18
+ # defined using `chain`, e.g.:
19
+ # be_bigger_than(2).and_smaller_than(4).description
20
+ # # => "be bigger than 2 and smaller than 4"
21
+ # ...rather than:
22
+ # # => "be bigger than 2"
23
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
24
+ end
25
+
26
+ # rspec-mocks config goes here. You can use an alternate test double
27
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
28
+ config.mock_with :rspec do |mocks|
29
+ # Prevents you from mocking or stubbing a method that does not exist on
30
+ # a real object. This is generally recommended, and will default to
31
+ # `true` in RSpec 4.
32
+ mocks.verify_partial_doubles = true
33
+ end
34
+
35
+ # Run specs in random order to surface order dependencies.
36
+ config.order = :random
37
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scoby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Brickbutton Engineering
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 4.2.6
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.2.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ description: |
56
+ Scoby is a tool for quickly generating a Rails application preconfigured with
57
+ the tools commonly used by Brickbutton. It owes a huge debt to thoughtbot's
58
+ Suspenders.
59
+ email: brickbutton@aol.com
60
+ executables:
61
+ - scoby
62
+ extensions: []
63
+ extra_rdoc_files:
64
+ - README.md
65
+ files:
66
+ - ".ruby-version"
67
+ - Gemfile
68
+ - Gemfile.lock
69
+ - README.md
70
+ - bin/scoby
71
+ - lib/scoby.rb
72
+ - lib/scoby/actions.rb
73
+ - lib/scoby/app_builder.rb
74
+ - lib/scoby/generators/app_generator.rb
75
+ - lib/scoby/version.rb
76
+ - scoby.gemspec
77
+ - templates/Gemfile.erb
78
+ - templates/action_mailer_rspec.rb
79
+ - templates/database_cleaner_rspec.rb
80
+ - templates/dotfiles/.env
81
+ - templates/factory_girl_rspec.rb
82
+ - templates/rails_helper.rb
83
+ - templates/shoulda_matchers_rspec.rb
84
+ - templates/simple_cov_rspec.rb
85
+ - templates/spec_helper.rb
86
+ homepage: https://github.com/brickbutton/scoby
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options:
92
+ - "--charset=UTF-8"
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 2.3.0
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.5.1
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Generate a Rails app using Brickbutton's best practices.
111
+ test_files: []