walt 0.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.gitignore +2 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +33 -26
- data/README.md +20 -7
- data/examples/Apple/vendor/Podfile.lock +3 -4
- data/lib/walt.rb +4 -24
- data/lib/walt/animation.rb +2 -0
- data/lib/walt/animation_set.rb +2 -0
- data/lib/walt/asset/asset.rb +2 -0
- data/lib/walt/asset/image.rb +5 -0
- data/lib/walt/asset/text.rb +2 -0
- data/lib/walt/operation/base.rb +2 -0
- data/lib/walt/operation/fade.rb +2 -0
- data/lib/walt/operation/move.rb +2 -0
- data/lib/walt/operation/rotate.rb +2 -0
- data/lib/walt/operation/scale.rb +2 -0
- data/lib/walt/version.rb +1 -1
- data/spec/asset/image_spec.rb +20 -0
- data/walt.gemspec +3 -3
- metadata +18 -34
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTQ1NzMxYTY4MWVjYWI4ZmQ5MGI2ZDM1ODQ1ZDY0ZDFiNDVlMjZlOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTIzZjg3YTJiMjA0NGQzZTQ5OGIyNDI0YTBmNzkxMThiZTkyZjViOQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NThiMWIyMDM0ZGYwMjQ4ZTM3MzIxOWMzMjE5MjEwZDE0MzVkOTczNjA3ODYx
|
10
|
+
MDU0NTZjYjJjYzA1YTU4M2YyMzljNWI5NzUyNDI3M2M1ZDk4Y2JjNTA4OGQ3
|
11
|
+
ODc3YTE5YzQxYjUxYTZiMWZmNjIyY2IxNjE4YjYxNmMwM2I1ZGM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTZmYTRhYjY0ZDZhNzVmNjA3YTc4YjMyMzVjMGI5ZDA5ZmI5MjU1OWU3MDcy
|
14
|
+
ODg0ZmJkYzJkNTlhMGNiNmY3YjZiMmIzMTczNGIxZTIwZmExMzg3MGY3MzQ1
|
15
|
+
OTM3ZWI5YmRlMjQ0MjMyZTBiMGM2ZjA0Mjk4M2M1MmM5NWIxMWQ=
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,56 +1,63 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
walt (0.1)
|
5
|
-
|
6
|
-
|
7
|
-
motion-
|
4
|
+
walt (0.1.2)
|
5
|
+
bubble-wrap (~> 1.3.0)
|
6
|
+
motion-cocoapods (~> 1.3.0)
|
7
|
+
motion-require (~> 0.0.3)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (3.2.
|
13
|
-
i18n (
|
12
|
+
activesupport (3.2.13)
|
13
|
+
i18n (= 0.6.1)
|
14
14
|
multi_json (~> 1.0)
|
15
|
-
addressable (2.3.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
addressable (2.3.4)
|
16
|
+
bubble-wrap (1.3.0)
|
17
|
+
claide (0.2.0)
|
18
|
+
cocoapods (0.19.1)
|
19
|
+
activesupport (~> 3.2.13)
|
20
|
+
claide (~> 0.2.0)
|
21
|
+
cocoapods-core (= 0.19.1)
|
22
|
+
cocoapods-downloader (~> 0.1.0)
|
21
23
|
colored (~> 1.2)
|
22
24
|
escape (~> 0.0.4)
|
23
25
|
faraday (~> 0.8.1)
|
24
26
|
json (~> 1.7.3)
|
25
27
|
octokit (~> 1.7)
|
26
28
|
open4 (~> 1.3.0)
|
27
|
-
rake (~> 0.
|
28
|
-
xcodeproj (~> 0.
|
29
|
+
rake (~> 10.0.0)
|
30
|
+
xcodeproj (~> 0.5.5)
|
31
|
+
cocoapods-core (0.19.1)
|
32
|
+
activesupport (~> 3.2.13)
|
33
|
+
rake (~> 10.0.0)
|
34
|
+
cocoapods-downloader (0.1.0)
|
29
35
|
colored (1.2)
|
30
36
|
escape (0.0.4)
|
31
|
-
faraday (0.8.
|
37
|
+
faraday (0.8.7)
|
32
38
|
multipart-post (~> 1.1)
|
33
39
|
faraday_middleware (0.9.0)
|
34
40
|
faraday (>= 0.7.4, < 0.9)
|
35
|
-
hashie (
|
41
|
+
hashie (2.0.5)
|
36
42
|
i18n (0.6.1)
|
37
|
-
json (1.7.
|
38
|
-
motion-cocoapods (1.2
|
39
|
-
cocoapods (>= 0.
|
40
|
-
|
41
|
-
|
43
|
+
json (1.7.7)
|
44
|
+
motion-cocoapods (1.3.2)
|
45
|
+
cocoapods (>= 0.17.0)
|
46
|
+
motion-require (0.0.6)
|
47
|
+
multi_json (1.7.3)
|
48
|
+
multipart-post (1.2.0)
|
42
49
|
netrc (0.7.7)
|
43
|
-
octokit (1.
|
50
|
+
octokit (1.24.0)
|
44
51
|
addressable (~> 2.2)
|
45
52
|
faraday (~> 0.8)
|
46
53
|
faraday_middleware (~> 0.9)
|
47
|
-
hashie (~>
|
54
|
+
hashie (~> 2.0)
|
48
55
|
multi_json (~> 1.3)
|
49
56
|
netrc (~> 0.7.7)
|
50
57
|
open4 (1.3.0)
|
51
|
-
rake (0.
|
52
|
-
xcodeproj (0.
|
53
|
-
activesupport (~> 3.2.
|
58
|
+
rake (10.0.4)
|
59
|
+
xcodeproj (0.5.5)
|
60
|
+
activesupport (~> 3.2.13)
|
54
61
|
colored (~> 1.2)
|
55
62
|
|
56
63
|
PLATFORMS
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
# Walt
|
1
|
+
# Walt for [RubyMotion](http://rubymotion.com)
|
2
2
|
|
3
|
-
|
3
|
+
Tired of verbose animation chains in iOS?
|
4
|
+
|
5
|
+
With Walt, you can make this:
|
4
6
|
|
5
7
|

|
6
8
|
|
@@ -41,17 +43,17 @@ First install the `Walt` gem:
|
|
41
43
|
|
42
44
|
`gem install walt`
|
43
45
|
|
44
|
-
Add `Walt` to your Gemfile or require it in your `Rakefile`:
|
46
|
+
Add `Walt` to your `Gemfile` or require it in your `Rakefile`:
|
45
47
|
|
46
48
|
```ruby
|
47
|
-
|
49
|
+
gem 'walt'
|
48
50
|
```
|
49
51
|
|
50
52
|
```ruby
|
51
|
-
|
53
|
+
require 'walt'
|
52
54
|
```
|
53
55
|
|
54
|
-
|
56
|
+
If you're going to use the image-URL loading component of Walt, add [AFNetworking](https://github.com/AFNetworking/AFNetworking) to your `pods`:
|
55
57
|
|
56
58
|
```ruby
|
57
59
|
app.pods do
|
@@ -114,7 +116,7 @@ Walt comes with a few nifty operations, and adding your own is easy.
|
|
114
116
|
|
115
117
|
```ruby
|
116
118
|
{
|
117
|
-
|
119
|
+
rotate: "my_id",
|
118
120
|
from: 20, # in degrees
|
119
121
|
to: 50
|
120
122
|
}
|
@@ -191,3 +193,14 @@ Animations can be chained using an animation's `:after` property, which takes an
|
|
191
193
|
}
|
192
194
|
}
|
193
195
|
```
|
196
|
+
|
197
|
+
## Contact
|
198
|
+
|
199
|
+
Clay Allsopp ([http://clayallsopp.com](http://clayallsopp.com))
|
200
|
+
|
201
|
+
- [http://twitter.com/clayallsopp](http://twitter.com/clayallsopp)
|
202
|
+
- [clay@usepropeller.com](clay@usepropeller.com)
|
203
|
+
|
204
|
+
## License
|
205
|
+
|
206
|
+
Walt is available under the MIT license. See the LICENSE file for more info.
|
data/lib/walt.rb
CHANGED
@@ -1,27 +1,7 @@
|
|
1
|
-
require "walt/version"
|
2
|
-
require 'bubble-wrap/core'
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "walt/version"))
|
3
2
|
require 'motion-cocoapods'
|
3
|
+
require 'bubble-wrap/core'
|
4
4
|
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
BW.require File.expand_path('../walt/**/*.rb', __FILE__) do
|
9
|
-
end
|
10
|
-
|
11
|
-
Motion::Project::App.setup do |app|
|
12
|
-
depends = {}
|
13
|
-
|
14
|
-
['fade','move'].each {|file|
|
15
|
-
_f = File.expand_path("../walt/operation/#{file}.rb", __FILE__)
|
16
|
-
depends[_f] ||= []
|
17
|
-
depends[_f] << File.expand_path("../walt/operation/base.rb", __FILE__)
|
18
|
-
}
|
19
|
-
|
20
|
-
['image'].each {|file|
|
21
|
-
_f = File.expand_path("../walt/asset/#{file}.rb", __FILE__)
|
22
|
-
depends[_f] ||= []
|
23
|
-
depends[_f] << File.expand_path("../walt/asset/asset.rb", __FILE__)
|
24
|
-
}
|
5
|
+
require 'motion-require'
|
25
6
|
|
26
|
-
|
27
|
-
end
|
7
|
+
Motion::Require.all(Dir.glob(File.expand_path('../walt/**/*.rb', __FILE__)))
|
data/lib/walt/animation.rb
CHANGED
data/lib/walt/animation_set.rb
CHANGED
data/lib/walt/asset/asset.rb
CHANGED
data/lib/walt/asset/image.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
motion_require "asset"
|
2
|
+
|
1
3
|
=begin
|
2
4
|
{
|
3
5
|
url: "http://mysite.com/pic.jpg"
|
@@ -26,6 +28,9 @@ module Walt
|
|
26
28
|
@view.contentMode = self.view_content_mode
|
27
29
|
@view.clipsToBounds = self.clips_to_bounds
|
28
30
|
url = NSURL.URLWithString(self.url)
|
31
|
+
if !@view.respond_to?("af_imageRequestOperation")
|
32
|
+
raise "You need to add the AFNetworking pod for remote images"
|
33
|
+
end
|
29
34
|
@view.setImageWithURLRequest(NSURLRequest.requestWithURL(url),
|
30
35
|
placeholderImage:nil,
|
31
36
|
success: lambda {|request, response, image|
|
data/lib/walt/asset/text.rb
CHANGED
data/lib/walt/operation/base.rb
CHANGED
data/lib/walt/operation/fade.rb
CHANGED
data/lib/walt/operation/move.rb
CHANGED
data/lib/walt/operation/scale.rb
CHANGED
data/lib/walt/version.rb
CHANGED
data/spec/asset/image_spec.rb
CHANGED
@@ -12,5 +12,25 @@ describe "Walt::ImageAsset" do
|
|
12
12
|
asset = Walt::ImageAsset.new(url: "http://upload.wikimedia.org/wikipedia/commons/3/30/Googlelogo.png", id: "google")
|
13
13
|
asset.view.af_imageRequestOperation.should.not == nil
|
14
14
|
end
|
15
|
+
|
16
|
+
it "should raise exception without method" do
|
17
|
+
asset = Walt::ImageAsset.new(url: "http://upload.wikimedia.org/wikipedia/commons/3/30/Googlelogo.png", id: "google")
|
18
|
+
UIImageView.class_eval do
|
19
|
+
alias_method :respond_to_old?, :respond_to?
|
20
|
+
def respond_to?(val)
|
21
|
+
if val == "af_imageRequestOperation"
|
22
|
+
return false
|
23
|
+
end
|
24
|
+
respond_to_old?(val)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
lambda { asset.view }.should.raise Exception
|
28
|
+
UIImageView.class_eval do
|
29
|
+
def respond_to?(val)
|
30
|
+
respond_to_old?(val)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
lambda { asset.view }.should.not.raise Exception
|
34
|
+
end
|
15
35
|
end
|
16
36
|
end
|
data/walt.gemspec
CHANGED
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
|
17
|
-
s.add_dependency "
|
18
|
-
s.add_dependency "
|
19
|
-
s.add_dependency "
|
17
|
+
s.add_dependency "motion-cocoapods", "~> 1.3.0"
|
18
|
+
s.add_dependency "motion-require", "~> 0.0.3"
|
19
|
+
s.add_dependency "bubble-wrap", "~> 1.3.0"
|
20
20
|
s.add_development_dependency 'rake'
|
21
21
|
end
|
metadata
CHANGED
@@ -1,68 +1,60 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: walt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Clay Allsopp
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: motion-cocoapods
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
19
|
+
version: 1.3.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
26
|
+
version: 1.3.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: motion-require
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: 0.0.3
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
version: 0.0.3
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: bubble-wrap
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
47
|
+
version: 1.3.0
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
54
|
+
version: 1.3.0
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -131,33 +122,26 @@ files:
|
|
131
122
|
- walt.gemspec
|
132
123
|
homepage: https://github.com/clayallsopp/walt
|
133
124
|
licenses: []
|
125
|
+
metadata: {}
|
134
126
|
post_install_message:
|
135
127
|
rdoc_options: []
|
136
128
|
require_paths:
|
137
129
|
- lib
|
138
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
131
|
requirements:
|
141
132
|
- - ! '>='
|
142
133
|
- !ruby/object:Gem::Version
|
143
134
|
version: '0'
|
144
|
-
segments:
|
145
|
-
- 0
|
146
|
-
hash: -3169356068372827673
|
147
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
136
|
requirements:
|
150
137
|
- - ! '>='
|
151
138
|
- !ruby/object:Gem::Version
|
152
139
|
version: '0'
|
153
|
-
segments:
|
154
|
-
- 0
|
155
|
-
hash: -3169356068372827673
|
156
140
|
requirements: []
|
157
141
|
rubyforge_project:
|
158
|
-
rubygems_version:
|
142
|
+
rubygems_version: 2.0.3
|
159
143
|
signing_key:
|
160
|
-
specification_version:
|
144
|
+
specification_version: 4
|
161
145
|
summary: Fast, frictionless iOS animations
|
162
146
|
test_files:
|
163
147
|
- spec/animation_set_spec.rb
|