bluepotion 0.1.0 → 0.1.1

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: 2144e6cc671ff757a2afd611680884628dc5422a
4
- data.tar.gz: e067abe21100a273fd70c6a245f99f06e5355b29
3
+ metadata.gz: d63573b24ac2969163f7eb92fcb46e368dda0e9f
4
+ data.tar.gz: 7dd7129bd3785eb9a27166f6cff5ecba0dc8b6eb
5
5
  SHA512:
6
- metadata.gz: 3a8f167141409255d7ab4f83cf3172f9c81ed45639cf4ce16eb562779697e9fe31e9188def5994ab5a13b4dabade23d38a080314c9d8c81cfcd2ebbb309eee35
7
- data.tar.gz: 5f8826fbdc43efb2f2f7612078d298350a04a4b28348eeb2bd6854d478e7fdadc2f161c5c63a8a88e896cf325556ecef164f826d633798a9b11202aa5c76711f
6
+ metadata.gz: 9e61f1e779c465eb103cc4747af76d263ecd2c3e19b7886a30fd4bd9002f7be6f2c9186b1459f6640c22d5c4f4811c1faaa6fe26a994345e1547e08e80b3b317
7
+ data.tar.gz: 057cb3c8acda52faf7a9604cffb398345d5abd22570b4977998f641c8cb579980d88f90bb9b89630828f18a9c8c68eb25c4b7f6a4a7cefac16e5fb4f16ffd209
@@ -15,6 +15,7 @@ class PotionCommandLine
15
15
  > bluepotion create my_new_app
16
16
 
17
17
  > bluepotion create screen foo
18
+ > bluepotion create xml_screen foo
18
19
 
19
20
  Misc
20
21
  > bluepotion -h, --help
@@ -23,7 +24,8 @@ class PotionCommandLine
23
24
 
24
25
  class << self
25
26
  VALID_CREATE_TYPES = [
26
- :screen
27
+ :screen,
28
+ :xml_screen
27
29
  ]
28
30
 
29
31
  def create(template_or_app_name, *options)
@@ -96,7 +98,7 @@ class PotionCommandLine
96
98
  end
97
99
 
98
100
  def insert_from_template(template_name, name)
99
- return unless %w{screen}.include? template_name
101
+ return unless %w{screen xml_screen}.include? template_name
100
102
 
101
103
  puts "\n Creating #{template_name}: #{name}\n\n"
102
104
 
@@ -1,7 +1,7 @@
1
1
  # RM-773
2
2
  #module ProMotion
3
3
  class PMApplication < Android::App::Application
4
- attr_accessor :home_screen_class, :context, :current_activity
4
+ attr_accessor :context, :current_activity
5
5
 
6
6
  def onCreate
7
7
  mp "PMApplication onCreate", debugging_only: true
@@ -17,6 +17,10 @@
17
17
  self.on_create if respond_to?(:on_create)
18
18
  end
19
19
 
20
+ def home_screen_class
21
+ @home_screen_class
22
+ end
23
+
20
24
  def application_info
21
25
  context.applicationInfo
22
26
  end
@@ -5,10 +5,12 @@
5
5
  super
6
6
 
7
7
  mp "PMHomeActivity on_create", debugging_only: true
8
+ create_home_screen
9
+ end
8
10
 
11
+ def create_home_screen
9
12
  home_screen_class = PMApplication.current_application.home_screen_class
10
- set_fragment home_screen_class.new if home_screen_class
13
+ self.set_fragment home_screen_class.new if home_screen_class
11
14
  end
12
15
  end
13
-
14
16
  #end
@@ -1,3 +1,3 @@
1
1
  module BluePotion
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  class <%= @name_camel_case %>Screen < PMScreen
2
2
 
3
3
  # If you are using XML for this screen:
4
- #uses_xml :<%= @name %>
4
+ #uses_xml :<%= @name %>_screen
5
5
 
6
6
  uses_action_bar true
7
7
  stylesheet <%= @name_camel_case %>ScreenStylesheet
@@ -0,0 +1,8 @@
1
+ class <%= @name_camel_case %>Screen < PMScreen
2
+ uses_xml :<%= @name %>_screen
3
+ uses_action_bar true
4
+ stylesheet <%= @name_camel_case %>ScreenStylesheet
5
+
6
+ def on_load
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ class <%= @name_camel_case %>ScreenStylesheet < ApplicationStylesheet
2
+ # Add your view stylesheets here. You can then override styles if needed,
3
+ # example: include FooStylesheet
4
+
5
+ def setup
6
+ # Add stylesheet specific setup stuff here.
7
+ # Add application specific setup stuff in application_stylesheet.rb
8
+ end
9
+
10
+ def root_view(st)
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ describe '<%= @name_camel_case %>Screen' do
2
+
3
+ before do
4
+ end
5
+
6
+ after do
7
+ end
8
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluepotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfiniteRed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-30 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -86,6 +86,9 @@ files:
86
86
  - templates/screen/app/screens/name_screen.rb
87
87
  - templates/screen/app/stylesheets/name_screen_stylesheet.rb
88
88
  - templates/screen/spec/screens/name_screen_spec.rb
89
+ - templates/xml_screen/app/screens/name_screen.rb
90
+ - templates/xml_screen/app/stylesheets/name_screen_stylesheet.rb
91
+ - templates/xml_screen/spec/screens/name_screen_spec.rb
89
92
  homepage: https://github.com/infinitered/bluepotion
90
93
  licenses:
91
94
  - MIT