x_files 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: de567b725ae8696b3fc63d11950f61169545a25a
4
+ data.tar.gz: 718b6d831362c6377d6dc39ee57b194222cd5ebe
5
+ SHA512:
6
+ metadata.gz: a7c08c0a3b4b81320c52224186d405d063ef540a485b56b08f35972fffcfe977d8654b98fa22e0d5a9028ca0bc67dbd88382f0a4a488c178dcd4174daf98c0a8
7
+ data.tar.gz: 57bd3a64511b6280bc3a3fa061e2e3b30a596cf05ab19db6ca16ecea643f196b6305f5378ddc8f275026b1a0f516060a5d7d54ec9d48ede96e815879373ae87f
data/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # x_files
2
+
3
+ Filter RubyMotion files from compilation based on file extension.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'x_files'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install x_files
18
+
19
+
20
+ ## Usage
21
+
22
+ Only install the gem.
@@ -0,0 +1,30 @@
1
+ unless defined?(Motion::Project::Config)
2
+ fail('This file must be required within a RubyMotion project Rakefile.')
3
+ end
4
+
5
+ module Motion::Project
6
+ class Config
7
+ variable :x_files
8
+
9
+ def x_files(&block)
10
+ @x_files ||= Motion::Project::XFiles.new(self)
11
+ end
12
+ end
13
+
14
+ class XFiles
15
+ SUPPORTED_TEMPLATES = [:ios, :android, :osx]
16
+
17
+ def initialize(config)
18
+ @config = config
19
+ @excluded_platforms = (SUPPORTED_TEMPLATES - [@config.template]).map(&:to_s)
20
+ end
21
+
22
+ def filter!
23
+ @config.files.each do |file|
24
+ if @excluded_platforms.any? { |excluded| file.end_with?(".#{excluded}.rb") }
25
+ @config.files.delete(file)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/x_files.rb ADDED
@@ -0,0 +1,5 @@
1
+ require_relative 'project/x_files'
2
+
3
+ Motion::Project::App.setup do |app|
4
+ app.x_files.filter!
5
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: x_files
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Joffrey JAFFEUX
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
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
+ description: Filter RubyMotion files from compilation based on file extension
28
+ email:
29
+ - j.jaffeux@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - README.md
35
+ - lib/project/x_files.rb
36
+ - lib/x_files.rb
37
+ homepage: ''
38
+ licenses:
39
+ - MIT
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubyforge_project:
57
+ rubygems_version: 2.4.5
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: Filter RubyMotion files from compilation based on file extension
61
+ test_files: []
62
+ has_rdoc: