pluginizer 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pluginizer/plugin_builder.rb +24 -21
- data/lib/pluginizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe77ffb23247717812c6aba71a79692c1303345e
|
4
|
+
data.tar.gz: e025fc083b0d282b09dda79c90926bd5f0b56c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc4c276ec7d78e050de3de983db0dc4c5b8497553217384029747bd51675d670b0b5abcd3b3a3ebf43ebe7140f848c3de454a1e5e1a01c3c17e9a853b766b352
|
7
|
+
data.tar.gz: af2627537210dff2bd6e7e6f58918accb188b917ff9daa5d96353bb0eb1291682f5d384f74dd9f485b46d1b1d2c53672688934f0f787d07c63cadd9a587c4c28
|
@@ -13,6 +13,7 @@ module Pluginizer
|
|
13
13
|
|
14
14
|
after_bundle do
|
15
15
|
in_root do
|
16
|
+
configure_database_yml if options.database == 'postgresql'
|
16
17
|
configure_rspec
|
17
18
|
|
18
19
|
git :init
|
@@ -24,6 +25,15 @@ module Pluginizer
|
|
24
25
|
|
25
26
|
private
|
26
27
|
|
28
|
+
def configure_database_yml
|
29
|
+
insert_into_file 'spec/dummy/config/database.yml', <<-END.strip_heredoc.indent(2), after: "encoding: unicode"
|
30
|
+
|
31
|
+
host: 127.0.0.1
|
32
|
+
username: postgres
|
33
|
+
password: postgres
|
34
|
+
END
|
35
|
+
end
|
36
|
+
|
27
37
|
def configure_rspec
|
28
38
|
invoke('rspec:install')
|
29
39
|
rails_helper = 'spec/rails_helper.rb'
|
@@ -37,25 +47,22 @@ module Pluginizer
|
|
37
47
|
|
38
48
|
run "bundle binstubs rspec-core"
|
39
49
|
|
40
|
-
requires = %w[
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
insert_into_file rails_helper,
|
48
|
-
|
49
|
-
|
50
|
-
cache = <<-CACHE.strip_heredoc.indent(2)
|
50
|
+
requires = %w[
|
51
|
+
fantaskspec
|
52
|
+
email_spec
|
53
|
+
email_spec/rspec
|
54
|
+
].map{ |file| "require '#{file}'" }.join("\n")
|
55
|
+
insert_into_file rails_helper, "\n#{requires}\n", after: "# Add additional requires below this line. Rails is not loaded until this point!"
|
56
|
+
|
57
|
+
insert_into_file rails_helper, "\n config.infer_rake_task_specs_from_file_location!\n", before: /^end/
|
58
|
+
insert_into_file rails_helper, "\n config.render_views\n", before: /^end/
|
59
|
+
insert_into_file rails_helper, <<-END.strip_heredoc.indent(2), before: /^end/
|
51
60
|
|
52
61
|
config.before(:each) do
|
53
62
|
Rails.cache.clear
|
54
63
|
end
|
55
|
-
|
56
|
-
insert_into_file rails_helper,
|
57
|
-
before: /^end/
|
58
|
-
shoulda = <<-SHOULDA.strip_heredoc.indent(2)
|
64
|
+
END
|
65
|
+
insert_into_file rails_helper, <<-END.strip_heredoc.indent(2), before: /^end/
|
59
66
|
|
60
67
|
Shoulda::Matchers.configure do |config|
|
61
68
|
config.integrate do |with|
|
@@ -63,12 +70,8 @@ module Pluginizer
|
|
63
70
|
with.library :rails
|
64
71
|
end
|
65
72
|
end
|
66
|
-
|
67
|
-
insert_into_file rails_helper,
|
68
|
-
before: /^end/
|
69
|
-
insert_into_file rails_helper,
|
70
|
-
"\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n",
|
71
|
-
before: /^end/
|
73
|
+
END
|
74
|
+
insert_into_file rails_helper, "\n config.include(Shoulda::Callback::Matchers::ActiveModel)\n", before: /^end/
|
72
75
|
end
|
73
76
|
end
|
74
77
|
end
|
data/lib/pluginizer/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.7
|
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-10-
|
11
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|