motion-flow 0.1.3 → 0.1.4

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: 59473ce2df050d9206bdb1bba82321e031e7158d
4
- data.tar.gz: 75e2bd1a9e79d6612e4a95984bd5daa779f7ca2a
3
+ metadata.gz: 707ca8aea0f6a587026d263830de2ef35149a6a9
4
+ data.tar.gz: 7cfe35727ca401a0ecb98bb19aa0404284c7bfc5
5
5
  SHA512:
6
- metadata.gz: ccece4daf3120a6de42e3524165eecb9b67bd7b76aed9363d96a3aaf0be7575cbda9716a9937cf4333f30501e498d9305b86f5e480facdd1dc10c068e8d4a2a2
7
- data.tar.gz: 21e0cbdff4b45e0cf235650803bffbc72a911cf6cfda032efa16dd7a96bb5efba9cd30f64496c37d59b323070d6576637876517c43c1a09ce6a16557e409e304
6
+ metadata.gz: 25e4a52d2f54fcfccb84ac9e6a9f4e7baa01231755754a76ea5ef40cd90827b309dba2aa76adea757ab0c8e0edbd91cbf3738009e537729eace798e34e5d78e9
7
+ data.tar.gz: af6a0a591db19b2a5cf1f47421c7daccda532531726c838bfac7980e67f73802783f46ca452d674222b365f0142cd3f1cbbd591177aa4cffd7ecd12f9873ab42
Binary file
data/flow/net/net.rb CHANGED
@@ -17,9 +17,9 @@ module Net
17
17
  expectation
18
18
  end
19
19
 
20
- [:get, :post, :put, :delete, :patch, :options, :head].each do |http_medhod|
21
- define_method(http_medhod) do |base_url, *options, &callback|
22
- Request.send(http_medhod, base_url, options.shift || {}, callback)
20
+ [:get, :post, :put, :delete, :patch, :options, :head].each do |http_method|
21
+ define_method(http_method) do |base_url, *options, &callback|
22
+ Request.send(http_method, base_url, options.shift || {}, callback)
23
23
  end
24
24
  end
25
25
  end
@@ -20,7 +20,7 @@ module UI
20
20
  'CutiveMono' => 'serif-monospace'
21
21
  }
22
22
 
23
- def initialize(obj, size, trait=nil)
23
+ def initialize(obj, size, trait=nil, extension=:ttf)
24
24
  if obj.is_a?(Android::Graphics::Typeface)
25
25
  @proxy = obj
26
26
  else
@@ -38,7 +38,7 @@ module UI
38
38
  end
39
39
  @proxy = Android::Graphics::Typeface.create(family_name, style)
40
40
  else
41
- @proxy = Android::Graphics::Typeface.createFromAsset(UI.context.getAssets, obj + '.ttf')
41
+ @proxy = Android::Graphics::Typeface.createFromAsset(UI.context.getAssets, obj + "." + extension.to_s)
42
42
  end
43
43
  end
44
44
  @size = size
Binary file
@@ -4,7 +4,7 @@ module UI
4
4
  new(font, nil, nil)
5
5
  end
6
6
 
7
- def initialize(obj, size, trait=nil)
7
+ def initialize(obj, size, trait=nil, extension=nil)
8
8
  if obj.is_a?(UIFont)
9
9
  @proxy = obj
10
10
  else
Binary file
data/flow/ui/font.rb CHANGED
@@ -7,9 +7,10 @@ module UI
7
7
  name = (font[:name] or raise ":name expected")
8
8
  size = (font[:size] or raise ":size expected")
9
9
  trait = (font[:trait] or :normal)
10
- UI::Font.new(name, size, trait)
10
+ extension = (font[:extension] or :ttf)
11
+ UI::Font.new(name, size, trait, extension)
11
12
  when Array
12
- raise "Expected Array of 2 or 3 elements" if font.size < 2 or font.size > 3
13
+ raise "Expected Array of 2 or 3 or 4 elements" if font.size < 2 or font.size > 4
13
14
  UI::Font.new(*font)
14
15
  else
15
16
  raise "Expected UI::Font or Hash or Array"
data/lib/motion-flow.rb CHANGED
@@ -15,7 +15,7 @@ else
15
15
  trace = Rake.application.options.trace == true
16
16
 
17
17
  template = platform.to_s == 'android' ? 'android' : 'cocoa'
18
- system "template=#{platform} /usr/bin/rake -r \"#{File.dirname(__FILE__)}/#{template}.rb\" -f \"config/#{platform}.rb\" \"#{task}\" #{trace ? '--trace' : ''}" or exit 1
18
+ system "template=#{platform} rake -r \"#{File.dirname(__FILE__)}/#{template}.rb\" -f \"config/#{platform}.rb\" \"#{task}\" #{trace ? '--trace' : ''}" or exit 1
19
19
  end
20
20
  namespace 'ios' do
21
21
  desc "Create an .ipa archive"
@@ -231,8 +231,17 @@ else
231
231
  task "super_repl" do
232
232
  require "readline"
233
233
 
234
- ios_io = IO.popen('/usr/bin/rake ios:simulator skip_build=1', 'w')
235
- android_io = IO.popen('/usr/bin/rake android:emulator:start skip_build=1', 'w')
234
+ cmd = %w{ rake }
235
+ ios_cmd = cmd + ['ios:simulator']
236
+ android_cmd = cmd + ['android:emulator:start']
237
+
238
+ if ENV.fetch("skip_build", nil)
239
+ ios_cmd << 'skip_build=1'
240
+ android_cmd << 'skip_build=1'
241
+ end
242
+
243
+ ios_io = IO.popen(ios_cmd.join(' '), 'w')
244
+ android_io = IO.popen(android_cmd.join(' '), 'w')
236
245
 
237
246
  while expr = Readline.readline("> ", true)
238
247
  ios_io.puts expr
@@ -1,5 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ begin
4
+ require 'bundler'
5
+ Bundler.require
6
+ rescue LoadError
7
+ end
8
+
3
9
  Motion::Project::App.setup do |app|
4
10
  # Use `rake android:config' to see complete project settings.
5
11
  app.name = '<%= name %>'
@@ -1,5 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ begin
4
+ require 'bundler'
5
+ Bundler.require
6
+ rescue LoadError
7
+ end
8
+
3
9
  Motion::Project::App.setup do |app|
4
10
  # Use `rake ios:config' to see complete project settings.
5
11
  app.name = '<%= name %>'
@@ -1,5 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ begin
4
+ require 'bundler'
5
+ Bundler.require
6
+ rescue LoadError
7
+ end
8
+
3
9
  Motion::Project::App.setup do |app|
4
10
  # Use `rake ios:config' to see complete project settings.
5
11
  app.name = '<%= name %>'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipByte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  motion-flow allows you to write cross-platform
@@ -54,7 +54,6 @@ files:
54
54
  - flow/ui/android/alert.rb
55
55
  - flow/ui/android/application.rb
56
56
  - flow/ui/android/armeabi-v7a/libcss_node.a
57
- - flow/ui/android/armeabi/libcss_node.a
58
57
  - flow/ui/android/button.rb
59
58
  - flow/ui/android/camera.rb
60
59
  - flow/ui/android/color.rb
@@ -1123,7 +1122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1123
1122
  version: '0'
1124
1123
  requirements: []
1125
1124
  rubyforge_project:
1126
- rubygems_version: 2.6.4
1125
+ rubygems_version: 2.5.1
1127
1126
  signing_key:
1128
1127
  specification_version: 4
1129
1128
  summary: Cross-platform app framework for RubyMotion
Binary file