padrino-gen 0.14.0.rc1 → 0.14.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-gen/generators/actions.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/minitest.rb +1 -1
- data/lib/padrino-gen/generators/plugin.rb +1 -1
- data/lib/padrino-gen/generators/project.rb +5 -2
- data/lib/padrino-gen/generators/templates/gem/gemspec.tt +2 -1
- data/lib/padrino-gen/padrino-tasks/datamapper.rb +2 -2
- data/test/helper.rb +1 -0
- data/test/test_project_generator.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e094b4fad7aaec458ffb7fc5af7b3a639737154c
|
4
|
+
data.tar.gz: 67a01738c4c1455dcee511ebfb743f1e37d24466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d1430a6fd2045c64d4c172c8b0c795ec471ab40aed1474d2df4e74943276158bac862e9d4f57d82e46b8678d2deff4f59fbdaf767d0aff47b26082be85e5b12
|
7
|
+
data.tar.gz: 0f41807dc776ecee3f6210a265cf88357640faaf318345c099723c785829a29d93ec6ee3b2ea276516b14332c203798e2975145ec0da33d08b72554e67250770
|
@@ -55,7 +55,7 @@ module Padrino
|
|
55
55
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
56
56
|
http.start do
|
57
57
|
http.request_get(uri.path) do |res|
|
58
|
-
plugins = res.body.scan(%r{/plugins/(
|
58
|
+
plugins = res.body.scan(%r{/plugins/([-\w]+)_plugin.rb}).flatten.uniq
|
59
59
|
end
|
60
60
|
end
|
61
61
|
say "Available plugins:", :green
|
@@ -47,6 +47,9 @@ module Padrino
|
|
47
47
|
app = (options[:app] || "App")
|
48
48
|
|
49
49
|
@project_name = name.gsub(/\W/, '_').underscore.camelize
|
50
|
+
|
51
|
+
fail "Constant `#{@project_name}` already exists. Please, use another name" if already_exists?(@project_name)
|
52
|
+
|
50
53
|
@app_name = app.gsub(/\W/, '_').camelize
|
51
54
|
self.destination_root = File.join(options[:root], name)
|
52
55
|
if options[:template]
|
@@ -63,8 +66,8 @@ module Padrino
|
|
63
66
|
end
|
64
67
|
template 'templates/Gemfile.tt', destination_root('Gemfile')
|
65
68
|
template 'templates/Rakefile.tt', destination_root('Rakefile')
|
66
|
-
template 'templates/project_bin.tt', destination_root("
|
67
|
-
File.chmod(0755, destination_root("
|
69
|
+
template 'templates/project_bin.tt', destination_root("exe/#{name}")
|
70
|
+
File.chmod(0755, destination_root("exe/#{name}"))
|
68
71
|
if options.gem?
|
69
72
|
template 'templates/gem/gemspec.tt', destination_root(name + '.gemspec')
|
70
73
|
template 'templates/gem/README.md.tt', destination_root('README.md')
|
@@ -8,8 +8,9 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.summary = %q{TODO: Write a gem summary}
|
9
9
|
gem.homepage = ""
|
10
10
|
|
11
|
+
gem.bindir = "exe"
|
11
12
|
gem.files = `git ls-files`.split($\)
|
12
|
-
gem.executables = gem.files.grep(%r{^
|
13
|
+
gem.executables = gem.files.grep(%r{^exe/}).map{ |f| File.basename(f) }
|
13
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
15
|
gem.name = <%= name.downcase.inspect %>
|
15
16
|
gem.require_paths = ["lib", "app"]
|
@@ -50,7 +50,7 @@ if PadrinoTasks.load?(:datamapper, defined?(DataMapper))
|
|
50
50
|
|
51
51
|
desc "Create the database"
|
52
52
|
task :create => :environment do
|
53
|
-
config = DataMapper.repository.adapter.options
|
53
|
+
config = Utils.symbolize_keys(DataMapper.repository.adapter.options)
|
54
54
|
adapter = config[:adapter]
|
55
55
|
user, password, host = config[:user], config[:password], config[:host]
|
56
56
|
|
@@ -67,7 +67,7 @@ if PadrinoTasks.load?(:datamapper, defined?(DataMapper))
|
|
67
67
|
|
68
68
|
desc "Drop the database (postgres and mysql only)"
|
69
69
|
task :drop => :environment do
|
70
|
-
config = DataMapper.repository.adapter.options
|
70
|
+
config = Utils.symbolize_keys(DataMapper.repository.adapter.options)
|
71
71
|
adapter = config[:adapter]
|
72
72
|
user, password, host = config[:user], config[:password], config[:host]
|
73
73
|
|
data/test/helper.rb
CHANGED
@@ -20,7 +20,7 @@ describe "ProjectGenerator" do
|
|
20
20
|
assert_match_in_file("Padrino.mount('SampleProject::App', :app_file => Padrino.root('app/app.rb')).to('/')", "#{@apptmp}/sample_project/config/apps.rb")
|
21
21
|
assert_file_exists("#{@apptmp}/sample_project/config/boot.rb")
|
22
22
|
assert_file_exists("#{@apptmp}/sample_project/Rakefile")
|
23
|
-
assert_file_exists("#{@apptmp}/sample_project/
|
23
|
+
assert_file_exists("#{@apptmp}/sample_project/exe/sample_project")
|
24
24
|
assert_file_exists("#{@apptmp}/sample_project/public/favicon.ico")
|
25
25
|
assert_dir_exists("#{@apptmp}/sample_project/public/images")
|
26
26
|
assert_dir_exists("#{@apptmp}/sample_project/public/javascripts")
|
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.14.0.
|
4
|
+
version: 0.14.0.rc2
|
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: 2017-01-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-core
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.14.0.
|
22
|
+
version: 0.14.0.rc2
|
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.14.0.
|
29
|
+
version: 0.14.0.rc2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bundler
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,28 +47,28 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.14.0.
|
50
|
+
version: 0.14.0.rc2
|
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.14.0.
|
57
|
+
version: 0.14.0.rc2
|
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.14.0.
|
64
|
+
version: 0.14.0.rc2
|
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.14.0.
|
71
|
+
version: 0.14.0.rc2
|
72
72
|
description: Generators for easily creating and building padrino applications from
|
73
73
|
the console
|
74
74
|
email: padrinorb@gmail.com
|