udn 0.3.23.4 → 0.3.23.5

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.
Files changed (3) hide show
  1. data/lib/cli/frameworks.rb +14 -3
  2. data/lib/cli/version.rb +1 -1
  3. metadata +19 -2
@@ -6,7 +6,8 @@ module VMC::Cli
6
6
  DEFAULT_MEM = '256M'
7
7
 
8
8
  FRAMEWORKS = {
9
- 'Rails' => ['rails3', { :mem => '256M', :description => 'Rails Application', :console=>true}],
9
+ 'Rails' => ['rails3', { :mem => '256M', :description => 'Rails3 Application', :console=>true}],
10
+ 'Rails4' => ['rails4', { :mem => '256M', :description => 'Rails4 Application', :console=>true}],
10
11
  'Spring' => ['spring', { :mem => '512M', :description => 'Java SpringSource Spring Application'}],
11
12
  'Grails' => ['grails', { :mem => '512M', :description => 'Java SpringSource Grails Application'}],
12
13
  'Lift' => ['lift', { :mem => '512M', :description => 'Scala Lift Application'}],
@@ -65,9 +66,19 @@ module VMC::Cli
65
66
  end
66
67
  end
67
68
  Dir.chdir(path) do
68
- # Rails
69
+ # Rails4 or Other Rails
69
70
  if File.exist?('config/environment.rb')
70
- return Framework.lookup('Rails')
71
+ if File.exist?('Gemfile')
72
+ flag = false
73
+ File::open('Gemfile') {|f|
74
+ f.each {|line| flag = true if line =~ /.*gem *["']rails["'] *, *["'][<>=~ ]*4.*["']/ }
75
+ }
76
+ if flag
77
+ return Framework.lookup('Rails4')
78
+ else
79
+ return Framework.lookup('Rails')
80
+ end
81
+ end
71
82
 
72
83
  # Rack
73
84
  elsif File.exist?('config.ru') && available_frameworks.include?(["rack"])
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.23.4'
5
+ VERSION = '0.3.23.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.23.4
4
+ version: 0.3.23.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-07 00:00:00.000000000 Z
12
+ date: 2014-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -151,6 +151,22 @@ dependencies:
151
151
  - - ~>
152
152
  - !ruby/object:Gem::Version
153
153
  version: 0.4.2
154
+ - !ruby/object:Gem::Dependency
155
+ name: mime-types
156
+ requirement: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - '='
160
+ - !ruby/object:Gem::Version
161
+ version: '1.25'
162
+ type: :runtime
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - '='
168
+ - !ruby/object:Gem::Version
169
+ version: '1.25'
154
170
  - !ruby/object:Gem::Dependency
155
171
  name: rake
156
172
  requirement: !ruby/object:Gem::Requirement
@@ -307,3 +323,4 @@ signing_key:
307
323
  specification_version: 3
308
324
  summary: Client library and CLI for Cloudn PaaS
309
325
  test_files: []
326
+ has_rdoc: