lotion 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +5 -0
- data/lib/lotion/application.rb +9 -0
- data/lib/lotion/concern.rb +22 -0
- data/lib/lotion/version.rb +3 -0
- data/lib/lotion.rb +9 -0
- data/lotion.gemspec +21 -0
- data/spec/lotion/application_spec.rb +16 -0
- data/spec/lotion/concern_spec.rb +46 -0
- data/spec/lotion/files_spec.rb +11 -0
- data/spec/spec_helper.rb +6 -0
- metadata +95 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Jeremy Ruppel
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Lotion
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'lotion'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install lotion
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Lotion
|
2
|
+
module Concern
|
3
|
+
|
4
|
+
def self.extended( base )
|
5
|
+
base.instance_exec do
|
6
|
+
|
7
|
+
def included( base=nil, &block )
|
8
|
+
if block_given?
|
9
|
+
@_included_block = block
|
10
|
+
else
|
11
|
+
if const_defined? :ClassMethods
|
12
|
+
base.extend const_get( :ClassMethods )
|
13
|
+
end
|
14
|
+
if @_included_block
|
15
|
+
base.class_eval &@_included_block
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/lotion.rb
ADDED
data/lotion.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/lotion/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Jeremy Ruppel"]
|
6
|
+
gem.email = ["jeremy.ruppel@gmail.com"]
|
7
|
+
gem.description = %q{Silky smooth helpers for RubyMotion}
|
8
|
+
gem.summary = %q{Silky smooth helpers for RubyMotion}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "lotion"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Lotion::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'rake', '>= 0.9.2.2'
|
19
|
+
|
20
|
+
gem.add_development_dependency 'rspec', '>= 2.10.0'
|
21
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Lotion::Application do
|
4
|
+
subject { Class.new do
|
5
|
+
include Lotion::Application
|
6
|
+
end.new }
|
7
|
+
|
8
|
+
it { should respond_to( :application ) }
|
9
|
+
|
10
|
+
let( :application ){ double 'application' }
|
11
|
+
let( :options ){ double 'launch options' }
|
12
|
+
|
13
|
+
it 'should return true, of course' do
|
14
|
+
subject.application( application, options ).should == true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Lotion::Concern do
|
4
|
+
|
5
|
+
let( :concern ){ Module.new do
|
6
|
+
extend Lotion::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
$woot = self
|
10
|
+
end
|
11
|
+
|
12
|
+
def foo
|
13
|
+
'foo!'
|
14
|
+
end
|
15
|
+
|
16
|
+
module ClassMethods
|
17
|
+
|
18
|
+
def bar
|
19
|
+
'bar!'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end }
|
23
|
+
|
24
|
+
let( :klass ){ Class.new }
|
25
|
+
|
26
|
+
before do
|
27
|
+
klass.send :include, concern
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'class methods' do
|
31
|
+
subject { klass }
|
32
|
+
it { should respond_to( :bar ) }
|
33
|
+
its( :bar ){ should eq( 'bar!' ) }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'instance methods' do
|
37
|
+
subject { klass.new }
|
38
|
+
it { should respond_to( :foo ) }
|
39
|
+
its( :foo ){ should eq( 'foo!' ) }
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'included block' do
|
43
|
+
subject { $woot }
|
44
|
+
it { should eq( klass ) }
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Lotion do
|
4
|
+
subject { Lotion::FILES }
|
5
|
+
|
6
|
+
let( :path ){ File.expand_path( File.join( __FILE__, '../../..' ) ) }
|
7
|
+
|
8
|
+
it { should include( "#{path}/lib/lotion.rb" ) }
|
9
|
+
it { should include( "#{path}/lib/lotion/concern.rb" ) }
|
10
|
+
it { should include( "#{path}/lib/lotion/version.rb" ) }
|
11
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lotion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jeremy Ruppel
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.2.2
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.2.2
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.10.0
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.10.0
|
46
|
+
description: Silky smooth helpers for RubyMotion
|
47
|
+
email:
|
48
|
+
- jeremy.ruppel@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- LICENSE
|
56
|
+
- README.md
|
57
|
+
- Rakefile
|
58
|
+
- lib/lotion.rb
|
59
|
+
- lib/lotion/application.rb
|
60
|
+
- lib/lotion/concern.rb
|
61
|
+
- lib/lotion/version.rb
|
62
|
+
- lotion.gemspec
|
63
|
+
- spec/lotion/application_spec.rb
|
64
|
+
- spec/lotion/concern_spec.rb
|
65
|
+
- spec/lotion/files_spec.rb
|
66
|
+
- spec/spec_helper.rb
|
67
|
+
homepage: ''
|
68
|
+
licenses: []
|
69
|
+
post_install_message:
|
70
|
+
rdoc_options: []
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 1.8.19
|
88
|
+
signing_key:
|
89
|
+
specification_version: 3
|
90
|
+
summary: Silky smooth helpers for RubyMotion
|
91
|
+
test_files:
|
92
|
+
- spec/lotion/application_spec.rb
|
93
|
+
- spec/lotion/concern_spec.rb
|
94
|
+
- spec/lotion/files_spec.rb
|
95
|
+
- spec/spec_helper.rb
|