sencha-touch2-rails 2.0.1.1.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.
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # Sencha::Touch2::Rails
2
+
3
+ This is a simple Rails asset pipeline gem packaging the [Sencha Touch
4
+ Framework](http://www.sencha.com/products/touch/) (GPL version). It is
5
+ loosely based on [ext\_rails\_shim](https://github.com/sakuro/ext_rails_shim),
6
+ but without any Rails integration besides making the assets available to
7
+ the asset pipeline.
8
+
9
+ The currently bundled version is Sencha Touch 2.0.1.1 GPL
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'sencha-touch2-rails'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install sencha-touch2-rails
24
+
25
+ ## Usage
26
+
27
+ Just include the desired theme css file
28
+
29
+ <%= stylesheet_include_tag 'sencha-touch2-rails/apple' %>
30
+
31
+ and JS file
32
+
33
+ <%= javascript_include_tag 'sencha-touch2-rails/sencha-touch-all' %>
34
+
35
+ Don't forget to add the chosen files to config.assets.precompile
36
+
37
+ config.assets.precompile << 'sencha-touch2-rails/sencha-touch-all'
38
+ config.assets.precompile << 'sencha-touch2-rails/apple.css'
39
+
40
+ Note: The sencha-touch-all\*.js versions should be used, as dynamic class
41
+ loading is incompatible with the asset pipeline.
42
+
43
+ ## Rake task
44
+
45
+ You can fork this gem and run
46
+
47
+ TOUCH_DIR=/path/to/sencha-touch-2.x.x.x rake sencha-touch2-rails:install
48
+
49
+ to rebuild Sencha Touch, i.e. when you built your own theme.
50
+
51
+ ## License
52
+
53
+ [GPLv3](http://www.gnu.org/copyleft/gpl.html) like Sencha Touch.
54
+
55
+ ## Contributing
56
+
57
+ 1. Fork it
58
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
59
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
60
+ 4. Push to the branch (`git push origin my-new-feature`)
61
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ load File.join(File.dirname(__FILE__), 'tasks/sencha-touch2-rails.rake')
@@ -0,0 +1,7 @@
1
+ module Sencha
2
+ module Touch2
3
+ module Rails
4
+ VERSION = "2.0.1.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require "sencha-touch2-rails/version"
2
+
3
+ module Sencha
4
+ module Touch2
5
+ module Rails
6
+ class Engine < ::Rails::Engine
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/sencha-touch2-rails/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Paul Schyska"]
6
+ gem.email = ["pschyska@googlemail.com"]
7
+ gem.description = %q{Rails asset gem for the Sencha Touch Framework}
8
+ gem.summary = %q{Rails asset gem for the Sencha Touch Framework}
9
+ gem.homepage = "https://github.com/pschyska/sencha-touch2-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 = "sencha-touch2-rails"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Sencha::Touch2::Rails::VERSION
17
+
18
+ gem.add_development_dependency "rake"
19
+ gem.add_development_dependency "compass"
20
+ end
@@ -0,0 +1,43 @@
1
+ # based on https://github.com/sakuro/ext_rails_shim/blob/master/lib/tasks/ext_rails_shim_tasks.rake @e6da6188d91eb201a4cc7ed952e827bc7d63bac9
2
+
3
+ namespace :'sencha-touch2-rails' do
4
+ JAVASCRIPTS_DIR = 'vendor/assets/javascripts/sencha-touch2-rails'
5
+ STYLESHEETS_DIR = 'vendor/assets/stylesheets/sencha-touch2-rails'
6
+
7
+ directory JAVASCRIPTS_DIR
8
+ directory STYLESHEETS_DIR
9
+
10
+ desc 'Install Sencha Touch scripts and themes'
11
+ task :install => %w(install:javascripts install:themes)
12
+
13
+
14
+ namespace :install do
15
+ task :touch_dir do
16
+ raise 'TOUCH_DIR is not set.' unless ENV.has_key?('TOUCH_DIR')
17
+ raise 'TOUCH_DIR is not a directory.' unless FileTest.directory?(File.expand_path(ENV['TOUCH_DIR']))
18
+ end
19
+
20
+ task javascripts: JAVASCRIPTS_DIR do
21
+ script_files = FileList["#{File.expand_path(ENV['TOUCH_DIR'])}/*.js"]
22
+ cp script_files, JAVASCRIPTS_DIR
23
+ end
24
+
25
+ task themes: 'stylesheets'
26
+
27
+ task stylesheets: STYLESHEETS_DIR do
28
+ compass_command_line = %w(compass compile)
29
+ compass_command_line << '--config' << File.join(File.expand_path(ENV['TOUCH_DIR']), 'resources/themes/compass_init.rb')
30
+ compass_command_line << '--sass-dir' << File.join(File.expand_path(ENV['TOUCH_DIR']), 'resources/sass')
31
+ compass_command_line << '--css-dir' << STYLESHEETS_DIR
32
+ compass_command_line << '--output-style' << 'compressed'
33
+ compass_command_line << '--load' << File.join(File.expand_path(ENV['TOUCH_DIR']), 'resources/themes')
34
+ sh *compass_command_line
35
+ end
36
+ end
37
+ end
38
+
39
+ Rake.application.tasks_in_scope(%w(sencha-touch2-rails install)).each do |t|
40
+ next if t.name == 'sencha-touch2-rails:install:touch_dir'
41
+ t.prerequisites.unshift 'sencha-touch2-rails:install:touch_dir'
42
+ end
43
+