pluginizer 0.1.7 → 0.2.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c51edd7f2a3a846799b8f5d70dc56ff59c83d188
|
|
4
|
+
data.tar.gz: 5fa67fb93caf537fc0d1c9db4c50f340d3695fb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96483bb14471aa5d8450bc8b1e390cd1e838371a82eaf81583acf797724ddea50f32b5fcf2737d4bd95ef46bbe24f8d3f95ad94ad6eb41e58be817efa79aa63e
|
|
7
|
+
data.tar.gz: 303b7818729c20122711ce7695cafab5a1afea4f2563ead11d6e7828660ab9c3d8b77b087dc7770b89a58dc61fde2bfecf1e7046841fea8a3deb51590627ed07
|
|
@@ -12,6 +12,9 @@ module Pluginizer
|
|
|
12
12
|
class_option :ruby_version, type: :string, default: '2.3.1',
|
|
13
13
|
desc: 'Set Ruby version used'
|
|
14
14
|
|
|
15
|
+
class_option :skip_git_init, type: :boolean, default: false,
|
|
16
|
+
desc: 'Skip git repository initialization'
|
|
17
|
+
|
|
15
18
|
protected
|
|
16
19
|
|
|
17
20
|
def get_builder_class
|
|
@@ -15,10 +15,13 @@ module Pluginizer
|
|
|
15
15
|
in_root do
|
|
16
16
|
configure_database_yml if options.database == 'postgresql'
|
|
17
17
|
configure_rspec
|
|
18
|
+
configure_dummy_environments
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
unless options.skip_git? || options.skip_git_init?
|
|
21
|
+
git :init
|
|
22
|
+
git add: '.'
|
|
23
|
+
git commit: "-m 'first commit'"
|
|
24
|
+
end
|
|
22
25
|
end
|
|
23
26
|
end
|
|
24
27
|
end
|
|
@@ -52,10 +55,13 @@ module Pluginizer
|
|
|
52
55
|
email_spec
|
|
53
56
|
email_spec/rspec
|
|
54
57
|
].map{ |file| "require '#{file}'" }.join("\n")
|
|
55
|
-
insert_into_file rails_helper, "\n#{requires}\n",
|
|
58
|
+
insert_into_file rails_helper, "\n#{requires}\n",
|
|
59
|
+
after: "# Add additional requires below this line. Rails is not loaded until this point!"
|
|
56
60
|
|
|
57
|
-
insert_into_file rails_helper, "\n config.infer_rake_task_specs_from_file_location!\n",
|
|
58
|
-
|
|
61
|
+
insert_into_file rails_helper, "\n config.infer_rake_task_specs_from_file_location!\n",
|
|
62
|
+
before: /^end/
|
|
63
|
+
insert_into_file rails_helper, "\n config.render_views\n",
|
|
64
|
+
before: /^end/
|
|
59
65
|
insert_into_file rails_helper, <<-END.strip_heredoc.indent(2), before: /^end/
|
|
60
66
|
|
|
61
67
|
config.before(:each) do
|
|
@@ -71,7 +77,15 @@ module Pluginizer
|
|
|
71
77
|
end
|
|
72
78
|
end
|
|
73
79
|
END
|
|
74
|
-
insert_into_file rails_helper, "\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n",
|
|
80
|
+
insert_into_file rails_helper, "\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n",
|
|
81
|
+
before: /^end/
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def configure_dummy_environments
|
|
85
|
+
insert_into_file 'spec/dummy/config/environments/test.rb', <<-END.strip_heredoc.indent(2), before: /^end/
|
|
86
|
+
|
|
87
|
+
config.logger = ActiveSupport::Logger.new(config.paths['log'].first, 1, 5*1024*1024) # 5Mb
|
|
88
|
+
END
|
|
75
89
|
end
|
|
76
90
|
end
|
|
77
91
|
end
|
data/lib/pluginizer/version.rb
CHANGED
|
@@ -4,6 +4,7 @@ require "<%= namespaced_name %>/configuration"
|
|
|
4
4
|
class Engine < ::Rails::Engine
|
|
5
5
|
#{mountable? ? ' isolate_namespace ' + camelized_modules : ' '}
|
|
6
6
|
#{api? ? " config.generators.api_only = true" : ' '}
|
|
7
|
+
\n
|
|
7
8
|
# Initialize engine dependencies on wrapper application
|
|
8
9
|
Gem.loaded_specs["#{ name }"].dependencies.each do |d|
|
|
9
10
|
begin
|
|
@@ -12,8 +13,7 @@ require "<%= namespaced_name %>/configuration"
|
|
|
12
13
|
# Put exceptions here.
|
|
13
14
|
end
|
|
14
15
|
end
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
\n
|
|
17
17
|
# Uncomment if migrations need to be shared
|
|
18
18
|
# initializer :append_migrations do |app|
|
|
19
19
|
# unless app.root.to_s.match root.to_s
|
|
@@ -22,6 +22,12 @@ require "<%= namespaced_name %>/configuration"
|
|
|
22
22
|
# end
|
|
23
23
|
# end
|
|
24
24
|
# end
|
|
25
|
+
\n
|
|
26
|
+
config.to_prepare do
|
|
27
|
+
# Dir[Engine.root.join("{app,lib}/**/*_decorator.rb")].each do |c|
|
|
28
|
+
# require_dependency(c)
|
|
29
|
+
# end
|
|
30
|
+
end
|
|
25
31
|
end
|
|
26
32
|
rb
|
|
27
33
|
%>
|
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.
|
|
4
|
+
version: 0.2.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:
|
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -111,4 +111,3 @@ signing_key:
|
|
|
111
111
|
specification_version: 4
|
|
112
112
|
summary: Plugin Boilerplate Builder
|
|
113
113
|
test_files: []
|
|
114
|
-
has_rdoc:
|