vedeu_cli 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -1
- data/lib/vedeu/cli/application.rb +29 -29
- data/lib/vedeu/cli/helpers.rb +10 -10
- data/lib/vedeu/cli/version.rb +1 -1
- data/lib/vedeu/cli/view.rb +12 -12
- data/vedeu_cli.gemspec +4 -4
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 458779e8041e6792549e064d5babdca2436a4d6d
|
4
|
+
data.tar.gz: fbdc956a222698a138133ae92ba80103ae9913f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7922f71b7ff9b8b97f044480b0bb6172c2ed67580f5fa8038a5638be3b26da0d80bbd0b4c886cb89917d545281a923e68b26cc096eb7ad50aa225f4ace6b779e
|
7
|
+
data.tar.gz: e9abd0bbdaeef46181a0236fc5f7468a6ce0978b003f5c5e2ab7e6fade8e0f9b9047d2cb09542cde6c6f3909fddeaa75b0cd086cbbac1c3d0aa928d86d2ee503
|
data/README.md
CHANGED
@@ -10,6 +10,21 @@ Vedeu (vee-dee-you; aka VDU) is my attempt at creating a terminal based
|
|
10
10
|
for Vedeu.
|
11
11
|
|
12
12
|
|
13
|
+
## Requirements
|
14
|
+
|
15
|
+
Patience.
|
16
|
+
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
To install Vedeu, simply:
|
21
|
+
|
22
|
+
gem install vedeu
|
23
|
+
|
24
|
+
To use Vedeu's application scaffolding, see the
|
25
|
+
[RubyDoc](http://www.rubydoc.info/gems/vedeu/file/docs/getting_started.md)
|
26
|
+
|
27
|
+
|
13
28
|
## Example
|
14
29
|
|
15
30
|
Coming soon!
|
@@ -17,7 +32,23 @@ Coming soon!
|
|
17
32
|
|
18
33
|
## Documentation & Usage
|
19
34
|
|
20
|
-
|
35
|
+
More coming soon! In the meantime...
|
36
|
+
|
37
|
+
To create a new application framework use:
|
38
|
+
|
39
|
+
vedeu new your_app_name_here
|
40
|
+
|
41
|
+
|
42
|
+
To create a new view with supporting files within your newly created
|
43
|
+
application, after moving into your application directory, use:
|
44
|
+
|
45
|
+
mv your_app_name_here
|
46
|
+
vedeu view your_view_name_here
|
47
|
+
|
48
|
+
|
49
|
+
To find out what version of Vedeu::CLI (and Vedeu) you are using, use:
|
50
|
+
|
51
|
+
vedeu version
|
21
52
|
|
22
53
|
|
23
54
|
## Development / Contributing
|
@@ -40,6 +71,7 @@ Any branch on the repository that is not `master` is probably experimental; do
|
|
40
71
|
into `master` before a release, and branches prefixed with `spike/` are me
|
41
72
|
playing with ideas.
|
42
73
|
|
74
|
+
|
43
75
|
### General contribution help
|
44
76
|
|
45
77
|
1. Fork it ([https://github.com/gavinlaking/vedeu_cli/fork](https://github.com/gavinlaking/vedeu_cli/fork))
|
@@ -52,14 +52,14 @@ module Vedeu
|
|
52
52
|
|
53
53
|
# @return [void]
|
54
54
|
def copy_application_bootstrapper
|
55
|
-
make_file(source + '/application.erb',
|
56
|
-
app_root_path + '/application.rb')
|
55
|
+
make_file(source + '/application.erb'.freeze,
|
56
|
+
app_root_path + '/application.rb'.freeze)
|
57
57
|
end
|
58
58
|
|
59
59
|
# @return [void]
|
60
60
|
def copy_application_controller
|
61
|
-
make_file(source + '/app/controllers/application_controller.erb',
|
62
|
-
app_controllers_path + 'application_controller.rb')
|
61
|
+
make_file(source + '/app/controllers/application_controller.erb'.freeze,
|
62
|
+
app_controllers_path + 'application_controller.rb'.freeze)
|
63
63
|
end
|
64
64
|
|
65
65
|
# @return [void]
|
@@ -69,30 +69,30 @@ module Vedeu
|
|
69
69
|
|
70
70
|
# @return [void]
|
71
71
|
def copy_application_helper
|
72
|
-
make_file(source + '/app/helpers/application_helper.erb',
|
73
|
-
app_helpers_path + 'application_helper.rb')
|
72
|
+
make_file(source + '/app/helpers/application_helper.erb'.freeze,
|
73
|
+
app_helpers_path + 'application_helper.rb'.freeze)
|
74
74
|
end
|
75
75
|
|
76
76
|
# @return [void]
|
77
77
|
def copy_configuration
|
78
|
-
make_file(source + '/config/configuration.erb',
|
79
|
-
app_config_path + 'configuration.rb')
|
78
|
+
make_file(source + '/config/configuration.erb'.freeze,
|
79
|
+
app_config_path + 'configuration.rb'.freeze)
|
80
80
|
end
|
81
81
|
|
82
82
|
# @return [void]
|
83
83
|
def copy_app_name
|
84
|
-
make_file(source + '/config/app_name.erb',
|
85
|
-
app_config_path + 'app_name')
|
84
|
+
make_file(source + '/config/app_name.erb'.freeze,
|
85
|
+
app_config_path + 'app_name'.freeze)
|
86
86
|
end
|
87
87
|
|
88
88
|
# @return [void]
|
89
89
|
def copy_app_root_files
|
90
90
|
[
|
91
|
-
'/Gemfile',
|
92
|
-
'/.gitignore',
|
93
|
-
'/LICENSE.txt',
|
94
|
-
'/README.md',
|
95
|
-
'/.ruby-version',
|
91
|
+
'/Gemfile'.freeze,
|
92
|
+
'/.gitignore'.freeze,
|
93
|
+
'/LICENSE.txt'.freeze,
|
94
|
+
'/README.md'.freeze,
|
95
|
+
'/.ruby-version'.freeze,
|
96
96
|
].each do |file|
|
97
97
|
copy_file((source + file), (app_root_path + file))
|
98
98
|
end
|
@@ -100,29 +100,29 @@ module Vedeu
|
|
100
100
|
|
101
101
|
# @return [void]
|
102
102
|
def make_application_executable
|
103
|
-
FileUtils.chmod(0755, "#{name}/bin/#{name}")
|
103
|
+
FileUtils.chmod(0755, "#{name}/bin/#{name}".freeze)
|
104
104
|
end
|
105
105
|
|
106
106
|
# @return [void]
|
107
107
|
def copy_global_keymap
|
108
|
-
copy_file(source + '/app/models/keymaps/_global_.rb',
|
109
|
-
app_keymaps_path + '_global_.rb')
|
108
|
+
copy_file(source + '/app/models/keymaps/_global_.rb'.freeze,
|
109
|
+
app_keymaps_path + '_global_.rb'.freeze)
|
110
110
|
end
|
111
111
|
|
112
112
|
# @return [Array<String>]
|
113
113
|
def directories
|
114
114
|
[
|
115
|
-
'/app/controllers',
|
116
|
-
'/app/helpers',
|
117
|
-
'/app/models/keymaps',
|
118
|
-
'/app/views/interfaces',
|
119
|
-
'/app/views/templates',
|
120
|
-
'/bin',
|
121
|
-
'/config',
|
122
|
-
'/lib',
|
123
|
-
'/log',
|
124
|
-
'/test',
|
125
|
-
'/vendor',
|
115
|
+
'/app/controllers'.freeze,
|
116
|
+
'/app/helpers'.freeze,
|
117
|
+
'/app/models/keymaps'.freeze,
|
118
|
+
'/app/views/interfaces'.freeze,
|
119
|
+
'/app/views/templates'.freeze,
|
120
|
+
'/bin'.freeze,
|
121
|
+
'/config'.freeze,
|
122
|
+
'/lib'.freeze,
|
123
|
+
'/log'.freeze,
|
124
|
+
'/test'.freeze,
|
125
|
+
'/vendor'.freeze,
|
126
126
|
]
|
127
127
|
end
|
128
128
|
|
data/lib/vedeu/cli/helpers.rb
CHANGED
@@ -12,42 +12,42 @@ module Vedeu
|
|
12
12
|
|
13
13
|
# @return [String]
|
14
14
|
def app_name
|
15
|
-
@app_name ||= File.read('./config/app_name')
|
15
|
+
@app_name ||= File.read('./config/app_name'.freeze)
|
16
16
|
end
|
17
17
|
|
18
18
|
# @return [String]
|
19
19
|
def app_bin_path
|
20
|
-
name + '/bin/'
|
20
|
+
name + '/bin/'.freeze
|
21
21
|
end
|
22
22
|
|
23
23
|
# @return [String]
|
24
24
|
def app_config_path
|
25
|
-
name + '/config/'
|
25
|
+
name + '/config/'.freeze
|
26
26
|
end
|
27
27
|
|
28
28
|
# @return [String]
|
29
29
|
def app_controllers_path
|
30
|
-
name + '/app/controllers/'
|
30
|
+
name + '/app/controllers/'.freeze
|
31
31
|
end
|
32
32
|
|
33
33
|
# @return [String]
|
34
34
|
def app_helpers_path
|
35
|
-
name + '/app/helpers/'
|
35
|
+
name + '/app/helpers/'.freeze
|
36
36
|
end
|
37
37
|
|
38
38
|
# @return [String]
|
39
39
|
def app_models_path
|
40
|
-
name + '/app/models/'
|
40
|
+
name + '/app/models/'.freeze
|
41
41
|
end
|
42
42
|
|
43
43
|
# @return [String]
|
44
44
|
def app_keymaps_path
|
45
|
-
name + '/app/models/keymaps/'
|
45
|
+
name + '/app/models/keymaps/'.freeze
|
46
46
|
end
|
47
47
|
|
48
48
|
# @return [String]
|
49
49
|
def app_views_path
|
50
|
-
name + '/app/views/'
|
50
|
+
name + '/app/views/'.freeze
|
51
51
|
end
|
52
52
|
|
53
53
|
# @param destination [String]
|
@@ -99,7 +99,7 @@ module Vedeu
|
|
99
99
|
# @param destination [String]
|
100
100
|
# @return [TrueClass]
|
101
101
|
def log_processed_file(destination)
|
102
|
-
Vedeu.log_stdout(type: :create, message: "#{destination}")
|
102
|
+
Vedeu.log_stdout(type: :create, message: "#{destination}".freeze)
|
103
103
|
|
104
104
|
true
|
105
105
|
end
|
@@ -151,7 +151,7 @@ module Vedeu
|
|
151
151
|
|
152
152
|
# @return [String]
|
153
153
|
def source
|
154
|
-
File.dirname(__FILE__) + '/templates/application/.'
|
154
|
+
File.dirname(__FILE__) + '/templates/application/.'.freeze
|
155
155
|
end
|
156
156
|
|
157
157
|
end # Helpers
|
data/lib/vedeu/cli/version.rb
CHANGED
data/lib/vedeu/cli/view.rb
CHANGED
@@ -41,44 +41,44 @@ module Vedeu
|
|
41
41
|
"controller and action: (args are optional)\n\n" \
|
42
42
|
"Vedeu.configure do\n" \
|
43
43
|
" root :some_controller, :show, *args\n" \
|
44
|
-
"end\n\n")
|
44
|
+
"end\n\n".freeze)
|
45
45
|
end
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
49
|
# @return [void]
|
50
50
|
def make_controller_file
|
51
|
-
make_file(source + '/app/controllers/name.erb',
|
52
|
-
'.' + "/app/controllers/#{name}_controller.rb")
|
51
|
+
make_file(source + '/app/controllers/name.erb'.freeze,
|
52
|
+
'.' + "/app/controllers/#{name}_controller.rb".freeze)
|
53
53
|
end
|
54
54
|
|
55
55
|
# @return [void]
|
56
56
|
def make_helper_file
|
57
|
-
make_file(source + '/app/helpers/name.erb',
|
58
|
-
'.' + "/app/helpers/#{name}_helper.rb")
|
57
|
+
make_file(source + '/app/helpers/name.erb'.freeze,
|
58
|
+
'.' + "/app/helpers/#{name}_helper.rb".freeze)
|
59
59
|
end
|
60
60
|
|
61
61
|
# @return [void]
|
62
62
|
def make_keymap_file
|
63
|
-
make_file(source + '/app/models/keymaps/name.erb',
|
64
|
-
'.' + "/app/models/keymaps/#{name}.rb")
|
63
|
+
make_file(source + '/app/models/keymaps/name.erb'.freeze,
|
64
|
+
'.' + "/app/models/keymaps/#{name}.rb".freeze)
|
65
65
|
end
|
66
66
|
|
67
67
|
# @return [void]
|
68
68
|
def make_interface_file
|
69
|
-
make_file(source + '/app/views/interfaces/name.erb',
|
70
|
-
'.' + "/app/views/interfaces/#{name}.rb")
|
69
|
+
make_file(source + '/app/views/interfaces/name.erb'.freeze,
|
70
|
+
'.' + "/app/views/interfaces/#{name}.rb".freeze)
|
71
71
|
end
|
72
72
|
|
73
73
|
# @return [void]
|
74
74
|
def make_template_file
|
75
|
-
touch_file('.' + "/app/views/templates/#{name}.erb")
|
75
|
+
touch_file('.' + "/app/views/templates/#{name}.erb".freeze)
|
76
76
|
end
|
77
77
|
|
78
78
|
# @return [void]
|
79
79
|
def make_view_class_file
|
80
|
-
make_file(source + '/app/views/name.erb',
|
81
|
-
'.' + "/app/views/#{name}.rb")
|
80
|
+
make_file(source + '/app/views/name.erb'.freeze,
|
81
|
+
'.' + "/app/views/#{name}.rb".freeze)
|
82
82
|
end
|
83
83
|
|
84
84
|
end # View
|
data/vedeu_cli.gemspec
CHANGED
@@ -21,11 +21,11 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency 'guard', '2.13.0'
|
22
22
|
spec.add_development_dependency 'guard-minitest', '2.4.4'
|
23
23
|
spec.add_development_dependency 'guard-rubocop', '1.2.0'
|
24
|
-
spec.add_development_dependency 'minitest', '5.8.
|
25
|
-
spec.add_development_dependency 'minitest-reporters', '1.1.
|
24
|
+
spec.add_development_dependency 'minitest', '5.8.3'
|
25
|
+
spec.add_development_dependency 'minitest-reporters', '1.1.7'
|
26
26
|
spec.add_development_dependency 'mocha', '1.1.0'
|
27
|
-
spec.add_development_dependency 'pry', '0.10.
|
28
|
-
spec.add_development_dependency 'rubocop', '0.
|
27
|
+
spec.add_development_dependency 'pry', '0.10.3'
|
28
|
+
spec.add_development_dependency 'rubocop', '0.35.1'
|
29
29
|
spec.add_development_dependency 'ruby-prof', '0.15.8'
|
30
30
|
spec.add_development_dependency 'simplecov', '0.10.0'
|
31
31
|
spec.add_development_dependency 'simplecov-console', '0.2.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vedeu_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 5.8.
|
61
|
+
version: 5.8.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 5.8.
|
68
|
+
version: 5.8.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest-reporters
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.1.
|
75
|
+
version: 1.1.7
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.1.
|
82
|
+
version: 1.1.7
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: mocha
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.10.
|
103
|
+
version: 0.10.3
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.10.
|
110
|
+
version: 0.10.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubocop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.35.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.35.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: ruby-prof
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|