ruby_motion_query 1.3.0 → 1.3.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: f07e29c003088b2fdb825513424edf07e8673300
4
- data.tar.gz: 17091f33590d403601b76abcb6053b101cde9bdb
3
+ metadata.gz: b9eb30a7a93515b83eec06678d84d454f2a886a7
4
+ data.tar.gz: 3d1f5a83228e5da2ae5c65049c4be900b96f19c4
5
5
  SHA512:
6
- metadata.gz: f08414538bd10286c20ee97834216cc562de28b5bf348d0443143b773469c1ca9e087c20b3dae73c969845f9fc81edf9d362e90993d9fa38d46c8e4b2336642b
7
- data.tar.gz: 7f21906b0acc652fe1221f9b957c07139a5fb6785f0b6624e656e3229b7bca59d6e470e916ab8e578cffb1bb4601deb24bf33248754dbf35669c2e126c598f9f
6
+ metadata.gz: 9e650c864d96733422b6e8f7f61d0dd00ef8a420302d014d3b1b74f9b28c2575abfbe4d324f66ce5aa9b21c39edf9d70cca8519ae68f62142f35fde71bfecf24
7
+ data.tar.gz: e5a7b72a5156d499fb5167688a95193105c7431b32f14da937cd03fad1222734dd67e182d99d958bd9ff437dc379b34569b19bd120585dda9c6de772f9a64e07
data/motion/ext.rb CHANGED
@@ -71,8 +71,10 @@ if RUBYMOTION_ENV == "development"
71
71
 
72
72
  def enable_rmq_live_stylesheets(interval)
73
73
  # Get list of stylesheet files
74
- root_path = File.dirname(__FILE__).gsub(/motion$/,"")
75
- path_query = "#{root_path}app/stylesheets/*.rb"
74
+ return unless root_path = RubyMotionQuery::RMQ.project_path
75
+
76
+ path_query = "#{root_path}/app/stylesheets/*.rb"
77
+ puts path_query if @live_reload_debug
76
78
  stylesheet_file_paths = Dir.glob(path_query)
77
79
  stylesheet_file_paths.delete_if{|stylesheet| stylesheet =~ /application_stylesheet\.rb$/}
78
80
 
@@ -100,6 +100,25 @@ module RubyMotionQuery
100
100
  out << " SUBVIEWS count: #{view.subviews.length}\n"
101
101
  out
102
102
  end
103
+
104
+ if RUBYMOTION_ENV == "development"
105
+ # To use this, put this in your Rakefile:
106
+ # app.development do
107
+ # app.info_plist["ProjectRootPath"] = File.dirname(__FILE__)
108
+ # end
109
+ def project_path
110
+ if ppath = NSBundle.mainBundle.infoDictionary["ProjectRootPath"]
111
+ else
112
+ puts %(
113
+ [RMQ Warning] The project_path method requires that this code is in your RakeFile:
114
+ app.development do
115
+ app.info_plist["ProjectRootPath"] = File.dirname(__FILE__)
116
+ end)
117
+ end
118
+
119
+ ppath
120
+ end
121
+ end
103
122
  end
104
123
 
105
124
  end
@@ -1,5 +1,5 @@
1
1
  module RubyMotionQuery
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
 
4
4
  class RMQ
5
5
  def version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_motion_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Werth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-14 00:00:00.000000000 Z
12
+ date: 2015-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon