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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 915b0a48e339f834e9ae19763caa61cb68a19b58
4
- data.tar.gz: dab1ee0d87653e8f75940fe8a21dcd86526570f5
3
+ metadata.gz: e094b4fad7aaec458ffb7fc5af7b3a639737154c
4
+ data.tar.gz: 67a01738c4c1455dcee511ebfb743f1e37d24466
5
5
  SHA512:
6
- metadata.gz: 0c797e1cee89d1ae8d98a53aae60ac84c6909bfaf8123f344e2e56d8b6d95a27973cc6fd76a8ee7eb57cb0aed794eb6868507d38bedaad96c8a1ce81022513d7
7
- data.tar.gz: 0f094302cab28458ffe37c4c13a7303625c139c1403eb411aad622146166344c3bce9ac1c05ebfd349002dc0392e62a9157f391e38c77a3bcefde1a4075f119e
6
+ metadata.gz: 9d1430a6fd2045c64d4c172c8b0c795ec471ab40aed1474d2df4e74943276158bac862e9d4f57d82e46b8678d2deff4f59fbdaf767d0aff47b26082be85e5b12
7
+ data.tar.gz: 0f41807dc776ecee3f6210a265cf88357640faaf318345c099723c785829a29d93ec6ee3b2ea276516b14332c203798e2975145ec0da33d08b72554e67250770
@@ -432,7 +432,7 @@ WARNING
432
432
  #
433
433
  def run_bundler
434
434
  say 'Bundling application dependencies using bundler...', :yellow
435
- in_root { run 'bundle install' }
435
+ in_root { run 'bundle install --binstubs' }
436
436
  end
437
437
 
438
438
  ##
@@ -79,7 +79,7 @@ describe "!NAME!" do
79
79
  end
80
80
 
81
81
  it "should return nil" do
82
- assert_equal nil, helpers.foo
82
+ assert_nil helpers.foo
83
83
  end
84
84
  end
85
85
  TEST
@@ -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/(\w+-\w+)_plugin.rb}).uniq
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("bin/#{name}")
67
- File.chmod(0755, destination_root("bin/#{name}"))
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{^bin/}).map{ |f| File.basename(f) }
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.symbolize_keys
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.symbolize_keys
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
@@ -10,6 +10,7 @@ require 'padrino-mailer'
10
10
  require 'padrino-helpers'
11
11
 
12
12
  require 'ext/minitest-spec'
13
+ require 'ext/fakeweb-ruby24'
13
14
 
14
15
  Padrino::Generators.load_components!
15
16
 
@@ -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/bin/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.rc1
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: 2016-11-02 00:00:00.000000000 Z
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.rc1
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.rc1
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.rc1
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.rc1
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.rc1
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.rc1
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