jqmobi-rails 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +8 -0
  3. data/LICENSE +22 -0
  4. data/README.md +29 -0
  5. data/Rakefile +68 -0
  6. data/jqmobi-rails.gemspec +17 -0
  7. data/lib/jqmobi/rails/engine.rb +6 -0
  8. data/lib/jqmobi/rails/version.rb +7 -0
  9. data/lib/jqmobi/rails.rb +7 -0
  10. data/lib/jqmobi-rails.rb +1 -0
  11. data/vendor/assets/javascripts/jq.mobi.js +1894 -0
  12. data/vendor/assets/javascripts/jq.mobi_ujs.js +393 -0
  13. data/vendor/assets/javascripts/jq.ui.js +3396 -0
  14. data/vendor/assets/javascripts/plugins/jq.actionsheet.js +99 -0
  15. data/vendor/assets/javascripts/plugins/jq.alphatable.js +136 -0
  16. data/vendor/assets/javascripts/plugins/jq.carousel.js +415 -0
  17. data/vendor/assets/javascripts/plugins/jq.css3animate.js +155 -0
  18. data/vendor/assets/javascripts/plugins/jq.drawer.js +224 -0
  19. data/vendor/assets/javascripts/plugins/jq.fx.js +110 -0
  20. data/vendor/assets/javascripts/plugins/jq.passwordBox.js +45 -0
  21. data/vendor/assets/javascripts/plugins/jq.popup.js +201 -0
  22. data/vendor/assets/javascripts/plugins/jq.scroller.js +540 -0
  23. data/vendor/assets/javascripts/plugins/jq.selectBox.js +315 -0
  24. data/vendor/assets/javascripts/plugins/jq.shake.js +39 -0
  25. data/vendor/assets/javascripts/plugins/jq.social.js +113 -0
  26. data/vendor/assets/javascripts/plugins/jq.swipe.js +121 -0
  27. data/vendor/assets/javascripts/plugins/jq.template.js +26 -0
  28. data/vendor/assets/javascripts/plugins/jq.web.min.js +66 -0
  29. data/vendor/assets/stylesheets/plugins/jq.actionsheet.css +57 -0
  30. data/vendor/assets/stylesheets/plugins/jq.popup.css +73 -0
  31. data/vendor/assets/stylesheets/plugins/jq.scroller.css +10 -0
  32. data/vendor/assets/stylesheets/plugins/jq.selectBox.css +35 -0
  33. metadata +77 -0
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'git'
5
+ end
6
+
7
+ # Specify your gem's dependencies in jqmobi-rails.gemspec
8
+ gemspec
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
@@ -0,0 +1,6 @@
1
+ module Jqmobi
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ module Jqmobi
2
+ module Rails
3
+ VERSION = "0.0.0"
4
+ JQMOBI_VERSION = "1.02a"
5
+ JQMOBI_UJS_VERSION = "707a0ee59efbe59d02b52efcf79f45fabc603305"
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require "jqmobi/rails/engine"
2
+ require "jqmobi/rails/version"
3
+
4
+ module Jqmobi
5
+ module Rails
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ require "jqmobi/rails"