projecto 0.2.0 → 0.2.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 +4 -4
- data/Gemfile.lock +1 -1
- data/gem_builds/projecto-0.2.1.gem +0 -0
- data/lib/projecto/app_builder.rb +7 -0
- data/lib/projecto/generators/app_generator.rb +3 -0
- data/lib/projecto/version.rb +1 -1
- data/templates/rspec/rails_helper +19 -0
- data/templates/rspec/spec_helper +11 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f7b25a09f9e6430f7a26c7f36dd8879ebf0693667da4a3fc165bcd12027ba85
|
4
|
+
data.tar.gz: dc79193dea731428ea048798abbace181d9586015295c8e7b24c92f566503499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c91fb9d26b80b39900e5471cd896393448758dc861ebeabb1145b8b34d53dd3980361402c3d4c57e84def96ac074d67896763a848635773f85af50490254c2
|
7
|
+
data.tar.gz: 7ffd1798c683e05910f3961eb3677280f897e49b348db4caa5ce7bc7184ff14576395458f3b145b5f0c9aa0add2f2083d529dc592db2594af04ed19ebab4f1dd
|
data/Gemfile.lock
CHANGED
Binary file
|
data/lib/projecto/app_builder.rb
CHANGED
@@ -7,5 +7,12 @@ module Projecto
|
|
7
7
|
def gemfile
|
8
8
|
template "Gemfile.erb", "Gemfile"
|
9
9
|
end
|
10
|
+
|
11
|
+
# Test environment for projecto
|
12
|
+
def setup_rspec
|
13
|
+
create_file ".rspec", "--require rails_helper\n", force: true
|
14
|
+
template "rspec/rails_helper", "spec/rails_helper.rb", force: true
|
15
|
+
template "rspec/spec_helper", "spec/spec_helper.rb", force: true
|
16
|
+
end
|
10
17
|
end
|
11
18
|
end
|
@@ -6,6 +6,8 @@ module Projecto
|
|
6
6
|
class_option :database, type: :string, aliases: "-d", default: "postgresql",
|
7
7
|
desc: "Configure for selected database (options: #{DATABASES.join('/')})"
|
8
8
|
|
9
|
+
class_option :skip_bootsnap, type: :boolean, default: true,
|
10
|
+
desc: "Skip bootsnap gem"
|
9
11
|
class_option :skip_turbolinks, type: :boolean, default: false,
|
10
12
|
desc: "Skip turbolinks gem"
|
11
13
|
class_option :skip_webpack_install, type: :boolean, default: true,
|
@@ -17,6 +19,7 @@ module Projecto
|
|
17
19
|
|
18
20
|
def projecto_customizations
|
19
21
|
build :set_ruby_version
|
22
|
+
build :setup_rspec
|
20
23
|
end
|
21
24
|
|
22
25
|
protected
|
data/lib/projecto/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
ENV['RAILS_ENV'] ||= 'test'
|
3
|
+
require File.expand_path('../config/environment', __dir__)
|
4
|
+
|
5
|
+
require 'rspec/rails'
|
6
|
+
|
7
|
+
Dir[File.join(Projecto.root, "/spec/support/**/*.rb")].each { |f| require f }
|
8
|
+
|
9
|
+
begin
|
10
|
+
ActiveRecord::Migration.maintain_test_schema!
|
11
|
+
rescue ActiveRecord::PendingMigrationError => e
|
12
|
+
puts e.to_s.strip
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
RSpec.configure do |config|
|
16
|
+
config.use_transactional_fixtures = true
|
17
|
+
config.infer_spec_type_from_file_location!
|
18
|
+
config.filter_rails_from_backtrace!
|
19
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.expect_with :rspec do |expectations|
|
3
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
4
|
+
end
|
5
|
+
|
6
|
+
config.mock_with :rspec do |mocks|
|
7
|
+
mocks.verify_partial_doubles = true
|
8
|
+
end
|
9
|
+
|
10
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
11
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: projecto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anto Dominic
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- gem_builds/projecto-0.1.1.gem
|
149
149
|
- gem_builds/projecto-0.1.2.gem
|
150
150
|
- gem_builds/projecto-0.2.0.gem
|
151
|
+
- gem_builds/projecto-0.2.1.gem
|
151
152
|
- lib/projecto.rb
|
152
153
|
- lib/projecto/Rakefile
|
153
154
|
- lib/projecto/app_builder.rb
|
@@ -164,6 +165,8 @@ files:
|
|
164
165
|
- spec/support/capybara.rb
|
165
166
|
- spec/support/test_helper.rb
|
166
167
|
- templates/Gemfile.erb
|
168
|
+
- templates/rspec/rails_helper
|
169
|
+
- templates/rspec/spec_helper
|
167
170
|
homepage: https://web-examiner.herokuapp.com
|
168
171
|
licenses:
|
169
172
|
- MIT
|