rails_view_component 0.0.4 → 0.0.5
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/lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb +1 -1
- data/lib/generators/rails_view_component/install_generator.rb +7 -4
- data/lib/generators/rails_view_component/rails_view_component_generator.rb +3 -3
- data/lib/rails_view_component/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abb27a87197e92c1ae57eeae4da0d052f1fd8131
|
4
|
+
data.tar.gz: 32e3aa3a6ff56a5feaa32506d67e0c13e4701e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dd3fcb552e5ab1da54c3078135c5b1ea0b602576e9dbd6c7e62c5ee341bda1ad043869afd5a94f2e8557693d2cc3b36228689a4631529ad16b1b832f3b2de08
|
7
|
+
data.tar.gz: ebc8610bfb432dabd11a5fdbb97cdf2ba26927414b525cae37d8f4939ea4a4cf2890cd19de996afffedb0161eb961801ee7c3dd18339e82ec8de20481bee0919
|
@@ -2,7 +2,7 @@ import jQuery.*;
|
|
2
2
|
|
3
3
|
class <%= @class_name %>ViewComponent extends RailsViewComponent {
|
4
4
|
public static function eachComponent(klass:String,
|
5
|
-
f:
|
5
|
+
f:RailsViewComponent->String->JQuery->Dynamic->Void){
|
6
6
|
var dom = new JQuery("."+klass+"_view_component");
|
7
7
|
dom.each(function(i,e){
|
8
8
|
var d = new JQuery(e);
|
@@ -5,14 +5,17 @@ module RailsViewComponent
|
|
5
5
|
source_root File.expand_path('../templates', __FILE__)
|
6
6
|
def copy
|
7
7
|
{
|
8
|
-
"rails_view_component_builder.rb" => "lib",
|
9
|
-
"rails_view_component_helper.rb" => "lib",
|
10
|
-
"rails_view_component_model.rb" => "lib",
|
11
|
-
"RailsViewComponent.hx" =>
|
8
|
+
"rails_view_component_builder.rb" => "lib/rails_view_component",
|
9
|
+
"rails_view_component_helper.rb" => "lib/rails_view_component",
|
10
|
+
"rails_view_component_model.rb" => "lib/rails_view_component",
|
11
|
+
"RailsViewComponent.hx" =>
|
12
|
+
"lib/rails_view_component/haxe",
|
12
13
|
"haxe_compile.hxml" => "./",
|
13
14
|
}.each{|file,dir|
|
14
15
|
copy_file file, "#{dir}/#{file}"
|
15
16
|
}
|
17
|
+
`mkdir public/javascripts`
|
18
|
+
`mkdir public/stylesheets`
|
16
19
|
end
|
17
20
|
|
18
21
|
end
|
@@ -11,7 +11,7 @@ module RailsViewComponent
|
|
11
11
|
copy_and_compile = ->(from, to){
|
12
12
|
root = File.expand_path("../", __FILE__)
|
13
13
|
erb = ERB.new(open("#{root}/erb/#{from}").read)
|
14
|
-
@class_name = class_name
|
14
|
+
@class_name = class_name.split("::").last
|
15
15
|
@file_name = file_name
|
16
16
|
@args = args
|
17
17
|
create_file "app/rails_view_components/#{file_name}/#{to}",
|
@@ -24,9 +24,9 @@ module RailsViewComponent
|
|
24
24
|
copy_and_compile.call("views/rails_view_component.html.erb.erb",
|
25
25
|
"views/#{file_name}_view_component.html.erb")
|
26
26
|
copy_and_compile.call("haxe/RailsViewComponent.hx.erb",
|
27
|
-
"haxe/#{class_name}ViewComponent.hx")
|
27
|
+
"haxe/#{@class_name}ViewComponent.hx")
|
28
28
|
|
29
|
-
route "#{class_name}::Routes.routings"
|
29
|
+
route "#{@class_name}::Routes.routings"
|
30
30
|
|
31
31
|
inject_into_file "haxe_compile.hxml",
|
32
32
|
after: "## RailsViewComponent JavaScripts\n" do <<RUBY
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_view_component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi Kojima
|
@@ -14,14 +14,14 @@ dependencies:
|
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.2.0
|
27
27
|
description: Description of RailsViewComponent.
|
@@ -31,10 +31,6 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- MIT-LICENSE
|
35
|
-
- README.rdoc
|
36
|
-
- Rakefile
|
37
|
-
- lib/generators/rails_view_component/USAGE
|
38
34
|
- lib/generators/rails_view_component/erb/controller.rb.erb
|
39
35
|
- lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb
|
40
36
|
- lib/generators/rails_view_component/erb/model.rb.erb
|
@@ -42,21 +38,23 @@ files:
|
|
42
38
|
- lib/generators/rails_view_component/erb/views/rails_view_component.html.erb.erb
|
43
39
|
- lib/generators/rails_view_component/install_generator.rb
|
44
40
|
- lib/generators/rails_view_component/rails_view_component_generator.rb
|
45
|
-
- lib/generators/rails_view_component/templates/RailsViewComponent.hx
|
46
41
|
- lib/generators/rails_view_component/templates/haxe_compile.hxml
|
47
42
|
- lib/generators/rails_view_component/templates/rails_view_component_builder.rb
|
48
43
|
- lib/generators/rails_view_component/templates/rails_view_component_helper.rb
|
49
44
|
- lib/generators/rails_view_component/templates/rails_view_component_model.rb
|
50
|
-
- lib/rails_view_component.
|
45
|
+
- lib/generators/rails_view_component/templates/RailsViewComponent.hx
|
46
|
+
- lib/generators/rails_view_component/USAGE
|
51
47
|
- lib/rails_view_component/engine.rb
|
52
48
|
- lib/rails_view_component/haxe/RailsViewComponent.hx
|
53
49
|
- lib/rails_view_component/rails_view_component_builder.rb
|
54
50
|
- lib/rails_view_component/rails_view_component_helper.rb
|
55
51
|
- lib/rails_view_component/rails_view_component_model.rb
|
56
52
|
- lib/rails_view_component/version.rb
|
53
|
+
- lib/rails_view_component.rb
|
57
54
|
- lib/tasks/rails_view_component_tasks.rake
|
58
|
-
-
|
59
|
-
-
|
55
|
+
- MIT-LICENSE
|
56
|
+
- Rakefile
|
57
|
+
- README.rdoc
|
60
58
|
- test/dummy/app/assets/javascripts/application.js
|
61
59
|
- test/dummy/app/assets/stylesheets/application.css
|
62
60
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -66,7 +64,6 @@ files:
|
|
66
64
|
- test/dummy/bin/rails
|
67
65
|
- test/dummy/bin/rake
|
68
66
|
- test/dummy/bin/setup
|
69
|
-
- test/dummy/config.ru
|
70
67
|
- test/dummy/config/application.rb
|
71
68
|
- test/dummy/config/boot.rb
|
72
69
|
- test/dummy/config/database.yml
|
@@ -85,12 +82,15 @@ files:
|
|
85
82
|
- test/dummy/config/locales/en.yml
|
86
83
|
- test/dummy/config/routes.rb
|
87
84
|
- test/dummy/config/secrets.yml
|
85
|
+
- test/dummy/config.ru
|
88
86
|
- test/dummy/db/test.sqlite3
|
89
87
|
- test/dummy/log/test.log
|
90
88
|
- test/dummy/public/404.html
|
91
89
|
- test/dummy/public/422.html
|
92
90
|
- test/dummy/public/500.html
|
93
91
|
- test/dummy/public/favicon.ico
|
92
|
+
- test/dummy/Rakefile
|
93
|
+
- test/dummy/README.rdoc
|
94
94
|
- test/rails_view_component_test.rb
|
95
95
|
- test/test_helper.rb
|
96
96
|
homepage: http://tatkeshi.jp
|
@@ -103,17 +103,17 @@ require_paths:
|
|
103
103
|
- lib
|
104
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - '>='
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- -
|
111
|
+
- - '>='
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.0.14
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Summary of RailsViewComponent.
|