padrino-gen 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/test/helper.rb +13 -0
- data/test/test_plugin_generator.rb +4 -0
- metadata +31 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5960d1b173b537e1795982c50689f15313cc50f
|
4
|
+
data.tar.gz: 7798b5275a9480d8b77d44dc8301fe301d92cf2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9ea00bcf3bcfc4fdef5810209cf74a5f27b1d915fe0b6f1f242513b26f7a51304d60e56e00ff4af3ce401b9de685438d95d94558d261ae46b4d8a9dfd585556
|
7
|
+
data.tar.gz: 7e4266768975bdb6c23a865352754fede9f0e0917c5ebab132b173f5c235f37c3c2489b16d6b10fc0808d4642c54bc8b86141ec4cb65c7e619adf831155fbaf6
|
data/test/helper.rb
CHANGED
@@ -14,6 +14,19 @@ require 'padrino-helpers'
|
|
14
14
|
|
15
15
|
Padrino::Generators.load_components!
|
16
16
|
|
17
|
+
# register fake URL to avoid downloading static files every time tests run
|
18
|
+
fake_uri_base = "https://raw.github.com/padrino/padrino-static/master/"
|
19
|
+
%W[
|
20
|
+
js/dojo.js ujs/dojo.js
|
21
|
+
js/ext.js ujs/ext.js
|
22
|
+
js/jquery.js ujs/jquery.js
|
23
|
+
js/mootools.js ujs/mootools.js
|
24
|
+
js/right.js ujs/right.js
|
25
|
+
js/protopak.js js/lowpro.js ujs/prototype.js
|
26
|
+
].each do |suffix|
|
27
|
+
FakeWeb.register_uri(:get, fake_uri_base + suffix, :body => '')
|
28
|
+
end
|
29
|
+
|
17
30
|
class MiniTest::Spec
|
18
31
|
include Rack::Test::Methods
|
19
32
|
include Webrat::Methods
|
@@ -54,6 +54,7 @@ describe "PluginGenerator" do
|
|
54
54
|
|
55
55
|
it 'should resolve generic url properly' do
|
56
56
|
template_file = 'http://www.example.com/test.rb'
|
57
|
+
FakeWeb.register_uri :get, template_file, :body => ''
|
57
58
|
project_gen = Padrino::Generators::Project.new(['sample_project'], ["-p=#{template_file}", "-r=#{@apptmp}"], {})
|
58
59
|
project_gen.expects(:apply).with(template_file).returns(true).once
|
59
60
|
capture_io { project_gen.invoke_all }
|
@@ -71,6 +72,7 @@ describe "PluginGenerator" do
|
|
71
72
|
it 'should resolve official template' do
|
72
73
|
template_file = 'sampleblog'
|
73
74
|
resolved_path = "https://raw.github.com/padrino/padrino-recipes/master/templates/sampleblog_template.rb"
|
75
|
+
FakeWeb.register_uri :get, resolved_path, :body => template_file
|
74
76
|
project_gen = Padrino::Generators::Project.new(['sample_project'], ["-p=#{template_file}", "-r=#{@apptmp}"], {})
|
75
77
|
project_gen.expects(:apply).with(resolved_path).returns(true).once
|
76
78
|
capture_io { project_gen.invoke_all }
|
@@ -86,6 +88,7 @@ describe "PluginGenerator" do
|
|
86
88
|
it 'should resolve official plugin' do
|
87
89
|
template_file = 'hoptoad'
|
88
90
|
resolved_path = "https://raw.github.com/padrino/padrino-recipes/master/plugins/hoptoad_plugin.rb"
|
91
|
+
FakeWeb.register_uri :get, resolved_path, :body => template_file
|
89
92
|
plugin_gen = Padrino::Generators::Plugin.new([ template_file], ["-r=#{@apptmp}/sample_project"],{})
|
90
93
|
plugin_gen.expects(:in_app_root?).returns(true).once
|
91
94
|
plugin_gen.expects(:apply).with(resolved_path).returns(true).once
|
@@ -95,6 +98,7 @@ describe "PluginGenerator" do
|
|
95
98
|
it 'should print a warning if template cannot be found' do
|
96
99
|
template_file = 'hwat'
|
97
100
|
resolved_path = "https://raw.github.com/padrino/padrino-recipes/master/plugins/hwat_plugin.rb"
|
101
|
+
FakeWeb.register_uri :get, resolved_path, :status => 404
|
98
102
|
plugin_gen = Padrino::Generators::Plugin.new([ template_file], ["-r=#{@apptmp}/sample_project"],{})
|
99
103
|
plugin_gen.expects(:in_app_root?).returns(true).once
|
100
104
|
plugin_gen.expects(:say).with("The template at #{resolved_path} could not be found!", :red).returns(true).once
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-core
|
@@ -19,26 +19,26 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.12.
|
22
|
+
version: 0.12.6
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.12.
|
29
|
+
version: 0.12.6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bundler
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - ~>
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '1.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '1.0'
|
44
44
|
- !ruby/object:Gem::Dependency
|
@@ -47,28 +47,28 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.12.
|
50
|
+
version: 0.12.6
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.12.
|
57
|
+
version: 0.12.6
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: padrino-mailer
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - '='
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.12.
|
64
|
+
version: 0.12.6
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - '='
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.12.
|
71
|
+
version: 0.12.6
|
72
72
|
description: Generators for easily creating and building padrino applications from
|
73
73
|
the console
|
74
74
|
email: padrinorb@gmail.com
|
@@ -78,9 +78,9 @@ extensions: []
|
|
78
78
|
extra_rdoc_files:
|
79
79
|
- README.rdoc
|
80
80
|
files:
|
81
|
-
- .document
|
82
|
-
- .gitignore
|
83
|
-
- .yardopts
|
81
|
+
- ".document"
|
82
|
+
- ".gitignore"
|
83
|
+
- ".yardopts"
|
84
84
|
- LICENSE.txt
|
85
85
|
- README.rdoc
|
86
86
|
- Rakefile
|
@@ -154,6 +154,20 @@ files:
|
|
154
154
|
- lib/padrino-gen/generators/templates/initializer.rb.tt
|
155
155
|
- lib/padrino-gen/generators/templates/mailer.rb.tt
|
156
156
|
- lib/padrino-gen/generators/templates/project_bin.tt
|
157
|
+
- lib/padrino-gen/generators/templates/static/README.rdoc
|
158
|
+
- lib/padrino-gen/generators/templates/static/js/dojo.js
|
159
|
+
- lib/padrino-gen/generators/templates/static/js/ext.js
|
160
|
+
- lib/padrino-gen/generators/templates/static/js/jquery.js
|
161
|
+
- lib/padrino-gen/generators/templates/static/js/lowpro.js
|
162
|
+
- lib/padrino-gen/generators/templates/static/js/mootools.js
|
163
|
+
- lib/padrino-gen/generators/templates/static/js/protopak.js
|
164
|
+
- lib/padrino-gen/generators/templates/static/js/right.js
|
165
|
+
- lib/padrino-gen/generators/templates/static/ujs/dojo.js
|
166
|
+
- lib/padrino-gen/generators/templates/static/ujs/ext.js
|
167
|
+
- lib/padrino-gen/generators/templates/static/ujs/jquery.js
|
168
|
+
- lib/padrino-gen/generators/templates/static/ujs/mootools.js
|
169
|
+
- lib/padrino-gen/generators/templates/static/ujs/prototype.js
|
170
|
+
- lib/padrino-gen/generators/templates/static/ujs/right.js
|
157
171
|
- lib/padrino-gen/generators/templates/task.rb.tt
|
158
172
|
- lib/padrino-gen/padrino-tasks/activerecord.rb
|
159
173
|
- lib/padrino-gen/padrino-tasks/database.rb
|
@@ -182,42 +196,28 @@ files:
|
|
182
196
|
- test/test_plugin_generator.rb
|
183
197
|
- test/test_project_generator.rb
|
184
198
|
- test/test_task_generator.rb
|
185
|
-
- lib/padrino-gen/generators/templates/static/js/dojo.js
|
186
|
-
- lib/padrino-gen/generators/templates/static/js/ext.js
|
187
|
-
- lib/padrino-gen/generators/templates/static/js/jquery.js
|
188
|
-
- lib/padrino-gen/generators/templates/static/js/lowpro.js
|
189
|
-
- lib/padrino-gen/generators/templates/static/js/mootools.js
|
190
|
-
- lib/padrino-gen/generators/templates/static/js/protopak.js
|
191
|
-
- lib/padrino-gen/generators/templates/static/js/right.js
|
192
|
-
- lib/padrino-gen/generators/templates/static/README.rdoc
|
193
|
-
- lib/padrino-gen/generators/templates/static/ujs/dojo.js
|
194
|
-
- lib/padrino-gen/generators/templates/static/ujs/ext.js
|
195
|
-
- lib/padrino-gen/generators/templates/static/ujs/jquery.js
|
196
|
-
- lib/padrino-gen/generators/templates/static/ujs/mootools.js
|
197
|
-
- lib/padrino-gen/generators/templates/static/ujs/prototype.js
|
198
|
-
- lib/padrino-gen/generators/templates/static/ujs/right.js
|
199
199
|
homepage: http://www.padrinorb.com
|
200
200
|
licenses:
|
201
201
|
- MIT
|
202
202
|
metadata: {}
|
203
203
|
post_install_message:
|
204
204
|
rdoc_options:
|
205
|
-
- --charset=UTF-8
|
205
|
+
- "--charset=UTF-8"
|
206
206
|
require_paths:
|
207
207
|
- lib
|
208
208
|
required_ruby_version: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
|
-
- -
|
210
|
+
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
212
|
version: '0'
|
213
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
|
-
- -
|
215
|
+
- - ">="
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: 1.3.6
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project: padrino-gen
|
220
|
-
rubygems_version: 2.
|
220
|
+
rubygems_version: 2.4.8
|
221
221
|
signing_key:
|
222
222
|
specification_version: 4
|
223
223
|
summary: Generators for easily creating and building padrino applications
|