redpotion 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 3e5c5d0efda601613376e85bfdf5528866720287
4
- data.tar.gz: 1070e4c018eefc0d2eff4a54c37cf6361ea3262f
3
+ metadata.gz: c8e4d048a7e5125b990c3f6561a68735f347a580
4
+ data.tar.gz: e0e211d6791c47c6ecc80c6da00827538365f5d5
5
5
  SHA512:
6
- metadata.gz: 5d58f76407b7529334284ada481f6cdbf5102c258ee0b3919bd5f7b9885bc4d97eae8b88c973c075f5637f8cf9af9be517a0ad01e30e3bcf2192845f74e0e8a4
7
- data.tar.gz: ab75ae2a089c2a42a633005870f9b6f18a28dea1c43d1b5c2401c1c2826967a35ce85ecdcea48f015055a9527b9533c8fbc4f8cce5e8f8f620a79136d8dd64ba
6
+ metadata.gz: b9ea227eafa37228db1f1ce476a8b158c4a9b99476a8b6009591439ebf4660854b9c90715c28e02692bb58eac03309fa37675ea1ccbd7f24e1e6a08d516347ca
7
+ data.tar.gz: 584cbf839500ff1c50572ca6690929a86765a3583a896879d3ad6194cdb6961a308ff484d42f0b54b6f43d6ae2e01fc1f6bdc9f446ea25c9f0ff4d3cc5464511
data/bin/potion CHANGED
@@ -15,6 +15,8 @@ class PotionCommandLine
15
15
  > potion create my_new_app
16
16
 
17
17
  > potion create model foo
18
+ > potion create screen foo
19
+ > potion create table_screen foo
18
20
  > potion create controller foos
19
21
  > potion create view bar
20
22
  > potion create shared some_class_used_app_wide
@@ -32,6 +34,7 @@ class PotionCommandLine
32
34
 
33
35
  class << self
34
36
  VALID_CREATE_TYPES = [
37
+ :screen, :table_screen,
35
38
  :model, :controller,
36
39
  :view,
37
40
  :shared,
@@ -113,8 +116,13 @@ class PotionCommandLine
113
116
  end
114
117
 
115
118
  def insert_from_template(template_name, name)
116
- puts `rmq create #{template_name} #{name}`
117
- return
119
+ unless %w{screen table_screen}.include? template_name
120
+ puts `rmq create #{template_name} #{name}`
121
+ return
122
+ else
123
+ @screen_base = template_name.split('_').collect(&:capitalize).join
124
+ template_name = 'screen'
125
+ end
118
126
 
119
127
  #if [:lib, :collection_view_controller, :shared, :controller].include?(template_name)
120
128
  #end
@@ -124,7 +132,7 @@ class PotionCommandLine
124
132
  return unless (@template_path = template_path(template_name))
125
133
  files = Dir["#{@template_path}**/*"].select {|f| !File.directory? f}
126
134
 
127
- @name = name.gsub(/_?(controller|stylesheet)/,'')
135
+ @name = name.gsub(/_?(screen|controller|stylesheet)/,'')
128
136
  @name_camel_case = @name.split('_').map{|word| word.capitalize}.join
129
137
 
130
138
  files.each do |template_file_path_and_name|
@@ -36,7 +36,7 @@ class UIView
36
36
  end
37
37
 
38
38
  def on(event, args = {}, &block)
39
- rmq(self).on(event, args, block)
39
+ rmq(self).on(event, args, &block)
40
40
  end
41
41
 
42
42
  def apply_style(style_name)
@@ -48,7 +48,7 @@ class UIView
48
48
  end
49
49
 
50
50
  def style(&block)
51
- rmq(self).style(block)
51
+ rmq(self).style(&block)
52
52
  end
53
53
  end
54
54
 
@@ -1,3 +1,3 @@
1
1
  module RedPotion
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redpotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfiniteRed
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '2.0'
34
+ version: '2.1'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '2.0'
41
+ version: '2.1'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: motion_print
44
44
  requirement: !ruby/object:Gem::Requirement