motion-util 0.1.0 → 0.1.1

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.
@@ -94,7 +94,7 @@ module Motion
94
94
 
95
95
  def class_name
96
96
  case file_type
97
- when :general
97
+ when "general"
98
98
  @class_name = ARGV[1].capitalize
99
99
  else
100
100
  @class_name = ARGV[2].capitalize
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  module Motion
3
3
  module Util
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
@@ -0,0 +1,3 @@
1
+ # -*- coding: utf-8 -*-
2
+ class #{class_name}
3
+ end
@@ -57,6 +57,11 @@ class TestGenerate < Test::Unit::TestCase
57
57
  end
58
58
 
59
59
 
60
+ test "destination_path shoudle be 'app/foo.rb' with foo" do
61
+ ARGV.replace %w(generate foo)
62
+ assert_equal "app/foo.rb", @generator.destination_path
63
+ end
64
+
60
65
  # --- context
61
66
  test "check model file context" do
62
67
  ARGV.replace %w(generate model foo)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -31,6 +31,7 @@ files:
31
31
  - lib/motion-util/version.rb
32
32
  - motion-util.gemspec
33
33
  - template/class/controller.rb
34
+ - template/class/general.rb
34
35
  - template/class/model.rb
35
36
  - template/class/navigation_controller.rb
36
37
  - template/class/tab_bar_controller.rb