pluginizer 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fea62e1c1c0b028eaa053a312f3d157b1c1c7d5a
4
- data.tar.gz: 6cee422852fd54f13dbd024126fffe71a2792d06
3
+ metadata.gz: 3c12cc5abb1a107f7a886a639493d0d8215224e9
4
+ data.tar.gz: a9bb964223412cc2d25f8b60040710d9f8355da0
5
5
  SHA512:
6
- metadata.gz: fde19453c8e67e1c9829c3b88a2caf9d7548d1b8ca08a2f3c8e877d9e8d973f1de7cc51e705388dbe9ccc6f0323ffa72391e492846874c498f6302d0ae679300
7
- data.tar.gz: 02b45f61cd766fc8332f3c1b511fbb8e57568069e49364f6c17c37595bd5aa001bb01a99ea7d62009105b8f7cda670475b8b6568bbd59e2f16d8c1baf396d8bc
6
+ metadata.gz: a62059e3cdf13b84daacb04c57869d1da1169d32a333021255f3648b9556362cd27a44c7d795d27e772a9326ed1f5191a70e5c57797f9856cd7208ceb43f5a0c
7
+ data.tar.gz: 8944d9b7bf193140b884bfd73b06298c7548a75312fe9759c6eaef95bfc2988b520b5edd76ff9cb743b47a57e3daf4e59d69c4afb37a17736c0f70d638f620dd
@@ -1,6 +1,7 @@
1
1
  require "pluginizer/version"
2
2
  require "pluginizer/generators/plugin_generator"
3
3
  require "pluginizer/plugin_builder"
4
+ require 'rails/all'
4
5
  require 'active_support/all'
5
6
 
6
7
  module Pluginizer
@@ -34,15 +34,26 @@ module Pluginizer
34
34
 
35
35
  def configure_rspec
36
36
  invoke('rspec:install')
37
+ rails_helper = 'spec/rails_helper.rb'
37
38
 
38
- gsub_file 'spec/rails_helper.rb',
39
+ gsub_file rails_helper,
39
40
  "require File.expand_path('../../config/environment', __FILE__)",
40
41
  "require File.expand_path('../dummy/config/environment', __FILE__)"
42
+ gsub_file rails_helper,
43
+ %{config.fixture_path = "\#{::Rails.root}/spec/fixtures"},
44
+ %{config.fixture_path = "\#{#{camelized}::Engine.root}/spec/fixtures"}
41
45
 
42
46
  run "bundle binstubs rspec-core"
43
47
 
44
- insert_into_file 'spec/rails_helper.rb', "\nrequire 'fantaskspec'\n", after: "# Add additional requires below this line. Rails is not loaded until this point!"
45
- insert_into_file 'spec/rails_helper.rb', "\n config.infer_rake_task_specs_from_file_location!\n", before: /^end/
48
+ insert_into_file rails_helper,
49
+ "\nrequire 'fantaskspec'\n",
50
+ after: "# Add additional requires below this line. Rails is not loaded until this point!"
51
+ insert_into_file rails_helper,
52
+ "\n config.infer_rake_task_specs_from_file_location!\n",
53
+ before: /^end/
54
+ insert_into_file rails_helper,
55
+ "\n config.render_views\n",
56
+ before: /^end/
46
57
  shoulda = <<-SHOULDA.strip_heredoc.indent(2)
47
58
 
48
59
  Shoulda::Matchers.configure do |config|
@@ -52,7 +63,10 @@ module Pluginizer
52
63
  end
53
64
  end
54
65
  SHOULDA
55
- insert_into_file 'spec/rails_helper.rb', shoulda, before: /^end/
66
+ insert_into_file rails_helper, shoulda, before: /^end/
67
+ insert_into_file rails_helper,
68
+ "\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n",
69
+ before: /^end/
56
70
  end
57
71
  end
58
72
  end
@@ -1,3 +1,3 @@
1
1
  module Pluginizer
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency 'rspec-rails', '~> 3.5'
26
26
  s.add_development_dependency 'fantaskspec', '~> 1.0'
27
27
  s.add_development_dependency 'shoulda-matchers', '~> 3.1'
28
+ s.add_development_dependency 'shoulda-callback-matchers', '~> 1.1'
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluginizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrice Lebel