mountain_view 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/mountain_view/component_generator.rb +21 -3
- data/lib/mountain_view/version.rb +1 -1
- data/test/dummy/log/test.log +78 -0
- data/test/generators/component_generator_test.rb +13 -0
- data/test/tmp/app/components/widget/{_widget.html.erb → _widget.html.haml} +0 -0
- data/test/tmp/app/components/widget/{widget.css → widget.coffee} +0 -0
- data/test/tmp/app/components/widget/{widget.js → widget.scss} +0 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d58f258908920f91b5f18ba52bd647029a15ee83
|
4
|
+
data.tar.gz: a77389d0a639cfd33bdb97b427a43b2ec93d8929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26f74e9e9ba17ac91b2faac4b39648186be503816205b721a55a1de054418d6abaff4028883b05fa8f21de36f78827b78883bcc70c1a49e99949b6e16cf5d910
|
7
|
+
data.tar.gz: a3db37b6d0d3cf21b85d975fd19c2125dd974c68e2567c84cff6863910d00bdcc72a75088b03da86605fdcc8c12b38ceaa67e36eb7c51719dc7f44b31d5ee004
|
@@ -9,20 +9,38 @@ module MountainView
|
|
9
9
|
desc: "Component name, e.g: header, widget"
|
10
10
|
|
11
11
|
def create_view_file
|
12
|
-
create_file "app/components/#{component}/_#{component}.html
|
12
|
+
create_file "app/components/#{component}/_#{component}.html.#{template_engine}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def create_css_file
|
16
|
-
create_file "app/components/#{component}/#{component}
|
16
|
+
create_file "app/components/#{component}/#{component}.#{stylesheet_engine}"
|
17
17
|
end
|
18
18
|
|
19
19
|
def create_js_file
|
20
|
-
create_file "app/components/#{component}/#{component}
|
20
|
+
create_file "app/components/#{component}/#{component}.#{javascript_engine}"
|
21
21
|
end
|
22
22
|
|
23
23
|
def create_stubs_file
|
24
24
|
create_file "app/components/#{component}/#{component}.yml"
|
25
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def template_engine
|
30
|
+
app_generators[:template_engine] || "erb"
|
31
|
+
end
|
32
|
+
|
33
|
+
def stylesheet_engine
|
34
|
+
app_generators[:stylesheet_engine] || "css"
|
35
|
+
end
|
36
|
+
|
37
|
+
def javascript_engine
|
38
|
+
app_generators[:javascript_engine] || "js"
|
39
|
+
end
|
40
|
+
|
41
|
+
def app_generators
|
42
|
+
Rails.application.config.generators.rails
|
43
|
+
end
|
26
44
|
end
|
27
45
|
end
|
28
46
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -1509,3 +1509,81 @@ MountainView::ComponentHelperTest: test_renders_the_proper_component
|
|
1509
1509
|
------------------------------------------------------------------
|
1510
1510
|
ComponentGeneratorTest: test_Assert_all_files_are_properly_created
|
1511
1511
|
------------------------------------------------------------------
|
1512
|
+
------------------------------------------------------------------
|
1513
|
+
ComponentGeneratorTest: test_Assert_all_files_are_properly_created
|
1514
|
+
------------------------------------------------------------------
|
1515
|
+
--------------------------------------------------------------------
|
1516
|
+
MountainView::ComponentHelperTest: test_renders_the_proper_component
|
1517
|
+
--------------------------------------------------------------------
|
1518
|
+
Rendered app/components/header/_header.html.erb (1.6ms)
|
1519
|
+
------------------------------------------------------
|
1520
|
+
MountainViewTest: test_javascripts_are_properly_served
|
1521
|
+
------------------------------------------------------
|
1522
|
+
Started GET "/assets/mountain_view.js" for 127.0.0.1 at 2015-04-14 11:15:53 -0400
|
1523
|
+
---------------------------------------
|
1524
|
+
MountainViewTest: test_engine_is_loaded
|
1525
|
+
---------------------------------------
|
1526
|
+
------------------------------------------------------
|
1527
|
+
MountainViewTest: test_stylesheets_are_properly_served
|
1528
|
+
------------------------------------------------------
|
1529
|
+
Started GET "/assets/mountain_view.css" for 127.0.0.1 at 2015-04-14 11:15:53 -0400
|
1530
|
+
------------------------------------------------------------------
|
1531
|
+
ComponentGeneratorTest: test_Assert_all_files_are_properly_created
|
1532
|
+
------------------------------------------------------------------
|
1533
|
+
--------------------------------------------------------------------
|
1534
|
+
MountainView::ComponentHelperTest: test_renders_the_proper_component
|
1535
|
+
--------------------------------------------------------------------
|
1536
|
+
Rendered app/components/header/_header.html.erb (1.5ms)
|
1537
|
+
---------------------------------------
|
1538
|
+
MountainViewTest: test_engine_is_loaded
|
1539
|
+
---------------------------------------
|
1540
|
+
------------------------------------------------------
|
1541
|
+
MountainViewTest: test_javascripts_are_properly_served
|
1542
|
+
------------------------------------------------------
|
1543
|
+
Started GET "/assets/mountain_view.js" for 127.0.0.1 at 2015-04-14 12:09:39 -0400
|
1544
|
+
------------------------------------------------------
|
1545
|
+
MountainViewTest: test_stylesheets_are_properly_served
|
1546
|
+
------------------------------------------------------
|
1547
|
+
Started GET "/assets/mountain_view.css" for 127.0.0.1 at 2015-04-14 12:09:39 -0400
|
1548
|
+
---------------------------------------
|
1549
|
+
MountainViewTest: test_engine_is_loaded
|
1550
|
+
---------------------------------------
|
1551
|
+
------------------------------------------------------
|
1552
|
+
MountainViewTest: test_stylesheets_are_properly_served
|
1553
|
+
------------------------------------------------------
|
1554
|
+
Started GET "/assets/mountain_view.css" for 127.0.0.1 at 2015-04-14 12:11:07 -0400
|
1555
|
+
------------------------------------------------------
|
1556
|
+
MountainViewTest: test_javascripts_are_properly_served
|
1557
|
+
------------------------------------------------------
|
1558
|
+
Started GET "/assets/mountain_view.js" for 127.0.0.1 at 2015-04-14 12:11:07 -0400
|
1559
|
+
------------------------------------------------------------------
|
1560
|
+
ComponentGeneratorTest: test_Assert_all_files_are_properly_created
|
1561
|
+
------------------------------------------------------------------
|
1562
|
+
--------------------------------------------------------
|
1563
|
+
ComponentGeneratorTest: test_Generates_different_engines
|
1564
|
+
--------------------------------------------------------
|
1565
|
+
--------------------------------------------------------------------
|
1566
|
+
MountainView::ComponentHelperTest: test_renders_the_proper_component
|
1567
|
+
--------------------------------------------------------------------
|
1568
|
+
Rendered app/components/header/_header.html.erb (1.2ms)
|
1569
|
+
---------------------------------------
|
1570
|
+
MountainViewTest: test_engine_is_loaded
|
1571
|
+
---------------------------------------
|
1572
|
+
------------------------------------------------------
|
1573
|
+
MountainViewTest: test_stylesheets_are_properly_served
|
1574
|
+
------------------------------------------------------
|
1575
|
+
Started GET "/assets/mountain_view.css" for 127.0.0.1 at 2015-04-14 12:11:22 -0400
|
1576
|
+
------------------------------------------------------
|
1577
|
+
MountainViewTest: test_javascripts_are_properly_served
|
1578
|
+
------------------------------------------------------
|
1579
|
+
Started GET "/assets/mountain_view.js" for 127.0.0.1 at 2015-04-14 12:11:22 -0400
|
1580
|
+
--------------------------------------------------------------------
|
1581
|
+
MountainView::ComponentHelperTest: test_renders_the_proper_component
|
1582
|
+
--------------------------------------------------------------------
|
1583
|
+
Rendered app/components/header/_header.html.erb (1.9ms)
|
1584
|
+
------------------------------------------------------------------
|
1585
|
+
ComponentGeneratorTest: test_Assert_all_files_are_properly_created
|
1586
|
+
------------------------------------------------------------------
|
1587
|
+
--------------------------------------------------------
|
1588
|
+
ComponentGeneratorTest: test_Generates_different_engines
|
1589
|
+
--------------------------------------------------------
|
@@ -14,4 +14,17 @@ class ComponentGeneratorTest < Rails::Generators::TestCase
|
|
14
14
|
assert_file "app/components/widget/widget.js"
|
15
15
|
assert_file "app/components/widget/widget.yml"
|
16
16
|
end
|
17
|
+
|
18
|
+
test "Generates different engines" do
|
19
|
+
Rails.application.config.app_generators.template_engine :haml
|
20
|
+
Rails.application.config.app_generators.stylesheet_engine :scss
|
21
|
+
Rails.application.config.app_generators.javascript_engine :coffee
|
22
|
+
|
23
|
+
run_generator %w( widget )
|
24
|
+
|
25
|
+
assert_file "app/components/widget/_widget.html.haml"
|
26
|
+
assert_file "app/components/widget/widget.scss"
|
27
|
+
assert_file "app/components/widget/widget.coffee"
|
28
|
+
assert_file "app/components/widget/widget.yml"
|
29
|
+
end
|
17
30
|
end
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mountain_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignacio Gutierrez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04-
|
12
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -119,9 +119,9 @@ files:
|
|
119
119
|
- test/helpers/mountain_view/component_helper_test.rb
|
120
120
|
- test/mountain_view_test.rb
|
121
121
|
- test/test_helper.rb
|
122
|
-
- test/tmp/app/components/widget/_widget.html.
|
123
|
-
- test/tmp/app/components/widget/widget.
|
124
|
-
- test/tmp/app/components/widget/widget.
|
122
|
+
- test/tmp/app/components/widget/_widget.html.haml
|
123
|
+
- test/tmp/app/components/widget/widget.coffee
|
124
|
+
- test/tmp/app/components/widget/widget.scss
|
125
125
|
- test/tmp/app/components/widget/widget.yml
|
126
126
|
homepage: http://github.com/jgnatch/mountain_view
|
127
127
|
licenses:
|
@@ -200,7 +200,7 @@ test_files:
|
|
200
200
|
- test/helpers/mountain_view/component_helper_test.rb
|
201
201
|
- test/mountain_view_test.rb
|
202
202
|
- test/test_helper.rb
|
203
|
-
- test/tmp/app/components/widget/_widget.html.
|
204
|
-
- test/tmp/app/components/widget/widget.
|
205
|
-
- test/tmp/app/components/widget/widget.
|
203
|
+
- test/tmp/app/components/widget/_widget.html.haml
|
204
|
+
- test/tmp/app/components/widget/widget.coffee
|
205
|
+
- test/tmp/app/components/widget/widget.scss
|
206
206
|
- test/tmp/app/components/widget/widget.yml
|