fronton 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf06971bb8ab38302025de3aa89e2083f2602181
4
- data.tar.gz: 97708f5a928378aa2d5c694b0e70118dc070f95c
3
+ metadata.gz: d8c91394908a4f20e90e8c257a5b26072bc1f547
4
+ data.tar.gz: 1a04c819b80d78702d67fd5b79195105467aa6d0
5
5
  SHA512:
6
- metadata.gz: ecc654ae6b9c2a432b663c639263d85daf43a6e491df59cf2bb0dbf4a86e1fea61ffff6012d485e476c0f1bff54d2fd3115f74a39be49538d03c61305baeda98
7
- data.tar.gz: 84d4a825ae4c83cae74d54622eb9d0a7dd4311221a693bf749adb21cca8a3f8ae9f198ac7bf46fe74839a14bebd958d6a23f96612fe0d73798c515448de82160
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 :port, type: :numeric, default: 3000, banner: 'PORT the server listen port'
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
@@ -1,8 +1,8 @@
1
1
  module Fronton
2
2
  module VERSION
3
3
  MAJOR = 0
4
- MINOR = 2
5
- TINY = 1
4
+ MINOR = 3
5
+ TINY = 0
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
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.2.1
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-21 00:00:00.000000000 Z
11
+ date: 2016-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor