haxe-rails 0.1.3 → 0.2.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 +4 -4
- data/README.md +8 -0
- data/lib/generators/haxe/assets_generator.rb +22 -0
- data/lib/generators/haxe/templates/hxml.rb +5 -0
- data/lib/generators/haxe/templates/main.rb +6 -0
- data/lib/haxe/rails/version.rb +1 -1
- data/spec/generators/haxe/assets_generator_spec.rb +11 -0
- data/spec/haxe-rails_spec.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bc28d00db58c54c024c013f7574e223e6bc1328
|
4
|
+
data.tar.gz: 648c354e93287cfef1c229a4c4462de1982a420a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0fbea1b778502644c247e24de73fe3eb951f029b8304e5ec99a92a8c5d5ce017a4fee894715eb505d7016db8c7f4d5b16409b19b944ca3ed12d29d11b68628c
|
7
|
+
data.tar.gz: 37cbc5353832b1ecd5c228228758e2078aeef4d28efed0a2e031060a15c41c3c0924ba199f73eb398803041dc41ab697a82240d70a2fd262cded9be85361ddae
|
data/README.md
CHANGED
@@ -54,3 +54,11 @@ Rails.application.config.assets.precompile += %w( haxe_project/compile.js )
|
|
54
54
|
```
|
55
55
|
|
56
56
|
> It is necessary for the extension of hxml file to make `.js`.
|
57
|
+
|
58
|
+
## Generator
|
59
|
+
|
60
|
+
Generate empty project with:
|
61
|
+
|
62
|
+
```
|
63
|
+
rails g haxe:assets [project name]
|
64
|
+
```
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rails/generators/named_base'
|
2
|
+
|
3
|
+
module Haxe
|
4
|
+
module Generators
|
5
|
+
class AssetsGenerator < ::Rails::Generators::NamedBase
|
6
|
+
def self.source_root()
|
7
|
+
File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
8
|
+
end
|
9
|
+
|
10
|
+
def copy_haxe
|
11
|
+
project_path = File.join('app/assets/javascripts', "#{file_name}.haxe")
|
12
|
+
|
13
|
+
empty_directory File.join(project_path)
|
14
|
+
empty_directory File.join(project_path, 'src')
|
15
|
+
empty_directory File.join(project_path, 'src', file_name)
|
16
|
+
|
17
|
+
template 'main.rb', File.join(project_path, 'src', file_name, 'Main.hx')
|
18
|
+
template 'hxml.rb', File.join(project_path, "#{file_name}.hxml")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/haxe/rails/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'generators/haxe/assets_generator'
|
3
|
+
|
4
|
+
describe Haxe::Generators::AssetsGenerator do
|
5
|
+
describe 'static method' do
|
6
|
+
describe 'source_root' do
|
7
|
+
subject { Haxe::Generators::AssetsGenerator.source_root() }
|
8
|
+
it { is_expected.to match /lib\/generators\/haxe\/templates/ }
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spec/haxe-rails_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haxe-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k-motoyan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haxe-cli-proxy
|
@@ -104,6 +104,9 @@ files:
|
|
104
104
|
- MIT-LICENSE
|
105
105
|
- README.md
|
106
106
|
- Rakefile
|
107
|
+
- lib/generators/haxe/assets_generator.rb
|
108
|
+
- lib/generators/haxe/templates/hxml.rb
|
109
|
+
- lib/generators/haxe/templates/main.rb
|
107
110
|
- lib/haxe-rails.rb
|
108
111
|
- lib/haxe/rails/compiler.rb
|
109
112
|
- lib/haxe/rails/engine.rb
|
@@ -119,6 +122,7 @@ files:
|
|
119
122
|
- spec/fixtures/haxe_projects/will_compile/Main.hx
|
120
123
|
- spec/fixtures/haxe_projects/will_compile/compile.hxml
|
121
124
|
- spec/fixtures/haxe_projects/will_compile/main.js
|
125
|
+
- spec/generators/haxe/assets_generator_spec.rb
|
122
126
|
- spec/haxe-rails_spec.rb
|
123
127
|
- spec/haxe/rails/compiler_spec.rb
|
124
128
|
- spec/haxe/rails/template_spec.rb
|
@@ -143,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
147
|
version: '0'
|
144
148
|
requirements: []
|
145
149
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.4.5
|
150
|
+
rubygems_version: 2.4.5.1
|
147
151
|
signing_key:
|
148
152
|
specification_version: 4
|
149
153
|
summary: Haxe adapter for the Rails asset pipeline.
|
@@ -156,6 +160,7 @@ test_files:
|
|
156
160
|
- spec/fixtures/haxe_projects/will_compile/compile.hxml
|
157
161
|
- spec/fixtures/haxe_projects/will_compile/Main.hx
|
158
162
|
- spec/fixtures/haxe_projects/will_compile/main.js
|
163
|
+
- spec/generators/haxe/assets_generator_spec.rb
|
159
164
|
- spec/haxe/rails/compiler_spec.rb
|
160
165
|
- spec/haxe/rails/template_spec.rb
|
161
166
|
- spec/haxe-rails_spec.rb
|