redpotion 1.2.0 → 1.3.0

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: d415539623793501c7096c6ab89fe0c138f5f7f7
4
- data.tar.gz: ea5dcb50cc68ad77920ab081885fd60b5350fce0
3
+ metadata.gz: 3679810174cad62212f3453c6cbe5f7611db602c
4
+ data.tar.gz: 59c97b1182042a1bf47fc6b6ecb4736466ee6469
5
5
  SHA512:
6
- metadata.gz: cd1fc0c4e231339eba5a5ff8cb98a4ba1d74f08721e7fe27fb480e27d419ef4eef9badf56ae0638251c19624cca920a84c38ada60047524842320076b21c9368
7
- data.tar.gz: 25c10fd5b0ed7813eec75fe2e59d49a5f2ec19840e23c1d770667c17561fe510dffc2591647ea4c3481e81fdc681bf2b04c53a8987d730d77ed7118c462a4f86
6
+ metadata.gz: ac377c93f8b763bef9dbabf3e4de8f2b3ad6a7611246316e2d824ad515a2e8b857e4546ad09d16766cc64b4fcc6d5416c0b8ab93d446ed4c5c1d3d20d2e3b8e0
7
+ data.tar.gz: fd9d7aa314eb3a8470385d3db426ffe7168d07eb68063016a3406d62b01ff4714fdcfdfcd5d1891685e664b1743bafb7d7e6b032036eed0bd06bc0a122051308
data/bin/potion CHANGED
@@ -101,7 +101,7 @@ class PotionCommandLine
101
101
  def create_app(app_name)
102
102
  puts ' Creating app'
103
103
 
104
- `motion create --template=git@github.com:infinitered/redpotion-template.git #{app_name}`
104
+ `motion create --template=https://github.com/infinitered/redpotion-template.git #{app_name}`
105
105
 
106
106
  ["bundle", "rake pod:install"].each do |command|
107
107
  puts "Running #{command}..."
@@ -137,7 +137,7 @@ class PotionCommandLine
137
137
  # TODO Disabling for now, this needs to get latest template
138
138
  def ensure_template_dir
139
139
  return if Dir.exists?(template_dir)
140
- `git clone git@github.com:infinitered/potion-template.git #{template_dir}`
140
+ `git clone https://github.com/infinitered/redpotion-template.git #{template_dir}`
141
141
  end
142
142
 
143
143
  def template_path(template_name)
@@ -10,4 +10,8 @@ class Object
10
10
  def find(*args) # Do not alias this, strange bugs happen where classes don't have methods
11
11
  rmq(*args)
12
12
  end
13
+
14
+ def find!(*args)
15
+ rmq(*args).get
16
+ end
13
17
  end
@@ -1,11 +1,25 @@
1
1
  class UIImageView
2
2
 
3
3
  def remote_image=(value)
4
- if self.respond_to?("setImageWithURL:placeholder:")
4
+ if !!defined?(SDWebImageManager)
5
+ @remote_image_operations ||= {}
6
+
7
+ # Cancel the previous remote operation if it exists
8
+ operation = @remote_image_operations[("%p" % self)]
9
+ if operation && operation.respond_to?(:cancel)
10
+ operation.cancel
11
+ @remote_image_operations[("%p" % self)] = nil
12
+ end
13
+
5
14
  value = NSURL.URLWithString(value) unless value.is_a?(NSURL)
6
- self.setImageWithURL(value, placeholder:self.image)
15
+ @remote_image_operations[("%p" % self)] = SDWebImageManager.sharedManager.downloadWithURL(value,
16
+ options:SDWebImageRefreshCached,
17
+ progress:nil,
18
+ completed: -> image, error, cacheType, finished {
19
+ self.image = image unless image.nil?
20
+ })
7
21
  else
8
- puts "\n[RedPotion ERROR] tried to set remote_image without JMImageCache cocoapod. Please add this to your Rakefile: \n\napp.pods do\n pod \"JMImageCache\"\nend\n"
22
+ puts "\n[RedPotion ERROR] tried to set remote_image without SDWebImage cocoapod. Please add this to your Rakefile: \n\napp.pods do\n pod \"SDWebImage\"\nend\n"
9
23
  end
10
24
  end
11
25
 
@@ -65,13 +65,9 @@ class UIViewController
65
65
  def view_did_load
66
66
  end
67
67
 
68
- # Monkey patch because I think that overriding viewDidLoad like this may be problematic
69
68
  alias :originalViewDidLoad :viewDidLoad
70
69
  def viewDidLoad
71
- if self.class.rmq_style_sheet_class
72
- self.rmq.stylesheet = self.class.rmq_style_sheet_class
73
- self.view.rmq.apply_style(:root_view) if self.rmq.stylesheet.respond_to?(:root_view)
74
- end
70
+ set_stylesheet
75
71
 
76
72
  self.originalViewDidLoad
77
73
  unless pm_handles_delegates?
@@ -154,6 +150,15 @@ class UIViewController
154
150
  self.will_animate_rotate(orientation, duration)
155
151
  end
156
152
 
153
+ protected
154
+
155
+ def set_stylesheet
156
+ if self.class.rmq_style_sheet_class
157
+ self.rmq.stylesheet = self.class.rmq_style_sheet_class
158
+ self.view.rmq.apply_style(:root_view) if self.rmq.stylesheet.respond_to?(:root_view)
159
+ end
160
+ end
161
+
157
162
  private
158
163
 
159
164
  def pm_handles_delegates?
@@ -1,3 +1,3 @@
1
1
  module RedPotion
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -7,6 +7,7 @@ end
7
7
  require 'ruby_motion_query'
8
8
  require 'ProMotion'
9
9
  require 'motion_print'
10
+ require 'redalert'
10
11
 
11
12
  lib_dir_path = File.dirname(File.expand_path(__FILE__))
12
13
  Motion::Project::App.setup do |app|
@@ -10,6 +10,7 @@ class <%= @name_camel_case %>Cell < UICollectionViewCell
10
10
  end
11
11
 
12
12
  def prepareForReuse
13
+ super
13
14
  @reused = true
14
15
  end
15
16
 
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: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfiniteRed
@@ -9,36 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-09 00:00:00.000000000 Z
12
+ date: 2015-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_motion_query
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.4.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 1.4.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: ProMotion
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 2.3.1
34
+ version: 2.4.2
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.3.1
41
+ version: 2.4.2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: motion_print
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -155,7 +155,7 @@ files:
155
155
  - templates/view/app/stylesheets/name_stylesheet.rb
156
156
  - templates/view/app/views/name.rb
157
157
  - templates/view/spec/views/name.rb
158
- homepage: https://github.com/infinitered/redpotion
158
+ homepage: http://redpotion.org
159
159
  licenses:
160
160
  - MIT
161
161
  metadata: {}
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.4.5
178
+ rubygems_version: 2.4.6
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: RedPotion combines RMQ, ProMotion, CDQ, AFMotion, and more for the perfect