fronton 0.2.1 → 0.3.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/lib/fronton/cli.rb +7 -1
- data/lib/fronton/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8c91394908a4f20e90e8c257a5b26072bc1f547
|
|
4
|
+
data.tar.gz: 1a04c819b80d78702d67fd5b79195105467aa6d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 848900d19a40c9cc50609cf954aaf1871ce2ee3ddf7600190afc5f72527b4ae4fb4c8d8a4cc44530ee38c4d4da3e46ce855bf840c529d42767e4196c5719d882
|
|
7
|
+
data.tar.gz: ef8c1a3bebbc35b8b9e2b84cec6c0c1f2b0eb75405a743d023da4a7a64217dfc54198c06f83143c5dd6b1fefa7f1cb31e9e7a367194883033615aeb98e931d94
|
data/lib/fronton/cli.rb
CHANGED
|
@@ -38,7 +38,8 @@ module Fronton
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
desc 'server', 'Preview your app in browser'
|
|
41
|
-
method_option :
|
|
41
|
+
method_option :host, type: :string, default: '127.0.0.1', banner: 'HOST the host address to bind to'
|
|
42
|
+
method_option :port, type: :numeric, default: 3000, banner: 'PORT the port to bind to'
|
|
42
43
|
def server # rubocop:disable Metrics/AbcSize
|
|
43
44
|
# install dependencies for rails assets
|
|
44
45
|
config.install_dependencies
|
|
@@ -51,10 +52,12 @@ module Fronton
|
|
|
51
52
|
def asset_path(path, _options = {})
|
|
52
53
|
"/assets/#{path}"
|
|
53
54
|
end
|
|
55
|
+
alias_method :'asset-path', :asset_path
|
|
54
56
|
|
|
55
57
|
def asset_url(path, _options = {})
|
|
56
58
|
"url(#{asset_path(path)})"
|
|
57
59
|
end
|
|
60
|
+
alias_method :'asset-url', :asset_url
|
|
58
61
|
end
|
|
59
62
|
|
|
60
63
|
conf = config
|
|
@@ -67,6 +70,7 @@ module Fronton
|
|
|
67
70
|
Rack::Server.start(
|
|
68
71
|
app: app,
|
|
69
72
|
environment: 'development',
|
|
73
|
+
Host: options[:host],
|
|
70
74
|
Port: options[:port]
|
|
71
75
|
)
|
|
72
76
|
end
|
|
@@ -98,10 +102,12 @@ module Fronton
|
|
|
98
102
|
path = self.class.superclass.fronton_config.manifest.assets[path]
|
|
99
103
|
"#{self.class.superclass.fronton_config.assets_url}/#{path}"
|
|
100
104
|
end
|
|
105
|
+
alias_method :'asset-path', :asset_path
|
|
101
106
|
|
|
102
107
|
def asset_url(path, _options = {})
|
|
103
108
|
"url(#{asset_path(path)})"
|
|
104
109
|
end
|
|
110
|
+
alias_method :'asset-url', :asset_url
|
|
105
111
|
end
|
|
106
112
|
|
|
107
113
|
config.environment.context_class.fronton_config = config
|
data/lib/fronton/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fronton
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Javier Aranda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|