inesita 0.7.0 → 0.8.1

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
  SHA256:
3
- metadata.gz: 593839c5dcafc20d97673e15a3cbb50e55d6fe65a6175265a5189783823fa6cd
4
- data.tar.gz: 970ff04862576b05a37e4d0d74ae19e8188c667f709a1b23809ef892ff99a8c8
3
+ metadata.gz: 6a612568f59392de67e706c41d61e7320b5f60ac894da8618b28b368e029a6a6
4
+ data.tar.gz: 901d38803661101d455962a1a5d7c9838c9bcdf6b31068f0569b637a655f226c
5
5
  SHA512:
6
- metadata.gz: 1297ed999cb39b0dd188507d1b8f94ad9345aa8116ad44a03f4a18386418efc149cd5a7bc9e5fcc39176d9f74535439d62701a5cb75a2088e3e905851ca7bc90
7
- data.tar.gz: 5081aebace29915edf37c7ee4f06c3cd5b638b6f8bb03bcc91278508e25316c88db05010d582deb6653d07f4474aa7b371e3ab3f5bcbc1ce8cad0d630388f4b0
6
+ metadata.gz: ab0ef641a0ead59a453db7d6f1abc4eda97a0ab90aa573ca5c3794ce02433d7a4d3920383c8eb802bcbf1babe1ff1d578e5bb7225eb4eb738989bb9731973582
7
+ data.tar.gz: 66b5cae8ffceab6fb4eb394bb77cc05468c0b12210e4bd342dc6943837d048af2aaff2d07a4314cf2fa9fbc60366331ab9f8935c6074b503c68e865870a52a62
@@ -1,4 +1,10 @@
1
- ## [0.7.0] -
1
+ ## [0.8.1] - 17.08.2018
2
+
3
+ ### Changed
4
+ - sprockets setup moved from `config.ru` into `.sprockets.rb` file
5
+
6
+
7
+ ## [0.7.0] - 22.02.2018
2
8
 
3
9
  ### Fixes
4
10
  - `thor` warrnings
data/README.md CHANGED
@@ -11,3 +11,7 @@ More detailed description [here](https://inesita.fazibear.me).
11
11
  ## Examples
12
12
 
13
13
  For list of examples go [here](https://github.com/inesita-rb/awesome-inesita)
14
+
15
+ ## Thank you!
16
+
17
+ [![Become Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=6912974)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'inesita'
3
- s.version = '0.7.0'
3
+ s.version = '0.8.1'
4
4
  s.authors = ['Michał Kalbarczyk']
5
5
  s.email = 'fazibear@gmail.com'
6
6
  s.homepage = 'http://github.com/inesita-rb/inesita'
@@ -0,0 +1,7 @@
1
+ # setup sprockets
2
+
3
+ sprockets.register_engine(
4
+ '.slim',
5
+ Slim::Template,
6
+ silence_deprecation: true
7
+ )
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  # inesita gems
4
- gem 'inesita', '~> 0.7.0'
4
+ gem 'inesita', '~> 0.8.0'
5
5
  gem 'inesita-livereload', '~> 0.1.0'
6
6
  gem 'inesita-router', '~> 0.2.0'
7
7
 
@@ -2,17 +2,8 @@
2
2
  require 'bundler'
3
3
  Bundler.require
4
4
 
5
- # setup slim templates
6
- def setup(sprockets)
7
- sprockets.register_engine(
8
- '.slim',
9
- Slim::Template,
10
- silence_deprecation: true
11
- )
12
- end
13
-
14
5
  # you can comment this line to disable live-reload
15
6
  use Inesita::LiveReload
16
7
 
17
8
  # run inesita server
18
- run Inesita::Server.new(setup_sprockets: method(:setup))
9
+ run Inesita::Server.new()
@@ -11,9 +11,9 @@ module Inesita
11
11
  attr_reader :assets_app
12
12
 
13
13
  def initialize(opts = {})
14
- @setup_sprockets = opts.delete(:setup_sprockets)
15
14
  setup_dirs(opts)
16
15
  setup_env(opts)
16
+ @setup_sprockets = opts.delete(:setup_sprockets) || './.sprockets.rb'
17
17
  @assets_app = create_assets_app
18
18
  @source_maps_app = create_source_maps_app
19
19
  @app = create_app
@@ -82,10 +82,14 @@ module Inesita
82
82
  include SprocketsContext
83
83
  end
84
84
 
85
- @setup_sprockets.call(s.sprockets) if @setup_sprockets
85
+ setup_sprockets(@setup_sprockets, s.sprockets)
86
86
  end.sprockets
87
87
  end
88
88
 
89
+ def setup_sprockets(dir, sprockets)
90
+ self.instance_eval(File.read(dir)) if File.exists?(dir)
91
+ end
92
+
89
93
  def create_source_maps_app
90
94
  ::Opal::Sprockets::SourceMapHeaderPatch.inject!(Config::SOURCE_MAP_PREFIX)
91
95
  Opal::SourceMapServer.new(@assets_app, Config::SOURCE_MAP_PREFIX)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inesita
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Kalbarczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-22 00:00:00.000000000 Z
11
+ date: 2018-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -178,6 +178,7 @@ files:
178
178
  - lib/inesita/cli/new.rb
179
179
  - lib/inesita/cli/server.rb
180
180
  - lib/inesita/cli/template/.gitignore.tt
181
+ - lib/inesita/cli/template/.sprockets.rb.tt
181
182
  - lib/inesita/cli/template/Gemfile.tt
182
183
  - lib/inesita/cli/template/README.md.tt
183
184
  - lib/inesita/cli/template/app/application.rb.tt