mugatu_motion 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +0 -0
- data/README.md +26 -0
- data/Rakefile +17 -0
- data/app/app_delegate.rb +5 -0
- data/lib/mugatu_motion.rb +13 -0
- data/lib/mugatu_motion/core_ext.rb +5 -0
- data/mugatu_motion.gemspec +13 -0
- data/spec/main_spec.rb +42 -0
- metadata +68 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 75d4f4ba07faace755b6b7e4333e74416205ec69
|
4
|
+
data.tar.gz: dadd6af590fa539fa7eebb317ada527cdc2cffc0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60d313ecc6a266d22a3318089af24458f4e2281b6cbd95478976a5f689af47bcaf491a44906e67da59c1f4bcc22b18bef8ce867eea3ba1dfc1e02c37525c582f
|
7
|
+
data.tar.gz: 1811c70f47da69849ae31d0c9e567414c2ae008e42d0eaa3736c799493c44c59c597830eb96f7521dda944aff23313cc24317cf8ad4513186fb5fde17a77141c
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
File without changes
|
data/README.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# mugatu_motion
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'mugatu_motion'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install mugatu_motion
|
18
|
+
|
19
|
+
Then require the gem in your RubyMotion Gemfile:
|
20
|
+
|
21
|
+
require 'mugatu_motion'
|
22
|
+
|
23
|
+
|
24
|
+
## License
|
25
|
+
|
26
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
$:.unshift('/Library/RubyMotion/lib')
|
3
|
+
|
4
|
+
require 'motion/project/template/ios'
|
5
|
+
require './lib/mugatu_motion'
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'bundler'
|
9
|
+
require 'motion/project/template/gem/gem_tasks'
|
10
|
+
Bundler.require
|
11
|
+
rescue LoadError
|
12
|
+
end
|
13
|
+
|
14
|
+
Motion::Project::App.setup do |app|
|
15
|
+
# Use `rake config' to see complete project settings.
|
16
|
+
app.name = 'mugatu_motion'
|
17
|
+
end
|
data/app/app_delegate.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
unless defined?(Motion::Project::Config)
|
4
|
+
raise 'This file must be required within a RubyMotion Rakefile'
|
5
|
+
end
|
6
|
+
|
7
|
+
gem_dir = Gem::Specification.find_by_name('mugatu').gem_dir
|
8
|
+
lib_dir = File.dirname(File.expand_path(__FILE__))
|
9
|
+
|
10
|
+
Motion::Project::App.setup do |app|
|
11
|
+
app.files.unshift(Dir.glob(File.join(gem_dir, "lib/**/*.rb")))
|
12
|
+
app.files.unshift(Dir.glob(File.join(lib_dir, "mugatu_motion/**/*.rb")))
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = 'mugatu_motion'
|
5
|
+
s.summary = 'MugatuMotion'
|
6
|
+
s.version = '0.1.0'
|
7
|
+
s.authors = ['Steve Weiss']
|
8
|
+
s.email = ['weissst@mail.gvsu.edu']
|
9
|
+
s.homepage = 'https://github.com/sirscriptalot/mugatu_motion'
|
10
|
+
s.license = 'MIT'
|
11
|
+
s.files = `git ls-files`.split("\n")
|
12
|
+
s.add_runtime_dependency('mugatu', ['>= 0.1.0'])
|
13
|
+
end
|
data/spec/main_spec.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
class User < Mugatu::Entity
|
2
|
+
attribute :name, String
|
3
|
+
attribute :age, Integer
|
4
|
+
attribute :email, String
|
5
|
+
end
|
6
|
+
|
7
|
+
class Post < Mugatu::Entity
|
8
|
+
attribute :title, String, default_value: 'untitled'
|
9
|
+
attribute :body, String
|
10
|
+
attribute :published, Boolean, default_value: false
|
11
|
+
end
|
12
|
+
|
13
|
+
describe User do
|
14
|
+
describe '#initialize' do
|
15
|
+
it 'assigns values' do
|
16
|
+
user = User.new(name: 'Steve', age: 28, email: 'weissst@mail.gvsu.edu')
|
17
|
+
|
18
|
+
user.name.should == 'Steve'
|
19
|
+
user.age.should == 28
|
20
|
+
user.email.should == 'weissst@mail.gvsu.edu'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe Post do
|
26
|
+
describe '#initialize' do
|
27
|
+
it 'respects default values' do
|
28
|
+
post = Post.new
|
29
|
+
|
30
|
+
post.title.should == 'untitled'
|
31
|
+
post.published.should == false
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#title=' do
|
36
|
+
it 'casts value' do
|
37
|
+
post = Post.new(title: 1234)
|
38
|
+
|
39
|
+
post.title.should == '1234'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mugatu_motion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Steve Weiss
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mugatu
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.0
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- weissst@mail.gvsu.edu
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".gitignore"
|
35
|
+
- Gemfile
|
36
|
+
- LICENSE.txt
|
37
|
+
- README.md
|
38
|
+
- Rakefile
|
39
|
+
- app/app_delegate.rb
|
40
|
+
- lib/mugatu_motion.rb
|
41
|
+
- lib/mugatu_motion/core_ext.rb
|
42
|
+
- mugatu_motion.gemspec
|
43
|
+
- spec/main_spec.rb
|
44
|
+
homepage: https://github.com/sirscriptalot/mugatu_motion
|
45
|
+
licenses:
|
46
|
+
- MIT
|
47
|
+
metadata: {}
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options: []
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubyforge_project:
|
64
|
+
rubygems_version: 2.5.1
|
65
|
+
signing_key:
|
66
|
+
specification_version: 4
|
67
|
+
summary: MugatuMotion
|
68
|
+
test_files: []
|