ruby-app 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -1
- data/bin/ruby-app +12 -2
- data/generator/database.yml +12 -0
- data/generator/{.gitignore → project/.gitignore.tt} +1 -0
- data/generator/{Gemfile → project/Gemfile.tt} +4 -1
- data/generator/{Rakefile → project/Rakefile.tt} +1 -0
- data/generator/{app → project/app}/models/.gitkeep +0 -0
- data/generator/{bin → project/bin}/console +0 -0
- data/generator/{bin → project/bin}/example +0 -0
- data/generator/{config → project/config}/boot.rb +0 -0
- data/generator/{config → project/config}/config.rb +0 -0
- data/generator/{config → project/config}/environment.rb +0 -0
- data/generator/{config → project/config}/environments/development.rb +0 -0
- data/generator/{config → project/config}/environments/production.rb +0 -0
- data/generator/{config → project/config}/environments/test.rb +0 -0
- data/generator/{config → project/config}/initializers/.gitkeep +0 -0
- data/generator/{lib → project/lib}/application.rb.tt +0 -0
- data/generator/{lib → project/lib}/rake_tasks/.gitkeep +0 -0
- data/generator/{spec → project/spec}/spec1_spec.rb.tt +0 -0
- data/generator/{spec → project/spec}/spec_helper.rb +0 -0
- data/lib/ruby-app/version.rb +1 -1
- metadata +21 -20
data/README.md
CHANGED
data/bin/ruby-app
CHANGED
@@ -8,11 +8,17 @@ class RubyAppGenerator < Thor::Group
|
|
8
8
|
|
9
9
|
# Define arguments and options
|
10
10
|
argument :name
|
11
|
+
class_option :ar, :default => false
|
11
12
|
|
12
13
|
def copy_tree
|
13
|
-
directory('', "#{name}/")
|
14
|
+
directory('project', "#{name}/")
|
14
15
|
empty_directory("#{name}/log")
|
15
16
|
empty_directory("#{name}/tmp")
|
17
|
+
|
18
|
+
if ar
|
19
|
+
copy_file("database.yml", "#{name}/config/database.yml")
|
20
|
+
empty_directory("#{name}/db/migrate")
|
21
|
+
end
|
16
22
|
end
|
17
23
|
|
18
24
|
def chmod_example_bin
|
@@ -23,13 +29,17 @@ class RubyAppGenerator < Thor::Group
|
|
23
29
|
private
|
24
30
|
|
25
31
|
def self.source_root
|
26
|
-
File.join(File.dirname(__FILE__), %w{.. generator})
|
32
|
+
File.join(File.dirname(__FILE__), %w{.. generator })
|
27
33
|
end
|
28
34
|
|
29
35
|
def base_name
|
30
36
|
File.basename(name)
|
31
37
|
end
|
32
38
|
|
39
|
+
def ar
|
40
|
+
options[:ar]
|
41
|
+
end
|
42
|
+
|
33
43
|
end
|
34
44
|
|
35
45
|
RubyAppGenerator.start
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/ruby-app/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Makarchev Konstantin
|
@@ -116,23 +116,24 @@ files:
|
|
116
116
|
- README.md
|
117
117
|
- Rakefile
|
118
118
|
- bin/ruby-app
|
119
|
-
- generator
|
120
|
-
- generator/
|
121
|
-
- generator/
|
122
|
-
- generator/
|
123
|
-
- generator/
|
124
|
-
- generator/bin/
|
125
|
-
- generator/
|
126
|
-
- generator/config/
|
127
|
-
- generator/config/
|
128
|
-
- generator/config/
|
129
|
-
- generator/config/environments/
|
130
|
-
- generator/config/environments/
|
131
|
-
- generator/config/
|
132
|
-
- generator/
|
133
|
-
- generator/lib/
|
134
|
-
- generator/
|
135
|
-
- generator/spec/
|
119
|
+
- generator/database.yml
|
120
|
+
- generator/project/.gitignore.tt
|
121
|
+
- generator/project/Gemfile.tt
|
122
|
+
- generator/project/Rakefile.tt
|
123
|
+
- generator/project/app/models/.gitkeep
|
124
|
+
- generator/project/bin/console
|
125
|
+
- generator/project/bin/example
|
126
|
+
- generator/project/config/boot.rb
|
127
|
+
- generator/project/config/config.rb
|
128
|
+
- generator/project/config/environment.rb
|
129
|
+
- generator/project/config/environments/development.rb
|
130
|
+
- generator/project/config/environments/production.rb
|
131
|
+
- generator/project/config/environments/test.rb
|
132
|
+
- generator/project/config/initializers/.gitkeep
|
133
|
+
- generator/project/lib/application.rb.tt
|
134
|
+
- generator/project/lib/rake_tasks/.gitkeep
|
135
|
+
- generator/project/spec/spec1_spec.rb.tt
|
136
|
+
- generator/project/spec/spec_helper.rb
|
136
137
|
- lib/ruby-app/application.rb
|
137
138
|
- lib/ruby-app/boot.rb
|
138
139
|
- lib/ruby-app/common_config.rb
|