motion-generators 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48af4ede224ecebf057d9243aba7804fbec318c5
4
- data.tar.gz: aa4e4a8462acee18606c32b6a448db59b2a4e511
3
+ metadata.gz: 4e881160d18d8ccbc8207274d64184a25e3b13c2
4
+ data.tar.gz: 81249d85243d993ec591b572d4aa2c7e0b11dd01
5
5
  SHA512:
6
- metadata.gz: 9ae0fb10adf9c2d9237b8af5423030bdb7df63c0ceaa5013965e4304c16c0b8e5ab347f270e2c03adcb755095a08d13f29e3583a2f72cb27427d686b44bd3e6e
7
- data.tar.gz: 4c1fbbe4d330bb7fd8c74d54a15cb7cafaef0c3cf61717b75f94f6d6adec91a98ce4bb90d103bade62503f3df915f64bac6223434074134290bd1d4ea36a8f03
6
+ metadata.gz: b2e7564cb34e99134a2093bd4c2434e589bd6c34bafb3ce2181d6aa5582fdc86e701951fee3fe075ff76f0a6cfb320712fe9db6d0d1955b1edc10c2343c34264
7
+ data.tar.gz: bab339e13aaec41435d6758819736b92d152b5441efe04bbf99901b8bfc49ad5b60f906663bbce4b1fc3c0ecc6bd788822eea15a4ea5e3c872600140405f7b01
data/README.md CHANGED
@@ -36,19 +36,22 @@ To see a full list of what's available, do
36
36
  motion-generate ui_table_view_controller # Creates a UIViewController subclass in app/controllers
37
37
  motion-generate ui_view_controller # Creates a UIViewController subclass in app/controllers
38
38
 
39
+ ### Example
39
40
 
40
- ## Development
41
+ $ motion-generate ui_table_view_controller skateboards
41
42
 
42
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
43
43
 
44
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+ Will generate a file named **app/controllers/skateboards_controller.rb** that looks something like [this template](lib/motion/templates/ui_table_view_controller.rb.erb)
45
45
 
46
46
  ## Contributing
47
47
 
48
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/motion-generators.
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/KatanaCode/motion-generators.
49
49
 
50
50
 
51
51
  ## License
52
52
 
53
53
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
54
54
 
55
+ ## Credit
56
+
57
+ Created by [Katana—App developers in Edinburgh, Scotland](http://katanacode.com)
@@ -25,7 +25,6 @@ module Motion
25
25
  desc "ui_view_controller", "Creates a UIViewController subclass in app/controllers"
26
26
  def ui_view_controller(name)
27
27
  @name = name
28
- @parent_class_name = options[:parent_class].camelize
29
28
  template "ui_view_controller.rb.erb", "app/controllers/#{name}_controller.rb"
30
29
  end
31
30
 
@@ -39,7 +38,6 @@ module Motion
39
38
  desc "ui_table_view_controller", "Creates a UITableViewController subclass in app/controllers"
40
39
  def ui_table_view_controller(name)
41
40
  @name = name
42
- @parent_class_name = options[:parent_class].camelize
43
41
  template "ui_view_controller.rb.erb", "app/controllers/#{name}_controller.rb"
44
42
  end
45
43
 
@@ -49,11 +47,11 @@ module Motion
49
47
 
50
48
 
51
49
  def parent_class_name
52
- @parent_class_name
50
+ options[:parent_class].camelize
53
51
  end
54
52
 
55
53
  def class_name
56
- @name.camelize
54
+ "%sController" % @name.camelize
57
55
  end
58
56
 
59
57
  end
@@ -1,5 +1,5 @@
1
1
  module Motion
2
2
  module Generators
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -1,9 +1,11 @@
1
- class <%= class_name %>Controller < <%= parent_class_name %>
1
+ class <%= class_name %> < <%= parent_class_name %>
2
+
2
3
 
3
4
  # ==================
4
5
  # = View Lifecycle =
5
6
  # ==================
6
7
 
8
+
7
9
  # def viewDidLoad
8
10
  # super
9
11
  # end
@@ -1,9 +1,11 @@
1
- class <%= class_name %>Controller < <%= parent_class_name %>
1
+ class <%= class_name %> < <%= parent_class_name %>
2
+
2
3
 
3
4
  # ==================
4
5
  # = View Lifecycle =
5
6
  # ==================
6
7
 
8
+
7
9
  # def viewDidLoad
8
10
  # super
9
11
  # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodacious
@@ -79,7 +79,6 @@ files:
79
79
  - ".gitignore"
80
80
  - Gemfile
81
81
  - LICENSE
82
- - LICENSE.txt
83
82
  - README.md
84
83
  - Rakefile
85
84
  - bin/console
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Bodacious
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.