jqmobi-rails 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +8 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +68 -0
- data/jqmobi-rails.gemspec +17 -0
- data/lib/jqmobi/rails/engine.rb +6 -0
- data/lib/jqmobi/rails/version.rb +7 -0
- data/lib/jqmobi/rails.rb +7 -0
- data/lib/jqmobi-rails.rb +1 -0
- data/vendor/assets/javascripts/jq.mobi.js +1894 -0
- data/vendor/assets/javascripts/jq.mobi_ujs.js +393 -0
- data/vendor/assets/javascripts/jq.ui.js +3396 -0
- data/vendor/assets/javascripts/plugins/jq.actionsheet.js +99 -0
- data/vendor/assets/javascripts/plugins/jq.alphatable.js +136 -0
- data/vendor/assets/javascripts/plugins/jq.carousel.js +415 -0
- data/vendor/assets/javascripts/plugins/jq.css3animate.js +155 -0
- data/vendor/assets/javascripts/plugins/jq.drawer.js +224 -0
- data/vendor/assets/javascripts/plugins/jq.fx.js +110 -0
- data/vendor/assets/javascripts/plugins/jq.passwordBox.js +45 -0
- data/vendor/assets/javascripts/plugins/jq.popup.js +201 -0
- data/vendor/assets/javascripts/plugins/jq.scroller.js +540 -0
- data/vendor/assets/javascripts/plugins/jq.selectBox.js +315 -0
- data/vendor/assets/javascripts/plugins/jq.shake.js +39 -0
- data/vendor/assets/javascripts/plugins/jq.social.js +113 -0
- data/vendor/assets/javascripts/plugins/jq.swipe.js +121 -0
- data/vendor/assets/javascripts/plugins/jq.template.js +26 -0
- data/vendor/assets/javascripts/plugins/jq.web.min.js +66 -0
- data/vendor/assets/stylesheets/plugins/jq.actionsheet.css +57 -0
- data/vendor/assets/stylesheets/plugins/jq.popup.css +73 -0
- data/vendor/assets/stylesheets/plugins/jq.scroller.css +10 -0
- data/vendor/assets/stylesheets/plugins/jq.selectBox.css +35 -0
- metadata +77 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 M.Shibuya
|
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
|
+
# jqmobi-rails
|
2
|
+
|
3
|
+
jQMobi integration for Rails.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'jqmobi-rails'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install jqmobi-rails
|
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,68 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require "git"
|
4
|
+
require "open-uri"
|
5
|
+
require 'zip/zip'
|
6
|
+
|
7
|
+
def unzip_file (file, destination)
|
8
|
+
Zip::ZipFile.open(file) { |zip_file|
|
9
|
+
zip_file.each { |f|
|
10
|
+
f_path=File.join(destination, f.name)
|
11
|
+
FileUtils.mkdir_p(File.dirname(f_path))
|
12
|
+
zip_file.extract(f, f_path) unless File.exist?(f_path)
|
13
|
+
}
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
def update_version
|
18
|
+
version_path = File.expand_path('../lib/jqmobi/rails/version.rb', __FILE__)
|
19
|
+
version = File.read(version_path, :encoding => Encoding::UTF_8)
|
20
|
+
yield version
|
21
|
+
File.write(version_path, version)
|
22
|
+
end
|
23
|
+
|
24
|
+
desc %(Update both jq.mobi and jqmobi-ujs libraries)
|
25
|
+
multitask :default => ['update:jqmobi', 'update:ujs']
|
26
|
+
|
27
|
+
namespace :update do
|
28
|
+
|
29
|
+
desc %(Update jq.mobi libraries)
|
30
|
+
task :jqmobi do
|
31
|
+
if ENV['JQMOBI']
|
32
|
+
ver = ENV['JQMOBI']
|
33
|
+
src = File.expand_path("../tmp/#{ver}", __FILE__)
|
34
|
+
FileUtils.rm_rf(src)
|
35
|
+
zip_path = File.expand_path("../tmp/#{ver}.zip", __FILE__)
|
36
|
+
File.open(zip_path, "w") do |file|
|
37
|
+
open("http://cloud.github.com/downloads/appMobi/jQ.Mobi/#{ver}.zip") { |f| file.write(f.read) }
|
38
|
+
end
|
39
|
+
unzip_file(zip_path, File.expand_path("../tmp/", __FILE__))
|
40
|
+
else
|
41
|
+
src = File.expand_path('../tmp/jqmobi', __FILE__)
|
42
|
+
FileUtils.rm_rf(src)
|
43
|
+
git = Git.clone('git://github.com/appMobi/jQ.Mobi.git', src)
|
44
|
+
ver = git.revparse('HEAD')
|
45
|
+
end
|
46
|
+
dest = File.expand_path('../', __FILE__)
|
47
|
+
FileUtils.copy(File.join(src, 'jq.mobi.js'), File.join(dest, 'vendor/assets/javascripts/jq.mobi.js'))
|
48
|
+
FileUtils.copy(File.join(src, 'ui', 'jq.ui.js'), File.join(dest, 'vendor/assets/javascripts/jq.ui.js'))
|
49
|
+
Dir.glob(File.join(src, 'plugins', '*.js')) do |file|
|
50
|
+
FileUtils.copy(file, File.join(dest, 'vendor/assets/javascripts/plugins', File.split(file).last))
|
51
|
+
end
|
52
|
+
Dir.glob(File.join(src, 'plugins', 'css', '*.css')) do |file|
|
53
|
+
FileUtils.copy(file, File.join(dest, 'vendor/assets/stylesheets/plugins', File.split(file).last))
|
54
|
+
end
|
55
|
+
update_version{|v| v.gsub!(/JQMOBI_VERSION = "[^"]+"/, "JQMOBI_VERSION = \"#{ver}\"") }
|
56
|
+
end
|
57
|
+
|
58
|
+
desc %(Update jqmobi-ujs library)
|
59
|
+
task :ujs do
|
60
|
+
FileUtils.rm_rf(File.expand_path('../tmp/jqmobi-ujs', __FILE__))
|
61
|
+
git = Git.clone('git://github.com/mshibuya/jqmobi-ujs.git', File.expand_path('../tmp/jqmobi-ujs', __FILE__))
|
62
|
+
FileUtils.copy(
|
63
|
+
File.expand_path('../tmp/jqmobi-ujs/src/rails.js', __FILE__),
|
64
|
+
File.expand_path('../vendor/assets/javascripts/jq.mobi_ujs.js', __FILE__)
|
65
|
+
)
|
66
|
+
update_version{|v| v.gsub!(/JQMOBI_UJS_VERSION = "[0-9a-f]{40}"/, "JQMOBI_UJS_VERSION = \"#{git.revparse('HEAD')}\"") }
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/jqmobi/rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["M.Shibuya"]
|
6
|
+
gem.email = ["mit.shibuya@gmail.com"]
|
7
|
+
gem.description = %q{This gem provides jQMobi and jQMobi-ujs driver for Rails3 application.}
|
8
|
+
gem.summary = %q{jQMobi integration for Rails.}
|
9
|
+
gem.homepage = "https://github.com/mshibuya/jqmobi-rails"
|
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 = "jqmobi-rails"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Jqmobi::Rails::VERSION
|
17
|
+
end
|
data/lib/jqmobi/rails.rb
ADDED
data/lib/jqmobi-rails.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "jqmobi/rails"
|