motion-infinite 0.0.0
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 +7 -0
- data/.gitignore +16 -0
- data/.travis.yml +16 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/motion/infinite.rb +7 -0
- data/lib/motion/infinite/version.rb +5 -0
- data/motion-infinite.gemspec +38 -0
- data/script/bootstrap +33 -0
- data/script/cibuild +39 -0
- data/script/setup +24 -0
- data/script/test +46 -0
- data/script/update +13 -0
- data/templates/infinite/files/.gitignore +27 -0
- data/templates/infinite/files/.gitignore.erb +27 -0
- data/templates/infinite/files/.travis.yml +16 -0
- data/templates/infinite/files/Gemfile +17 -0
- data/templates/infinite/files/README.md.erb +9 -0
- data/templates/infinite/files/Rakefile +58 -0
- data/templates/infinite/files/app/app_delegate.rb +23 -0
- data/templates/infinite/files/app/layouts/.gitkeep +0 -0
- data/templates/infinite/files/app/layouts/news_layout.rb +23 -0
- data/templates/infinite/files/app/models/.gitkeep +0 -0
- data/templates/infinite/files/app/screens/infinite_news_screen.rb +25 -0
- data/templates/infinite/files/app/screens/news_screen.rb +40 -0
- data/templates/infinite/files/app/styles/.gitkeep +0 -0
- data/templates/infinite/files/app/views/.gitkeep +0 -0
- data/templates/infinite/files/lib/.gitkeep +0 -0
- data/templates/infinite/files/lib/__app.rb.erb +11 -0
- data/templates/infinite/files/lib/infinite_screen.rb +116 -0
- data/templates/infinite/files/resources/Default-568h@2x.png +0 -0
- data/templates/infinite/files/resources/Default-667h@2x.png +0 -0
- data/templates/infinite/files/resources/Default-736h@3x.png +0 -0
- data/templates/infinite/files/resources/en.lproj/InfoPlist.strings.erb +2 -0
- data/templates/infinite/files/resources/en.lproj/Localizable.strings +1 -0
- data/templates/infinite/files/resources/zh-Hans.lproj/InfoPlist.strings.erb +2 -0
- data/templates/infinite/files/resources/zh-Hans.lproj/Localizable.strings +1 -0
- data/templates/infinite/files/script/bootstrap +35 -0
- data/templates/infinite/files/script/cibuild +39 -0
- data/templates/infinite/files/script/setup +22 -0
- data/templates/infinite/files/script/test +41 -0
- data/templates/infinite/files/script/update +13 -0
- data/templates/infinite/files/spec/main_spec.rb +10 -0
- metadata +134 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: ea340debd8e5e06fc38359abb6db9b98399cbf09
|
|
4
|
+
data.tar.gz: 0ebc6acbec5e78141e9a753378c571b0530ccf84
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 83257dc17047f3aa637b15c852c042a794b13fa5f04d89f5733730296cfee6d389f9dc5af0983f1b68fb366ae46277fbf68751efb95a70d546b9544920f239a9
|
|
7
|
+
data.tar.gz: 717d2ad4c910827544428dffcb17e648fff9493855847e23d84a0a8f9838f4ff861c45bc2ef83a790d7efc91dfe8d63ad16bc33d756bd7d17be11dbdbbf0909a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
language: objective-c
|
|
2
|
+
osx_image: xcode8.3
|
|
3
|
+
cache:
|
|
4
|
+
# - bundler
|
|
5
|
+
- cocoapods
|
|
6
|
+
rvm: 2.4
|
|
7
|
+
before_install:
|
|
8
|
+
- (motion --version)
|
|
9
|
+
- (rvm list)
|
|
10
|
+
install:
|
|
11
|
+
- sudo motion update || echo 'RubyMotion up to date'
|
|
12
|
+
before_script:
|
|
13
|
+
- (motion --version)
|
|
14
|
+
- (ruby --version)
|
|
15
|
+
script:
|
|
16
|
+
- script/cibuild
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at liulantao@gmail.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: http://contributor-covenant.org
|
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Liu Lantao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Motion::Infinite [](https://travis-ci.org/Lax/motion-infinite)
|
|
2
|
+
|
|
3
|
+
RubyMotion Template: Infinite
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'motion-infinite'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And then execute:
|
|
14
|
+
|
|
15
|
+
$ bundle
|
|
16
|
+
|
|
17
|
+
Or install it yourself as:
|
|
18
|
+
|
|
19
|
+
$ gem install motion-infinite
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
$ motion create --template=infinite <app>
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
28
|
+
|
|
29
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
30
|
+
|
|
31
|
+
## Contributing
|
|
32
|
+
|
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Lax/motion-infinite. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
39
|
+
|
|
40
|
+
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FLax%2Fmotion-infinite?ref=badge_large)
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "motion/infinite"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'motion/infinite/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "motion-infinite"
|
|
8
|
+
spec.version = Motion::Infinite::VERSION
|
|
9
|
+
spec.authors = ["Liu Lantao"]
|
|
10
|
+
spec.email = ["liulantao@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %q{RubyMotion Template: Infinite}
|
|
13
|
+
spec.description = %q{RubyMotion Template: Infinite}
|
|
14
|
+
spec.homepage = "https://github.com/Lax/motion-infinite"
|
|
15
|
+
spec.license = "MIT"
|
|
16
|
+
|
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
19
|
+
# if spec.respond_to?(:metadata)
|
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
|
21
|
+
# else
|
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
|
23
|
+
# "public gem pushes."
|
|
24
|
+
# end
|
|
25
|
+
|
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
|
28
|
+
end
|
|
29
|
+
# spec.bindir = "exe"
|
|
30
|
+
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
31
|
+
# spec.require_paths = ["lib"]
|
|
32
|
+
|
|
33
|
+
spec.metadata = { "rubymotion_template_dir" => "templates" }
|
|
34
|
+
|
|
35
|
+
spec.add_development_dependency "bundler"
|
|
36
|
+
spec.add_development_dependency "rake"
|
|
37
|
+
spec.add_development_dependency "rspec"
|
|
38
|
+
end
|
data/script/bootstrap
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/bootstrap: Resolve all dependencies that the application requires to
|
|
4
|
+
# run.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
|
|
11
|
+
brew bundle check >/dev/null 2>&1 || {
|
|
12
|
+
echo "==> Installing Homebrew dependencies…"
|
|
13
|
+
brew bundle
|
|
14
|
+
}
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
if [ -f ".ruby-version" ] && [ -z "$(rbenv version-name 2>/dev/null)" ]; then
|
|
18
|
+
echo "==> Installing Ruby…"
|
|
19
|
+
rbenv install --skip-existing
|
|
20
|
+
which bundle >/dev/null 2>&1 || {
|
|
21
|
+
gem install bundler
|
|
22
|
+
rbenv rehash
|
|
23
|
+
}
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ -f "Gemfile" ]; then
|
|
27
|
+
echo "==> Installing gem dependencies…"
|
|
28
|
+
bundle update
|
|
29
|
+
bundle check --path vendor/gems >/dev/null 2>&1 || {
|
|
30
|
+
bundle install --path vendor/gems --quiet --without production
|
|
31
|
+
}
|
|
32
|
+
bundle show
|
|
33
|
+
fi
|
data/script/cibuild
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/cibuild: Setup environment for CI to run tests. This is primarily
|
|
4
|
+
# designed to run on the continuous integration server.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
echo "Tests started at…"
|
|
11
|
+
date "+%H:%M:%S"
|
|
12
|
+
|
|
13
|
+
# GC customizations
|
|
14
|
+
export RUBY_GC_MALLOC_LIMIT=79000000
|
|
15
|
+
export RUBY_HEAP_MIN_SLOTS=800000
|
|
16
|
+
export RUBY_HEAP_FREE_MIN=100000
|
|
17
|
+
export RUBY_HEAP_SLOTS_INCREMENT=400000
|
|
18
|
+
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
|
|
19
|
+
|
|
20
|
+
# setup environment
|
|
21
|
+
RAILS_ROOT="$(cd "$(dirname "$0")"/.. && pwd)"
|
|
22
|
+
export RAILS_ROOT
|
|
23
|
+
export RAILS_ENV="test"
|
|
24
|
+
export RACK_ROOT="$RAILS_ROOT"
|
|
25
|
+
export RACK_ENV="$RAILS_ENV"
|
|
26
|
+
|
|
27
|
+
test -d "/usr/share/rbenv/shims" && {
|
|
28
|
+
export PATH=/usr/share/rbenv/shims:$PATH
|
|
29
|
+
}
|
|
30
|
+
export RBENV_VERSION="2.1.6"
|
|
31
|
+
|
|
32
|
+
export PATH="$RACK_ROOT/bin:$PATH"
|
|
33
|
+
|
|
34
|
+
# run tests
|
|
35
|
+
echo "Running tests …"
|
|
36
|
+
date "+%H:%M:%S"
|
|
37
|
+
|
|
38
|
+
# run tests.
|
|
39
|
+
script/test
|
data/script/setup
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/setup: Set up application for the first time after cloning, or set it
|
|
4
|
+
# back to the initial first unused state.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
APP="${1:-DemoApp}"
|
|
11
|
+
|
|
12
|
+
script/bootstrap
|
|
13
|
+
|
|
14
|
+
echo "==> Setting up Circle…"
|
|
15
|
+
|
|
16
|
+
if [ -z "$RAILS_ENV" ] && [ -z "$RACK_ENV" ]; then
|
|
17
|
+
# Only things for a development environment will run inside here
|
|
18
|
+
# Do things that need to be done to the application to set up for the first
|
|
19
|
+
# time. Or things needed to be run to to reset the application back to first
|
|
20
|
+
# use experience. These things are scoped to the application's domain.
|
|
21
|
+
true
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
echo "==> Circle is now ready to go!"
|
data/script/test
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/test: Run test suite for application. Optionally pass in a path to an
|
|
4
|
+
# individual test file to run a single test.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
cd "$(dirname "$0")/.."
|
|
10
|
+
|
|
11
|
+
APP="${1:-TestApp}"
|
|
12
|
+
rm -rf "vendor/gems"
|
|
13
|
+
|
|
14
|
+
[ -z "$DEBUG" ] || set -x
|
|
15
|
+
|
|
16
|
+
RACK_ROOT="$(cd "$(dirname "$0")"/.. && pwd)"
|
|
17
|
+
export RACK_ROOT
|
|
18
|
+
|
|
19
|
+
if [ "$CI" = "true" ] || [ "$RAILS_ENV" = "test" ] || [ "$RACK_ENV" = "test" ]; then
|
|
20
|
+
# if executed and the environment is already set to `test`, then we want a
|
|
21
|
+
# clean from scratch application. This almost always means a ci environment,
|
|
22
|
+
# since we set the environment to `test` directly in `script/cibuild`.
|
|
23
|
+
script/setup "$APP"
|
|
24
|
+
else
|
|
25
|
+
# if the environment isn't set to `test`, set it to `test` and update the
|
|
26
|
+
# application to ensure all dependencies are met as well as any other things
|
|
27
|
+
# that need to be up to date, like db migrations. The environment not having
|
|
28
|
+
# already been set to `test` almost always means this is being called on it's
|
|
29
|
+
# own from a `development` environment.
|
|
30
|
+
export CI=true RAILS_ENV="test" RACK_ENV="test"
|
|
31
|
+
|
|
32
|
+
script/update "$APP"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
echo "==> Running tests…"
|
|
36
|
+
|
|
37
|
+
rm -rf "./$APP"
|
|
38
|
+
bundle exec motion create --template=infinite "$APP" && \
|
|
39
|
+
cd "$APP" && export BUNDLE_GEMFILE=$(pwd)/Gemfile
|
|
40
|
+
|
|
41
|
+
if [ -n "$1" ]; then
|
|
42
|
+
# pass arguments to test call. This is useful for calling a single test.
|
|
43
|
+
script/test "$1"
|
|
44
|
+
else
|
|
45
|
+
script/test
|
|
46
|
+
fi
|
data/script/update
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/update: Update application to run for its current checkout.
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
cd "$(dirname "$0")/.."
|
|
8
|
+
|
|
9
|
+
script/bootstrap
|
|
10
|
+
|
|
11
|
+
echo "==> Updating …"
|
|
12
|
+
# run all database migrations to ensure everything is up to date.
|
|
13
|
+
# bin/rake db:migrate
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.repl_history
|
|
2
|
+
build
|
|
3
|
+
tags
|
|
4
|
+
app/pixate_code.rb
|
|
5
|
+
resources/*.nib
|
|
6
|
+
resources/*.momd
|
|
7
|
+
resources/*.storyboardc
|
|
8
|
+
.DS_Store
|
|
9
|
+
nbproject
|
|
10
|
+
.redcar
|
|
11
|
+
#*#
|
|
12
|
+
*~
|
|
13
|
+
*.sw[po]
|
|
14
|
+
.eprj
|
|
15
|
+
.sass-cache
|
|
16
|
+
.idea
|
|
17
|
+
.dat*.*
|
|
18
|
+
|
|
19
|
+
# motion-infinite ignore
|
|
20
|
+
Gemfile.lock
|
|
21
|
+
/resources/Settings.bundle/
|
|
22
|
+
/vendor/Podfile.lock
|
|
23
|
+
/vendor/Pods
|
|
24
|
+
/vendor/build
|
|
25
|
+
/vendor/gems/
|
|
26
|
+
/.bundle/
|
|
27
|
+
/provisioning/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.repl_history
|
|
2
|
+
build
|
|
3
|
+
tags
|
|
4
|
+
app/pixate_code.rb
|
|
5
|
+
resources/*.nib
|
|
6
|
+
resources/*.momd
|
|
7
|
+
resources/*.storyboardc
|
|
8
|
+
.DS_Store
|
|
9
|
+
nbproject
|
|
10
|
+
.redcar
|
|
11
|
+
#*#
|
|
12
|
+
*~
|
|
13
|
+
*.sw[po]
|
|
14
|
+
.eprj
|
|
15
|
+
.sass-cache
|
|
16
|
+
.idea
|
|
17
|
+
.dat*.*
|
|
18
|
+
|
|
19
|
+
# motion-infinite ignore
|
|
20
|
+
Gemfile.lock
|
|
21
|
+
/resources/Settings.bundle/
|
|
22
|
+
/vendor/Podfile.lock
|
|
23
|
+
/vendor/Pods
|
|
24
|
+
/vendor/build
|
|
25
|
+
/vendor/gems/
|
|
26
|
+
/.bundle/
|
|
27
|
+
/provisioning/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
language: objective-c
|
|
2
|
+
osx_image: xcode8.3
|
|
3
|
+
cache:
|
|
4
|
+
- bundler
|
|
5
|
+
- cocoapods
|
|
6
|
+
rvm: 2.4
|
|
7
|
+
before_install:
|
|
8
|
+
- (motion --version)
|
|
9
|
+
- (rvm list)
|
|
10
|
+
install:
|
|
11
|
+
- sudo motion update || true
|
|
12
|
+
before_script:
|
|
13
|
+
- (motion --version)
|
|
14
|
+
- (ruby --version)
|
|
15
|
+
script:
|
|
16
|
+
- script/cibuild
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
gem 'rake'
|
|
4
|
+
gem 'motion-cocoapods'
|
|
5
|
+
gem 'motion-settings-bundle', github: 'picapica/motion-settings-bundle'
|
|
6
|
+
gem 'motion-acknowledgements', github: 'picapica/motion-acknowledgements'
|
|
7
|
+
|
|
8
|
+
gem 'motion-kit'
|
|
9
|
+
gem 'motion-kit-events'
|
|
10
|
+
gem 'ProMotion'
|
|
11
|
+
gem 'sugarcube', require: 'sugarcube-all'
|
|
12
|
+
gem 'afmotion'
|
|
13
|
+
gem 'moticons'
|
|
14
|
+
|
|
15
|
+
gem 'motion-html'
|
|
16
|
+
gem 'motion-blitz'
|
|
17
|
+
gem 'rm-digest'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# <%= name %>
|
|
2
|
+
|
|
3
|
+
## Contributing
|
|
4
|
+
|
|
5
|
+
1. Fork it
|
|
6
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
7
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
8
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
9
|
+
5. Create new Pull Request
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
$:.unshift("/Library/RubyMotion/lib")
|
|
3
|
+
require 'motion/project/template/ios'
|
|
4
|
+
require './lib/__app'
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
require 'bundler'
|
|
8
|
+
Bundler.require
|
|
9
|
+
rescue LoadError
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
$short_version = '0.0'
|
|
13
|
+
$version = '0.%s' % Time.now.strftime('%y%m.%d%H%M')
|
|
14
|
+
$version_fingerprint = '%s/%s/%s' % [$short_version, $version, `git log -1 --format='format:%h'`.strip]
|
|
15
|
+
|
|
16
|
+
Motion::Project::App.setup do |app|
|
|
17
|
+
app.name = App.name
|
|
18
|
+
app.identifier = 'com.your_domain_here.%s' % app.name.downcase.strip.gsub(/\s/, '_')
|
|
19
|
+
app.short_version = $short_version
|
|
20
|
+
app.version = $version
|
|
21
|
+
|
|
22
|
+
app.device_family = [:iphone, :ipad]
|
|
23
|
+
app.interface_orientations = [:portrait, :landscape_left, :landscape_right, :portrait_upside_down]
|
|
24
|
+
|
|
25
|
+
app.files += Dir.glob(File.join(app.project_dir, 'lib/**/*.rb'))
|
|
26
|
+
app.resources_dirs += %w(resources/icons)
|
|
27
|
+
app.icons = Dir.glob("resources/icons/*.png").map{|icon| icon.split("/").last}
|
|
28
|
+
|
|
29
|
+
app.info_plist['VersionFingerprint'] = $version_fingerprint
|
|
30
|
+
app.info_plist['ITSAppUsesNonExemptEncryption'] = false
|
|
31
|
+
app.info_plist['UIStatusBarHidden'] = true
|
|
32
|
+
app.info_plist['NSAppTransportSecurity'] = { NSAllowsArbitraryLoads: true }
|
|
33
|
+
# app.info_plist['UILaunchStoryboardName'] = 'Launch Screen'
|
|
34
|
+
|
|
35
|
+
app.pods do
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
app.development do
|
|
39
|
+
if ENV['CI']
|
|
40
|
+
app.codesign_certificate = nil
|
|
41
|
+
app.provisioning_profile = nil
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
app.release do
|
|
46
|
+
app.entitlements['get-task-allow'] = false
|
|
47
|
+
app.entitlements['beta-reports-active'] = true
|
|
48
|
+
app.entitlements['application-identifier'] = app.seed_id + '.' + app.identifier
|
|
49
|
+
app.entitlements['keychain-access-groups'] = [ app.seed_id + '.' + app.identifier ]
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
Motion::SettingsBundle.setup do |app|
|
|
54
|
+
app.group 'App', footer: "Version: %s" % $version_fingerprint.gsub('/', ' - '), titles: 'titles'
|
|
55
|
+
app.child "Acknowledgements" do |ack|
|
|
56
|
+
ack.child "CocoaPods", Title: 'CocoaPods' do end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class AppDelegate < PM::Delegate
|
|
2
|
+
status_bar true, animation: [:none, :slide, :fade].sample
|
|
3
|
+
|
|
4
|
+
def on_load(app, options)
|
|
5
|
+
return true if RUBYMOTION_ENV == "test"
|
|
6
|
+
open InfiniteNewsScreen.new(items: [:beijing, :chengdu, :guangzhou, :shanghai, :shenyang], screen_type: NewsScreen)
|
|
7
|
+
|
|
8
|
+
UINavigationBar.appearance.tintColor = :white.uicolor
|
|
9
|
+
UINavigationBar.appearance.barTintColor = [255, 102, 0].uicolor
|
|
10
|
+
UINavigationBar.appearance.setTitleTextAttributes(
|
|
11
|
+
NSForegroundColorAttributeName => :white.uicolor,
|
|
12
|
+
NSBaselineOffsetAttributeName => 0,
|
|
13
|
+
NSFontAttributeName => 'HelveticaNeue-Bold'.uifont(UIFont.labelFontSize)
|
|
14
|
+
)
|
|
15
|
+
UINavigationBar.appearance.setBackIndicatorImage icon_image(:awesome, :arrow_circle_left, size: UIFont.labelFontSize, color: :white.uicolor)
|
|
16
|
+
UINavigationBar.appearance.setBackIndicatorTransitionMaskImage icon_image(:awesome, :arrow_circle_o_left, size: UIFont.labelFontSize, color: :white.uicolor)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def on_open_url(args = {})
|
|
20
|
+
mp args
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class NewsLayout < MK::Layout
|
|
2
|
+
|
|
3
|
+
def layout
|
|
4
|
+
root :main do
|
|
5
|
+
add UILabel, :title
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def main_style
|
|
10
|
+
background_color :white.uicolor(0.95)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def title_style
|
|
14
|
+
text 'Hi, there!'
|
|
15
|
+
font UIFont.fontWithName("Helvetica Neue", size: UIFont.labelFontSize * 2)
|
|
16
|
+
size_to_fit
|
|
17
|
+
|
|
18
|
+
constraints do
|
|
19
|
+
center.equals(:superview)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class InfiniteNewsScreen < InfiniteScreen
|
|
2
|
+
def on_load
|
|
3
|
+
super
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def on_init
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def will_appear
|
|
10
|
+
# just before the view appears
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def on_appear
|
|
14
|
+
# just after the view appears
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def will_disappear
|
|
18
|
+
# just before the view disappears
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def on_disappear
|
|
22
|
+
# just after the view disappears
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
class NewsScreen < PM::Screen
|
|
2
|
+
title "News"._
|
|
3
|
+
|
|
4
|
+
attr_accessor :item, :index # required by InfiniteScreen
|
|
5
|
+
|
|
6
|
+
def load_view
|
|
7
|
+
self.view = layout.view
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def on_load
|
|
11
|
+
layout.get(:title).text = "%s" % self.item
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def on_init
|
|
15
|
+
set_tab_bar_item item: "News", title: "News"._
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def will_appear
|
|
19
|
+
# just before the view appears
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def on_appear
|
|
23
|
+
# just after the view appears
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def will_disappear
|
|
27
|
+
# just before the view disappears
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def on_disappear
|
|
31
|
+
# just after the view disappears
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
private
|
|
35
|
+
|
|
36
|
+
def layout
|
|
37
|
+
@layout ||= NewsLayout.new
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
class InfiniteScreen < UIPageViewController
|
|
2
|
+
include ProMotion::ScreenModule
|
|
3
|
+
|
|
4
|
+
attr_accessor :items, :screen_type
|
|
5
|
+
attr_accessor :pages, :current_page
|
|
6
|
+
|
|
7
|
+
# InfiniteScreen.new items: [], view: UIViewControllers
|
|
8
|
+
|
|
9
|
+
def on_load
|
|
10
|
+
self.items ||= []
|
|
11
|
+
self.screen_type ||= PM::Screen
|
|
12
|
+
|
|
13
|
+
self.pages = self.items.map.with_index { |item, index| self.screen_type.new item: item, index: index }
|
|
14
|
+
self.current_page = self.pages.first
|
|
15
|
+
|
|
16
|
+
init_pages
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def init_pages
|
|
20
|
+
self.dataSource = self
|
|
21
|
+
self.delegate = self
|
|
22
|
+
|
|
23
|
+
self.setViewControllers self.pages.take(1), direction: UIPageViewControllerNavigationDirectionForward, animated: true, completion: nil
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# dataSource
|
|
27
|
+
def pageViewController(pageViewController, viewControllerBeforeViewController:viewController)
|
|
28
|
+
if viewController
|
|
29
|
+
return self.pages.last if viewController.index <= 0
|
|
30
|
+
return self.pages[viewController.index - 1]
|
|
31
|
+
end
|
|
32
|
+
nil
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def pageViewController(pageViewController, viewControllerAfterViewController:viewController)
|
|
36
|
+
if viewController
|
|
37
|
+
return self.pages.first if viewController.index >= self.pages.count - 1
|
|
38
|
+
return self.pages[viewController.index + 1]
|
|
39
|
+
end
|
|
40
|
+
nil
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def presentationCountForPageViewController(pageViewController)
|
|
44
|
+
self.pages.count
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def presentationIndexForPageViewController(pageViewController)
|
|
48
|
+
self.current_page.index
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# delegate
|
|
52
|
+
def pageViewController(pageViewController, willTransitionToViewControllers:pendingViewControllers)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def pageViewController(pageViewController, didFinishAnimating:finished, previousViewControllers:previousViewControllers, transitionCompleted:completed)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def self.new(args = {})
|
|
59
|
+
s = self.alloc.initWithTransitionStyle UIPageViewControllerTransitionStyleScroll,
|
|
60
|
+
navigationOrientation: UIPageViewControllerNavigationOrientationHorizontal,
|
|
61
|
+
options: {
|
|
62
|
+
UIPageViewControllerOptionSpineLocationKey: UIPageViewControllerSpineLocationMid
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
s.screen_init(args) # Important for ProMotion stuff!
|
|
66
|
+
s
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# Highly recommended that you include these methods below
|
|
71
|
+
|
|
72
|
+
def loadView
|
|
73
|
+
self.respond_to?(:load_view) ? self.load_view : super
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def viewDidLoad
|
|
77
|
+
super
|
|
78
|
+
self.view_did_load if self.respond_to?(:view_did_load)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def viewWillAppear(animated)
|
|
82
|
+
super
|
|
83
|
+
self.view_will_appear(animated) if self.respond_to?("view_will_appear:")
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def viewDidAppear(animated)
|
|
87
|
+
super
|
|
88
|
+
self.view_did_appear(animated) if self.respond_to?("view_did_appear:")
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def viewWillDisappear(animated)
|
|
92
|
+
self.view_will_disappear(animated) if self.respond_to?("view_will_disappear:")
|
|
93
|
+
super
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def viewDidDisappear(animated)
|
|
97
|
+
self.view_did_disappear(animated) if self.respond_to?("view_did_disappear:")
|
|
98
|
+
super
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def shouldAutorotateToInterfaceOrientation(orientation)
|
|
102
|
+
self.should_rotate(orientation)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def shouldAutorotate
|
|
106
|
+
self.should_autorotate
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def willRotateToInterfaceOrientation(orientation, duration:duration)
|
|
110
|
+
self.will_rotate(orientation, duration)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def didRotateFromInterfaceOrientation(orientation)
|
|
114
|
+
self.on_rotate
|
|
115
|
+
end
|
|
116
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"Home" = "Home";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"Home" = "首页";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/bootstrap: Resolve all dependencies that the application requires to
|
|
4
|
+
# run.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
echo "==> Bootstraping…"
|
|
11
|
+
|
|
12
|
+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
|
|
13
|
+
brew bundle check >/dev/null 2>&1 || {
|
|
14
|
+
echo "==> Installing Homebrew dependencies…"
|
|
15
|
+
brew bundle
|
|
16
|
+
}
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [ -f ".ruby-version" ] && [ -z "$(rbenv version-name 2>/dev/null)" ]; then
|
|
20
|
+
echo "==> Installing Ruby…"
|
|
21
|
+
rbenv install --skip-existing
|
|
22
|
+
which bundle >/dev/null 2>&1 || {
|
|
23
|
+
gem install bundler
|
|
24
|
+
rbenv rehash
|
|
25
|
+
}
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
if [ -f "Gemfile" ]; then
|
|
29
|
+
echo "==> Installing gem dependencies…"
|
|
30
|
+
bundle update
|
|
31
|
+
bundle check --path vendor/gems >/dev/null 2>&1 || {
|
|
32
|
+
bundle install --path vendor/gems --quiet --without production
|
|
33
|
+
}
|
|
34
|
+
bundle show
|
|
35
|
+
fi
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/cibuild: Setup environment for CI to run tests. This is primarily
|
|
4
|
+
# designed to run on the continuous integration server.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
echo "Tests started at…"
|
|
11
|
+
date "+%H:%M:%S"
|
|
12
|
+
|
|
13
|
+
# GC customizations
|
|
14
|
+
export RUBY_GC_MALLOC_LIMIT=79000000
|
|
15
|
+
export RUBY_HEAP_MIN_SLOTS=800000
|
|
16
|
+
export RUBY_HEAP_FREE_MIN=100000
|
|
17
|
+
export RUBY_HEAP_SLOTS_INCREMENT=400000
|
|
18
|
+
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
|
|
19
|
+
|
|
20
|
+
# setup environment
|
|
21
|
+
RAILS_ROOT="$(cd "$(dirname "$0")"/.. && pwd)"
|
|
22
|
+
export RAILS_ROOT
|
|
23
|
+
export RAILS_ENV="test"
|
|
24
|
+
export RACK_ROOT="$RAILS_ROOT"
|
|
25
|
+
export RACK_ENV="$RAILS_ENV"
|
|
26
|
+
|
|
27
|
+
test -d "/usr/share/rbenv/shims" && {
|
|
28
|
+
export PATH=/usr/share/rbenv/shims:$PATH
|
|
29
|
+
}
|
|
30
|
+
export RBENV_VERSION="2.1.6"
|
|
31
|
+
|
|
32
|
+
export PATH="$RACK_ROOT/bin:$PATH"
|
|
33
|
+
|
|
34
|
+
# run tests
|
|
35
|
+
echo "Running tests …"
|
|
36
|
+
date "+%H:%M:%S"
|
|
37
|
+
|
|
38
|
+
# run tests.
|
|
39
|
+
script/test
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/setup: Set up application for the first time after cloning, or set it
|
|
4
|
+
# back to the initial first unused state.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
cd "$(dirname "$0")/.."
|
|
9
|
+
|
|
10
|
+
script/bootstrap
|
|
11
|
+
|
|
12
|
+
echo "==> Setting up TestApp…"
|
|
13
|
+
|
|
14
|
+
if [ -z "$RAILS_ENV" ] && [ -z "$RACK_ENV" ]; then
|
|
15
|
+
# Only things for a development environment will run inside here
|
|
16
|
+
# Do things that need to be done to the application to set up for the first
|
|
17
|
+
# time. Or things needed to be run to to reset the application back to first
|
|
18
|
+
# use experience. These things are scoped to the application's domain.
|
|
19
|
+
true
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
echo "==> App is now ready to go!"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/test: Run test suite for application. Optionally pass in a path to an
|
|
4
|
+
# individual test file to run a single test.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
cd "$(dirname "$0")/.."
|
|
10
|
+
|
|
11
|
+
[ -z "$DEBUG" ] || set -x
|
|
12
|
+
|
|
13
|
+
RACK_ROOT="$(cd "$(dirname "$0")"/.. && pwd)"
|
|
14
|
+
export RACK_ROOT
|
|
15
|
+
|
|
16
|
+
if [ "$CI" = "true" ] || [ "$RAILS_ENV" = "test" ] || [ "$RACK_ENV" = "test" ]; then
|
|
17
|
+
# if executed and the environment is already set to `test`, then we want a
|
|
18
|
+
# clean from scratch application. This almost always means a ci environment,
|
|
19
|
+
# since we set the environment to `test` directly in `script/cibuild`.
|
|
20
|
+
script/setup
|
|
21
|
+
else
|
|
22
|
+
# if the environment isn't set to `test`, set it to `test` and update the
|
|
23
|
+
# application to ensure all dependencies are met as well as any other things
|
|
24
|
+
# that need to be up to date, like db migrations. The environment not having
|
|
25
|
+
# already been set to `test` almost always means this is being called on it's
|
|
26
|
+
# own from a `development` environment.
|
|
27
|
+
export CI=true RAILS_ENV="test" RACK_ENV="test"
|
|
28
|
+
|
|
29
|
+
script/update
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
echo "==> Running tests…"
|
|
33
|
+
|
|
34
|
+
export BUNDLE_GEMFILE=$(pwd)/Gemfile
|
|
35
|
+
|
|
36
|
+
if [ -n "$1" ]; then
|
|
37
|
+
# pass arguments to test call. This is useful for calling a single test.
|
|
38
|
+
script/test "$1"
|
|
39
|
+
else
|
|
40
|
+
rake clean:all pod:install && rake pod:update spec
|
|
41
|
+
fi
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# script/update: Update application to run for its current checkout.
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
cd "$(dirname "$0")/.."
|
|
8
|
+
|
|
9
|
+
script/bootstrap
|
|
10
|
+
|
|
11
|
+
echo "==> Updating …"
|
|
12
|
+
# run all database migrations to ensure everything is up to date.
|
|
13
|
+
# bin/rake db:migrate
|
metadata
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: motion-infinite
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Liu Lantao
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
description: 'RubyMotion Template: Infinite'
|
|
56
|
+
email:
|
|
57
|
+
- liulantao@gmail.com
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- ".travis.yml"
|
|
64
|
+
- CODE_OF_CONDUCT.md
|
|
65
|
+
- Gemfile
|
|
66
|
+
- LICENSE.txt
|
|
67
|
+
- README.md
|
|
68
|
+
- Rakefile
|
|
69
|
+
- bin/console
|
|
70
|
+
- bin/setup
|
|
71
|
+
- lib/motion/infinite.rb
|
|
72
|
+
- lib/motion/infinite/version.rb
|
|
73
|
+
- motion-infinite.gemspec
|
|
74
|
+
- script/bootstrap
|
|
75
|
+
- script/cibuild
|
|
76
|
+
- script/setup
|
|
77
|
+
- script/test
|
|
78
|
+
- script/update
|
|
79
|
+
- templates/infinite/files/.gitignore
|
|
80
|
+
- templates/infinite/files/.gitignore.erb
|
|
81
|
+
- templates/infinite/files/.travis.yml
|
|
82
|
+
- templates/infinite/files/Gemfile
|
|
83
|
+
- templates/infinite/files/README.md.erb
|
|
84
|
+
- templates/infinite/files/Rakefile
|
|
85
|
+
- templates/infinite/files/app/app_delegate.rb
|
|
86
|
+
- templates/infinite/files/app/layouts/.gitkeep
|
|
87
|
+
- templates/infinite/files/app/layouts/news_layout.rb
|
|
88
|
+
- templates/infinite/files/app/models/.gitkeep
|
|
89
|
+
- templates/infinite/files/app/screens/infinite_news_screen.rb
|
|
90
|
+
- templates/infinite/files/app/screens/news_screen.rb
|
|
91
|
+
- templates/infinite/files/app/styles/.gitkeep
|
|
92
|
+
- templates/infinite/files/app/views/.gitkeep
|
|
93
|
+
- templates/infinite/files/lib/.gitkeep
|
|
94
|
+
- templates/infinite/files/lib/__app.rb.erb
|
|
95
|
+
- templates/infinite/files/lib/infinite_screen.rb
|
|
96
|
+
- templates/infinite/files/resources/Default-568h@2x.png
|
|
97
|
+
- templates/infinite/files/resources/Default-667h@2x.png
|
|
98
|
+
- templates/infinite/files/resources/Default-736h@3x.png
|
|
99
|
+
- templates/infinite/files/resources/en.lproj/InfoPlist.strings.erb
|
|
100
|
+
- templates/infinite/files/resources/en.lproj/Localizable.strings
|
|
101
|
+
- templates/infinite/files/resources/zh-Hans.lproj/InfoPlist.strings.erb
|
|
102
|
+
- templates/infinite/files/resources/zh-Hans.lproj/Localizable.strings
|
|
103
|
+
- templates/infinite/files/script/bootstrap
|
|
104
|
+
- templates/infinite/files/script/cibuild
|
|
105
|
+
- templates/infinite/files/script/setup
|
|
106
|
+
- templates/infinite/files/script/test
|
|
107
|
+
- templates/infinite/files/script/update
|
|
108
|
+
- templates/infinite/files/spec/main_spec.rb
|
|
109
|
+
homepage: https://github.com/Lax/motion-infinite
|
|
110
|
+
licenses:
|
|
111
|
+
- MIT
|
|
112
|
+
metadata:
|
|
113
|
+
rubymotion_template_dir: templates
|
|
114
|
+
post_install_message:
|
|
115
|
+
rdoc_options: []
|
|
116
|
+
require_paths:
|
|
117
|
+
- lib
|
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
|
+
requirements:
|
|
125
|
+
- - ">="
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: '0'
|
|
128
|
+
requirements: []
|
|
129
|
+
rubyforge_project:
|
|
130
|
+
rubygems_version: 2.6.8
|
|
131
|
+
signing_key:
|
|
132
|
+
specification_version: 4
|
|
133
|
+
summary: 'RubyMotion Template: Infinite'
|
|
134
|
+
test_files: []
|