catalyst-rails 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f4062e6e325a8a191e435eb75e272cb7746c863ad9d75f1b6d274f5d41a5433
4
- data.tar.gz: 34c8cd4232f14da1d9c06af6c70e6cc363f7c5d20b3a1b151766156a9b18f15e
3
+ metadata.gz: 0f70b95bd1dee4a92256303ca05c47fc164280b7ad2c543dd344834c8477801a
4
+ data.tar.gz: f2c0e66eeeaf95ebe7b6ec7b29aa6254b4cd6999851e627606316ddaaa4a5e77
5
5
  SHA512:
6
- metadata.gz: a5f6edf6124e90a195fcb36e08548b3c5e04d368ea4f9550a0671903eec576e0011cac87275c392b7a85049fd9f722bdcbb370e56ae7306030dc98c378fa2cca
7
- data.tar.gz: 9a75fb0d529bdeb052f7eabf7ac9d17fbceb2d83ba5c1a41d30a3d4b98eb6724e8bc6fb354e00b344b7a17e16cac4710bf26201728ca33a0a93c9f000c79660c
6
+ metadata.gz: 3c96dccaffd33ea151d1ca550200a583d1f2f2c072a374742f079bb146907e329ae70bba64fbce5b3ffe4022793778e1b7b2656658b5b89ef56de884c2c75c51
7
+ data.tar.gz: 664bd6ed7dcd43eda14c526e152d87fe771a7a0305fd30ff0c683384b9dcf7b5ee3d3e02fb498a2b0042f6e0022d6a442a43e14937753619c7348cb965385b44
@@ -9,7 +9,7 @@ module Catalyst
9
9
 
10
10
  def catalyst_javascript_vendor_include_tag
11
11
  if Catalyst.development?
12
- content_tag(:script, nil, src: ::Catalyst::Manifest['vendor-dll.js'])
12
+ catalyst_javascript_include_tag('vendor-dll')
13
13
  end
14
14
  end
15
15
 
@@ -19,8 +19,9 @@ module Catalyst
19
19
  content_tag(
20
20
  :script,
21
21
  nil,
22
- src: ::Catalyst::Manifest["#{path}.js"],
23
- type: 'text/javascript'
22
+ type: 'text/javascript',
23
+ crossorigin: 'anonymous',
24
+ src: ::Catalyst::Manifest["#{path}.js"]
24
25
  )
25
26
  end
26
27
 
@@ -2,7 +2,7 @@ namespace :catalyst do
2
2
  desc 'Build assets with Catalyst'
3
3
  task :build do
4
4
  if File.exists?('./public/assets/manifest.json')
5
- puts "[Catalyst] Removing previous assets..."
5
+ Catalyst.log('Removing previous assets...')
6
6
 
7
7
  manifest = JSON.parse(File.read('./public/assets/manifest.json'))
8
8
 
@@ -11,11 +11,11 @@ namespace :catalyst do
11
11
  end
12
12
  end
13
13
 
14
- puts "[Catalyst] Compiling assets..."
14
+ Catalyst.log('Compiling assets...')
15
15
  Catalyst.build!
16
16
 
17
17
  if Catalyst.production?
18
- puts "[Catalyst] Removing 'node_modules' directory..."
18
+ Catalyst.log('Removing \'node_modules\' directory...')
19
19
  system 'rm -rf ./node_modules'
20
20
  end
21
21
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Catalyst
4
+ def self.version
5
+ Gem::Version.new('0.0.2')
6
+ end
7
+ end
@@ -29,7 +29,7 @@ module Catalyst
29
29
 
30
30
  def self.log(message, level = :info)
31
31
  message = message.split("\n").reduce('') do |reduction, line|
32
- reduction + "\e[31m[Catalyst]\e[0m #{line}\n"
32
+ reduction + "\e[35m[Catalyst]\e[0m #{line}\n"
33
33
  end
34
34
 
35
35
  puts message
@@ -104,6 +104,7 @@ module Catalyst
104
104
  end
105
105
  end
106
106
 
107
+ require_relative './catalyst/version'
107
108
  require_relative './catalyst/errors'
108
109
  require_relative './catalyst/builder'
109
110
  require_relative './catalyst/helpers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catalyst-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Martens
@@ -58,6 +58,7 @@ files:
58
58
  - lib/catalyst/manifest.rb
59
59
  - lib/catalyst/railtie.rb
60
60
  - lib/catalyst/tasks/build.rake
61
+ - lib/catalyst/version.rb
61
62
  homepage: http://rubygems.org/gems/catalyst-rails
62
63
  licenses:
63
64
  - MIT