railspp 0.2.9 → 0.3.0

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
  SHA256:
3
- metadata.gz: 870688ba49c6b87982b46076d98d9ab8962d7a491c4c93c0732c9d59679843cc
4
- data.tar.gz: e2b9498aa28bc3e8593ab786811080e4e301b47bb2bd52e4151205d865ec00d2
3
+ metadata.gz: 37e6f7c34e88a8709e1cf932d8bbe1ef6f994601349b91ecc49dc76e7161f1d7
4
+ data.tar.gz: f6843abd128722e9480ab99580b29a34adcad06cca7cd18a63fe1294d433726b
5
5
  SHA512:
6
- metadata.gz: 95a7d39a919d3c61aa5940f673dbec14ad3a42588a8166b548edaecd5cf93e1a1708a916dfc3c9ac0c8c8d28e641caf639288e71edb182e69c31e55069c19585
7
- data.tar.gz: 981dcdaee5d97357066b9bfb5d147298d4048b6bd104778984e2462d9fb23ef87ba93d0a7e3e4ff24587add3b0e4f9baa01fc543bd665cc283f69a424e62fbdd
6
+ metadata.gz: 8cd644a00d15a557889b70aa8cd8e247e178312f8b5f1ecbaaeb97f3f1a39b2df3cbc48573664fce0b3bd8e67de9a3e83a9825f5b0e0e299e8ebfd39fd7770a4
7
+ data.tar.gz: 4ee799382461b7c864fc2d458f477ebce87d11206b7a7a52d15e7b9ec12f85ae45a0b029f7933e119605c692785ead92a04364d904a09fc964075de3c9107d35
data/README.md CHANGED
@@ -19,7 +19,13 @@ gem 'railspp'
19
19
  In your terminal
20
20
 
21
21
  ```bash
22
- gem isntall railspp
22
+ gem install railspp
23
+ ```
24
+
25
+ ## Updating versions
26
+
27
+ ```bash
28
+ railspp update_version
23
29
  ```
24
30
 
25
31
  ## CLI Commands
@@ -0,0 +1,24 @@
1
+ require_relative '../utils/strings.rb'
2
+
3
+
4
+ class UpdateVersionCommand < MoreUtils
5
+ class << self
6
+
7
+ def run *args
8
+
9
+ # Add Controllers
10
+ gc_template = get_file_str("#{this_dir}/../templates/global_controller.txt")
11
+ write_file("#{root}/app/controllers/global_controller.rb", gc_template)
12
+
13
+ # dc_template = get_file_str("#{this_dir}/../templates/documentation_controller.txt")
14
+ # write_file("#{root}/app/controllers/documentation_controller.rb", dc_template)
15
+
16
+ # Add Service
17
+ # aps_template = get_file_str("#{this_dir}/../templates/api_documentation_service.txt")
18
+ # write_file("#{root}/app/services/api_documentation_service.rb", aps_template)
19
+
20
+ puts "Updated your code base for Rails Plus Plus version: #{gem_version}"
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,16 @@
1
+ require_relative '../utils/strings.rb'
2
+
3
+
4
+ class UpdateVersionHelpCommand < MoreUtils
5
+ class << self
6
+
7
+ def run *args
8
+ puts "No Options available
9
+
10
+ Update your version of rails plus plus in your code base:
11
+ 'railspp update_version'
12
+ "
13
+ end
14
+
15
+ end
16
+ end
data/lib/railspp.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  require_relative './commands/initialize.rb'
2
2
  require_relative './commands/model.rb'
3
3
  require_relative './commands/make_test.rb'
4
+ require_relative './commands/update_version.rb'
4
5
  require_relative './help/documentation.rb'
5
6
  require_relative './help/initialize.rb'
6
7
  require_relative './help/model.rb'
7
8
  require_relative './help/make_test.rb'
9
+ require_relative './help/update_version.rb'
8
10
  require_relative './utils/strings.rb'
9
11
 
10
12
 
@@ -45,6 +47,8 @@ class RailsPlusPlus < MoreUtils
45
47
  model: ModelCommand,
46
48
  mt: MakeTestCommand,
47
49
  make_test: MakeTestCommand,
50
+ uv: UpdateVersionCommand,
51
+ update_version: UpdateVersionCommand,
48
52
  }
49
53
  end
50
54
 
@@ -57,6 +61,8 @@ class RailsPlusPlus < MoreUtils
57
61
  model: ModelHelpCommand,
58
62
  mt: MakeTestHelpCommand,
59
63
  make_test: MakeTestHelpCommand,
64
+ uv: UpdateVersionHelpCommand,
65
+ update_version: UpdateVersionHelpCommand,
60
66
  }
61
67
  end
62
68
 
@@ -69,6 +75,8 @@ class RailsPlusPlus < MoreUtils
69
75
  '- model => Generate your CRUD model, controller, and migration',
70
76
  '- mt => Generate a unit test in minitest',
71
77
  '- make_test => Generate a unit test in minitest',
78
+ '- uv => Update your version of Rails Plus Plus in your code base',
79
+ '- update_version => Update your version of Rails Plus Plus in your code base',
72
80
  ]
73
81
  end
74
82
 
data/lib/utils/strings.rb CHANGED
@@ -21,7 +21,7 @@ class MoreUtils
21
21
  class << self
22
22
 
23
23
  def gem_version
24
- "0.2.9"
24
+ "0.3.0"
25
25
  end
26
26
 
27
27
  def get_file_str path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railspp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Layne Faler
@@ -64,10 +64,12 @@ files:
64
64
  - lib/commands/initialize.rb
65
65
  - lib/commands/make_test.rb
66
66
  - lib/commands/model.rb
67
+ - lib/commands/update_version.rb
67
68
  - lib/help/documentation.rb
68
69
  - lib/help/initialize.rb
69
70
  - lib/help/make_test.rb
70
71
  - lib/help/model.rb
72
+ - lib/help/update_version.rb
71
73
  - lib/railspp.rb
72
74
  - lib/templates/api_documentation_initializer.txt
73
75
  - lib/templates/api_documentation_service.txt