nautilus 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nautilus/create.rb +12 -4
- data/lib/nautilus/version.rb +1 -1
- metadata +32 -54
data/lib/nautilus/create.rb
CHANGED
@@ -18,7 +18,7 @@ module Nautilus
|
|
18
18
|
|
19
19
|
def create_project!
|
20
20
|
Nautilus.run("git clone git@github.com:newtonlabs/nautilus-project.git #{project_path}")
|
21
|
-
|
21
|
+
|
22
22
|
Dir.glob("#{project_path}/**/*").each do |file|
|
23
23
|
Nautilus.search_and_replace(file, "nautilus", project_path)
|
24
24
|
Nautilus.search_and_replace(file, "Nautilus", project_path.capitalize)
|
@@ -38,13 +38,21 @@ module Nautilus
|
|
38
38
|
|
39
39
|
private
|
40
40
|
|
41
|
+
def project_name
|
42
|
+
File.basename(project_path)
|
43
|
+
end
|
44
|
+
|
41
45
|
def validate_project_name
|
42
|
-
project_name = File.basename(project_path)
|
43
46
|
unless project_name =~ /^[a-z0-9_]+$/
|
44
47
|
raise InvalidInput.new("Project name must only contain [a-z0-9_]")
|
45
48
|
end
|
46
49
|
end
|
47
50
|
|
51
|
+
def create_rvm
|
52
|
+
system("rvm gemset create #{project_name}")
|
53
|
+
File.open("#{project_path}/.rvmrc", 'w') {|f| f.write("rvm gemset use #{project_name}") }
|
54
|
+
end
|
55
|
+
|
48
56
|
def validate_project_path
|
49
57
|
base_directory = Dir.pwd
|
50
58
|
full_path = File.join(base_directory, project_path)
|
@@ -55,7 +63,7 @@ module Nautilus
|
|
55
63
|
raise InvalidInput.new("Project directory (#{project_path}) already exists")
|
56
64
|
end
|
57
65
|
end
|
58
|
-
|
66
|
+
|
59
67
|
def readme
|
60
68
|
<<-TEXT
|
61
69
|
|
@@ -67,7 +75,7 @@ module Nautilus
|
|
67
75
|
* rake db:migrate
|
68
76
|
|
69
77
|
TEXT
|
70
|
-
|
78
|
+
|
71
79
|
end
|
72
80
|
end
|
73
81
|
end
|
data/lib/nautilus/version.rb
CHANGED
metadata
CHANGED
@@ -1,47 +1,35 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: nautilus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Thomas Newton
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-02-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: rspec
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2156209080 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :development
|
34
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2156209080
|
35
25
|
description: Get developing quickly
|
36
|
-
email:
|
26
|
+
email:
|
37
27
|
- tnewton@gmail.com
|
38
|
-
executables:
|
28
|
+
executables:
|
39
29
|
- nautilus
|
40
30
|
extensions: []
|
41
|
-
|
42
31
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
32
|
+
files:
|
45
33
|
- .gitignore
|
46
34
|
- Gemfile
|
47
35
|
- README.markdown
|
@@ -53,39 +41,29 @@ files:
|
|
53
41
|
- lib/nautilus/version.rb
|
54
42
|
- nautilus.gemspec
|
55
43
|
- spec/spec_helper.rb
|
56
|
-
|
57
|
-
homepage: ""
|
44
|
+
homepage: ''
|
58
45
|
licenses: []
|
59
|
-
|
60
46
|
post_install_message:
|
61
47
|
rdoc_options: []
|
62
|
-
|
63
|
-
require_paths:
|
48
|
+
require_paths:
|
64
49
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
51
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
72
|
-
- 0
|
73
|
-
version: "0"
|
74
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
57
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
segments:
|
81
|
-
- 0
|
82
|
-
version: "0"
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
83
62
|
requirements: []
|
84
|
-
|
85
63
|
rubyforge_project: nautilus
|
86
|
-
rubygems_version: 1.
|
64
|
+
rubygems_version: 1.8.15
|
87
65
|
signing_key:
|
88
66
|
specification_version: 3
|
89
67
|
summary: Create a shell project to get started rapidly
|
90
|
-
test_files:
|
68
|
+
test_files:
|
91
69
|
- spec/spec_helper.rb
|