bluepotion 0.1.4 → 0.1.5

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: b2753dc1bf30f1d007bbdde6e645aa14894fafe0
4
- data.tar.gz: 3f373b657682bf8617045c056e5cee5b88e7b6b4
3
+ metadata.gz: e8c33ac84159dff9873425c197d5c9242c67768f
4
+ data.tar.gz: b036ad3025714de737321d4f416b9c311ce0b6b4
5
5
  SHA512:
6
- metadata.gz: 85af577175f249ca9b416135aaa58ba8191428a4707024fb7cbc8033702b04d455ce91c792ab56c8ebc23e6e32bd96470dfe0e3d926e3656368ef98f06aaba49
7
- data.tar.gz: 6b1233452ee3ca385c832e5708ce0e8d8b37975739a08a047c8741a2cbc4ab85038d2581b0953be98aa02e508b350138324715b3985fce3a99f39b44b9b258d2
6
+ metadata.gz: 27935ab418a592ba44f19dec919c95e91a39140b3bd6a8f85c4ca7d74609ebcbe5304f1615112fd67e7b61d275b66e7a467c04bf3d99864449a89e5c913987f4
7
+ data.tar.gz: 08d769a8538ec46d1b564ff78fd330d227e7c45a9487488b9b119c72603cc48367678ca0c7f1cecd0d8fe1ad03ecedce7899981caa50c664d2d12ebac0e653b1
@@ -10,8 +10,13 @@ def skip_line?(line)
10
10
  line.strip =~ /^if\s/ ||
11
11
  line.strip =~ /^unless\s/ ||
12
12
  line.strip =~ /^while\s/ ||
13
+ line.strip =~ /^else\s/ ||
14
+ line.strip =~ /^when\s/ ||
15
+ line.strip =~ /^case\s/ ||
16
+ line.strip =~ /^end\..+/ ||
13
17
  line.strip =~ /^#/ ||
14
18
  line =~ /\sdo(\s|$)/ ||
19
+ line.strip == "__END__" ||
15
20
  line.strip == "end"
16
21
  end
17
22
 
@@ -0,0 +1,14 @@
1
+ class MotionKeychain
2
+ class << self
3
+ def key_store
4
+ # TODO store this somewhere real
5
+ @_key_store ||= {}
6
+ end
7
+ def get(key)
8
+ key_store[key]
9
+ end
10
+ def set(key, value)
11
+ key_store[key] = value
12
+ end
13
+ end
14
+ end
@@ -89,6 +89,16 @@
89
89
  MotionAsync.async(options, &block)
90
90
  end
91
91
 
92
+ def toast(message, params={})
93
+ message_length = case params[:length]
94
+ when :long
95
+ Android::Widget::Toast::LENGTH_LONG
96
+ else
97
+ Android::Widget::Toast::LENGTH_SHORT
98
+ end
99
+ Android::Widget::Toast.makeText(rmq.activity, message, message_length).show
100
+ end
101
+
92
102
  class << self
93
103
  attr_accessor :current_application, :home_screen_class
94
104
 
@@ -4,7 +4,7 @@ class RMQ
4
4
  selected.each do |view|
5
5
  case view
6
6
  when Potion::EditText then view.text = new_data.to_s.toString
7
- when Potion::TextView then view.text = new_data
7
+ when Potion::TextView then view.text = new_data.to_s.toString
8
8
  # TODO, finish
9
9
  end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module BluePotion
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -88,7 +88,8 @@ Headers:
88
88
 
89
89
  Body:
90
90
  #{body}
91
- \n
91
+ -----------------------------------
92
+
92
93
  )
93
94
  end
94
95
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluepotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfiniteRed
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-20 00:00:00.000000000 Z
12
+ date: 2015-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -43,6 +43,7 @@ files:
43
43
  - lib/bluepotion.rb
44
44
  - lib/project/blue_potion_net.rb
45
45
  - lib/project/compatibility/dispatch.rb
46
+ - lib/project/compatibility/motion_keychain.rb
46
47
  - lib/project/ext/activity.rb
47
48
  - lib/project/ext/array_list.rb
48
49
  - lib/project/ext/fragment.rb