pluginizer 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b72a9602e21d1105a07a6d87f2efe4405c5d282
4
- data.tar.gz: 20e29315043517ea1a6013113bbaf83346ccfdd8
3
+ metadata.gz: fe7cc066e247c20bb5055d011f789a9ca0927c17
4
+ data.tar.gz: 96eb5c01346070035854025e30efc39be6dc4cac
5
5
  SHA512:
6
- metadata.gz: 6c265c4a34d76eceff2036ce531a400682d46d7b433de31d96b515fc4b41ded074561e94af4d144f384bab51300d4fb581df63e49830c3c19d1d99d0798b42c4
7
- data.tar.gz: 331b007fca953afbbfcc4e7a784c8cfed1b1712d0dd6c9914de6265ac71e3f5d098bb7028cf86795be31f2cdff27957d0ad17d485ad03d34cd3910305e7e1eeb
6
+ metadata.gz: 677beb57eea3ae19c1893dbce6214d0744960d79bfa5cc8025bbfb3323277da908d0e6136a6c097bc3f1b4e45e2733003180e93ec8222101f9e263952be592ab
7
+ data.tar.gz: b0691938dcc057e61dff0d76b1cb64d1e37c389e44369276a1fcb51f3684436e3241a39db3186e4590719ea4b522952258166d33399ac1f6116f6f9285be9655
@@ -3,6 +3,9 @@ require 'rails/generators/rails/plugin/plugin_generator'
3
3
 
4
4
  module Pluginizer
5
5
  class PluginGenerator < Rails::Generators::PluginGenerator
6
+ class_option :dummy_path, type: :string, default: "spec/dummy",
7
+ desc: "Create dummy application at given path"
8
+
6
9
  class_option :full, type: :boolean, default: true,
7
10
  desc: "Generate a rails engine with bundled Rails application for testing"
8
11
 
@@ -21,11 +21,23 @@ module Pluginizer
21
21
 
22
22
  after_bundle do
23
23
  in_root do
24
+ configure_rspec
25
+
24
26
  git :init
25
27
  git add: '.'
26
28
  git commit: "-m 'first commit'"
27
29
  end
28
30
  end
29
31
  end
32
+
33
+ private
34
+
35
+ def configure_rspec
36
+ invoke('rspec:install')
37
+
38
+ gsub_file 'spec/rails_helper.rb',
39
+ "require File.expand_path('../../config/environment', __FILE__)",
40
+ "require File.expand_path('../dummy/config/environment', __FILE__)"
41
+ end
30
42
  end
31
43
  end
@@ -1,3 +1,3 @@
1
1
  module Pluginizer
2
- VERSION = "0.0.10"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -15,10 +15,12 @@ Gem::Specification.new do |s|
15
15
  s.license = "MIT"
16
16
 
17
17
  s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
18
+ s.test_files = Dir["spec/**/*"]
18
19
 
19
20
  <%= '# ' if options.dev? || options.edge? -%>s.add_dependency "rails", "~> 5.0"
20
21
  <% unless options[:skip_active_record] -%>
21
22
 
22
23
  s.add_development_dependency "<%= gem_for_database[0] %>"
23
24
  <% end -%>
25
+ s.add_development_dependency 'rspec-rails', '~> 3.5'
24
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluginizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrice Lebel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-24 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -111,3 +111,4 @@ signing_key:
111
111
  specification_version: 4
112
112
  summary: Plugin Boilerplate Builder
113
113
  test_files: []
114
+ has_rdoc: